Background technology
H.261 traditional video encoding standard such as ITU formulate, H.263, H.26L, the MEPG-1 that organizes to set up of the MPEG of standard and ISO H.264, MPEG-2, MPEG-4 etc. are based on hybrid coding, promptly on the Hybrid Coding framework.So-called hybrid encoding frame is to take all factors into consideration prediction, and the coding framework of the method for conversion and entropy coding has following main feature:
1) utilize prediction to remove the redundancy of time-domain;
2) utilize conversion to remove the redundancy of spatial domain;
3) remove statistical redundancy with entropy coding;
Above-mentioned video encoding standard all has intracoded frame, i.e. I frame, and inter-frame encoding frame, i.e. and P frame, I frame and P frame adopt different coding methods.The cataloged procedure of I frame is as follows: the residual block that raw image data or infra-frame prediction are obtained carries out two-dimensional transform; In transform domain, conversion coefficient is quantized then; Carry out entropy coding at last, i.e. Huffman coding or arithmetic coding etc.The cataloged procedure of P frame is as follows: adopt estimation to obtain motion vector, adopt the inter prediction based on motion compensation then, then the residual block that inter prediction is obtained carries out two-dimensional transform, coefficient in transform domain is quantized again, and carries out entropy coding at last.
Because video data stronger correlation on spatial domain, utilize the sample value of available pixel around the current pending block of pixels to obtain the prediction sample value of yard block of pixels.The residual error of actual sample value and prediction sample value is encoded and can be obtained bigger compression ratio.Infra-frame prediction is the principal element that improves the coding gain of intraframe coding block of pixels in intracoded frame and the inter-frame encoding frame, so infra-frame prediction is a part and parcel very in the coding and decoding video.
Generally, if when the sample value part of available pixel is unavailable around the pending block of pixels, can't utilizes the available sample value of part to treat processed pixels piece sample value and predict.
Summary of the invention
The purpose of this invention is to provide method of intra-prediction and device in a kind of coding and decoding video, the sample value interpolation processing of the part or all of available surrounding pixel of current pending block of pixels can be obtained the estimated value of the sample value of other surrounding pixel, obtain the prediction sample value of pending block of pixels again in conjunction with the sample value of available surrounding pixel.
In order to achieve the above object, the technical solution used in the present invention is as follows:
The sample value of coming the predict pixel piece according to the estimated value of the sample value of the sample value of current pending block of pixels surrounding pixel or surrounding pixel; Wherein:
1) but in the sample value time spent of the even number line surrounding pixel of current pending block of pixels, adopt the sample value interpolation processing of even number line surrounding pixel to obtain the estimated value of the sample value of odd-numbered line surrounding pixel; But, adopt the sample value interpolation processing of odd-numbered line surrounding pixel to obtain the estimated value of the sample value of even number line surrounding pixel in the sample value time spent of the odd-numbered line surrounding pixel of current pending block of pixels;
2) when the sample value of the upper left surrounding pixel of current pending block of pixels is unavailable, adopt the sample value interpolation processing of the available surrounding pixel of this pixel to obtain the estimated value of its sample value;
3) obtain the estimated value of sample value of surrounding pixel of pending block of pixels after, obtain the prediction sample value of pending block of pixels in conjunction with the sample value of available surrounding pixel.
The infra-frame prediction device comprises in a kind of coding and decoding video:
Be used to accept to store the input unit of sample value of the available surrounding pixel of current pending block of pixels;
The sample value of the available surrounding pixel in the input unit is carried out the interpolation processor of estimated value that interpolation processing obtains the sample value of other surrounding pixel;
In conjunction with the sample value of available surrounding pixel the sample value of current pending block of pixels is carried out the intra-prediction process device of intra-prediction process with the estimated value of the sample value of the surrounding pixel after the interpolation processing;
Be used to store the sample value predicted value of the current pending block of pixels after the intra-prediction process and the output device of output is provided;
Be connected by data/address bus between input unit and the interpolation processor, transmit the sample value of available surrounding pixel; Be connected the estimated value of the sample value of transmission surrounding pixel between interpolation processor and the intra-prediction process device by data/address bus; Be connected by data/address bus between input unit and the intra-prediction process device, transmit the sample value of available surrounding pixel; Be connected by data/address bus between intra-prediction process device and the output device, transmit the sample value predicted value of current pending block of pixels.
The present invention compares with background technology, the beneficial effect that has:
Method of intra-prediction of the present invention can obtain the sample value interpolation processing of the part or all of available surrounding pixel of current pending block of pixels the estimated value of the sample value of other surrounding pixel, obtain the prediction sample value of pending block of pixels again in conjunction with the sample value of available surrounding pixel, thereby reduced the number of coded bits of pending block of pixels, improved the compression efficiency of video coding.The device of the infra-frame prediction among the present invention is realized the Forecasting Methodology among the present invention fully.
Embodiment
Video data can be divided into the block of pixels of different sizes and carry out estimation and infra-frame prediction.For example, 4 * 4,4 * 8,8 * 4,8 * 8,4 * 16,16 * 4,16 * 8,8 * 16 and 16 * 16 etc.Also can be divided into dissimilar block of pixels and carry out estimation and infra-frame prediction.For example, a frame encoded pixels piece and an encoded pixels piece.Field encoded pixels piece is divided into two kinds, odd-numbered line block of pixels and even number line block of pixels.The odd-numbered line block of pixels is made up of the part odd-numbered line pixel in the two field picture, and the even number line block of pixels is made up of the part even number line pixel in the two field picture.
Block of pixels to be encoded or block of pixels to be decoded are called as pending block of pixels.The sample value of coming the predict pixel piece according to the estimated value of the sample value of the sample value of current pending block of pixels surrounding pixel or surrounding pixel.
But, adopt the sample value interpolation processing of even number line surrounding pixel to obtain the estimated value of the sample value of odd-numbered line surrounding pixel in the sample value time spent of the even number line surrounding pixel of current pending block of pixels; But, adopt the sample value interpolation processing of odd-numbered line surrounding pixel to obtain the estimated value of the sample value of even number line surrounding pixel in the sample value time spent of the odd-numbered line surrounding pixel of current pending block of pixels.
When the sample value of the upper left surrounding pixel of current pending block of pixels is unavailable, adopt the sample value interpolation processing of the available surrounding pixel of this pixel to obtain the estimated value of its sample value.
After obtaining the estimated value of sample value of surrounding pixel of pending block of pixels, obtain the prediction sample value of pending block of pixels in conjunction with the sample value of available surrounding pixel.
Embodiment 1:
If current pending block of pixels is one 8 * 8 a frame encoded pixels piece, and its leftmost pixel C
i, i=1...8 belongs to odd-numbered line block of pixels and even number line block of pixels, C respectively
0Be its top left pixel, R
i, i=1...8 is its right pixels, as shown in Figure 1.
When pending block of pixels is encoded, if its leftmost pixel C
1, C
3, C
5And C
7Sample value C
Ori, 1, C
Ori, 3, C
Ori, 5And C
Ori, 7Unavailable, and C
2, C
4, C
6And C
8Sample value C
Ori, 2, C
Ori, 4, C
Ori, 6And C
Ori, 8Available, adopt C so
Ori, 2, C
Ori, 4, C
Ori, 6And C
Ori, 8Carry out linear interpolation processing and obtain C
1, C
3, C
5And C
7The estimated value C of sample value
Pred, 1, C
Pred, 3, C
Pred, 5And C
Pred, 7, as follows:
C
pred,1=C
ori,2;
C
pred,3=(C
ori,2+C
ori,4+1)>>1;
C
pred,5=(C
ori,4+C
ori,6+1)>>1;
C
pred,7=(C
ori,6+C
ori,8+1)>>1。
If pending block of pixels top left pixel C
0Sample value C
Ori, 0Unavailable, and C
1And R
1Sample value C
Ori, 1And R
Ori, 1Available, adopt C so
Ori, 1And R
Ori, 1Carry out linear interpolation processing and obtain C
0Sample value estimated value C
Pred, 0, as follows:
C
pred,0=(C
ori,1+R
ori,1+1)>>1。
Utilize the estimated value and the top pixel sample value of estimated value, top left pixel sample value or the sample value of the leftmost pixel sample value of pending block of pixels or sample value to carry out the prediction sample value that prediction processing obtains pending block of pixels again.
Embodiment 2:
If current pending block of pixels is one 8 * 8 a frame encoded pixels piece, and its leftmost pixel C
i, i=1...8 belongs to odd-numbered line block of pixels and even number line block of pixels, C respectively
0Be its top left pixel, R
i, i=1...8 is its right pixels, as shown in Figure 1.
When pending block of pixels is encoded, if its leftmost pixel C
2, C
4, C
6And C
8Sample value C
Ori, 2, C
Ori, 4, C
Ori, 6And C
Ori, 8Unavailable, and C
1, C
3, C
5And C
7Sample value C
Ori, 1, C
Ori, 3, C
Ori, 5And C
Ori, 7Available, adopt C so
Ori, 1, C
Ori, 3, C
Ori, 5And C
Ori, 7Carry out linear interpolation processing and obtain C
2, C
4, C
6And C
8The estimated value C of sample value
Pred, 2, C
Pred, 4, C
Pred, 6And C
Pred, 8, as follows:
C
pred,2=(C
ori,1+C
ori,3+1)>>1;
C
pred,4=(C
ori,3+C
ori,5+1)>>1;
C
pred,6=(C
ori,5+C
ori,7+1)>>1。
C
pred,8=C
ori,7;
If pending block of pixels top left pixel C
0Sample value C
Ori, 0Unavailable, and C
1And R
1Sample value C
Ori, 1And R
Ori, 1Available, adopt C so
Ori, 1And R
Ori, 1Carry out linear interpolation processing and obtain C
0Sample value estimated value C
Pred, 0, as follows:
C
pred,0=(C
ori,1+R
ori,1+1)>>1。
Utilize the estimated value and the top pixel sample value of estimated value, top left pixel sample value or the sample value of the leftmost pixel sample value of pending block of pixels or sample value to carry out the prediction sample value that prediction processing obtains pending block of pixels again.
The infra-frame prediction device comprises input unit, interpolation processor, intra-prediction process device and output device in the coding and decoding video, as shown in Figure 2.Input unit 210 is used to accept store the sample value of the available surrounding pixel of current pending block of pixels.The sample value of the available surrounding pixel in 220 pairs of input units of interpolation processor is carried out the estimated value that interpolation processing obtains the sample value of other surrounding pixel, comprising ALU 225 can use multiplying, add operation and shift operation realize this processing.The estimated value of the sample value of the surrounding pixel after the intra-prediction process device 230 usefulness interpolation processing is carried out intra-prediction process in conjunction with the sample value of available surrounding pixel to the sample value of current pending block of pixels, comprising ALU 235 can use multiplying, add operation and shift operation realize this processing.Output device 240 is used to store the sample value predicted value of the current pending block of pixels after the intra-prediction process and output is provided.
Be connected by data/address bus between input unit and the interpolation processor, transmit the sample value of available surrounding pixel; Be connected the estimated value of the sample value of transmission surrounding pixel between interpolation processor and the intra-prediction process device by data/address bus; Be connected by data/address bus between input unit and the intra-prediction process device, transmit the sample value of available surrounding pixel; Be connected by data/address bus between intra-prediction process device and the output device, transmit the sample value predicted value of current pending block of pixels.
The prediction unit of motion vector can be used processor system in the above-mentioned coding and decoding video, microcontroller, and programmable logic device or microprocessor are realized part or all of operation.Above-mentioned certain operations can realize that other operations simultaneously can realize with hardware with software.
For convenience's sake, these operations are described to the functional unit of different interconnection or different software modules.But this is dispensable.In some applications, these functional units or module can be integrated in single logical device, program or the operation, and do not have obvious limit.In any situation, the feature of functional unit and software module or description can independently realize, or reinstate hardware or software realization with other operations one.