CN100586184C - Infra-frame prediction method - Google Patents

Infra-frame prediction method Download PDF

Info

Publication number
CN100586184C
CN100586184C CN 200810056776 CN200810056776A CN100586184C CN 100586184 C CN100586184 C CN 100586184C CN 200810056776 CN200810056776 CN 200810056776 CN 200810056776 A CN200810056776 A CN 200810056776A CN 100586184 C CN100586184 C CN 100586184C
Authority
CN
China
Prior art keywords
prediction mode
prediction
block
energy
current block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 200810056776
Other languages
Chinese (zh)
Other versions
CN101222635A (en
Inventor
尹宝才
施云惠
冯会晓
孙艳丰
李敬华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN 200810056776 priority Critical patent/CN100586184C/en
Publication of CN101222635A publication Critical patent/CN101222635A/en
Application granted granted Critical
Publication of CN100586184C publication Critical patent/CN100586184C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明涉及一种帧内预测方法。该帧内预测方法包括选取一个待预测的4×4像素亮度块作为当前块;判断所述当前块是否为中心块,若是,计算所有预测模式下所述当前块的预测块和所述当前块的残差的能量函数,并根据不同预测模式下的能量函数确定候选预测模式,否则,将可用的预测模式作为候选预测模式;计算候选预测模式的率失真代价参数,选取率失真代价参数最小的候选预测模式为所述当前块的最优预测模式。本发明根据残差能量函数确定候选预测模式,通过计算候选预测模式的率失真代价参数确定最优预测模式,达到减少需要计算率失真代价参数的预测模式的数量,进而减小计算量的目的。

Figure 200810056776

The invention relates to an intra-frame prediction method. The intra-frame prediction method includes selecting a 4×4 pixel brightness block to be predicted as a current block; judging whether the current block is a central block, and if so, calculating the prediction block and the current block of the current block in all prediction modes The energy function of the residual, and determine the candidate prediction mode according to the energy function in different prediction modes, otherwise, use the available prediction mode as the candidate prediction mode; calculate the rate-distortion cost parameter of the candidate prediction mode, and select the smallest rate-distortion cost parameter The candidate prediction mode is the optimal prediction mode of the current block. The present invention determines the candidate prediction mode according to the residual energy function, and determines the optimal prediction mode by calculating the rate-distortion cost parameter of the candidate prediction mode, so as to reduce the number of prediction modes that need to calculate the rate-distortion cost parameter, thereby reducing the calculation amount.

Figure 200810056776

Description

帧内预测方法 Intra Prediction Method

技术领域 technical field

本发明涉及一种帧内预测方法,尤其是一种能够有效提高运算速度的帧内预测方法。The present invention relates to an intra-frame prediction method, in particular to an intra-frame prediction method capable of effectively improving operation speed.

背景技术 Background technique

新一代视频编码标准H.264/AVC具有良好的网络性能,适用于交互和非交互应用环境,自发布以来就受到很大的关注,其显著的优点是压缩效率高。图1示出了H.264/AVC标准的编码器框架图,其工作过程可根据数据流方向分为前向通道和重建通道。当前帧Fn的编码,是对原始图像16×16像素的宏块进行编码,宏块编码分为帧内编码和帧间编码,在帧内编码和帧间编码时,预测宏块P都由重建帧获得。在帧内编码模式中,P由当前帧中的已编码宏块经解码、重构,由重构宏块uF′n预测得到,在帧间编码模式下,P由一个或多个参考帧F′n-1经运动补偿预测得到。预测宏块P与当前宏块Fn的差值为残差宏块Dn,Dn经变换、量化后得到一串变换参数X,参数X需要进行两方面的处理:一是重排序和熵编码处理,整个过程没有反馈分量,故称为前向通道;二是反量化和逆变换处理,产生宏块D′n,D′n与预测宏块P相加得到重构宏块uF′n,重构宏块uF′n再经过一系列处理得到重建的参考帧F′n,用于下一帧的运动估计,因此称为重建通道。H.264/AVC性能的提高与其采用的一些新技术密不可分,如采用基于空间域的帧内预测方法、变换采用整数离散余弦变换(Discrete Cosine Transform,以下简称DCT)、运动估计/运动补偿基于4×4像素块、重建通道采用环路滤波、新的熵编码方法等。The new-generation video coding standard H.264/AVC has good network performance and is suitable for interactive and non-interactive application environments. It has received great attention since its release, and its notable advantage is high compression efficiency. Figure 1 shows the frame diagram of the encoder of the H.264/AVC standard, and its working process can be divided into a forward channel and a reconstruction channel according to the data flow direction. The encoding of the current frame F n is to encode the macroblock of 16×16 pixels in the original image. The macroblock encoding is divided into intra-frame coding and inter-frame coding. In intra-frame coding and inter-frame coding, the predicted macroblock P is composed of The reconstructed frame is obtained. In the intra-frame coding mode, P is decoded and reconstructed from the coded macroblock in the current frame, and predicted from the reconstructed macroblock uF'n ; in the inter-frame coding mode, P is obtained by one or more reference frames F ' n-1 is obtained by motion compensation prediction. The difference between the predicted macroblock P and the current macroblock F n is the residual macroblock D n , and D n is transformed and quantized to obtain a series of transformation parameters X. The parameters X need to be processed in two aspects: one is reordering and entropy Coding processing, the whole process has no feedback component, so it is called the forward channel; the second is inverse quantization and inverse transformation processing, generating macroblock D' n , D' n is added to predicted macroblock P to obtain reconstructed macroblock uF'n , the reconstructed macroblock uF'n undergoes a series of processing to obtain a reconstructed reference frame F'n , which is used for motion estimation of the next frame, so it is called a reconstruction channel. The improvement of H.264/AVC performance is inseparable from some new technologies adopted, such as the use of intra-frame prediction method based on space domain, integer discrete cosine transform (Discrete Cosine Transform, hereinafter referred to as DCT) for transformation, motion estimation/motion compensation based on 4×4 pixel block, reconstruction channel adopts loop filter, new entropy coding method, etc.

其中基于空间域的帧内预测是H.264/AVC性能提高的重要因素,帧内预测利用图像的空间相关性,根据已解码重构的相邻像素块的信息预测当前块的信息,得到当前块的预测块,然后对当前块和当前块的预测块的残差进行变换、量化、编码,为了较好地表示当前块,H.264/AVC采用率失真最优化(RateDistortion Optization,以下简称RDO)技术来最优化编码质量和最小化编码位。Among them, the intra prediction based on the space domain is an important factor for the performance improvement of H.264/AVC. The intra prediction uses the spatial correlation of the image to predict the information of the current block according to the information of the decoded and reconstructed adjacent pixel blocks, and obtains the current The prediction block of the current block, and then transform, quantize, and encode the residual of the current block and the prediction block of the current block. In order to better represent the current block, H.264/AVC uses Rate Distortion Optimization (Rate Distortion Optimization, hereinafter referred to as RDO ) techniques to optimize encoding quality and minimize encoding bits.

H.264/AVC标准中以16×16像素的宏块为单位,一个宏块包括一个亮度块和两个对应的色度块,其中亮度块为1个16×16的或者16个4×4的,色度块为8×8的。In the H.264/AVC standard, a 16×16 pixel macroblock is used as a unit. A macroblock includes a luma block and two corresponding chrominance blocks, where the luma block is one 16×16 or 16 4×4 , the chroma block is 8×8.

对于4×4的亮度块,帧内预测有9种预测模式,这些预测模式为:For a 4×4 luma block, there are 9 prediction modes for intra prediction, and these prediction modes are:

模式0:垂直预测(vertical prediction)模式Mode 0: Vertical prediction mode

模式1:水平预测(horizontal prediction)模式Mode 1: Horizontal prediction mode

模式2:DC预测(DC prediction)模式Mode 2: DC prediction mode

模式3:45度方向预测(diagonal down/left prediction)模式Mode 3: 45-degree direction prediction (diagonal down/left prediction) mode

模式4:135度方向预测(diagonal down/right prediction)模式Mode 4: 135-degree direction prediction (diagonal down/right prediction) mode

模式5:112.5度方向预测(vertical-right prediction)模式Mode 5: 112.5-degree direction prediction (vertical-right prediction) mode

模式6:157.5度方向预测(horizontal-down prediction)模式Mode 6: 157.5 degree direction prediction (horizontal-down prediction) mode

模式7:67.5度方向预测(vertical-left prediction)模式Mode 7: 67.5-degree direction prediction (vertical-left prediction) mode

模式8:22.5度方向预测(horizontal-up prediction)模式Mode 8: 22.5 degree direction prediction (horizontal-up prediction) mode

其中,除了DC预测模式,剩余的8种预测模式称为方向预测模式,图2示出了参考像素和待预测的当前块像素的关系图,其中大写字母表示的为参考像素,小写字母表示的是当前块像素。图3中的数字标明了各个方向预测模式的指向。Among them, in addition to the DC prediction mode, the remaining 8 prediction modes are called directional prediction modes. Figure 2 shows the relationship between the reference pixel and the current block pixel to be predicted, where capital letters represent reference pixels, and small letters represent is the current block pixel. The numbers in Fig. 3 indicate the directions of the prediction modes in each direction.

对于16×16的亮度块,帧内预测有4种预测模式,这些预测模式为:For a 16×16 luma block, there are 4 prediction modes for intra prediction, these prediction modes are:

垂直预测(vertical prediction)模式vertical prediction mode

水平预测(horizontal prediction)模式Horizontal prediction mode

DC预测(DC prediction)模式DC prediction mode

平板预测(plane prediction)模式Plane prediction mode

对于8×8的色度块,帧内预测有4种预测模式,这些预测模式为:For 8×8 chrominance blocks, there are 4 prediction modes for intra prediction, these prediction modes are:

DC预测(DC prediction)模式DC prediction mode

水平预测(horizontal prediction)模式Horizontal prediction mode

垂直预测(vertical prediction)模式vertical prediction mode

平板预测(plane prediction)模式Plane prediction mode

从上述的分析可以看出:如果M8表示色度块的预测模式的数量、M4表示4×4亮度块的预测模式的数量、M16表示16×16亮度块的预测模式的数量,一个宏块中亮度块和色度块预测模式的组合数量为M8×(M4×16+M16)=592,即,为了确定一个宏块的帧内预测的最优模式,编码器需要进行592次RDO的计算。因此,H.264/AVC压缩率的提高是以计算复杂度的增加为代价的,难以实时应用。From the above analysis, it can be seen that if M8 represents the number of prediction modes for chrominance blocks, M4 represents the number of prediction modes for 4×4 luma blocks, and M16 represents the number of prediction modes for 16×16 luma blocks, in one macroblock The number of combinations of luma block and chrominance block prediction modes is M8×(M4×16+M16)=592, that is, in order to determine the optimal mode of intra prediction of a macroblock, the encoder needs to perform 592 RDO calculations. Therefore, the improvement of H.264/AVC compression rate is at the cost of increased computational complexity, which is difficult to apply in real time.

发明内容 Contents of the invention

本发明的目的是针对现有技术的缺陷,提供一种帧内预测方法,用以解决现有帧内预测方法计算复杂度高的问题,提高帧内预测编码的速度,有利于编码器的实时应用。The purpose of the present invention is to provide an intra-frame prediction method for the defects of the prior art, to solve the problem of high computational complexity of the existing intra-frame prediction method, improve the speed of intra-frame prediction encoding, and facilitate the real-time application.

本发明通过实施例提供了如下的技术方案:The present invention provides following technical scheme through embodiment:

一种帧内预测方法,包括:A method of intra-frame prediction, comprising:

步骤1:选取一个待预测的4×4像素亮度块作为当前块;Step 1: Select a 4×4 pixel brightness block to be predicted as the current block;

步骤2:判断所述当前块是否为中心块,若是,执行步骤3,否则,执行步骤4;Step 2: Determine whether the current block is the central block, if so, perform step 3, otherwise, perform step 4;

步骤3:计算所有预测模式下所述当前块的预测块和所述当前块的残差的能量函数,并根据不同预测模式下的能量函数确定候选预测模式,执行步骤5;Step 3: Calculate the energy function of the prediction block of the current block and the residual of the current block in all prediction modes, and determine candidate prediction modes according to the energy functions in different prediction modes, and perform step 5;

其中所述步骤3,具体包括:Wherein step 3 specifically includes:

步骤31:计算不同预测模式下的所述当前块的预测块;Step 31: Calculating prediction blocks of the current block in different prediction modes;

步骤32:根据不同预测模式下的所述当前块的预测块和所述当前块,得到不同预测模式下的所述当前块的预测块和所述当前块的残差;Step 32: According to the prediction block of the current block in different prediction modes and the current block, obtain the prediction block of the current block in different prediction modes and the residual of the current block;

步骤33:对不同预测模式下的残差进行离散余弦变换得到不同预测模式下的残差的能量函数;Step 33: performing discrete cosine transform on the residuals in different prediction modes to obtain energy functions of the residuals in different prediction modes;

其中能量函数的计算公式为:The calculation formula of the energy function is:

EE. == ΣΣ ythe y == 11 44 ΣΣ xx == 11 44 ww (( ythe y ,, xx )) DCTDCT (( ythe y -- 11 ,, xx -- 11 ))

其中, w ( y , x ) = 0.2 ( y = 1 , x = 1 ) , ( y = 1 , x = 2 ) , ( y = 2 , x = 1 ) 0.4 ( y = 1 , x = 3 ) , ( y = 2 , x = 2 ) , ( y = 3 , x = 1 ) 0.6 ( y = 1 , x = 4 ) , ( y = 2 , x = 3 ) , ( y = 3 , x = 2 ) , ( y = 4 , x = 1 ) 0.8 ( y = 2 , x = 4 ) , ( y = 3 , x = 3 ) , ( y = 4 , x = 2 ) 1 ( y = 3 , x = 4 ) , ( y = 4 , x = 3 ) , ( y = 4 , x = 4 ) in, w ( the y , x ) = 0.2 ( the y = 1 , x = 1 ) , ( the y = 1 , x = 2 ) , ( the y = 2 , x = 1 ) 0.4 ( the y = 1 , x = 3 ) , ( the y = 2 , x = 2 ) , ( the y = 3 , x = 1 ) 0.6 ( the y = 1 , x = 4 ) , ( the y = 2 , x = 3 ) , ( the y = 3 , x = 2 ) , ( the y = 4 , x = 1 ) 0.8 ( the y = 2 , x = 4 ) , ( the y = 3 , x = 3 ) , ( the y = 4 , x = 2 ) 1 ( the y = 3 , x = 4 ) , ( the y = 4 , x = 3 ) , ( the y = 4 , x = 4 )

DCTDCT == 11 11 11 11 22 11 -- 11 -- 22 11 -- 11 -- 11 11 11 -- 22 22 -- 11 Xx 11 22 11 11 11 11 -- 11 -- 22 11 -- 11 -- 11 22 11 -- 22 11 -- 11 ⊗⊗ aa 22 abab 22 aa 22 abab 22 abab 22 bb 22 44 abab 22 bb 22 44 aa 22 abab 22 aa 22 abab 22 abab 22 bb 22 44 abab 22 bb 22 44

y为所述当前块的宽度方向的坐标,x为所述当前块的高度方向的坐标,X为所述当前块的预测块与所述当前块的残差,DCT(y,x)为所述当前块的坐标为(y,x)的DCT系数, a = 1 2 , b = 2 5 ; y is the coordinate of the width direction of the current block, x is the coordinate of the height direction of the current block, X is the residual difference between the prediction block of the current block and the current block, and DCT(y, x) is the The coordinates of the current block are the DCT coefficients of (y, x), a = 1 2 , b = 2 5 ;

步骤34:将不同预测模式下的残差的能量函数按照能量值从小到大的顺序排列,依次得到能量值较小的第一能量、第二能量、第三能量和第四能量,并得到对应于所述第一能量的第一预测模式、对应于所述第二能量的第二预测模式、对应于所述第三能量的第三预测模式和对应于所述第四能量的第四预测模式;Step 34: Arrange the energy functions of residuals in different prediction modes in ascending order of energy values, and obtain the first energy, second energy, third energy, and fourth energy with smaller energy values in sequence, and obtain the corresponding a first prediction mode corresponding to the first energy, a second prediction mode corresponding to the second energy, a third prediction mode corresponding to the third energy and a fourth prediction mode corresponding to the fourth energy ;

步骤35:根据所述第一能量、第二能量、第三能量和第四能量及所述第一预测模式、第二预测模式、第三预测模式和第四预测模式确定候选预测模式;Step 35: Determine a candidate prediction mode according to the first energy, the second energy, the third energy and the fourth energy and the first prediction mode, the second prediction mode, the third prediction mode and the fourth prediction mode;

步骤4:将可用的预测模式作为候选预测模式,执行步骤5;Step 4: Use the available prediction modes as candidate prediction modes, and perform step 5;

步骤5:计算候选预测模式的率失真代价参数,选取率失真代价参数最小的候选预测模式为所述当前块的最优预测模式。Step 5: Calculate the rate-distortion cost parameters of the candidate prediction modes, and select the candidate prediction mode with the smallest rate-distortion cost parameter as the optimal prediction mode of the current block.

本发明实施例根据能量函数选择4×4像素亮度块的候选预测模式,通过计算候选预测模式的率失真代价参数得到最优预测模式,而不是根据所有预测模式的率失真代价参数得到最优预测模式,由于预测模式数量的减小,可以减少率失真代价参数的计算量,提高运算速度,适用于实时编码。The embodiment of the present invention selects the candidate prediction mode of the 4×4 pixel brightness block according to the energy function, and obtains the optimal prediction mode by calculating the rate-distortion cost parameters of the candidate prediction modes, instead of obtaining the optimal prediction according to the rate-distortion cost parameters of all prediction modes mode, due to the reduction in the number of prediction modes, the calculation amount of the rate-distortion cost parameter can be reduced, and the calculation speed can be improved, which is suitable for real-time encoding.

附图说明 Description of drawings

图1为现有技术H.264/AVC标准的编码器框架图;Fig. 1 is the encoder frame diagram of prior art H.264/AVC standard;

图2为现有技术H.264/AVC标准中参考像素与待预测的当前块像素关系的示意图;2 is a schematic diagram of the relationship between a reference pixel and a current block pixel to be predicted in the prior art H.264/AVC standard;

图3为现有技术H.264/AVC标准中方向预测模式的指向图;FIG. 3 is a pointing diagram of a direction prediction mode in the prior art H.264/AVC standard;

图4为本发明帧内预测方法实施例一流程图;FIG. 4 is a flow chart of Embodiment 1 of the intra prediction method of the present invention;

图5为本发明帧内预测方法实施例二流程图。FIG. 5 is a flow chart of Embodiment 2 of the intra prediction method of the present invention.

具体实施方式 Detailed ways

下面结合附图和具体实施例进一步说明本发明的技术方案。The technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

图4为本发明帧内预测方法实施例一流程图,该帧内预测方法包括:FIG. 4 is a flow chart of Embodiment 1 of the intra prediction method of the present invention. The intra prediction method includes:

步骤41:选取一个待预测的4×4像素亮度块作为当前块;Step 41: Select a 4×4 pixel brightness block to be predicted as the current block;

步骤42:判断所述当前块是否为中心块,若是,执行步骤43,否则,执行步骤44;Step 42: judging whether the current block is a central block, if so, execute step 43, otherwise, execute step 44;

步骤43:计算所有预测模式下所述当前块的预测块和所述当前块的残差的能量函数,并根据不同预测模式下的能量函数确定候选预测模式,执行步骤45;Step 43: Calculate the energy function of the prediction block of the current block and the residual of the current block in all prediction modes, and determine candidate prediction modes according to the energy functions in different prediction modes, and perform step 45;

步骤44:将可用的预测模式作为候选预测模式,执行步骤45;Step 44: Use available prediction modes as candidate prediction modes, and perform step 45;

步骤45:计算候选预测模式的率失真代价参数,选取率失真代价参数最小的候选预测模式为所述当前块的最优预测模式。Step 45: Calculate the rate-distortion cost parameters of the candidate prediction modes, and select the candidate prediction mode with the smallest rate-distortion cost parameter as the optimal prediction mode of the current block.

图5为本发明帧内预测方法实施例二流程图,该帧内预测方法包括:Fig. 5 is a flowchart of Embodiment 2 of the intra prediction method of the present invention, the intra prediction method includes:

步骤501:将一个16×16宏块划分为16个4×4亮度块,执行步骤502。H.264/AVC标准中以16×16像素的宏块为单位,一个宏块包括一个亮度块和两个色度块,亮度块是1个16×16的或16个4×4的,色度块是8×8的,当前亮度块或色度块的像素值用与当前块相邻的上块和相邻的左块已经解码重构的像素值按照多种预测模式预测编码。因为H.264/AVC标准中的变换是以4×4块为单位的,且4×4块在预测编码中占据很大的比例,因此,本实施例针对4×4亮度块的预测编码进行改进,对16×16亮度块和8×8色度块的预测编码方法不予改变。Step 501: Divide a 16×16 macroblock into 16 4×4 luma blocks, and execute step 502. In the H.264/AVC standard, a 16×16 pixel macroblock is used as a unit. A macroblock includes a luma block and two chrominance blocks. The luma block is one 16×16 or 16 4×4. The degree block is 8×8, and the pixel value of the current luma block or chrominance block is predicted and coded according to multiple prediction modes using the decoded and reconstructed pixel values of the upper block adjacent to the current block and the adjacent left block. Because the transformation in the H.264/AVC standard is based on a 4×4 block, and 4×4 blocks occupy a large proportion in predictive coding, therefore, this embodiment is aimed at the predictive coding of 4×4 luma blocks. Improvement, the predictive coding method for 16×16 luma block and 8×8 chrominance block will not be changed.

步骤502:选取一个待预测编码的4×4亮度块作为当前块,执行步骤503。4×4亮度块的帧内预测方法的预测模式包括8种方向预测和1种DC预测。传统的H.264/AVC标准中采用RDO技术进行亮度块的预测模式的选择包括如下步骤:Step 502: Select a 4×4 luma block to be predictively coded as the current block, and execute step 503. The prediction modes of the intra prediction method for the 4×4 luma block include 8 directional predictions and 1 DC prediction. In the traditional H.264/AVC standard, the selection of the prediction mode of the luma block using RDO technology includes the following steps:

(1)对于4×4亮度块,分别计算9种预测模式下的率失真代价参数,得到率失真代价参数的最小值及对应于率失真代价参数最小的预测模式。率失真代价参数(RDCost)的计算公式为:RDCost=SSD+λ×bitrate,其中RDCost为率失真代价参数;SSD为当前块与重构块的差值块的所有元素的平方和,即重构残差的平方;λ为量化参数(QP)的函数,λ=0.85×2(QP-12)/3;bitrate为熵编码后的码率,即预测编码后形成码流的比特数。(1) For the 4×4 luminance block, calculate the rate-distortion cost parameters in 9 prediction modes respectively, and obtain the minimum value of the rate-distortion cost parameter and the prediction mode corresponding to the minimum rate-distortion cost parameter. The formula for calculating the rate-distortion cost parameter (RDCost) is: RDCost=SSD+λ×bitrate, where RDCost is the rate-distortion cost parameter; SSD is the sum of squares of all elements of the difference block between the current block and the reconstructed block, that is, the reconstructed The square of the residual error; λ is a function of the quantization parameter (QP), λ=0.85×2 (QP-12)/3 ; bitrate is the code rate after entropy coding, that is, the number of bits forming the code stream after predictive coding.

(2)依照上述方法得到16个4×4亮度块的最小率失真代价参数,并将这16个最小率失真代价参数相加,将相加之后的和作为4×4亮度块的率失真代价参数。(2) Obtain the minimum rate-distortion cost parameters of 16 4×4 luminance blocks according to the above method, add these 16 minimum rate-distortion cost parameters, and use the added sum as the rate-distortion cost of 4×4 luminance blocks parameter.

(3)对于16×16亮度块,分别计算4种预测模式下的当前块与预测块的残差的hasmard变换后所有元素的和,即残差hasmard变换和(STAD)的值,计算STAD值最小的预测模式的率失真代价参数,将该率失真代价参数作为16×16亮度块的率失真代价参数.(3) For the 16×16 brightness block, calculate the sum of all elements after the hasmard transformation of the residual of the current block and the prediction block under the four prediction modes, that is, the value of the residual hasmard transformation sum (STAD), and calculate the STAD value The rate-distortion cost parameter of the smallest prediction mode, and the rate-distortion cost parameter is used as the rate-distortion cost parameter of the 16×16 luma block.

(4)比较(2)、(3)得到的率失真代价参数,选择最小的率失真代价参数对应的预测模式作为帧内亮度块的预测模式。(4) Compare the rate-distortion cost parameters obtained in (2) and (3), and select the prediction mode corresponding to the smallest rate-distortion cost parameter as the prediction mode of the intra-frame luma block.

从上述(1)的率失真代价参数的公式可以看出,对当前4×4亮度块的每种预测模式都要进行预编码,计算复杂度较大,为了降低计算复杂度,可以简化RDO的计算或者减少用来计算RDO的预测模式,为了降低帧内编码的复杂度同时较好地保持帧内编码的效率,本实施例采用减少用来计算RDO预测模式的方法。From the formula of the rate-distortion cost parameter in (1) above, it can be seen that each prediction mode of the current 4×4 luma block must be pre-encoded, and the computational complexity is relatively large. In order to reduce the computational complexity, the RDO can be simplified To calculate or reduce the prediction mode used to calculate the RDO, in order to reduce the complexity of the intra-frame coding while maintaining the efficiency of the intra-frame coding better, this embodiment adopts the method of reducing the prediction mode used to calculate the RDO.

步骤503:判断当前块是否为中心块,是则执行步骤504,否则,执行步骤507。由于视频编码中采用从左至右、从上至下的顺序进行解码重构,如果与当前块相邻的左块和相邻的上块均已解码时,称为左块和上块可用,当左块已解码重构时,称为左块可用,当上块已解码重构时,称为上块可用,当两者均未解码时,称为两者均不可用。当左块和上块均可用时,当前块即为中心块,此时,对应于当前块有9种预测模式;当前块不为中心块时,对应于当前块的预测模式称为可用预测模式,可用预测模式不足9种,如只有左块可用时,可用预测模式为将水平预测模式(模式1)、DC预测模式(模式2)、22.5度方向预测模式(模式8),只有上块可用时,可用预测模式为垂直预测模式(模式0)、DC预测模式(模式2)、45度方向预测模式(模式3)、67.5度方向预测(模式7)。Step 503: Determine whether the current block is the center block, if yes, execute step 504, otherwise, execute step 507. Since video coding uses the order of decoding and reconstruction from left to right and from top to bottom, if the left block adjacent to the current block and the adjacent upper block have been decoded, it is called the left block and the upper block are available, When the left block has been decoded and reconstructed, it is called the left block is available, when the upper block has been decoded and reconstructed, it is called the upper block is available, and when both are not decoded, it is called neither available. When both the left block and the upper block are available, the current block is the center block. At this time, there are 9 prediction modes corresponding to the current block; when the current block is not the center block, the prediction mode corresponding to the current block is called an available prediction mode , there are less than 9 available prediction modes. If only the left block is available, the available prediction modes are horizontal prediction mode (mode 1), DC prediction mode (mode 2), 22.5-degree direction prediction mode (mode 8), and only the upper block is available , the available prediction modes are vertical prediction mode (mode 0), DC prediction mode (mode 2), 45-degree direction prediction mode (mode 3), and 67.5-degree direction prediction (mode 7).

步骤504:计算所有预测模式下的当前块与预测块的残差的能量函数,执行步骤505。从上述分析可知,如果当前块为中心块时,其可用的预测模式有9种,为了减少RDO计算的运算量,采用减少预测模式的方法。由于自然的或合成的图像的大部分区域是由低频组成的,而大多数高频信息能用0行程编码,且高频可以粗略地反映一个图像的纹理的复杂程度。在实际应用中,用解码的相邻块的信息按照当前块的纹理方向来预测当前块的信息,然后对相应的残差进行能量函数的计算,本发明所定义的能量函数是从多维的频域空间到一维的能量空间的映射,纹理残差块的DCT变换的高频分量反映了纹理残差的细节信息,为了突出纹理残差的细节信息,本发明为高频分配较高的权值(w(y,x))可以放大高频系数的影响。由本发明所述的DCT能量函数的定义,纹理残差块细节越丰富(高频信息越多),其DCT能量越大。本发明正是利用了能量函数的这一特征,选择纹理残差块复杂度较小(能量较小、高频信息较少)的几种模式进行RDO的计算,从而可以达到减少用来进行RDO计算的的模式数量,最终实现加快帧内编码速度的目的。其中能量函数的计算公式为:Step 504: Calculate the energy function of the residuals between the current block and the predicted block in all prediction modes, and execute step 505. It can be seen from the above analysis that if the current block is the center block, there are 9 available prediction modes. In order to reduce the calculation amount of RDO calculation, the method of reducing the prediction mode is adopted. Since most areas of natural or synthetic images are composed of low frequencies, most high-frequency information can be coded with 0-length, and high frequencies can roughly reflect the complexity of an image's texture. In practical applications, the information of the adjacent blocks decoded is used to predict the information of the current block according to the texture direction of the current block, and then the energy function is calculated for the corresponding residual. The energy function defined in the present invention is obtained from the multi-dimensional frequency Mapping from domain space to one-dimensional energy space, the high-frequency component of the DCT transformation of the texture residual block reflects the detailed information of the texture residual. In order to highlight the detailed information of the texture residual, the present invention assigns a higher weight to the high frequency The value (w(y,x)) can amplify the influence of high frequency coefficients. According to the definition of the DCT energy function described in the present invention, the richer the details of the texture residual block (the more high-frequency information), the greater its DCT energy. The present invention just utilizes this feature of the energy function, and selects several modes with less complex texture residual blocks (less energy, less high-frequency information) to calculate RDO, thereby reducing The number of calculated modes finally achieves the purpose of speeding up the intra-frame encoding speed. The calculation formula of the energy function is:

EE. DCTDCT == ΣΣ ythe y == 11 ωω ΣΣ xx == 11 hh ww (( ythe y ,, xx )) DCTDCT (( ythe y -- 11 ,, xx -- 11 ))

这里EDCT是针对预测残差的DCT变换的能量计算,ω和h是当前块的宽度和高度,DCT(y,x)是位于(y,x)的DCT系数,对于H.264/AVC的4×4的亮度块,上式中权值函数w(y,x)(x=1,2,...h,y=1,2,...,ω),定义如下:Here E DCT is the energy calculation of the DCT transform for the prediction residual, ω and h are the width and height of the current block, DCT(y, x) is the DCT coefficient at (y, x), for H.264/AVC For a 4×4 brightness block, the weight function w(y, x) (x=1, 2, ... h, y = 1, 2, ..., ω) in the above formula is defined as follows:

ww (( ythe y ,, xx )) == 0.20.2 (( ythe y == 11 ,, xx == 11 )) ,, (( ythe y == 11 ,, xx == 22 )) ,, (( ythe y == 22 ,, xx == 11 )) 0.40.4 (( ythe y == 11 ,, xx == 33 )) ,, (( ythe y == 22 ,, xx == 22 )) ,, (( ythe y == 33 ,, xx == 11 )) 0.60.6 (( ythe y == 11 ,, xx == 44 )) ,, (( ythe y == 22 ,, xx == 33 )) ,, (( ythe y == 33 ,, xx == 22 )) ,, (( ythe y == 44 ,, xx == 11 )) 0.80.8 (( ythe y == 22 ,, xx == 44 )) ,, (( ythe y == 33 ,, xx == 33 )) ,, (( ythe y == 44 ,, xx == 22 )) 11 (( ythe y == 33 ,, xx == 44 )) ,, (( ythe y == 44 ,, xx == 33 )) ,, (( ythe y == 44 ,, xx == 44 ))

其中,ω=4,h=4Among them, ω=4, h=4

上式中的DCT变换采用标准中的整数DCT变换,公式如下所示:The DCT transformation in the above formula adopts the integer DCT transformation in the standard, and the formula is as follows:

DCTDCT == 11 11 11 11 22 11 -- 11 -- 22 11 -- 11 -- 11 11 11 -- 22 22 -- 11 Xx 11 22 11 11 11 11 -- 11 -- 22 11 -- 11 -- 11 22 11 -- 22 11 -- 11 ⊗⊗ aa 22 abab 22 aa 22 abab 22 abab 22 bb 22 44 abab 22 bb 22 44 aa 22 abab 22 aa 22 abab 22 abab 22 bb 22 44 abab 22 bb 22 44

其中, a = 1 2 , b = 2 5 , X为当前块与预测块的残差。in, a = 1 2 , b = 2 5 , X is the residual between the current block and the predicted block.

步骤505:将不同预测模式下的重构残差的能量函数值按从小到大的顺序排列,选取最小的四个能量值第一能量(E1)、第二能量(E2)、第三能量(E3)、第四能量(E4)及对应的第一预测模式(m1)、第二预测模式(m2)、第三预测模式(m3)、第四预测模式(m4),执行步骤506。Step 505: Arrange the energy function values of the reconstruction residuals in different prediction modes in ascending order, and select the four smallest energy values, the first energy (E1), the second energy (E2), and the third energy ( E3), the fourth energy (E4) and the corresponding first prediction mode (m1), second prediction mode (m2), third prediction mode (m3), and fourth prediction mode (m4), execute step 506.

步骤506:根据下述的筛选原则,从上述的四种预测模式m1、m2、m3、m4中确定候选预测模式,执行步骤508。所述筛选原则包括:Step 506: According to the following screening principles, determine candidate prediction modes from the above four prediction modes m1, m2, m3, and m4, and execute step 508. The screening principles include:

步骤5061:判断E2是否大于α×E1,若是,执行步骤5062;否则,执行步骤5063。Step 5061: Determine whether E2 is greater than α×E1, if yes, execute step 5062; otherwise, execute step 5063.

步骤5062:候选预测模式为m1。Step 5062: The candidate prediction mode is m1.

步骤5063:判断E3是否大于α×E1,若是,执行步骤5064,否则执行步骤5065。Step 5063: Determine whether E3 is greater than α×E1, if yes, go to step 5064, otherwise go to step 5065.

步骤5064:候选预测模式为m1和m2。Step 5064: The candidate prediction modes are m1 and m2.

步骤5065:判断E4是否大于α×E1,若是,执行步骤5066,否则执行步骤5067。Step 5065: Determine whether E4 is greater than α×E1, if yes, go to step 5066, otherwise go to step 5067.

步骤5066:候选预测模式为m1、m2和m3。Step 5066: The candidate prediction modes are m1, m2 and m3.

步骤5067:判断E4是否小于β×E1,若是,执行步骤5068,否则,执行步骤5069。Step 5067: Determine whether E4 is smaller than β×E1, if yes, execute step 5068, otherwise, execute step 5069.

步骤5068:候选预测模式为m1和m2。Step 5068: The candidate prediction modes are m1 and m2.

步骤5069:候选预测模式为m1、m2、m3和m4。Step 5069: The candidate prediction modes are m1, m2, m3 and m4.

上述的α,β是常数,经过大量的试验,取α=1.4和β=1.05时编码效果最佳。The above-mentioned α and β are constants. After a lot of experiments, the encoding effect is the best when α=1.4 and β=1.05.

步骤507:将可用的预测模式作为候选预测模式,执行步骤508。当只有与当前块相邻的左块可用时,可用预测模式为模式1、模式2、模式8;当只有与当前块相邻的上块可用时,可用预测模式为模式0、模式2、模式3、模式7;当与当前块相邻的左块和上块均不可用时,候选预测模式为DC预测模式。Step 507: Use available prediction modes as candidate prediction modes, and execute step 508. When only the left block adjacent to the current block is available, the available prediction modes are mode 1, mode 2, and mode 8; when only the upper block adjacent to the current block is available, the available prediction modes are mode 0, mode 2, and mode 3. Mode 7: when neither the left block nor the upper block adjacent to the current block is available, the candidate prediction mode is the DC prediction mode.

步骤508:对当前块各候选预测模式进行RDO计算,选取率失真代价参数RDCost最小的候选预测模式为当前块的最优预测模式,执行步骤509。即当前块的相邻左块和相邻上块均可用时,根据对能量函数确定的候选预测模式进行RDO计算,得到的率失真代价参数最小的候选预测模式为最优预测模式;当前块的相邻左块或相邻上块之一可用时,对可用的预测模式进行RDO计算,得到的率失真代价参数最小的可用预测模式为最优预测模式;当前块的相邻左块和相邻上块均不可用时,DC预测模式为最优预测模式。Step 508: Perform RDO calculation on each candidate prediction mode of the current block, select the candidate prediction mode with the smallest rate-distortion cost parameter RDCost as the optimal prediction mode of the current block, and execute step 509. That is, when both the adjacent left block and the adjacent upper block of the current block are available, the RDO calculation is performed according to the candidate prediction mode determined by the energy function, and the candidate prediction mode with the smallest rate-distortion cost parameter is the optimal prediction mode; When one of the adjacent left block or the adjacent upper block is available, RDO calculation is performed on the available prediction modes, and the available prediction mode with the smallest rate-distortion cost parameter is the optimal prediction mode; the adjacent left block and the adjacent When none of the upper blocks is available, the DC prediction mode is the optimal prediction mode.

步骤509:判断是否16个亮度块都作为当前块进行过上述计算,若是,执行步骤510,否则,重复执行步骤502,直到所有的4×4亮度块都完成预测编码。Step 509: Determine whether all the 16 luminance blocks have been used as the current block for the above calculation, if yes, perform step 510, otherwise, repeat step 502 until all 4×4 luminance blocks have completed predictive coding.

步骤510:将16个4×4亮度块的最小率失真代价参数相加,并将相加后的和作为4×4亮度块的率失真代价参数RDCost4,执行步骤512。Step 510: Add the minimum rate-distortion cost parameters of the 16 4×4 luma blocks, and use the added sum as the rate-distortion cost parameter RDCost4 of the 4×4 luma blocks, and execute step 512 .

步骤511:计算16×16亮度块4种预测模式的率失真代价参数,得到最小的率失真代价参数及对应于最小率失真代价参数的预测模式,其中最小的率失真代价参数为16×16亮度块的率失真代价参数RDCost16,对应于最小率失真代价参数的预测模式为16×16亮度块的最优预测模式,执行步骤512。Step 511: Calculate the rate-distortion cost parameters of the four prediction modes for the 16×16 luma block, and obtain the minimum rate-distortion cost parameter and the prediction mode corresponding to the minimum rate-distortion cost parameter, wherein the minimum rate-distortion cost parameter is 16×16 luma The rate-distortion cost parameter RDCost16 of the block corresponds to the optimal prediction mode of the 16×16 luma block where the prediction mode of the minimum rate-distortion cost parameter is, and step 512 is executed.

步骤512:比较4×4亮度块的率失真代价参数RDcost4和16×16亮度块的率失真代价参数RDcost16,若RDcost4<RDcost16,执行步骤513,否则,执行步骤514。Step 512: Compare the rate-distortion cost parameter RDcost4 of the 4×4 luma block with the rate-distortion cost parameter RDcost16 of the 16×16 luma block, if RDcost4<RDcost16, go to step 513; otherwise, go to step 514.

步骤513:选取对应于各个4×4亮度块的最优预测模式作为16×16宏块的亮度块的最优预测模式。Step 513: Select the optimal prediction mode corresponding to each 4*4 luma block as the optimal prediction mode of the luma block of the 16*16 macroblock.

步骤514:选取对应于RDcost16的16×16亮度块的最优预测模式作为16×16宏块的亮度块的最优预测模式。Step 514: Select the optimal prediction mode of the 16×16 luma block corresponding to RDcost16 as the optimal prediction mode of the luma block of the 16×16 macroblock.

本实施例,对H.264/AVC标准中的4×4亮度块的帧内预测方法进行改进,用残差的DCT变换得到的能量函数确定候选预测模式,对候选预测模式进行RDO计算,而不是对所有的预测模式进行RDO计算,由于进行RDO计算的预测模式数量减少,可以有效地减少RDO的运算量,有利于应用于实时编码。In this embodiment, the intra-frame prediction method of the 4×4 luma block in the H.264/AVC standard is improved, and the energy function obtained by the DCT transformation of the residual is used to determine the candidate prediction mode, and the RDO calculation is performed on the candidate prediction mode, and The RDO calculation is not performed on all prediction modes. Since the number of prediction modes for RDO calculation is reduced, the calculation amount of RDO can be effectively reduced, which is beneficial for real-time coding.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims (5)

1、一种帧内预测方法,其特征在于,包括:1. A method for intra-frame prediction, comprising: 步骤1:选取一个待预测的4×4像素亮度块作为当前块;Step 1: Select a 4×4 pixel brightness block to be predicted as the current block; 步骤2:判断所述当前块是否为中心块,若是,执行步骤3,否则,执行步骤4;Step 2: Determine whether the current block is the central block, if so, perform step 3, otherwise, perform step 4; 步骤3:计算所有预测模式下所述当前块的预测块和所述当前块的残差的能量函数,并根据不同预测模式下的能量函数确定候选预测模式,执行步骤5;Step 3: Calculate the energy function of the prediction block of the current block and the residual of the current block in all prediction modes, and determine candidate prediction modes according to the energy functions in different prediction modes, and perform step 5; 其中所述步骤3,具体包括:Wherein step 3 specifically includes: 步骤31:计算不同预测模式下的所述当前块的预测块;Step 31: Calculating prediction blocks of the current block in different prediction modes; 步骤32:根据不同预测模式下的所述当前块的预测块和所述当前块,得到不同预测模式下的所述当前块的预测块和所述当前块的残差;Step 32: According to the prediction block of the current block in different prediction modes and the current block, obtain the prediction block of the current block in different prediction modes and the residual of the current block; 步骤33:对不同预测模式下的残差进行离散余弦变换得到不同预测模式下的残差的能量函数;Step 33: performing discrete cosine transform on the residuals in different prediction modes to obtain energy functions of the residuals in different prediction modes; 其中能量函数的计算公式为:The calculation formula of the energy function is: EE. == &Sigma;&Sigma; ythe y == 11 44 &Sigma;&Sigma; xx == 11 44 ww (( ythe y ,, xx )) DCTDCT (( ythe y -- 11 ,, xx -- 11 )) 其中, w ( y , x ) = 0.2 ( y = 1 , x = 1 ) , ( y = 1 , x = 2 ) , ( y = 2 , x = 1 ) 0.4 ( y = 1 , x = 3 ) , ( y = 2 , x = 2 ) , ( y = 3 , x = 1 ) 0.6 ( y = 1 , x = 4 ) , ( y = 2 , x = 3 ) , ( y = 3 , x = 2 ) , ( y = 4 , x = 1 ) 0.8 ( y = 2 , x = 4 ) , ( y = 3 , x = 3 ) , ( y = 4 , x = 2 ) 1 ( y = 3 , x = 4 ) , ( y = 4 , x = 3 ) , ( y = 4 , x = 4 ) in, w ( the y , x ) = 0.2 ( the y = 1 , x = 1 ) , ( the y = 1 , x = 2 ) , ( the y = 2 , x = 1 ) 0.4 ( the y = 1 , x = 3 ) , ( the y = 2 , x = 2 ) , ( the y = 3 , x = 1 ) 0.6 ( the y = 1 , x = 4 ) , ( the y = 2 , x = 3 ) , ( the y = 3 , x = 2 ) , ( the y = 4 , x = 1 ) 0.8 ( the y = 2 , x = 4 ) , ( the y = 3 , x = 3 ) , ( the y = 4 , x = 2 ) 1 ( the y = 3 , x = 4 ) , ( the y = 4 , x = 3 ) , ( the y = 4 , x = 4 ) DCTDCT == (( 11 11 11 11 22 11 -- 11 -- 22 11 -- 11 -- 11 11 11 -- 22 22 -- 11 Xx 11 22 11 11 11 11 -- 11 -- 22 11 -- 11 -- 11 22 11 -- 22 11 -- 11 )) &CircleTimes;&CircleTimes; aa 22 abab 22 aa 22 abab 22 abab 22 bb 22 44 abab 22 bb 22 44 aa 22 abab 22 aa 22 abab 22 abab 22 bb 22 44 abab 22 bb 22 44 y为所述当前块的宽度方向的坐标,x为所述当前块的高度方向的坐标,X为所述当前块的预测块与所述当前块的残差,DCT(y,x)为所述当前块的坐标为(y,x)的DCT系数, a = 1 2 , b = 2 5 ; y is the coordinate of the width direction of the current block, x is the coordinate of the height direction of the current block, X is the residual difference between the prediction block of the current block and the current block, and DCT(y, x) is the The coordinates of the current block are the DCT coefficients of (y, x), a = 1 2 , b = 2 5 ; 步骤34:将不同预测模式下的残差的能量函数按照能量值从小到大的顺序排列,依次得到能量值较小的第一能量、第二能量、第三能量和第四能量,并得到对应于所述第一能量的第一预测模式、对应于所述第二能量的第二预测模式、对应于所述第三能量的第三预测模式和对应于所述第四能量的第四预测模式;Step 34: Arrange the energy functions of residuals in different prediction modes in ascending order of energy values, and obtain the first energy, second energy, third energy, and fourth energy with smaller energy values in sequence, and obtain the corresponding a first prediction mode corresponding to the first energy, a second prediction mode corresponding to the second energy, a third prediction mode corresponding to the third energy and a fourth prediction mode corresponding to the fourth energy ; 步骤35:根据所述第一能量、第二能量、第三能量和第四能量及所述第一预测模式、第二预测模式、第三预测模式和第四预测模式确定候选预测模式;Step 35: Determine a candidate prediction mode according to the first energy, the second energy, the third energy and the fourth energy and the first prediction mode, the second prediction mode, the third prediction mode and the fourth prediction mode; 步骤4:将可用的预测模式作为候选预测模式,执行步骤5;Step 4: Use the available prediction modes as candidate prediction modes, and perform step 5; 步骤5:计算候选预测模式的率失真代价参数,选取率失真代价参数最小的候选预测模式为所述当前块的最优预测模式。Step 5: Calculate the rate-distortion cost parameters of the candidate prediction modes, and select the candidate prediction mode with the smallest rate-distortion cost parameter as the optimal prediction mode of the current block. 2、根据权利要求1所述的帧内预测方法,其特征在于,所述步骤2具体为:像素亮度块按从左至右、从上至下的顺序解码,当与所述当前块相邻的左像素亮度块和上像素亮度块均已解码时,所述当前块为中心块。2. The intra-frame prediction method according to claim 1, wherein the step 2 specifically includes: pixel brightness blocks are decoded in order from left to right and from top to bottom, and when adjacent to the current block When both the left pixel luminance block and the upper pixel luminance block of have been decoded, the current block is the central block. 3、根据权利要求1所述的帧内预测方法,其特征在于,所述步骤35具体包括:3. The intra-frame prediction method according to claim 1, wherein the step 35 specifically comprises: 步骤351:判断所述第二能量是否大于所述第一能量的1.4倍,若是,则所述第一预测模式为候选预测模式,否则,执行步骤352;Step 351: judging whether the second energy is greater than 1.4 times the first energy, if yes, then the first prediction mode is a candidate prediction mode, otherwise, execute step 352; 步骤352:判断所述第三能量是否大于所述第一能量的1.4倍,若是,则所述第一预测模式和第二预测模式为候选预测模式,否则,执行步骤353;Step 352: Determine whether the third energy is greater than 1.4 times the first energy, if yes, then the first prediction mode and the second prediction mode are candidate prediction modes, otherwise, execute step 353; 步骤353:判断所述第四能量是否大于所述第一能量的1.4倍,若是,则所述第一预测模式、第二预测模式和第三预测模式为候选预测模式,否则,执行步骤354;Step 353: judging whether the fourth energy is greater than 1.4 times the first energy, if yes, then the first prediction mode, the second prediction mode and the third prediction mode are candidate prediction modes, otherwise, execute step 354; 步骤354:判断所述第四能量是否小于所述第一能量的1.05倍,若是,则所述第一预测模式和第二预测模式为候选预测模式,否则,所述第一预测模式、第二预测模式、第三预测模式和第四预测模式为候选预测模式。Step 354: Judging whether the fourth energy is less than 1.05 times the first energy, if yes, the first prediction mode and the second prediction mode are candidate prediction modes, otherwise, the first prediction mode, the second prediction mode The prediction mode, the third prediction mode and the fourth prediction mode are candidate prediction modes. 4、根据权利要求1所述的帧内预测方法,其特征在于,所述步骤4具体包括:4. The intra-frame prediction method according to claim 1, wherein the step 4 specifically comprises: 当与所述当前块相邻的上像素亮度块已解码时,将垂直预测模式、DC预测模式、45度方向预测模式、67.5度方向预测模式作为候选预测模式;When the upper pixel brightness block adjacent to the current block has been decoded, use vertical prediction mode, DC prediction mode, 45-degree direction prediction mode, and 67.5-degree direction prediction mode as candidate prediction modes; 当与所述当前块相邻的左像素亮度块已解码时,将水平预测模式、DC预测模式、22.5度方向预测模式作为候选预测模式;When the left pixel brightness block adjacent to the current block has been decoded, the horizontal prediction mode, the DC prediction mode, and the 22.5-degree direction prediction mode are used as candidate prediction modes; 当与所述当前块相邻的上像素亮度块、左像素亮度块均未解码时,将DC预测模式作为候选预测模式。When neither the upper pixel brightness block nor the left pixel brightness block adjacent to the current block has been decoded, the DC prediction mode is used as the candidate prediction mode. 5、根据权利要求1所述的帧内预测方法,其特征在于,还包括:5. The intra prediction method according to claim 1, further comprising: 步骤6:将16个4×4像素亮度块最优预测模式的率失真代价参数之和作为4×4像素亮度块的率失真代价参数;Step 6: The sum of the rate-distortion cost parameters of the optimal prediction mode of the 16 4×4 pixel brightness blocks is used as the rate-distortion cost parameter of the 4×4 pixel brightness block; 步骤7:计算16×16像素亮度块在不同预测模式下的残差hasmard变换和的值;Step 7: Calculate the value of the residual hasmard transform sum of the 16×16 pixel brightness block in different prediction modes; 步骤8:将具有残差hasmard变换和的值最小的预测模式的率失真代价参数作为16×16像素亮度块的率失真代价参数;Step 8: using the rate-distortion cost parameter of the prediction mode with the minimum value of the residual hasmard transform sum as the rate-distortion cost parameter of the 16×16 pixel luma block; 步骤9:判断所述4×4像素亮度块的率失真代价参数是否小于所述16×16像素亮度块的率失真代价参数,若是,将对应于4×4像素亮度块的最优预测模式作为像素亮度块的最优预测模式,否则,将对应于16×16像素亮度块的最优预测模式作为像素亮度块的最优预测模式。Step 9: Determine whether the rate-distortion cost parameter of the 4×4 pixel brightness block is smaller than the rate-distortion cost parameter of the 16×16 pixel brightness block, and if so, use the optimal prediction mode corresponding to the 4×4 pixel brightness block as The optimal prediction mode of the pixel brightness block, otherwise, the optimal prediction mode corresponding to the 16×16 pixel brightness block is used as the optimal prediction mode of the pixel brightness block.
CN 200810056776 2008-01-24 2008-01-24 Infra-frame prediction method Expired - Fee Related CN100586184C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810056776 CN100586184C (en) 2008-01-24 2008-01-24 Infra-frame prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810056776 CN100586184C (en) 2008-01-24 2008-01-24 Infra-frame prediction method

Publications (2)

Publication Number Publication Date
CN101222635A CN101222635A (en) 2008-07-16
CN100586184C true CN100586184C (en) 2010-01-27

Family

ID=39632171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810056776 Expired - Fee Related CN100586184C (en) 2008-01-24 2008-01-24 Infra-frame prediction method

Country Status (1)

Country Link
CN (1) CN100586184C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888549A (en) * 2010-06-18 2010-11-17 浙江大学 Intra 4×4 Prediction Mode Selection Method Based on Transform Domain Information

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350927B (en) * 2008-07-29 2011-07-13 北京中星微电子有限公司 Method and apparatus for forecasting and selecting optimum estimation mode in a frame
WO2010043806A2 (en) * 2008-10-14 2010-04-22 France Telecom Encoding and decoding with elimination of one or more predetermined predictors
CN101873500B (en) * 2009-04-24 2012-05-23 华为技术有限公司 Interframe prediction encoding method, interframe prediction decoding method and equipment
CN101964906B (en) * 2009-07-22 2012-07-04 北京工业大学 Rapid intra-frame prediction method and device based on texture characteristics
CN102098507B (en) * 2010-06-08 2013-12-25 同济大学 Integrative compressing method and device of image
CN102281435B (en) * 2010-06-11 2013-10-02 华为技术有限公司 Encoding method, decoding method, encoding device, decoding device and encoding/decoding system
CN101895756B (en) * 2010-07-15 2012-10-31 北京大学 Method and system for encoding, decoding and reconstructing video image blocks
CN102377993B (en) * 2010-08-05 2014-09-03 富士通株式会社 Intra-frame prediction mode selection method and system
ES2987011T3 (en) 2010-10-08 2024-11-13 Ge Video Compression Llc Image encoding that supports block partitioning and block merging
US20130215963A1 (en) * 2010-10-26 2013-08-22 Humax Co., Ltd. Adaptive intra-prediction encoding and decoding method
JP5869681B2 (en) 2011-10-07 2016-02-24 パンテック カンパニー リミテッド Encoding / decoding method and apparatus for intra prediction mode using candidate intra prediction mode
CN102427530B (en) * 2011-10-11 2013-10-23 北京工业大学 Intra Prediction Method
EP4525446A3 (en) 2011-10-18 2025-05-14 LG Electronics, Inc. Image decoding method, image encoding method and transmission method of data for an image
KR20130049526A (en) * 2011-11-04 2013-05-14 오수미 Method for generating reconstructed block
KR20130058524A (en) * 2011-11-25 2013-06-04 오수미 Method for generating chroma intra prediction block
DK3697091T3 (en) * 2013-03-29 2021-10-18 Jvckenwood Corp Image decoding device, image decoding method and image decoding program
CN104853192B (en) * 2015-05-08 2018-02-13 腾讯科技(深圳)有限公司 Predicting mode selecting method and device
CN106254866B (en) * 2016-10-17 2018-05-29 中国科学技术大学 Video intra-frame encoding method based on the flexible block order of stratification
CN109923865A (en) * 2017-03-22 2019-06-21 华为技术有限公司 Video data decoding method, decoding device, encoding method and encoding device
CN107592534A (en) * 2017-09-27 2018-01-16 天津工业大学 A kind of vehicle-mounted HD video play system of subway based on built-in Linux
CN108156457B (en) * 2017-12-27 2021-10-15 郑州云海信息技术有限公司 A kind of image coding method and device for converting JPEG to WebP
KR102470695B1 (en) * 2019-04-16 2022-11-25 엘지전자 주식회사 Transformation in intra-prediction based image coding

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888549A (en) * 2010-06-18 2010-11-17 浙江大学 Intra 4×4 Prediction Mode Selection Method Based on Transform Domain Information
CN101888549B (en) * 2010-06-18 2012-05-02 浙江大学 Intra 4×4 Prediction Mode Selection Method Based on Transform Domain Information

Also Published As

Publication number Publication date
CN101222635A (en) 2008-07-16

Similar Documents

Publication Publication Date Title
CN100586184C (en) Infra-frame prediction method
USRE49565E1 (en) Apparatus for encoding an image
KR102035565B1 (en) Video encoding/decoding method and apparatus using prediction based on in-loop filtering
JP6084734B2 (en) Video decoding device
USRE47759E1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
JP6005087B2 (en) Image decoding apparatus, image decoding method, image encoding apparatus, image encoding method, and data structure of encoded data
JP2007166617A (en) Video intra prediction encoding and decoding method and apparatus
JP5345220B2 (en) Encoding and decoding with the exclusion of one or more predetermined predictors
KR20110000438A (en) Apparatus and method for image coding / decoding using multidimensional integer transformation
KR20110036401A (en) Image encoding method and apparatus, decoding method and apparatus thereof
USRE47243E1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
JP6409400B2 (en) Video encoding apparatus, method and program
CN100512445C (en) Predictive coding method among interlacing video sequence frame internal fields
Zhu et al. Adaptive intra modes reduction by clustering for H. 264/AVC

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100127

Termination date: 20180124