


技术领域technical field
本发明涉及一种帧内预测方法,尤其是一种直流模式预测方法。The invention relates to an intra-frame prediction method, in particular to a direct current mode prediction method.
背景技术Background technique
现有视频编码标准都是建立在变换编码和运动补偿的混和编码框架上的,用变换编码降低视频序列的空间相关性,用运动补偿减少视频序列的时域相关性。如图1所示,视频编码标准采用一系列最新技术,包括帧内预测、帧间预测、变换、量化和熵编码等,这些技术的采用使得视频编码标准获得了很高的编码效率。其中帧内预测技术的引入是视频编码性能提高的重要因素之一。Existing video coding standards are all based on the hybrid coding framework of transform coding and motion compensation. Transform coding is used to reduce the spatial correlation of video sequences, and motion compensation is used to reduce the temporal correlation of video sequences. As shown in Figure 1, the video coding standard adopts a series of latest technologies, including intra-frame prediction, inter-frame prediction, transformation, quantization and entropy coding, etc. The adoption of these technologies makes the video coding standard obtain high coding efficiency. Among them, the introduction of intra-frame prediction technology is one of the important factors for the improvement of video coding performance.
帧内预测使用空间预测模式来消除图像内的冗余,它可以独立编解码,提高预测的精度和质量,作为后续序列的参考帧,为视频回放提供随机访问点。在现有帧内预测技术中,亮度或色度的像素值的预测采用的基于p×q块预测结构,其中p表示块的列数,q表示块的行数,它是利用该p×q块上、右上、左、左上和左下已经重构的像素值,按照某些预测模式及其计算规则来预测当前像素块的像素点的像素值,如图2所示, i表示像素点的行坐标,取值为i=0,1,...,2q;j表示像素点的列坐标,取值为j=0,1,...,2p;predMatrix[i,j]表示当前像素块中的行坐标为i,列坐标为j的像素点的像素值。设C[i](i=0,1,...,2 q)表示当前像素块左侧像素块中与该当前像素块相邻的一列的第i行像素点的像素,R[j](j=0,1,...,2p)表示当前像素块上侧像素块中与当前像素块相邻的一行的第j列像素点的像素值,其中C[0]=R[0]。对任意给定的坐标为(i,j)的像素点,利用周围已经编码重构的像素点C[i](i=0,1,...,2q)和R[j](j=0,1,...,2p)来预测,根据不同的标准和不同的预测块大小,有着不同的预测模式,下面说明AVS标准和H.264/AVC标准中的预测模式。Intra-frame prediction uses spatial prediction mode to eliminate redundancy in images. It can be coded independently to improve prediction accuracy and quality. It serves as a reference frame for subsequent sequences and provides random access points for video playback. In the existing intra prediction technology, the prediction of the pixel value of luminance or chrominance is based on the p×q block prediction structure, where p represents the number of columns of the block, and q represents the number of rows of the block. It uses the p×q The reconstructed pixel values on the block, upper right, left, upper left, and lower left are used to predict the pixel values of the pixels of the current pixel block according to certain prediction modes and calculation rules, as shown in Figure 2, where i represents the row of the pixel Coordinates, the value is i=0, 1, ..., 2q; j represents the column coordinate of the pixel point, the value is j = 0, 1, ..., 2p; predMatrix[i, j] represents the current pixel block The pixel value of the pixel point whose row coordinate is i and column coordinate is j. Let C[i] (i=0, 1, ..., 2 q) represent the pixel of the i-th row pixel point of a column adjacent to the current pixel block in the pixel block on the left side of the current pixel block, R[j] (j=0, 1, ..., 2p) represents the pixel value of the jth column pixel point of the row adjacent to the current pixel block in the upper side pixel block of the current pixel block, wherein C[0]=R[0] . For any given pixel point with coordinates (i, j), use the surrounding pixel points C[i] (i=0, 1, ..., 2q) and R[j] (j= 0, 1, .
在视频编码中,对视频图像的处理都是以16×16的宏块为单位的。在AVS标准中,一个宏块包括4个8×8的亮度块和2个8×8的色度块。亮度块有5种预测模式:垂直预测模式、水平预测模式、直流(DirectCurrent,以下简称DC)预测模式、对角下左预测模式、对角下右预测模式。除DC预测模式外,其他的都为方向预测模式,图3示出了方向预测模式的指向,其中,0、1、3、4分别表示垂直预测模式的指向、水平模式预测的指向、对角下左预测模式的指向、对角下右预测模式的指向;c表示与当前像素块相邻的左边一列,r表示与当前像素块相邻的上边一行。In video coding, video images are processed in units of 16×16 macroblocks. In the AVS standard, a macroblock includes four 8×8 luma blocks and two 8×8 chrominance blocks. There are five prediction modes for the luma block: a vertical prediction mode, a horizontal prediction mode, a direct current (DirectCurrent, hereinafter referred to as DC) prediction mode, a diagonal down-left prediction mode, and a diagonal down-right prediction mode. Except for the DC prediction mode, all others are directional prediction modes. Figure 3 shows the direction of the directional prediction mode, where 0, 1, 3, and 4 respectively represent the direction of the vertical prediction mode, the direction of the horizontal mode prediction, and the direction of the diagonal prediction mode. The orientation of the bottom-left prediction mode and the orientation of the diagonal bottom-right prediction mode; c indicates the left column adjacent to the current pixel block, and r indicates the upper row adjacent to the current pixel block.
未示出的DC预测模式定义如下:The not shown DC prediction modes are defined as follows:
1)如果r[i]、c[i](i=0~9)都“可用” (已知),如果某个样本所在的块不存在或者此样本未解码,则此样本“不可用”,否则,此样本“可用”,则1) If both r[i] and c[i] (i=0~9) are "available" (known), if the block where a sample is located does not exist or the sample is not decoded, the sample is "unavailable" , otherwise, this sample is "available", then
predMatrix[x,y]=((r[x]+2×c[x+1]+c[x+2]+2)>>2+(c[y]+2×c[y+1]+c[y+2]+2)>>2)>>1(x,y=0~7)predMatrix[x, y]=((r[x]+2×c[x+1]+c[x+2]+2)>>2+(c[y]+2×c[y+1] +c[y+2]+2)>>2)>>1(x, y=0~7)
其中,predMatrix[x,y]表示当前像素块中,坐标为(x,y)的待预测的像素点的像素值;r[x+1]表示与当前像素块相邻的上边一行中的,与待预测的像素点位于同一列的像素点的像素值;r[x]表示r[x+1]表示的像素点的左侧相邻像素点的像素值;r[x+2]表示r[x+1]表示的像素点的右侧相邻像素点的像素值;c[x+1]表示与当前像素块相邻的左边一列中的,与待预测的像素点位于同一行的像素点的像素值;c[x]表示c[x+1]表示的像素点的上侧像素点的像素值;c[x+2]表示c[x+1]表示的像素点的下侧像素点的像素值。下面的分析中,上述符号均为上述表述的含义。Among them, predMatrix[x, y] represents the pixel value of the pixel to be predicted whose coordinates are (x, y) in the current pixel block; r[x+1] represents the upper row adjacent to the current pixel block, The pixel value of the pixel located in the same column as the pixel to be predicted; r[x] indicates the pixel value of the left adjacent pixel of the pixel indicated by r[x+1]; r[x+2] indicates r [x+1] represents the pixel value of the right adjacent pixel of the pixel; c[x+1] represents the pixel in the same row as the pixel to be predicted in the left column adjacent to the current pixel block The pixel value of the point; c[x] indicates the pixel value of the upper pixel of the pixel indicated by c[x+1]; c[x+2] indicates the lower pixel of the pixel indicated by c[x+1] The pixel value of the point. In the following analysis, the above symbols have the meanings of the above expressions.
2)如果只有r[i](i=0~9) “可用”,则2) If only r[i] (i=0~9) is "available", then
predMatrix[x,y]=(c[y]+2×c[y+1]+c[y+2]+2)>>2(x,y=0~7)predMatrix[x, y]=(c[y]+2×c[y+1]+c[y+2]+2)>>2(x, y=0~7)
3)如果只有c[i](i=0~9)“可用”,则3) If only c[i] (i=0~9) is "available", then
predMatrix[x,y]=(c[y]+2×c[y+1]+c[y+2]+2)>>2(x,y=0~7);predMatrix[x, y]=(c[y]+2×c[y+1]+c[y+2]+2)>>2(x, y=0~7);
4)否则,predMatrix[x,y]=128(x,y=0~7)4) Otherwise, predMatrix[x, y]=128(x, y=0~7)
色度块有4种模式:Chroma blocks have 4 modes:
模式0:DC预测(DC prediction)Mode 0: DC prediction (DC prediction)
模式1:水平预测(horizontal prediction)Mode 1: Horizontal prediction
模式2:垂直预测(vertical prediction)Mode 2: vertical prediction
模式3:平板预测(plane prediction)Mode 3: plane prediction
其中DC预测模式定义与亮度块8×8块预测模式的定义是一致的。The definition of the DC prediction mode is consistent with the definition of the 8×8 block prediction mode of the luma block.
在H.264/AVC标准中,一个宏块包括一个亮度块和两个色度块,而亮度块为1个16×16的亮度块或者是16个4×4的亮度块,色度块为2个8×8的。对于4×4的亮度块,有9种预测模式,这些预测模式和顺序为:In the H.264/AVC standard, a macroblock includes a luma block and two chrominance blocks, and the luma block is a 16×16 luma block or 16 4×4 luma blocks, and the chrominance block is 2 8x8's. For a 4×4 luma block, there are 9 prediction modes, and these prediction modes and order are:
模式0:垂直预测(vertical prediction)Mode 0: Vertical prediction
模式1:水平预测(horizontal prediction)Mode 1: Horizontal prediction
模式2:DC预测(DC prediction)Mode 2: DC prediction (DC prediction)
模式3:4 5度方向预测(diagonal down/left prediction)Mode 3: 4 5 degree direction prediction (diagonal down/left prediction)
模式4:135度方向预测(diagonal down/right prediction)Mode 4: 135-degree direction prediction (diagonal down/right prediction)
模式5:112.5度方向预测(vertical-right prediction)Mode 5: 112.5 degree direction prediction (vertical-right prediction)
模式6:157.5度方向预测(horizontal-down prediction)Mode 6: 157.5 degree direction prediction (horizontal-down prediction)
模式7:67.5度方向预测(vertical-left prediction)Mode 7: 67.5 degree direction prediction (vertical-left prediction)
模式8:22.5度方向预测(horizontal-up prediction)Mode 8: 22.5 degree direction prediction (horizontal-up prediction)
其中,除了DC预测模式,剩余的8种预测模式称为方向预测模式,图4示出了参考像素和预测块,其中大写字母表示的为参考像素,小写字母表示的是预测块。图5中的数字标明了各个方向预测模式的指向。Among them, in addition to the DC prediction mode, the remaining eight prediction modes are called directional prediction modes. Figure 4 shows reference pixels and prediction blocks, where uppercase letters represent reference pixels and lowercase letters represent prediction blocks. The numbers in Fig. 5 indicate the directions of the prediction modes in each direction.
未标出的DC预测模式定义为:The unmarked DC prediction modes are defined as:
1)如果r[i]、c[i](i=1,2,...,4)都可用,则预测块中的所有预测样本的像素预测值均为:1) If r[i], c[i] (i=1, 2, ..., 4) are available, then the pixel prediction values of all prediction samples in the prediction block are:
2)如果只有r[i](i=1,2,...,4)可用,则2) If only r[i] (i=1, 2, ..., 4) are available, then
3)如果只有c[i](i=1,2,...,4)可用,则3) If only c[i] (i=1, 2, ..., 4) are available, then
4)否则,predMatrix[x,y]=128(x,y=0~3)4) Otherwise, predMatrix[x, y]=128(x, y=0~3)
16×16亮度块有4种模式,分别是:There are 4 modes for 16×16 luminance block, they are:
模式0:垂直预测(vertical prediction)Mode 0: Vertical prediction
模式1:水平预测(horizontal prediction)Mode 1: Horizontal prediction
模式2:DC预测(DC pre diction)Mode 2: DC prediction (DC prediction)
模式3:平板预测(plane prediction)Mode 3: plane prediction
其中的DC预测模式定义与亮度块为4×4块的预测模式定义一致。The definition of the DC prediction mode is consistent with the definition of the prediction mode that the luma block is a 4×4 block.
8×8色度块有4种模式,分别是:The 8×8 chroma block has 4 modes, namely:
模式0:DC预测(DC prediction)Mode 0: DC prediction (DC prediction)
模式1:水平预测(horizontal prediction)Mode 1: Horizontal prediction
模式2:垂直预测(vertical prediction)Mode 2: vertical prediction
模式3:平板预测(plane prediction)Mode 3: plane prediction
其中的DC预测模式定义与亮度块为4×4块的预测模式定义一致。The definition of the DC prediction mode is consistent with the definition of the prediction mode that the luma block is a 4×4 block.
从上述的分析可以看出:AVS标准中,是通过对与坐标为(x,y)的当前像素相关的可用的像素值r[x]、r[x+1]、r[x+2]、c[x]、c[x+1]、c[x+2]滤波后的像素平均值作为当前像素的预测值;H.264/AVC标准中,是通过当前像素块的左边和上边已经编码可用的像素的平均值作为当前像素块的预测值。这种直接计算平均或者滤波后计算平均的方法很粗糙,不能充分揭示出像素间的相关性,因此,这种预测方法是不精确的。From the above analysis, it can be seen that in the AVS standard, the available pixel values r[x], r[x+1], r[x+2] related to the current pixel with coordinates (x, y) , c[x], c[x+1], c[x+2] filtered average value of the pixel as the predicted value of the current pixel; in the H.264/AVC standard, the left and top of the current pixel block have been The average value of pixels available for encoding is used as the prediction value of the current pixel block. This method of directly calculating the average or calculating the average after filtering is very rough and cannot fully reveal the correlation between pixels, so this prediction method is not accurate.
发明内容Contents of the invention
本发明的目的是针对现有技术的缺陷,提供一种DC模式预测方法,用以解决现有预测方法不精确问题,实现对当前像素块中各待预测像素点的精确预测。本发明通过实施例提供了如下的技术方案:The purpose of the present invention is to provide a DC mode prediction method to solve the inaccurate problem of the existing prediction method and realize accurate prediction of each pixel to be predicted in the current pixel block in view of the defects of the prior art. The present invention provides following technical scheme through embodiment:
一种DC模式预测方法,包括:选取当前预测的宏块,将该宏块分为数个像素块;选取一个像素块作为当前像素块,该当前像素块的左侧像素块中与该当前像素块相邻的像素列中,与该当前像素块中待预测的像素点位于同一行的像素点为第一像素点,该当前像素块的上侧像素块中与该当前像素块相邻的像素行中,与该当前像素块中待预测的像素点位于同一列的像素点为第二像素点,该当前像素块的左上侧像素块中,与该当前像素块相邻的像素点为第三像素点;如果所述第一像素点所在的像素列和第二像素点所在的像素行中的所有像素点的像素值,以及第三像素点的像素值均已知,则对所述第一像素点进行滤波处理得到第一值,对所述第二像素点进行滤波处理得到第二值,对所述第三像素点进行滤波处理得到第三值;将所述第一值、第二值和第三值进行加权处理得到所述待预测的像素点的像素值;如果只有所述第一像素点所在的像素列中的像素点的像素值已知,则将对所述第一像素点进行滤波处理后得到的第一值作为所述待预测的像素点的像素值;如果只有所述第二像素点所在的像素行中的像素点的像素值已知,则将对所述第二像素点进行滤波处理后得到的第二值作为所述待预测的像素点的像素值;如果所述第一像素点所在的像素列和第二像素点所在的像素行中的所有像素点的像素值均未知时,将所述当前像素块中任一像素点的像素值设为128。A DC mode prediction method, comprising: selecting a currently predicted macroblock, and dividing the macroblock into several pixel blocks; selecting a pixel block as the current pixel block, and the left pixel block of the current pixel block and the current pixel block In the adjacent pixel columns, the pixel in the same row as the pixel to be predicted in the current pixel block is the first pixel, and the pixel row adjacent to the current pixel block in the upper pixel block of the current pixel block Among them, the pixel point in the same column as the pixel point to be predicted in the current pixel block is the second pixel point, and in the upper left pixel block of the current pixel block, the pixel point adjacent to the current pixel block is the third pixel point point; if the pixel values of all pixels in the pixel column where the first pixel is located and the pixel row where the second pixel is located, and the pixel values of the third pixel are known, then for the first pixel Points are filtered to obtain a first value, the second pixel is filtered to obtain a second value, and the third pixel is filtered to obtain a third value; the first value, the second value and The third value is weighted to obtain the pixel value of the pixel to be predicted; if only the pixel values of the pixels in the pixel column where the first pixel is located are known, then the first pixel will be The first value obtained after the filtering process is used as the pixel value of the pixel to be predicted; if only the pixel value of the pixel in the pixel row where the second pixel is located is known, then the second pixel will be The second value obtained after the point is filtered is used as the pixel value of the pixel to be predicted; if the pixel values of all the pixels in the pixel column where the first pixel is located and the pixel row where the second pixel is located When neither is known, set the pixel value of any pixel in the current pixel block to 128.
本发明实施例通过对已编码可用的像素点的像素值进行滤波加权处理,而不是简单的平均处理,以这些像素值滤波后的加权值,作为当前像素的预测值,提高预测的精度。In the embodiment of the present invention, the pixel values of encoded and available pixel points are filtered and weighted instead of simple average processing, and the weighted values of these pixel values after filtering are used as the predicted value of the current pixel to improve the prediction accuracy.
附图说明Description of drawings
图1为现有技术视频编码混合框架原理图;FIG. 1 is a schematic diagram of a video coding hybrid framework in the prior art;
图2为现有技术当前预测块的坐标示意图;FIG. 2 is a schematic diagram of coordinates of a current prediction block in the prior art;
图3为现有技术AVS标准中方向预测的指向图;Fig. 3 is a directing diagram of direction prediction in the prior art AVS standard;
图4为现有技术H.264/AVC标准中参考像素与当前预测块关系的示意图;FIG. 4 is a schematic diagram of the relationship between a reference pixel and a current prediction block in the prior art H.264/AVC standard;
图5为现有技术H.264/AVC标准中方向预测的指向图;Fig. 5 is a directing diagram of direction prediction in the prior art H.264/AVC standard;
图6为本发明DC模式预测方法流程图;Fig. 6 is a flow chart of the DC mode prediction method of the present invention;
图7为本发明DC模式预测方法当前像素块与相邻像素块中像素点的关系图。FIG. 7 is a relationship diagram between the current pixel block and the pixels in adjacent pixel blocks in the DC mode 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.
图6为本发明DC模式预测方法流程图,图7为本发明DC模式预测方法当前像素块与相邻像素块中像素点的关系图。参见图6及图7,该DC模式预测方法包括:步骤11:选取当前预测的宏块,将该宏块分为数个像素块;由于视频图像的处理是以16×16的宏块为单位进行处理的,因此该宏块选为16×16像素点的。将该宏块按从左至右、从上至下的顺序分为若干个p×q的像素块;p表示列数,q表示行数,p的数值可以取为4、8、16,q的数值可以取为4、8、16。步骤12:选取一个像素块作为当前像素块1,根据该当前像素块的左侧像素块2中与该当前像素块1相邻的像素列21中,与该当前像素块中待预测的像素点位于同一行的第一像素点;和/或该当前像素块的上侧像素块3中与该当前像素块1相邻的像素行31中,与该当前像素块中待预测的像素点位于同一列的第二像素点;和/或该当前像素块的左上侧像素块中4,与该当前像素块相邻的第三像素点,预测该当前像素块中的该待预测的像素点的像素值。FIG. 6 is a flow chart of the DC mode prediction method of the present invention, and FIG. 7 is a relationship diagram between the current pixel block and the pixels in adjacent pixel blocks of the DC mode prediction method of the present invention. Referring to Fig. 6 and Fig. 7, the DC mode prediction method includes: Step 11: select the currently predicted macroblock, and divide the macroblock into several pixel blocks; Therefore, the macroblock is selected as 16×16 pixels. Divide the macroblock into several p×q pixel blocks in order from left to right and from top to bottom; p represents the number of columns, q represents the number of rows, and the value of p can be 4, 8, 16, q The value of can be taken as 4, 8, 16. Step 12: Select a pixel block as the
上述流程图中的步骤12,具体实施例可分为第一实施例——AVS标准下8×8亮度块和/或8×8色度块和/或H.264/AVC标准下8×8色度块的DC模式预测方法,及第二实施例——H.264/AVC标准下4×4亮度块的DC模式预测方法。The specific embodiment of
第一实施例:在进行DC预测之前,先要获得参考样本(像素点),以依据参考样本进行预测。设当前像素块所属的图像样本矩阵为为8×8的矩阵I,I可表示亮度或色度矩阵。如果某个样本所在的块不“存在”或此样本尚未解码,则此样本“不可用”,反之此样本“可用”。Embodiment 1: Before performing DC prediction, reference samples (pixels) must be obtained first, so as to perform prediction based on the reference samples. Assume that the image sample matrix to which the current pixel block belongs is an 8×8 matrix I, where I can represent a luminance or chrominance matrix. A sample is "not available" if the block it is in does not "exist" or the sample has not been decoded, otherwise it is "available".
设当前像素块左上角样本的坐标是(x0,y0),其中,x0表示列,y0表示行,则当前像素块参考样本按以下规则获得:Assuming that the coordinates of the sample at the upper left corner of the current pixel block are (x0, y0), where x0 represents the column and y0 represents the row, then the reference sample of the current pixel block is obtained according to the following rules:
如果坐标为(x0+i-1,y0-1)(i=1..8)的样本“可用”,即当前像素块的上块中与当前像素块相邻的行可用,则该行元素(参考样本的像素值)为:r[i]=I[y0-1][x0+i-1];否则r[i]“不可用”;If the sample with coordinates (x0+i-1, y0-1) (i=1..8) is "available", that is, the row adjacent to the current pixel block in the upper block of the current pixel block is available, then the row element (The pixel value of the reference sample) is: r[i]=I[y0-1][x0+i-1]; otherwise r[i] is "unavailable";
如果坐标为(x0+i-1,y0-1)(i=9..16)的样本“可用”,即当前像素块的右上块中与当前像素块相邻的行可用,则r[i]=I[y0-1][x0+i-1];否则r[i]等于r[8];If the sample with the coordinates (x0+i-1, y0-1) (i=9..16) is "available", that is, the row adjacent to the current pixel block in the upper right block of the current pixel block is available, then r[i ]=I[y0-1][x0+i-1]; otherwise r[i] is equal to r[8];
如果坐标为(x0-1,y0+i-1)(i=1..8)的样本“可用”,即当前像素块的左块中与当前像素块相邻的列可用,则c[i]=I[y 0+i-1][x0-1];否则c[i]“不可用”;If the sample with coordinates (x0-1, y0+i-1) (i=1..8) is "available", that is, the column adjacent to the current pixel block in the left block of the current pixel block is available, then c[i ] = I[
如果坐标为(x0-1,y0+i-1)(i=9..16)的样本“可用”,即当前像素块的左下块中与当前像素块相邻的列可用,则c[i]=I[y0+i-1][x0-1];否则c[i]等于c[8];If the sample with coordinates (x0-1, y0+i-1) (i=9..16) is "available", that is, the column adjacent to the current pixel block in the lower left block of the current pixel block is available, then c[i ]=I[y0+i-1][x0-1]; otherwise c[i] is equal to c[8];
如果坐标为(x0-1,y0-1)的样本“可用”,则r[0]=I[y0-1][x0-1];否则:如果r[1]“可用”,并且c[1]“可用”,r[0]=(r[1]+c[1]+1)>>1;If the sample with coordinates (x0-1, y0-1) is "available", then r[0] = I[y0-1][x0-1]; otherwise: if r[1] is "available", and c[ 1] "Available", r[0]=(r[1]+c[1]+1)>>1;
如果r[1]“可用”,并且c[1]“不可用”,r[0]=r[1];if r[1] is "available", and c[1] is "not available", r[0] = r[1];
如果c[1]“可用”,并且r[1]“不可用”,r[0]=c[1];if c[1] is "available", and r[1] is "not available", r[0] = c[1];
否则r[0]“不可用”。Otherwise r[0] is "not available".
获取参考样本后,就要对当前像素块进行像素值DC预测,计算方法如下:After obtaining the reference samples, it is necessary to perform pixel value DC prediction on the current pixel block, and the calculation method is as follows:
(1)如果r[i]、c[i](i=0...9)均可用,即当前像素块左块中与当前像素块相邻的列、当前像素块上块中与当前像素块相邻的行,及当前像素块左上块中与当前像素块相邻的像素点均可用时,根据当前像素块左块中与当前像素块相邻的列中,与待预测的像素点位于同行的第一像素点的像素值、当前像素块上块中与当前像素块相邻的行中,与待预测的像素点位于同列的第二像素点的像素值、当前像素块的左上块中与当前像素块相邻的第三像素点的像素值,预测当前像素块中的待预测的像素点的像素值。具体为对所述第一像素点的像素值进行滤波,得到第一值,对所述第二像素点的像素值进行滤波,得到第二值,对所述第三像素点的像素值进行滤波,得到第三值;对所述第一值、第二值和第三值进行加权处理,将加权后的值作为待预测的像素的像素值。(1) If both r[i] and c[i] (i=0...9) are available, that is, the column adjacent to the current pixel block in the left block of the current pixel block, and the column adjacent to the current pixel block in the upper block of the current pixel block When the rows adjacent to the current pixel block and the pixels adjacent to the current pixel block in the upper left block of the current pixel block are available, according to the column adjacent to the current pixel block in the left block of the current pixel block, the pixel point to be predicted is located The pixel value of the first pixel in the same row, the pixel value of the second pixel in the same column as the pixel to be predicted in the row adjacent to the current pixel block in the upper block of the current pixel block, and the upper left block of the current pixel block The pixel value of the third pixel point adjacent to the current pixel block is used to predict the pixel value of the pixel point to be predicted in the current pixel block. Specifically, filter the pixel value of the first pixel point to obtain a first value, filter the pixel value of the second pixel point to obtain a second value, and filter the pixel value of the third pixel point , to obtain a third value; performing weighting processing on the first value, the second value and the third value, and using the weighted value as the pixel value of the pixel to be predicted.
如果当前像素块的行数和列数均大于8时(本实施例即为这种情况),对所述第一像素点的像素值进行滤波,得到第一值具体为:将与所述第一像素点相邻的上像素点的像素值的权重设为1,将所述第一像素点的像素值的权重设为2,将与所述第一像素点相邻的下像素点的像素值的权重设为1,将上述加权处理后的数据的平均值,作为所述第一值;对所述第二像素点的像素值进行滤波,得到第二值具体为:将与所述第二像素点相邻的左像素点的像素值的权重设为1,将所述第二像素点的像素值的权重设为2,将与所述第二像素点相邻的右像素点的像素值的权重设为1,将上述加权处理后的数据的平均值,作为所述第二值;对所述第三像素点的像素值进行滤波,得到第三值具体为:将与所述第三像素点相邻的右像素点的像素值的权重设为1,将所述第三像素点的像素值的权重设为2,将与所述第三像素点相邻的下像素点的像素值的权重设为1,将上述加权处理后的数据的平均值,作为所述第三值。If both the number of rows and the number of columns of the current pixel block are greater than 8 (this is the case in this embodiment), the pixel value of the first pixel point is filtered, and the first value obtained is specifically: The weight of the pixel value of the upper pixel point adjacent to a pixel point is set to 1, the weight of the pixel value of the first pixel point is set to 2, and the pixel value of the lower pixel point adjacent to the first pixel point is set to The weight of the value is set to 1, and the average value of the above-mentioned weighted data is used as the first value; the pixel value of the second pixel point is filtered to obtain the second value as follows: The weight of the pixel value of the left pixel adjacent to the second pixel is set to 1, the weight of the pixel value of the second pixel is set to 2, and the pixel of the right pixel adjacent to the second pixel is The weight of the value is set to 1, and the average value of the above-mentioned weighted data is used as the second value; the pixel value of the third pixel is filtered to obtain the third value, which is specifically: The weight of the pixel value of the right pixel point adjacent to the three pixel points is set to 1, the weight of the pixel value of the third pixel point is set to 2, and the pixel value of the lower pixel point adjacent to the third pixel point is set to The weight of the value is set to 1, and the average value of the above weighted data is used as the third value.
举例如下:以上述8×8的当前像素块为例,如要预测行坐标为y 1,列坐标为x1的像素点的像素值,那么第一像素点的像素值为c[y1+1],第一值为EP[-(y1+1)]=(c[y1]+2 c[y1+1]+c[y1+2]+2)>>2;第二像素点的像素值为r[x1+1],第二值为EP[(x1+1)]=(r[x1]+2 r[x1+1]+r[x 1+2]+2)>>2;第三像素点的像素值为r[0],第三值为EP[0]=(r[1]+2 r[0]+c[1]+2)>>2;对上述第一值、第二值、第三值再进行加权处理,处理后的值作为预测值,即预测值predMatrix[x,y]=αEP[(x+1)]+βEP[-(y+1)]+γEP[0]。其中力权系数α、β、γ是根据再生核插值函数得到的,且再生核插值函数的插值节点是当前像素块相邻的左块、上块、左下块、右上块的像素点。下面分析再生核函数:An example is as follows: Take the above 8×8 current pixel block as an example, if you want to predict the pixel value of the pixel whose row coordinate is y 1 and whose column coordinate is x1, then the pixel value of the first pixel is c[y1+1] , the first value is EP[-(y1+1)]=(c[y1]+2 c[y1+1]+c[y1+2]+2)>>2; the pixel value of the second pixel is r[x1+1], the second value is EP[(x1+1)]=(r[x1]+2 r[x1+1]+r[x 1+2]+2)>>2; the third The pixel value of the pixel point is r[0], and the third value is EP[0]=(r[1]+2 r[0]+c[1]+2)>>2; The binary value and the third value are then weighted, and the processed value is used as the predicted value, that is, the predicted value predMatrix[x, y]=αEP[(x+1)]+βEP[-(y+1)]+γEP[ 0]. Among them, the power weight coefficients α, β, and γ are obtained according to the interpolation function of the regeneration kernel, and the interpolation nodes of the interpolation function of the regeneration kernel are the pixels of the left block, upper block, lower left block, and upper right block adjacent to the current pixel block. The regeneration kernel function is analyzed as follows:
再生核函数形成的空间为再生核空间,再生核空间是一类重要的函数家族,它是数值分析研究的理想空间框架,再生核空间理论与实际应用相结合,在信号处理、量子力学、随机过程等方面有广泛的应用,特别是再生核方法为无规则的多元离散数据的逼近提供了一个理想的框架。再生核之所以有如此强大的数值表现力应完全归功于再生核空间所具有的再生属性。The space formed by the regenerative kernel function is the regenerative kernel space. The regenerative kernel space is an important family of functions. Processes and other aspects have a wide range of applications, especially the regenerative kernel method provides an ideal framework for the approximation of irregular multivariate discrete data. The reason why the regenerative nucleus has such a powerful numerical expression should be entirely attributed to the regenerative property of the regenerative kernel space.
W2p(R)空间是一个定义在R上的绝对连续函数的内积空间,且f(p)∈L2(R),该空间的内积与范数为:W2p (R) space is an inner product space of an absolute continuous function defined on R, and f(p) ∈L 2 (R), the inner product and norm of this space are:
这里{ck}kp=0满足条件
记W2p(R)的再生核为Rp(x,ξ)。根据再生核的再生属性,对于任意的
f(x)=(f(ξ),Rp(x,ξ)) (3)f(x)=(f(ξ),Rp (x,ξ)) (3)
对于W2p(R),随着p的增大,再生核空间的光滑度增强,对于p=1,2,3,相应的再生核空间的函数有解析表达式(见表1),当p>4相应的再生核空间的函数没有解析表达式,为了便于表征像素间的相关性,构造的插值函数应具有如下优良特性:插值节点精确成立,节点可以非规则分布,具有简洁的表达式,插值函数具有一定的光滑性。For W2p (R), as p increases, the smoothness of the regenerated kernel space increases. For p=1, 2, 3, the corresponding function of the regenerated kernel space has an analytical expression (see Table 1), when There is no analytical expression for the function of the regenerating kernel space corresponding to p>4. In order to facilitate the representation of the correlation between pixels, the interpolation function constructed should have the following excellent characteristics: the interpolation nodes are established accurately, the nodes can be distributed irregularly, and have concise expressions , the interpolation function has certain smoothness.
表1Table 1
为了构造满足上述特点的插值函数,本实施例采用再生核
f(x,y)=(f(ξ,η),K(x,ξ,y,η)) (4)f(x, y)=(f(ξ, η), K(x, ξ, y, η)) (4)
假设{xi,yi}i∞是两个互异的点集,ψi(x,y)=K(xi,x,yi,y),i=1,2,...,通过对{ψi(x,y)}i=1∞正交化处理,可以得到W(D)的标准正交基{ψi*(x,y)}i=1∞,Suppose {xi , yi }i∞ are two different point sets, ψi (x, y)=K(xi, x, yi , y), i=1, 2,..., By orthogonalizing {ψi (x, y)}i=1∞ , the orthonormal basis {ψi* (x, y)}i=1∞ of W(D) can be obtained,
其中βij,j=1,2,..,i;i=1,2,...,n是正交化系数,可由(6)式精确得到Among them, βij , j=1, 2,..., i; i=1, 2,..., n is the orthogonalization coefficient, which can be accurately obtained by formula (6)
这里Ci=(ψi(x,y),ψi(x,y)),
利用再生核空间的再生属性构造了再生核空间插值公式:Using the regeneration property of the regeneration kernel space, the interpolation formula of the regeneration kernel space is constructed:
这里
由于再生核空间的内积运算是精确的,进而正交化系数没有舍入误差,特别再生核具有解析表达式,因此插值系数hl可以精确得到,即插值公式在插值节点处精确成立。由于没有对插值节点分布施加任何约束,该插值方法适用于插值节点规则分布和不规则分布插值问题,当将相邻块已经重构的像素作为该插值函数的插值节点时,就可以得到当前像素的预测值。由上述的理论分析可得,将基于再生核插值构造的新的DC模式预测方法代替原有的DC模式预测方法,能够有效地提高预测精度。Since the inner product operation of the regenerating kernel space is accurate, the orthogonalization coefficient has no rounding error, especially the regenerating kernel has an analytical expression, so the interpolation coefficient hl can be obtained accurately, that is, the interpolation formula is established exactly at the interpolation node. Since no constraints are imposed on the distribution of interpolation nodes, this interpolation method is suitable for interpolation problems with regular distribution of interpolation nodes and irregular distribution. When the reconstructed pixels of adjacent blocks are used as the interpolation nodes of the interpolation function, the current pixel can be obtained predicted value of . From the above theoretical analysis, it can be concluded that replacing the original DC mode prediction method with the new DC mode prediction method based on the regenerative kernel interpolation structure can effectively improve the prediction accuracy.
为了便于将再生核插值公式应用于图像处理,将式(7)表示成其等价形式:In order to facilitate the application of the regeneration kernel interpolation formula to image processing, formula (7) is expressed in its equivalent form:
这里f(xi,yj),Hi,j(x,y)分别与f(xl,yl),hl(x,y)表示同一含义,不同的只是由原来的一个索引l形式表示成两个索引(i,j)的形式,在帧内预测中,亮度或色度的样值的预测采用的基于p×q块预测结构,其中p表示块的列数,q表示块的行数,它是利用该p×q块上、右上、左和左上边已经重构的像素值, 因此我们只能选择与当前像素块相邻的已经重构的像素点作为插值节点,因此将上式改写为如下形式:Here f(xi , yj ), Hi, j (x, y) have the same meaning as f(xl , yl ), hl (x, y) respectively, the difference is only the original index l The form is expressed in the form of two indexes (i, j). In intra-frame prediction, the prediction of luma or chrominance samples is based on a p×q block prediction structure, where p represents the number of columns of the block, and q represents the block The number of rows, it uses the reconstructed pixel values on the p×q block, the upper right, the left and the upper left, so we can only select the reconstructed pixel adjacent to the current pixel block as the interpolation node, so Rewrite the above formula into the following form:
其中,表示当前像素块的像素预测值;I(x0,yj)表示与当前像素块的左、左下块中与当前像素块相邻的列中的像素值;I(xi,y0)表示与当前像素块的上、右上块中与当前像素块相邻的行中的像素值;I(x0,y0)表示当前像素块的左上块中与当前像素块相邻的像素点的像素值;它们前面的权值是根据上述再生核插值函数计算出来的,实际应用中,由于大部分权值都近似为0,为了降低DC模式预测方法的复杂度,对式(9)近似得到:in, Represents the pixel prediction value of the current pixel block; I(x0 , yj ) represents the pixel value in the column adjacent to the current pixel block in the left and lower left blocks of the current pixel block; I(xi , y0 ) represents The pixel value in the row adjacent to the current pixel block in the upper and upper right blocks of the current pixel block; I(x0 , y0 ) represents the pixel of the pixel point adjacent to the current pixel block in the upper left block of the current pixel block The weights in front of them are calculated according to the above regeneration kernel interpolation function. In practical applications, since most of the weights are approximately 0, in order to reduce the complexity of the DC mode prediction method, the formula (9) is approximated:
其中,待预测的像素点的坐标为(xi0,yj0);待预测的像素点的像素值为I(x0,yj0)为对当前像素块的左块中与待预测的像素点位于同一行的像素点的像素值,即第一像素点进行滤波后的值;I(xi0,y0)为对当前像素块的上块中与待预测的像素点位于同一列的像素点的像素值,即第二像素点进行滤波后的值;I(x0,y0)为对当前像素块的左上块中与当前像素块像素点的像素值,即第三像素点进行滤波后的值。Among them, the coordinates of the pixel to be predicted are (xi0 , yj0 ); the pixel value of the pixel to be predicted is I(x0 , yj0 ) is the pixel value of the pixel on the same row as the pixel to be predicted in the left block of the current pixel block, that is, the filtered value of the first pixel; I(xi0 , y0 ) is the pixel value of the pixel point in the same column as the pixel point to be predicted in the upper block of the current pixel block, that is, the value after filtering the second pixel point; I(x0 , y0 ) is the value of the current pixel The pixel value of the pixel in the upper left block of the block and the pixel of the current pixel block, that is, the filtered value of the third pixel.
根据上述中的公式:坐标为(x,y)的待预测的像素点的像素值predMatrix[x,y]=αEP[(x+1)]+βEP[-(y+1)]+γEP[0],再根据上述再生核插值函数计算出加权系数α、β、γ,并且为了计算机实现,加权系数的分母取为2的幂次,以便除法运算可以用右移位运算实现。因此可得到AVS标准下8×8亮度块和/或8×8色度块和/或H.264/AVC标准下8×8色度块,且r[i]、c[i](i=0...9)均可用时,DC模式预测方法的计算式:According to the above formula: the pixel value predMatrix[x, y]=αEP[(x+1)]+βEP[-(y+1)]+γEP[ 0], and then calculate the weighting coefficients α, β, γ according to the above-mentioned regeneration kernel interpolation function, and for computer realization, the denominator of the weighting coefficient is taken as the power of 2, so that the division operation can be realized with the right shift operation. Therefore, 8×8 luma blocks and/or 8×8 chrominance blocks and/or 8×8 chrominance blocks under the H.264/AVC standard can be obtained under the AVS standard, and r[i], c[i] (i= 0...9) are available, the calculation formula of the DC mode prediction method:
predMatrix[0,0]=(56×EP[1]+56×EP[-1]-48×EP[0])/64;predMatrix[0,0]=(56×EP[1]+56×EP[-1]-48×EP[0])/64;
predMatrix[0,1]=(20×EP[1]+29×EP[-2]-17×EP[0])/32;predMatrix[0,1]=(20×EP[1]+29×EP[-2]-17×EP[0])/32;
predMatrix[0,2]=(24×EP[1]+61×EP[-3]-21×EP[0])/64;predMatrix[0,2]=(24×EP[1]+61×EP[-3]-21×EP[0])/64;
predMatrix[0,3]=(27×EP[1]+124×EP[-4]-23×EP[0])/128;predMatrix[0,3]=(27×EP[1]+124×EP[-4]-23×EP[0])/128;
predMatrix[0,4]=(7×EP[1]+63×EP[-5]-6×EP[0])/64;predMatrix[0,4]=(7×EP[1]+63×EP[-5]-6×EP[0])/64;
predMatrix[0,5]=(6×EP[1]+127×EP[-6]-5×EP[0])/128;predMatrix[0,5]=(6×EP[1]+127×EP[-6]-5×EP[0])/128;
predMatrix[0,6]=(1×EP[1]×EP[-7]-1×EP[0])/64;predMatrix[0,6]=(1×EP[1]×EP[-7]-1×EP[0])/64;
predMatrix[0,7]=(1×EP[1]×EP[-8]-1×EP[0])/128;predMatrix[0,7]=(1×EP[1]×EP[-8]-1×EP[0])/128;
predMatrix[1,0]=(29×EP[2]+20×EP[-1]-17×EP[0])/32;predMatrix[1,0]=(29×EP[2]+20×EP[-1]-17×EP[0])/32;
predMatrix[1,1]=(45×EP[2]5×EP[-2]-26×EP[0])/64;predMatrix[1,1]=(45×EP[2]5×EP[-2]-26×EP[0])/64;
predMatrix[1,2]=(31×EP[2]+51×EP[-3]-18×EP[0])/64;predMatrix[1,2]=(31×EP[2]+51×EP[-3]-18×EP[0])/64;
predMatrix[1,3]=(9×EP[2]+28×EP[-4]-5×EP[0])/32;predMatrix[1,3]=(9×EP[2]+28×EP[-4]-5×EP[0])/32;
predMatrix[1,4]=(77×EP[2]81×EP[-5]-46×EP[0])/512;predMatrix[1,4]=(77×EP[2]81×EP[-5]-46×EP[0])/512;
predMatrix[1,5]=(5×EP[2]+62×EP[-6]-3×EP[0])/64;predMatrix[1,5]=(5×EP[2]+62×EP[-6]-3×EP[0])/64;
predMatrix[1,6]=(10×EP[2]+251×EP[-7]-5×EP[0])/256;predMatrix[1,6]=(10×EP[2]+251×EP[-7]-5×EP[0])/256;
predMatrix[1,7]=(10×EP[2]+507×EP[-8]-5×EP[0])/512;predMatrix[1,7]=(10×EP[2]+507×EP[-8]-5×EP[0])/512;
predMatrix[2,0]=(61×EP[3]+24×EP[-1]-21×EP[0])/64;predMatrix[2,0]=(61×EP[3]+24×EP[-1]-21×EP[0])/64;
predMatrix[2,1]=(51×EP[3]+31×EP[-2]-18×EP[0])/64;predMatrix[2,1]=(51×EP[3]+31×EP[-2]-18×EP[0])/64;
predMatrix[2,2]=(5×EP[3]+5×EP[-3]-2×EP[0])/8;predMatrix[2,2]=(5×EP[3]+5×EP[-3]-2×EP[0])/8;
predMatrix[2,3]=(51×EP[3]+95×EP[-4]-18×EP[0])/128;predMatrix[2,3]=(51×EP[3]+95×EP[-4]-18×EP[0])/128;
predMatrix[2,4]=(15×EP[3]+54×EP[-5]-5×EP[0])/64;predMatrix[2,4]=(15×EP[3]+54×EP[-5]-5×EP[0])/64;
predMatrix[2,5]=(15×EP[3]+118×EP[-6]-5×EP[0])/128;predMatrix[2,5]=(15×EP[3]+118×EP[-6]-5×EP[0])/128;
predMatrix[2,5]=(4×EP[3]+61×EP[-7]-1×EP[0])/64;predMatrix[2,5]=(4×EP[3]+61×EP[-7]-1×EP[0])/64;
predMatrix[2,7]=(4×EP[3]+125×EP[-8]-1×EP[0])/128;predMatrix[2,7]=(4×EP[3]+125×EP[-8]-1×EP[0])/128;
predMatrix[3,0]=(124×EP[4]+27×EP[-1]-23×EP[0])/128;predMatrix[3,0]=(124×EP[4]+27×EP[-1]-23×EP[0])/128;
predMatrix[3,1]=(28×EP[4]+9×EP[-2]-5×EP[0])/32;predMatrix[3,1]=(28×EP[4]+9×EP[-2]-5×EP[0])/32;
predMatrix[3,2]=(95×EP[4]+51×EP[-3]-18×EP[0])/128;predMatrix[3,2]=(95×EP[4]+51×EP[-3]-18×EP[0])/128;
predMatrix[3,3]=(35×EP[4]+35×EP[-4]-6×EP[0])/64;predMatrix[3,3]=(35×EP[4]+35×EP[-4]-6×EP[0])/64;
predMatrix[3,4]=(46×EP[4]+91×EP[-5]-9×EP[0])/128;predMatrix[3,4]=(46×EP[4]+91×EP[-5]-9×EP[0])/128;
predMatrix[3,5]=(27×EP[4]+106×EP[-6]-5×EP[0])/128;predMatrix[3,5]=(27×EP[4]+106×EP[-6]-5×EP[0])/128;
predMatrix[3,6]=(7×EP[4]+58×EP[-7]-1×EP[0])/64;predMatrix[3,6]=(7×EP[4]+58×EP[-7]-1×EP[0])/64;
predMatrix[3,7]=(6×EP[4]+123×EP[-8]-1×EP[0])/128;predMatrix[3,7]=(6×EP[4]+123×EP[-8]-1×EP[0])/128;
predMatrix[4,0]=(63×EP[5]+7×EP[-1]-6×EP[0])/64;predMatrix[4,0]=(63×EP[5]+7×EP[-1]-6×EP[0])/64;
predMatrix[4,1]=(481×EP[5]+77×EP[-2]-46×EP[0])/512;predMatrix[4,1]=(481×EP[5]+77×EP[-2]-46×EP[0])/512;
predMatrix[4,2]=(54×EP[5]+15×EP[-3]-5×EP[0])/64;predMatrix[4,2]=(54×EP[5]+15×EP[-3]-5×EP[0])/64;
predMatrix[4,3]=(91×EP[5]6×EP[-4]-9×EP[0])/128;predMatrix[4,3]=(91×EP[5]6×EP[-4]-9×EP[0])/128;
predMatrix[4,4]=(269×EP[5]+269×EP[-5]-2 6×EP[0])/512;predMatrix[4,4]=(269×EP[5]+269×EP[-5]-2 6×EP[0])/512;
predMatrix[4,5]=(174×EP[5]+353×EP[-6]-15×EP[0])/512;predMatrix[4,5]=(174×EP[5]+353×EP[-6]-15×EP[0])/512;
predMatrix[4,6]=(12×EP[5]+53×EP[-7]-1×EP[0])/64;predMatrix[4,6]=(12×EP[5]+53×EP[-7]-1×EP[0])/64;
predMatrix[4,7]=(13×EP[5]+116×EP[-8]-1×EP[0])/128;predMatrix[4,7]=(13×EP[5]+116×EP[-8]-1×EP[0])/128;
predMatrix[5,0]=(127×EP[6]+6×EP[-1]-5×EP[0])/128;predMatrix[5,0]=(127×EP[6]+6×EP[-1]-5×EP[0])/128;
predMatrix[5,1]=(62×EP[6]+5×EP[-2]-3×EP[0])/64;predMatrix[5,1]=(62×EP[6]+5×EP[-2]-3×EP[0])/64;
predMatrix[5,2]=(118×EP[6]+15×EP[-3]-5×EP[0])/128;predMatrix[5,2]=(118×EP[6]+15×EP[-3]-5×EP[0])/128;
predMatrix[5,3]=(106×EP[6]+27×EP[-4]-5×EP[0])/128;predMatrix[5,3]=(106×EP[6]+27×EP[-4]-5×EP[0])/128;
predMatrix[5,4]=(353×EP[6]+174×EP[-5]-15×EP[0])/512;predMatrix[5,4]=(353×EP[6]+174×EP[-5]-15×EP[0])/512;
predMatrix[5,5]=(33×EP[6]+33×EP[-6]-2×EP[0])/64;predMatrix[5,5]=(33×EP[6]+33×EP[-6]-2×EP[0])/64;
predMatrix[5,6]=(21×EP[6]4×EP[-7]-1×EP[0])/64;predMatrix[5,6]=(21×EP[6]4×EP[-7]-1×EP[0])/64;
predMatrix[5,7]=(23×EP[6]+106×EP[-8]-1×EP[0])/128;predMatrix[5,7]=(23×EP[6]+106×EP[-8]-1×EP[0])/128;
predMatrix[6,0]=(64×EP[7]+1×EP[-1]-1×EP[0])/64;predMatrix[6,0]=(64×EP[7]+1×EP[-1]-1×EP[0])/64;
predMatrix[6,1]=(251×EP[7]+10×EP[-2]-5×EP[0])/256;predMatrix[6,1]=(251×EP[7]+10×EP[-2]-5×EP[0])/256;
predMatrix[6,2]=(61×EP[7]×EP[-3]-1×EP[0])/64;predMatrix[6,2]=(61×EP[7]×EP[-3]-1×EP[0])/64;
predMatrix[6,3]=(58×EP[7]+7×EP[-4]-1×EP[0])/64;predMatrix[6,3]=(58×EP[7]+7×EP[-4]-1×EP[0])/64;
predMatrix[6,4]=(53×EP[7]+12×EP[-5]-1×EP[0])/6 4;predMatrix[6,4]=(53×EP[7]+12×EP[-5]-1×EP[0])/6 4;
predMatrix[6,5]=(44×EP[7]+21×EP[-6]-1×EP[0])/64;predMatrix[6,5]=(44×EP[7]+21×EP[-6]-1×EP[0])/64;
predMatrix[6,6]=(259×EP[7]+259×EP[-7]-6×EP[0])/512;predMatrix[6,6]=(259×EP[7]+259×EP[-7]-6×EP[0])/512;
predMatrix[6,7]=(41×EP[7]+88×EP[-8]-1×EP[0])/128;predMatrix[6,7]=(41×EP[7]+88×EP[-8]-1×EP[0])/128;
predMatrix[7,0]=(128×EP[8]+1×EP[-1]-1×EP[0])/128;predMatrix[7,0]=(128×EP[8]+1×EP[-1]-1×EP[0])/128;
predMatrix[7,1]=(507×EP[8]+10×EP[-2]-5×EP[0])/512;predMatrix[7,1]=(507×EP[8]+10×EP[-2]-5×EP[0])/512;
predMatrix[7,2]=(125×EP[8]×EP[-3]-1×EP[0])/128;predMatrix[7,2]=(125×EP[8]×EP[-3]-1×EP[0])/128;
predMatrix[7,3]=(123×EP[8]+6×EP[-4]-1×EP[0])/128;predMatrix[7,3]=(123×EP[8]+6×EP[-4]-1×EP[0])/128;
predMatrix[7,4]=(116×EP[8]+13×EP[-5]-1×EP[0])/128;predMatrix[7,4]=(116×EP[8]+13×EP[-5]-1×EP[0])/128;
predMatrix[7,5]=(106×EP[8]+23×EP[-6]-1×EP[0])/128;predMatrix[7,5]=(106×EP[8]+23×EP[-6]-1×EP[0])/128;
predMatrix[7,6]=(88×EP[8]+41×EP[-7]-1×EP[0])/128;predMatrix[7,6]=(88×EP[8]+41×EP[-7]-1×EP[0])/128;
predMatrix[7,7]=(1029×EP[8]+1029×EP[-8]-10×EP[0])/2048。predMatrix[7,7]=(1029×EP[8]+1029×EP[−8]−10×EP[0])/2048.
(2)如果只有r[i](i=0...9)可用,即只有当前像素块上块中与当前像素块相邻的行可用时,根据当前像素块的上块中与待预测的像素点位于同列的第二像素点的像素值预测当前像素块的像素值。具体为对该第二像素点的像素值进行滤波,得到第二值,将该第二值作为待预测的像素点的像素值。(2) If only r[i] (i=0...9) is available, that is, only the row adjacent to the current pixel block in the upper block of the current pixel block is available, according to the upper block of the current pixel block and the row to be predicted The pixel value of the second pixel point in the same column predicts the pixel value of the current pixel block. Specifically, the pixel value of the second pixel point is filtered to obtain a second value, and the second value is used as the pixel value of the pixel point to be predicted.
如果当前像素块的行数和列数均大于或等于8时(本实施例即为这种情况),对该第二像素点的像素值进行滤波,得到第二值具体为:将与所述第二像素点相邻的左像素点的像素值的权重设为1,将所述第二像素点的像素值的权重设为2,将与所述第二像素点相邻的右像素点的像素值的权重设为1,将上述加权处理后的数据的平均值,作为所述第二值。If the number of rows and the number of columns of the current pixel block are both greater than or equal to 8 (this is the case in this embodiment), the pixel value of the second pixel point is filtered to obtain the second value as follows: The weight of the pixel value of the left pixel point adjacent to the second pixel point is set to 1, the weight of the pixel value of the second pixel point is set to 2, and the weight of the right pixel point adjacent to the second pixel point is set to The weight of the pixel value is set to 1, and the average value of the weighted data is used as the second value.
因此可得到AVS标准下8×8亮度块和/或8×8色度块和/或H.264/AVC标准下8×8色度块,只有r[i](i=0...9)可用时,DC模式预测方法的计算式:Therefore, 8×8 luminance blocks and/or 8×8 chrominance blocks under the AVS standard and/or 8×8 chrominance blocks under the H.264/AVC standard can be obtained, only r[i] (i=0...9 ) is available, the calculation formula of the DC mode prediction method:
predMatrix[x,y]=(r[x]+2×r[x+1]+r[x+2]+2)>>2(x,y=0..7)。predMatrix[x,y]=(r[x]+2×r[x+1]+r[x+2]+2)>>2(x,y=0..7).
(3)如果只有c[i](i=0...9)可用,即只有当前像素块的左块中与当前像素块相邻的列可用时,根据当前像素块的左块中与待预测的像素点位于同行的第一像素点的像素值预测当前像素块的像素值。具体为对该第一像素点的像素值进行滤波,得到第一值,将该第一值作为待预测的像素点的像素值。(3) If only c[i] (i=0...9) is available, that is, only the column adjacent to the current pixel block in the left block of the current pixel block is available, according to the column in the left block of the current pixel block and the column to be The pixel value of the first pixel in the same row of the predicted pixel is used to predict the pixel value of the current pixel block. Specifically, the pixel value of the first pixel point is filtered to obtain a first value, and the first value is used as the pixel value of the pixel point to be predicted.
如果当前像素块的行数和列数均大于或等于8时(本实施例即为这种情况),对该第一像素点的像素值进行滤波,得到第一值具体为:将与所述第一像素点相邻的上像素点的像素值的权重设为1,将所述第一像素点的像素值的权重设为2,将与所述第一像素点相邻的下像素点的像素值的权重设为1,将上述加权处理后的数据的平均值,作为所述第一值。If the number of rows and the number of columns of the current pixel block are both greater than or equal to 8 (this is the case in this embodiment), the pixel value of the first pixel point is filtered to obtain the first value as follows: The weight of the pixel value of the upper pixel point adjacent to the first pixel point is set to 1, the weight of the pixel value of the first pixel point is set to 2, and the weight of the lower pixel point adjacent to the first pixel point is set The weight of the pixel value is set to 1, and the average value of the weighted data is used as the first value.
因此可得到AVS标准下8×8亮度块和/或8×8色度块和/或H.264/AVC标准下8×8色度块,只有c[i](i=0...9)可用时,DC模式预测方法的计算式:Therefore, 8×8 luminance blocks and/or 8×8 chrominance blocks under the AVS standard and/or 8×8 chrominance blocks under the H.264/AVC standard can be obtained, only c[i] (i=0...9 ) is available, the calculation formula of the DC mode prediction method:
predMatrix[x,y]=(c[y]+2×c[y+1]+c[y+2]+2)>>2(x,y=0..7)。predMatrix[x,y]=(c[y]+2×c[y+1]+c[y+2]+2)>>2(x,y=0..7).
(4)如果当前像素块左块中的与当前像素块相邻的列、当前像素块上块中的与当前像素块相邻的行均不可用时,将所述当前像素块中任一像素的像素值均设为128。(4) If neither the column adjacent to the current pixel block in the left block of the current pixel block nor the row adjacent to the current pixel block in the upper block of the current pixel block is available, any pixel in the current pixel block The pixel values are all set to 128.
因此可得到AVS标准下8×8亮度块和/或8×8色度块和/或H.264/AVC标准下8×8色度块,r[i]、c[i](i=0...9)均不可用时,DC模式预测方法的计算式:Therefore, 8×8 luma blocks and/or 8×8 chrominance blocks under the AVS standard and/or 8×8 chrominance blocks under the H.264/AVC standard can be obtained, r[i], c[i] (i=0 ...9) When none of them are available, the calculation formula of the DC mode prediction method:
predMatrix[x,y]=128(x,y=0..7)。predMatrix[x,y]=128(x,y=0..7).
第二实施例:在进行DC预测之前,先要获得参考样本(像素点),以依据参考样本进行预测。设当前像素块所属的图像样本矩阵为4×4的矩阵I,I表示亮度矩阵。如果某个样本所在的块不“存在”或此样本尚未解码,则此样本“不可用”,反之此样本“可用”。Embodiment 2: Before performing DC prediction, reference samples (pixels) must be obtained first, so as to perform prediction based on the reference samples. Assume that the image sample matrix to which the current pixel block belongs is a 4×4 matrix I, where I represents the brightness matrix. A sample is "not available" if the block it is in does not "exist" or the sample has not been decoded, otherwise it is "available".
设当前像素块左上角样本的坐标是(x0,y0),其中,x0表示列,y0表示行,则当前像素块参考样本按以下规则获得:Assuming that the coordinates of the sample at the upper left corner of the current pixel block are (x0, y0), where x0 represents the column and y0 represents the row, then the reference sample of the current pixel block is obtained according to the following rules:
如果坐标为(x0+i-1,y0-1)(i=1..4)的样本“可用”,即当前像素块的上块中与当前像素块相邻的行可用,则该行元素(参考样本的像素值)为:r[i]=I[y0-1][x0+i-1];否则 r[i]“不可用”;If the sample with coordinates (x0+i-1, y0-1) (i=1..4) is "available", that is, the row adjacent to the current pixel block in the upper block of the current pixel block is available, then the row element (The pixel value of the reference sample) is: r[i]=I[y0-1][x0+i-1]; otherwise r[i] is "not available";
如果坐标为(x0+i-1,y0-1)(i=5..8)的样本“可用”,即当前像素块的右上块中与当前像素块相邻的行可用,则r[i]=I[y0-1][x0+i-1];否则r[i]等于r[4];If the sample with coordinates (x0+i-1, y0-1) (i=5..8) is "available", that is, the row adjacent to the current pixel block in the upper right block of the current pixel block is available, then r[i ]=I[y0-1][x0+i-1]; otherwise r[i] is equal to r[4];
如果坐标为(x0-1,y0+i-1)(i=1..4) 的样本“可用”,即当前像素块的左块中与当前像素块相邻的列可用,则c[i]=I[y 0+i-1][x0-1];否则c[i]“不可用”;If the sample with coordinates (x0-1, y0+i-1)(i=1..4) is "available", that is, the column adjacent to the current pixel block in the left block of the current pixel block is available, then c[i ] = I[
如果坐标为(x0-1,y0-1)的样本“可用”,则r[0]=I[y0-1][x0-1];否则:If the sample with coordinates (x0-1, y0-1) is "available", then r[0]=I[y0-1][x0-1]; otherwise:
如果r[1]“可用”,并且c[1]“可用”,r[0]=(r[1]+c[1]+1)>>1;If r[1] is "available" and c[1] is "available", r[0]=(r[1]+c[1]+1)>>1;
如果r[1]“可用”,并且c[1]“不可用”,r[0]=r[1];if r[1] is "available", and c[1] is "not available", r[0] = r[1];
如果c[1]“可用”,并且r[1]“不可用”,r[0]=c[1];if c[1] is "available", and r[1] is "not available", r[0] = c[1];
否则r[0]“不可用”。Otherwise r[0] is "not available".
获取参考样本的,就要对当前像素块进行像素值DC预测,计算方法如下:To obtain reference samples, it is necessary to perform pixel value DC prediction on the current pixel block, and the calculation method is as follows:
(1)如果r[i]、c[i](i=0...4)均可用,即当前像素块左块中与当前像素块相邻的列、当前像素块上块中与当前像素块相邻的行均可用时,根据当前像素块左块中与当前像素块相邻的列中,与待预测的像素点位于同行的第一像素点的像素值、当前像素块上块中与当前像素块相邻的行中,与待预测的像素点位于同列的第二像素点的像素值、当前像素块的左上块中与当前像素块相邻的第三像素点的像素值,预测当前像素块中的待预测的像素点的像素值。具体为对所述第一像素点的像素值进行滤波,得到第一值,对所述第二像素点的像素值进行滤波,得到第二值,对所述第三像素点的像素值进行滤波,得到第三值;对所述第一值、第二值和第三值进行加权处理,将加权后的值作为待预测的像素的像素值。(1) If both r[i] and c[i] (i=0...4) are available, that is, the column adjacent to the current pixel block in the left block of the current pixel block, and the column adjacent to the current pixel block in the upper block of the current pixel block When the adjacent rows of the block are available, according to the pixel value of the first pixel in the same row as the pixel to be predicted in the column adjacent to the current pixel block in the left block of the current pixel block, the upper block of the current pixel block and the In the row adjacent to the current pixel block, the pixel value of the second pixel point in the same column as the pixel point to be predicted, and the pixel value of the third pixel point adjacent to the current pixel block in the upper left block of the current pixel block are used to predict the current The pixel value of the pixel to be predicted in the pixel block. Specifically, filter the pixel value of the first pixel point to obtain a first value, filter the pixel value of the second pixel point to obtain a second value, and filter the pixel value of the third pixel point , to obtain a third value; performing weighting processing on the first value, the second value and the third value, and using the weighted value as the pixel value of the pixel to be predicted.
如果当前像素块的行数和列数中至少有一个小于8时(本实施例即为这种情况),对所述第一像素点的像素值进行滤波,得到第一值具体为:将与所述第一像素点相邻的上像素点的像素值的权重设为0,将所述第一像素点的像素值的权重设为1,将与所述第一像素点相邻的下像素点的像素值的权重设为0,将上述加权处理后的数据的平均值,作为所述第一值;对所述第二像素点的像素值进行滤波,得到第二值具体为:将与所述第二像素点相邻的左像素点的像素值的权重设为0,将所述第二像素点的像素值的权重设为1,将与所述第二像素点相邻的右像素点的像素值的权重设为0,将上述加权处理后的数据的平均值,作为所述第二值;对所述第三像素点的像素值进行滤波,得到第三值具体为:将与所述第三像素点相邻的右像素点的像素值的权重设为0,将所述第三像素点的像素值的权重设为1,将与所述第三像素点相邻的下像素点的像素值的权重设为0,将上述加权处理后的数据的平均值,作为所述第三值。If at least one of the number of rows and the number of columns of the current pixel block is less than 8 (this is the case in this embodiment), the pixel value of the first pixel point is filtered to obtain the first value as follows: The weight of the pixel value of the upper pixel adjacent to the first pixel is set to 0, the weight of the pixel value of the first pixel is set to 1, and the lower pixel adjacent to the first pixel is The weight of the pixel value of the point is set to 0, and the average value of the above-mentioned weighted data is used as the first value; the pixel value of the second pixel point is filtered to obtain the second value as follows: The weight of the pixel value of the left pixel point adjacent to the second pixel point is set to 0, the weight of the pixel value of the second pixel point is set to 1, and the right pixel point adjacent to the second pixel point is set to The weight of the pixel value of the point is set to 0, and the average value of the above-mentioned weighted data is used as the second value; the pixel value of the third pixel point is filtered to obtain the third value as follows: The weight of the pixel value of the right pixel adjacent to the third pixel is set to 0, the weight of the pixel value of the third pixel is set to 1, and the lower pixel adjacent to the third pixel is The weight of the pixel value of the point is set to 0, and the average value of the weighted data is used as the third value.
举例如下:以上述4×4的当前像素块为例,如要预测行坐标为y1,列坐标为x 1的像素点的像素值,那么第一像素点的像素值为c[y1+1],第一值为EP[-(y1+1)]=0×c[y1]+1×c[y1+1]+0×c[y1+2]=c[y1+1];第二像素点的像素值为r[x1+1],第二值为EP[(x1+1)]=0×r[x1]+1×r[x1+1]+0×r[x1+2]=r[x1+1];第三像素点的像素值为r[0],第三值为EP[0]=0×r[1]+1×r[0]+0×c[1]=r[0];对上述第一值、第二值、第三值再进行加权处理,处理后的值作为预测值,即预测值predMatrix[x,y]=α1 EP[(x+1)]+β1EP[-(y+1)]+γ1 EP[0]An example is as follows: Take the above 4×4 current pixel block as an example, if you want to predict the pixel value of the pixel point whose row coordinate is y1 and column coordinate is x1, then the pixel value of the first pixel point is c[y1+1] , the first value is EP[-(y1+1)]=0×c[y1]+1×c[y1+1]+0×c[y1+2]=c[y1+1]; the second pixel The pixel value of the point is r[x1+1], and the second value is EP[(x1+1)]=0×r[x1]+1×r[x1+1]+0×r[x1+2]= r[x1+1]; the pixel value of the third pixel point is r[0], and the third value is EP[0]=0×r[1]+1×r[0]+0×c[1]= r[0]; carry out weighting processing on the above-mentioned first value, second value, and third value, and the processed value is used as the predicted value, that is, the predicted value predMatrix[x, y]=α1 EP[(x+1)] +β1EP[-(y+1)]+γ1EP[0]
=α1r[x+1]+β1 c[-(y+1)]+γ1r[0]=α1r[x+1]+β1 c[-(y+1)]+γ1r[0]
其中加权系数α1、β1、γ1是根据再生核插值函数得到的,再生核插值函数的形成同上述AVS标准下形成的原理。Among them, the weighting coefficients α1, β1, and γ1 are obtained according to the regeneration kernel interpolation function, and the formation of the regeneration kernel interpolation function is the same as that formed under the above-mentioned AVS standard.
因此可得到H.2 6 4/AVC标准下4×4亮度块,且r[i]、c[i](i=1...4)均可用时,DC模式预测方法的计算式:Therefore, the calculation formula of the DC mode prediction method can be obtained when the 4×4 luminance block under the H.2 6 4/AVC standard is available and r[i] and c[i] (i=1...4) are available:
predMatrix[0,0]=(7×r[1]+7×c[1]-6×r[0]+4)>>3;predMatrix[0,0]=(7×r[1]+7×c[1]-6×r[0]+4)>>3;
predMatrix[1,0]=(29×r[2]+20×c[1]-17×r[0]+16)>>5;predMatrix[1,0]=(29×r[2]+20×c[1]-17×r[0]+16)>>5;
predMatrix[0,1]=(20×r[1]+29×c[2]-17×r[0]+16)>>5;predMatrix[0,1]=(20×r[1]+29×c[2]-17×r[0]+16)>>5;
predMatrix[2,0]=(15×r[3]+6×c[1]-5×r[0]+8)>>4;predMatrix[2,0]=(15×r[3]+6×c[1]-5×r[0]+8)>>4;
predMatrix[0,2]=(6×r[1]+15×c[3]~5×r[0]+8)>>4;predMatrix[0,2]=(6×r[1]+15×c[3]~5×r[0]+8)>>4;
predMatrix[3,0]=(31×r[4]+7×c[1]-6×r[0]+16)>>5;predMatrix[3,0]=(31×r[4]+7×c[1]-6×r[0]+16)>>5;
predMatrix[0,3]=(7×r[1]+3 1×c[4]-6×r[0]+16)>>5;predMatrix[0,3]=(7×r[1]+3 1×c[4]-6×r[0]+16)>>5;
predMatrix[2,1]=(103×r[3]+61×c[2]-36×r[0]+64)>>7;predMatrix[2,1]=(103×r[3]+61×c[2]-36×r[0]+64)>>7;
predMatrix[1,2]=(61×r[2]+103×c[3]-36×r[0]+64)>>7;predMatrix[1,2]=(61×r[2]+103×c[3]-36×r[0]+64)>>7;
predMatrix[3,1]=(28×r[4]+9×c[2]-5×r[0]+16)>>5;predMatrix[3,1]=(28×r[4]+9×c[2]-5×r[0]+16)>>5;
predMatrix[1,3]=(9×r[2]+28×c[4]-5×r[0]+16)>>5;predMatrix[1,3]=(9×r[2]+28×c[4]-5×r[0]+16)>>5;
predMatrix[3,2]=(47×r[4]+26×c[3]-9×r[0]+32)>>6;predMatrix[3,2]=(47×r[4]+26×c[3]-9×r[0]+32)>>6;
predMatrix[2,3]=(26×r[3]+47×c[4]-9×r[0]+32)>>6;predMatrix[2,3]=(26×r[3]+47×c[4]-9×r[0]+32)>>6;
predMatrix[1,1]=(45×r[2]+45×c[2]-26×r[0]+32)>>6;predMatrix[1,1]=(45×r[2]+45×c[2]-26×r[0]+32)>>6;
predMatrix[2,2]=(77×r[3]+77×c[3]-26×r[0]+64)>>7;predMatrix[2,2]=(77×r[3]+77×c[3]-26×r[0]+64)>>7;
predMatrix[3,3]=(35×r[4]+35×c[4]-6×r[0]+32)>>6。predMatrix[3,3]=(35×r[4]+35×c[4]−6×r[0]+32)>>6.
(2)如果只有r[i](i=1...4)可用,即只有当前像素块上块中与当前像素块相邻的行可用时,根据当前像素块的上块中与待预测的像素点位于同列的第二像素点的像素值预测当前像素块的像素值。具体为对该第二像素点的像素值进行滤波,得到第二值,将该第二值作为待预测的像素点的像素值。(2) If only r[i] (i=1...4) is available, that is, only the row adjacent to the current pixel block in the upper block of the current pixel block is available, according to the upper block of the current pixel block and the line to be predicted The pixel value of the second pixel point in the same column predicts the pixel value of the current pixel block. Specifically, the pixel value of the second pixel point is filtered to obtain a second value, and the second value is used as the pixel value of the pixel point to be predicted.
如果当前像素块的行数和列数至少有一个小于8时(本实施例即为这种情况),对该第二像素点的像素值进行滤波,得到第二值具体为:将与所述第二像素点相邻的左像素点的像素值的权重设为0,将所述第二像素点的像素值的权重设为1,将与所述第二像素点相邻的右像素点的像素值的权重设为0,将上述加权处理后的数据的平均值,作为所述第二值。If at least one of the number of rows and the number of columns of the current pixel block is less than 8 (this is the case in this embodiment), the pixel value of the second pixel point is filtered to obtain the second value as follows: The weight of the pixel value of the left pixel adjacent to the second pixel is set to 0, the weight of the pixel value of the second pixel is set to 1, and the weight of the right pixel adjacent to the second pixel is set The weight of the pixel value is set to 0, and the average value of the weighted data is used as the second value.
因此可得到H.264/AVC标准下4×4亮度块,只有r[i](i=1...4)可用时,DC模式预测方法的计算式:Therefore, a 4×4 luma block under the H.264/AVC standard can be obtained. When only r[i] (i=1...4) is available, the calculation formula of the DC mode prediction method is:
predMatrix[x,y]=(r[1]+r[2]+r[3]+r[4]+2)>>2。predMatrix[x,y]=(r[1]+r[2]+r[3]+r[4]+2)>>2.
(3)如果只有c[i](i=1...4)可用,即只有当前像素块的左块中与当前像素块相邻的列可用时,根据当前像素块的左块中与待预测的像素点位于同行的第一像素点的像素值预测当前像素块的像素值。具体为对该第一像素点的像素值进行滤波,得到第一值,将该第一值作为待预测的像素点的像素值。(3) If only c[i] (i=1...4) is available, that is, only the columns adjacent to the current pixel block in the left block of the current pixel block are available, according to the column in the left block of the current pixel block and the column to be The pixel value of the first pixel in the same row of the predicted pixel is used to predict the pixel value of the current pixel block. Specifically, the pixel value of the first pixel point is filtered to obtain a first value, and the first value is used as the pixel value of the pixel point to be predicted.
如果当前像素块的行数和列数至少有一个小于8时(本实施例即为这种情况),对该第一像素点的像素值进行滤波,得到第一值具体为:将与所述第一像素点相邻的上像素点的像素值的权重设为0,将所述第一像素点的像素值的权重设为1,将与所述第一像素点相邻的下像素点的像素值的权重设为0,将上述加权处理后的数据的平均值,作为所述第一值。If at least one of the number of rows and the number of columns of the current pixel block is less than 8 (this is the case in this embodiment), the pixel value of the first pixel point is filtered to obtain the first value as follows: The weight of the pixel value of the upper pixel point adjacent to the first pixel point is set to 0, the weight of the pixel value of the first pixel point is set to 1, and the weight of the lower pixel point adjacent to the first pixel point is set The weight of the pixel value is set to 0, and the average value of the weighted data is used as the first value.
因此可得到H.264/AVC标准下4×4亮度块,只有c[i](i=1...4)可用时,DC模式预测方法的计算式:Therefore, a 4×4 luminance block under the H.264/AVC standard can be obtained. When only c[i] (i=1...4) is available, the calculation formula of the DC mode prediction method is:
predMatrix[x,y]=(c[1]+c[2]+c[3]+c[4]+2)>>2。predMatrix[x,y]=(c[1]+c[2]+c[3]+c[4]+2)>>2.
(4)如果当前像素块左块中的与当前像素块相邻的列、当前像素块上块中的与当前像素块相邻的行均不可用时,将所述当前像素块中任一像素的像素值均设为128。(4) If neither the column adjacent to the current pixel block in the left block of the current pixel block nor the row adjacent to the current pixel block in the upper block of the current pixel block is available, any pixel in the current pixel block The pixel values are all set to 128.
因此可得到H.264/AVC标准下4×4亮度块,r[i]、c[i](i=1...4)均不可用时,DC模式预测方法的计算式:Therefore, the calculation formula of the DC mode prediction method can be obtained when r[i] and c[i] (i=1...4) are not available for a 4×4 luma block under the H.264/AVC standard:
predMatrix[x,y]=128(x,y=0..3)。predMatrix[x,y]=128(x,y=0..3).
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。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.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200710177725CN101163249B (en) | 2007-11-20 | 2007-11-20 | DC Mode Prediction Method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200710177725CN101163249B (en) | 2007-11-20 | 2007-11-20 | DC Mode Prediction Method |
| Publication Number | Publication Date |
|---|---|
| CN101163249A CN101163249A (en) | 2008-04-16 |
| CN101163249Btrue CN101163249B (en) | 2010-07-21 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200710177725Expired - Fee RelatedCN101163249B (en) | 2007-11-20 | 2007-11-20 | DC Mode Prediction Method |
| Country | Link |
|---|---|
| CN (1) | CN101163249B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20110113561A (en) | 2010-04-09 | 2011-10-17 | 한국전자통신연구원 | Intra Prediction Coding / Decoding Method Using Adaptive Filter and Its Apparatus |
| KR101530284B1 (en)* | 2010-07-16 | 2015-06-19 | 삼성전자주식회사 | Method and apparatus for video intra prediction encoding, and method and apparatus for video intra prediction decoding |
| BR112013016961B1 (en)* | 2011-01-12 | 2022-05-31 | Mitsubishi Electric Corporation | Image encoding and decoding devices, and image encoding and decoding methods |
| WO2020056798A1 (en)* | 2018-09-21 | 2020-03-26 | 华为技术有限公司 | Method and device for video encoding and decoding |
| WO2022183611A1 (en)* | 2021-03-04 | 2022-09-09 | Oppo广东移动通信有限公司 | Intra prediction method and apparatus, and codec, device and storage medium |
| Publication number | Publication date |
|---|---|
| CN101163249A (en) | 2008-04-16 |
| Publication | Publication Date | Title |
|---|---|---|
| CN111247799B (en) | Image encoding/decoding method and apparatus, and recording medium storing bit stream | |
| CN111386707B (en) | Image encoding/decoding method and device and recording medium for storing bit stream | |
| CN101964906B (en) | Rapid intra-frame prediction method and device based on texture characteristics | |
| CN109804625A (en) | Method and apparatus for encoding/decoding image and recording medium storing bitstream | |
| CN106131547B (en) | The high-speed decision method of intra prediction mode in Video coding | |
| CN100536573C (en) | Inframe prediction method used for video frequency coding | |
| CN108495135B (en) | Quick coding method for screen content video coding | |
| CN109905712A (en) | Fast Mode Decision Algorithm for HEVC Intra-coding Based on ResNet | |
| KR100739714B1 (en) | Method and apparatus for determining intra prediction mode | |
| CN106851316A (en) | The method decoded to intra prediction mode | |
| CN101163249B (en) | DC Mode Prediction Method | |
| CN103024383A (en) | Intra-frame lossless compression coding method based on HEVC (high efficiency video coding) frame | |
| EP3621303B1 (en) | Processing method and device for video encoding, and storage medium | |
| CN104853192A (en) | Prediction mode selection method and device | |
| CN102377993B (en) | Intra-frame prediction mode selection method and system | |
| CN105306957A (en) | Adaptive loop filtering method and device | |
| CN101304529A (en) | Method and device for selecting macro block mode | |
| KR100682912B1 (en) | Image data encoding and decoding method and apparatus | |
| CN102325256B (en) | Loop filtering method based on image macro block coding mode decision | |
| CN102438146B (en) | Method for improving video quality and implementing device thereof | |
| CN114630119A (en) | A kind of encoding, decoding method, apparatus and its equipment | |
| CN110139099B (en) | Interframe prediction mode selection method based on precoding and coding SATD value weighting | |
| KR20120090584A (en) | Intra prediction mode decision method and apparatus | |
| CN112770115B (en) | Rapid intra-frame prediction mode decision method based on directional gradient statistical characteristics | |
| WO2022188114A1 (en) | Intra-frame prediction method, encoder, decoder, and storage medium |
| 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:20100721 Termination date:20171120 |