Summary of the invention
The Forecasting Methodology and the device that the purpose of this invention is to provide motion vector in a kind of coding and decoding video, can according to around the current pending block of pixels the motion vector of processed pixels piece or the time gap between motion vector scale value, pending block of pixels and its reference picture and the time gap between processed pixels piece and its reference picture predict the motion vector of pending block of pixels.
In order to achieve the above object, the technical solution used in the present invention is as follows:
According in the motion vector of processed pixels piece A, block of pixels B, block of pixels C, block of pixels D or the motion vector scale value or its make up the motion vector of predict pixel piece E around the current pending block of pixels E.
The reference picture that belongs to dissimilar block of pixels or block of pixels X and block of pixels E as processed pixels piece X and pending block of pixels E is not simultaneously, motion vector to block of pixels X carries out the convergent-divergent processing, obtain the prediction reference of pending block of pixels E motion vector, i.e. the motion vector scale value MV of block of pixels X
PredX,, as follows:
MV
Pred,X=MV
X*d2/d1,
Wherein, wherein block of pixels X represents among processed pixels piece A, block of pixels B, block of pixels C or the block of pixels D one, MV
XThe motion vector of remarked pixel piece X; Time gap between d1 remarked pixel piece X and its reference picture; Time gap between d2 remarked pixel piece E and its reference picture; D1 and d2 must adopt uniform units.
After the prediction reference that obtains pending block of pixels E motion vector, with MV
Pred, AOr MV
A, MV
Pred, BOr MV
B, MV
Pred, COr MV
C, MV
Pred, DOr MV
DCarry out prediction processing and obtain the motion vector predictor MV of block of pixels E
Pred
The prediction unit of motion vector comprises in a kind of coding and decoding video:
Be used to accept to store around the current pending block of pixels input unit of the motion vector of processed pixels piece;
The motion vector of the piece of processed pixels in the input unit is carried out the motion vector convergent-divergent processing unit that convergent-divergent is handled, comprising ALU can use multiplying, add operation and shift operation realize this processing;
The motion vector of current pending block of pixels is carried out the motion-vector prediction processing unit of prediction processing with the motion vector convergent-divergent processing costs after the processing of motion vector convergent-divergent, comprising ALU can use multiplying, add operation and shift operation realize this processing;
Be used for the output device that the storing moving vector carries out the motion vector predictor of the current pending block of pixels after the prediction processing and output is provided;
Be connected by data/address bus between input unit and the motion vector convergent-divergent processing unit, transmit the motion vector of processed pixels piece; Be connected transmitting moving vector convergent-divergent processing costs by data/address bus between motion vector convergent-divergent processing unit and the motion-vector prediction processing unit; Be connected the motion vector predictor of pending block of pixels before the transmission between motion-vector prediction processing unit and the output device by data/address bus.
The present invention compares with background technology, the beneficial effect that has:
In the coding and decoding video of the present invention the Forecasting Methodology of motion vector can according to around the current pending block of pixels the motion vector of processed pixels piece or the time gap between motion vector scale value, pending block of pixels and its reference picture and the time gap between processed pixels piece and its reference picture predict the motion vector of pending block of pixels, thereby reduced the number of coded bits of pending block of pixels, improved the compression efficiency of video coding.The prediction unit of motion vector is realized the Forecasting Methodology among the present invention fully in the coding and decoding video among the present invention.
Embodiment
Video data can be divided into the block of pixels of different sizes and carry out estimation.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.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 encoded pixels piece or the decoded pixel piece be called as processed pixels piece.According in the motion vector of processed pixels piece A, block of pixels B, block of pixels C, block of pixels D or the motion vector scale value or its make up the motion vector of predict pixel piece E around the current pending block of pixels E.
The reference picture that belongs to dissimilar block of pixels or block of pixels X and block of pixels E as processed pixels piece X and pending block of pixels E is not simultaneously, motion vector to block of pixels X carries out the convergent-divergent processing, obtain the prediction reference of pending block of pixels E motion vector, i.e. the motion vector scale value MV of block of pixels X
Pred, X, as follows:
MV
Pred,X=MV
X*d2/d1,
Wherein, wherein block of pixels X represents among processed pixels piece A, block of pixels B, block of pixels C or the block of pixels D one, MV
XThe motion vector of remarked pixel piece X; Time gap between d1 remarked pixel piece X and its reference picture; Time gap between d2 remarked pixel piece E and its reference picture; D1 and d2 must adopt uniform units.
After the prediction reference that obtains pending block of pixels E motion vector, with MV
Pred, AOr MV
A, MV
Pred, BOr MV
B, MV
Pred, COr MV
C, MV
Pred, DOr MV
DCarry out prediction processing and obtain the motion vector predictor MV of block of pixels E
Pred
Embodiment 1:
If block of pixels X is a frame encoded pixels piece, block of pixels E is the odd-numbered line block of pixels in the encoded pixels piece, the reference prediction value MV of the motion vector of block of pixels E
PredAs follows:
If the reference picture of block of pixels E is made up of the odd-numbered line pixel of previous image, then MV
PredEqual MV
X
If the reference picture of block of pixels E is made up of the even number line pixel of previous image, and video sequence at first shows odd-numbered line pixel, then MV
PredEqual MV
X/ 2; If the reference picture of block of pixels E is made up of the even number line pixel of previous image, and video sequence at first shows even number line pixel, then MV
PredEqual MV
X* 3/2.
After the prediction reference that obtains pending block of pixels E motion vector with MV
Pred, AOr MV
A, MV
Pred, BOr MV
B, MV
Pred, COr MV
C, MV
Pred, DOr MV
DCan carry out median prediction processing or weighted average and handle the motion vector predictor MV that obtains block of pixels E
Pred
Embodiment 2:
If block of pixels X is a frame encoded pixels piece, block of pixels E is the even number line block of pixels in the encoded pixels piece, the reference prediction value MV of the motion vector of block of pixels E
PredAs follows:
If the reference picture of block of pixels E is made up of the odd-numbered line pixel of previous image, and video sequence at first shows odd-numbered line pixel, then MV
PredEqual MV
X* 3/2; If the reference picture of block of pixels E is made up of the odd-numbered line pixel of previous image, and video sequence at first shows even number line pixel, then MV
PredEqual MV
X/ 2;
If the reference picture of block of pixels E is made up of the even number line pixel of previous image, then MV
PredEqual MV
X
If the reference picture of block of pixels E is made up of the odd-numbered line pixel of present image, then MV
PredEqual MV
X/ 2.
After the prediction reference that obtains pending block of pixels E motion vector with MV
Pred, AOr MV
A, MV
Pred, BOr MV
B, MV
Pred, COr MV
C, MV
Pred, DOr MV
DCan carry out median prediction processing or weighted average and handle the motion vector predictor MV that obtains block of pixels E
Pred
Embodiment 3:
If block of pixels X is the odd-numbered line block of pixels of a field encoded pixels piece, block of pixels E is a frame encoded pixels piece, the reference prediction value MV of the motion vector of block of pixels E
PredAs follows:
If the reference picture of block of pixels X is made up of the odd-numbered line pixel of previous image, then MV
PredEqual MV
X
If the reference picture of block of pixels X is made up of the even number line pixel of previous image, and video sequence at first shows odd-numbered line pixel, then MV
PredEqual MV
X* 2; If the reference picture of block of pixels X is made up of the even number line pixel of previous image, and video sequence at first shows even number line pixel, then MV
PredEqual MV
X* 2/3.
After the prediction reference that obtains pending block of pixels E motion vector with MV
Pred, AOr MV
A, MV
Pred, BOr MV
B, MV
Pred, COr MV
C, MV
Pred, DOr MV
DCan carry out median prediction processing or weighted average and handle the motion vector predictor MV that obtains block of pixels E
Pred
Embodiment 4:
If block of pixels X is the even number line block of pixels of a field encoded pixels piece, block of pixels E is a frame encoded pixels piece, the reference prediction value MV of the motion vector of block of pixels E
PredAs follows:
If the reference picture of block of pixels X is made up of the odd-numbered line of previous image, and if video sequence be at first to show odd-numbered line, then MV
PredEqual MV
X* 2/3; If the reference picture of block of pixels X is made up of the odd-numbered line of previous image, and if video sequence be at first to show even number line, then MV
PredEqual MV
X* 2;
If the reference picture of block of pixels X is made up of the odd-numbered line pixel of previous image, then MV
PredEqual MV
X
If the reference picture of block of pixels X is made up of the odd-numbered line pixel of present image, then MV
PredEqual MV
X* 2.
After the prediction reference that obtains pending block of pixels E motion vector with MV
Pred, AOr MV
A, MV
Pred, BOr MV
B, MV
Pred, COr MV
C, MV
Pred, DOr MV
DCan carry out median prediction processing or weighted average and handle the motion vector predictor MV that obtains block of pixels E
Pred
Embodiment 5:
If block of pixels X and block of pixels E are frame encoded pixels pieces, the reference prediction value MV of the motion vector of block of pixels E then
PredEqual MV
X
After the prediction reference that obtains pending block of pixels E motion vector with MV
Pred, AOr MV
A, MV
Pred, BOr MV
B, MV
Pred, COr MV
C, MV
Pred, DOr MV
DCan carry out median prediction processing or weighted average and handle the motion vector predictor MV that obtains block of pixels E
Pred
Embodiment 6:
If block of pixels X and block of pixels E are odd-numbered line block of pixels or even number line block of pixels in the encoded pixels piece, and their reference picture is also identical, the reference prediction value MV of the motion vector of block of pixels E then
PredEqual MV
X
After the prediction reference that obtains pending block of pixels E motion vector with MV
Pred, AOr MV
A, MV
Pred, BOr MV
B, MV
Pred, COr MV
C, MV
Pred, DOr MV
DCan carry out median prediction processing or weighted average and handle the motion vector predictor MV that obtains block of pixels E
Pred
The prediction unit of motion vector comprises input unit, motion vector convergent-divergent processing unit, motion-vector prediction processing unit and output device in the coding and decoding video, as shown in Figure 2.Input unit 210 is used to accept to store around the current pending block of pixels motion vector of processed pixels piece.The motion vector of the piece of processed pixels in 220 pairs of input units of motion vector convergent-divergent processing unit carries out convergent-divergent to be handled, comprising ALU 225 can use multiplying, add operation and shift operation realize this processing.Motion vector convergent-divergent processing costs after motion-vector prediction processing unit 230 usefulness motion vector convergent-divergents are handled carries out prediction processing to the motion vector 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 for the storing moving vector to carry out the motion vector predictor of the current pending block of pixels after the prediction processing and output is provided.
Be connected by data/address bus between input unit and the motion vector convergent-divergent processing unit, transmit the motion vector of processed pixels piece; Be connected transmitting moving vector convergent-divergent processing costs by data/address bus between motion vector convergent-divergent processing unit and the motion-vector prediction processing unit; Be connected the motion vector predictor of pending block of pixels before the transmission between motion-vector prediction processing unit and the output device by data/address bus.
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.