Summary of the invention
Technical problem to be solved by this invention provides calibration steps and device, a kind of method for estimating and the device in a kind of estimation, in order to improve the performance of chroma coder.
In order to address the above problem, the invention discloses the calibration steps in a kind of estimation, comprising:
For each the colourity piecemeal in the two field picture macro block, if the motion vector of its corresponding bright piecemeal is not (0,0), then utilize its adjacent motion vector of going up piece, left piece and upper left, obtain its corresponding movable information;
When described movable information satisfies prerequisite, utilize the adjacent motion vector of going up piece and left piece of colourity piecemeal, the vector of described colourity piecemeal is predicted, obtain predictive vector;
If described predictive vector is different from the motion vector of corresponding bright piecemeal, then divide in the block motion vector from (0,0), predictive vector and corresponding bright, select a motion vector as described colourity piecemeal.
Preferably, described movable information comprises exercise intensity information and movement differential information;
Described prerequisite is that described exercise intensity information is not less than first threshold, and described movement differential information is not less than second threshold value.
Preferably, the described step of obtaining exercise intensity information comprises:
For the colourity piecemeal, calculate its adjacent absolute value summation that goes up piece, left piece and upper left block motion vector;
According to described absolute value summation, obtain described exercise intensity information;
The described step of obtaining movement differential information comprises:
For the colourity piecemeal, calculate its adjacent first relative motion vectors, second relative motion vectors that goes up upper left relatively of piece, left piece respectively;
According to the absolute value summation of described first relative motion vectors, second relative motion vectors, obtain described movement differential degree information.
Preferably, the described step that the motion vector of colourity piecemeal is predicted is, utilizes bi-linear filter that the described adjacent motion vector of going up piece and left piece is predicted, obtains described predictive vector.
Preferably, the described step of utilizing bi-linear filter to predict is, by following bi-linear filter formula obtain predictive vector (predX, predY):
PredX=(aX1+bX2+u1)/(a+b), predY=(aY1+bY2+u2)/(a+b), wherein, predX, predY are respectively predictive vector X component in the horizontal direction, Y component in vertical direction; X1, X2 are respectively the described adjacent X component of going up piece and left block motion vector; Y1, Y2 are respectively the described adjacent Y component of going up piece and left block motion vector; A, b are natural number; 0<u1, u2<a+b.
Preferably, the step of the motion vector of described selection colourity piecemeal comprises:
Calculate the rate distortion costs that (0,0), predictive vector and corresponding bright are divided block motion vector respectively, and with the vector of the rate distortion costs minimum motion vector as the colourity piecemeal;
Perhaps, calculate the image fault degree that (0,0), predictive vector and corresponding bright are divided block motion vector respectively, and with the vector of the image fault degree minimum motion vector as the colourity piecemeal.
Preferably, described calibration steps also comprises:
When the motion vector of described colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal.
Preferably, described calibration steps also comprises:
For the colourity piecemeal, be (0,0) at the motion vector of its corresponding bright piecemeal, perhaps, described movable information does not satisfy prerequisite, perhaps, when the motion vector of described predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal.
The invention also discloses a kind of method for estimating, comprising:
Brightness piecemeal in the one two field picture macro block is carried out estimation, obtain one group of best block mode and corresponding motion vector of dividing;
Divide each colourity piecemeal under the block mode for this best,, then utilize its adjacent motion vector of going up piece, left piece and upper left, obtain its corresponding movable information if the motion vector of its corresponding bright piecemeal is not (0,0);
When described movable information satisfies prerequisite, utilize the adjacent motion vector of going up piece and left piece of colourity piecemeal, the vector of described colourity piecemeal is predicted, obtain predictive vector;
If described predictive vector is different from the motion vector of corresponding bright piecemeal, then divide in the block motion vector from (0,0), predictive vector and corresponding bright, select a motion vector as described colourity piecemeal;
When the motion vector of described colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with the motion vector of described selection result as the corresponding bright piecemeal;
For the colourity piecemeal, motion vector at its corresponding bright piecemeal is (0,0), perhaps, its corresponding movable information does not satisfy prerequisite, perhaps, when the motion vector of described predictive vector and corresponding bright piecemeal is identical, with the motion vector of its corresponding bright piecemeal motion vector as this colourity piecemeal.
Preferably, described movable information comprises exercise intensity information and movement differential information;
Described prerequisite is that described exercise intensity information is not less than first threshold, and described movement differential information is not less than second threshold value.
Preferably, the described step of obtaining exercise intensity information comprises:
For the colourity piecemeal, calculate its adjacent absolute value summation that goes up piece, left piece and upper left block motion vector;
According to described absolute value summation, obtain described exercise intensity information;
The described step of obtaining movement differential information comprises:
For the colourity piecemeal, calculate its adjacent first relative motion vectors, second relative motion vectors that goes up upper left relatively of piece, left piece respectively;
According to the absolute value summation of described first relative motion vectors, second relative motion vectors, obtain described movement differential degree information.
Preferably, the described step that the vector of colourity piecemeal is predicted is, utilizes bi-linear filter that the described adjacent motion vector of going up piece and left piece is predicted, obtains described predictive vector.
The invention also discloses the calibrating installation in a kind of estimation, comprising:
The movable information acquisition module in order to for each the colourity piecemeal in the two field picture macro block, if the motion vector of its corresponding bright piecemeal is not (0,0), then utilizes its adjacent motion vector of going up piece, left piece and upper left, obtains its corresponding movable information;
Prediction module is used for when described movable information satisfies prerequisite, utilizes the adjacent motion vector of going up piece and left piece of colourity piecemeal, and the vector of described colourity piecemeal is predicted, obtains predictive vector;
Select module, be used for when described predictive vector is different from the motion vector of corresponding bright piecemeal, dividing in the block motion vector, select a motion vector as described colourity piecemeal from (0,0), predictive vector and corresponding bright.
Preferably, described movable information comprises exercise intensity information and movement differential information;
Described prerequisite is that described exercise intensity information is not less than first threshold, and described movement differential information is not less than second threshold value.
Preferably, described movable information acquisition module comprises:
Absolute value summation meter operator module is used for for the colourity piecemeal, calculates its adjacent absolute value summation that goes up piece, left piece and upper left block motion vector;
Exercise intensity information is obtained submodule, is used for obtaining described exercise intensity information according to described absolute value summation;
The relative motion vectors calculating sub module is used for for the colourity piecemeal, calculates its adjacent first relative motion vectors, second relative motion vectors that goes up upper left relatively of piece, left piece respectively;
Movement differential degree information is obtained submodule, is used for the absolute value summation according to described first relative motion vectors, second relative motion vectors, obtains described movement differential degree information.
Preferably, described prediction module is predicted the described adjacent motion vector of going up piece and left piece in order to utilize bi-linear filter, obtains described predictive vector.
Preferably, described selection module comprises:
First calculating sub module is used for calculating respectively the rate distortion costs that (0,0), predictive vector and corresponding bright are divided block motion vector, and with the vector of the rate distortion costs minimum motion vector as the colourity piecemeal;
Perhaps, second calculating sub module is used for calculating respectively the image fault degree that (0,0), predictive vector and corresponding bright are divided block motion vector, and with the vector of the image fault degree minimum motion vector as the colourity piecemeal.
Preferably, described calibrating installation also comprises:
First Multiplexing module is used for when the motion vector of described colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal.
Preferably, described calibrating installation also comprises:
Second Multiplexing module, in order to for the colourity piecemeal, motion vector at its corresponding bright piecemeal is (0,0), perhaps, described movable information does not satisfy prerequisite, perhaps, when the motion vector of described predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal.
The invention also discloses a kind of movement estimation apparatus of chromatic component, comprising:
The brightness estimation module is used for the brightness piecemeal of a two field picture macro block is carried out estimation, obtains one group of best block mode and corresponding motion vector of dividing;
The movable information acquisition module, in order to divide each the colourity piecemeal under the block mode for this best, if the motion vector of its corresponding bright piecemeal is not (0,0), then utilize its adjacent motion vector of going up piece, left piece and upper left, obtain its corresponding movable information;
Prediction module is used for when described movable information satisfies prerequisite, utilizes the adjacent motion vector of going up piece and left piece of colourity piecemeal, and the vector of described colourity piecemeal is predicted, obtains predictive vector;
Select module, be used for when described predictive vector is different from the motion vector of corresponding bright piecemeal, dividing in the block motion vector, select a motion vector as described colourity piecemeal from (0,0), predictive vector and corresponding bright;
First Multiplexing module is used for when the motion vector of described colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal;
Second Multiplexing module, in order to for the colourity piecemeal, motion vector at its corresponding bright piecemeal is (0,0), perhaps, described movable information does not satisfy prerequisite, perhaps, when the motion vector of described predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal.
Preferably, described movable information comprises exercise intensity information and movement differential information;
Described prerequisite is that described exercise intensity information is not less than first threshold, and described movement differential information is not less than second threshold value.
Preferably, described movable information acquisition module comprises:
Absolute value summation meter operator module is used for for the colourity piecemeal, calculates its adjacent absolute value summation that goes up piece, left piece and upper left block motion vector;
Exercise intensity information is obtained submodule, is used for obtaining described exercise intensity information according to described absolute value summation;
The relative motion vectors calculating sub module is used for for the colourity piecemeal, calculates its adjacent first relative motion vectors, second relative motion vectors that goes up upper left relatively of piece, left piece respectively;
Movement differential degree information is obtained submodule, is used for the absolute value summation according to described first relative motion vectors, second relative motion vectors, obtains described movement differential degree information.
Preferably, described prediction module is predicted the described adjacent motion vector of going up piece and left piece in order to utilize bi-linear filter, obtains described predictive vector.
Preferably, described selection module comprises:
First calculating sub module is used for calculating respectively the rate distortion costs that (0,0), predictive vector and corresponding bright are divided block motion vector, and with the vector of the rate distortion costs minimum motion vector as the colourity piecemeal;
Perhaps, second calculating sub module is used for calculating respectively the image fault degree that (0,0), predictive vector and corresponding bright are divided block motion vector, and with the vector of the image fault degree minimum motion vector as the colourity piecemeal.
Compared with prior art, the present invention has the following advantages:
The present invention is directed to the current chroma piecemeal, at first according to the motion vector of corresponding bright piecemeal, and the last piece adjacent, left piece and upper left correlation with this current colourity piecemeal, search obtains the object of its estimation calibration, predict at this object then, obtain predictive vector, at last, when described predictive vector is different from the motion vector of corresponding bright piecemeal, from (0,0), predictive vector and corresponding bright are divided in the block motion vector motion vector of the described colourity piecemeal of conduct of selection rate distortion cost minimum or image fault degree minimum; Above-mentioned search can precision and the scope of refinement estimation calibration, and the motion vector of the colourity piecemeal that obtains at last has minimum rate distortion costs or image fault degree, thereby can improve the accuracy as a result of colourity estimation, thereby can improve the performance of chroma coder greatly.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
One of core idea of the embodiment of the invention is, according to the motion vector of corresponding bright piecemeal, the estimation that the motion vector of colourity piecemeal is done in the certain limit is calibrated; Because described estimation calibration can not influence under the situation of computational complexity substantially, the estimation calibration of colourity piecemeal is played the effect of precision and refinement, thereby can improve the accuracy as a result of colourity estimation, thereby can improve the performance of chroma coder greatly.
With reference to Fig. 3, show the flow chart of the calibration steps embodiment in a kind of estimation of the present invention, specifically can comprise:
Step 301, for each the colourity piecemeal in the two field picture macro block, if the motion vector of its corresponding bright piecemeal is not (0,0), then utilize its adjacent motion vector of going up piece, left piece and upper left, obtain its corresponding movable information;
In the AVS coding standard, motion estimation algorithm carries out on luminance component; Also promptly, luminance component searches the best matching blocks of different piecemeals with different branch block sizes in reference frame, obtain motion vector.
Because (0,0) vector can be under with as far as possible little encoder bit rate, the image fault degree that obtains is few as much as possible, so be considered to reasonable motion vector; Therefore, the present invention is not the colourity piecemeal of (0,0) with the motion vector of corresponding bright piecemeal at first, as the object of estimation calibration.
Further, the inventor herein finds, concerning a colourity piecemeal, its adjacent upward piece, left piece and upper left correlation with this colourity piecemeal are bigger, also be, the described adjacent integrated motion information that goes up piece, left piece and upper left can reflect the movable information of this colourity piecemeal, and here, the last piece adjacent with this current colourity piecemeal, left piece and upper left are the colourity piecemeal.
In specific implementation, described movable information mainly can comprise following classification:
Classification 1, exercise intensity information;
With reference to Fig. 4, in a kind of colourity partitioned organization example of the present invention, 8 * 8 colourity piecemeal X adjacent gone up piece, left piece and upper left and is respectively A, B and C, so, the motion vector of comprehensive colourity piecemeal A, B and C can obtain the exercise intensity information that reflects colourity piecemeal X.
In specific implementation, the described step of obtaining exercise intensity information can comprise:
Substep A1, for the colourity piecemeal, calculate its adjacent absolute value summation that goes up piece, left piece and upper left block motion vector;
Suppose A, B, C in the horizontal direction the motion vector on the X be respectively mvxa, mvxb, mvxc, the motion vector on vertical direction Y is respectively mvya, mvyb, mvyc, so, the computational process of described absolute value summation can for:
int?x=abs(mvxa)+abs(mvxb)+abs(mvxc);
int?y=abs(mvya)+abs(mvyb)+abs(mvyc);
Wherein, abs (x) expression is asked absolute value to x.
Here, x+y also is described absolute value summation.
Substep A2, according to described absolute value summation, obtain described exercise intensity information;
Suppose to represent described exercise intensity information with motion_level, so the implementation of substep A2 can for:
if(x+y<4){
motion_level=0;
}else?if(x+y<=8){
motion_level=1;
}else{
motion_level=(x+y)>>2;
}
Wherein, described ">>" expression right-shift operation.
Suppose A, the motion vector of B and X all is 1/4 pixel precision, and the motion vector of A is (5 ,-7), and the motion vector of B is (5 ,-4), and the motion vector of the C that search obtains then can calculate motion_level=7 for (3 ,-5).
As can be seen, the value of motion_level is big more, and the adjacent piece motion around the expression current block is more violent, can predict that then the motion Shaoxing opera of colourity piecemeal X is strong; The implementation that is appreciated that above-mentioned substep A2 is just as example, and those skilled in the art can adopt other implementation to obtain the value of motion_level as required, and the present invention is not limited this.
Classification 2, movement differential information.
Described exercise intensity information can reflect the motion severe degree of current chroma piecemeal, and still, in some cases, it is adjacent goes up piece, left piece is identical or similar with upper left motion vector, at this moment, can not carry out the estimation calibration; Therefore, the present invention introduces the notion of movement differential information, is used to reflect that its adjacent motion of going up piece, left piece and upper left concentrates or degree of divergence.
In specific implementation, the described step of obtaining movement differential information can comprise:
Substep B1, for the colourity piecemeal, calculate its adjacent first relative motion vectors, second relative motion vectors that goes up upper left relatively of piece, left piece respectively;
Substep B2, according to the absolute value summation of described first relative motion vectors, second relative motion vectors, obtain described movement differential degree information.
Example on the correspondence can at first be calculated the absolute value summation of described first relative motion vectors, second relative motion vectors
Sum=abs (mvxa-mvxb)+abs (mvxb-mvxc)+abs (mvya-mvyb)+abs (mvyb-mvyc), then, substep B2 obtains movement differential information of the present invention by movement differential degree information motion_diff=x>>2.
As can be seen, the value of movement differential degree information motion_diff is big more, and it is diffusing all the more that reflection colourity piecemeal X adjacent gone up piece, left piece and upper left motion, otherwise it is concentrated more to move; The implementation that is appreciated that above-mentioned substep B2 is just as example, and those skilled in the art can adopt other implementation to obtain the value of motion_diff as required, and the present invention is not limited this.
Step 302, when described movable information satisfies prerequisite, utilize the adjacent motion vector of going up piece and left piece of colourity piecemeal, the vector of described colourity piecemeal is predicted, obtain predictive vector;
The present invention is according to the movable information of current chroma piecemeal, and further searching moving is estimated the object of calibration.
For example, when described movable information comprises exercise intensity information and movement differential information, described prerequisite can for, described exercise intensity information is not less than first threshold, and described movement differential information is not less than second threshold value.
With Fig. 4 is example, its adjacent X, Y direction motion vector hypothesis that goes up piece, left piece and upper left can be the motion_level value 6 that calculated at 1 o'clock as described first threshold; Can suppose that it is adjacent goes up piece, left piece and upper left movement warp summation in X, Y direction and be no more than under 1 the situation, does not carry out the estimation calibration, so described second threshold value is made as numerical value less than 2.
Be appreciated that, above-mentioned just as example, those skilled in the art can be provided with described prerequisite according to actual conditions, for example, when colourity piecemeal bigger (8 * 8), bigger first threshold is set, and when colourity piecemeal smaller (4 * 4), less first threshold is set, and the present invention is not limited this.
In video coding, because the adjacent correlation maximum that goes up piece and left piece and current chroma piecemeal, so select described adjacent upward piece and left piece that the vector of current chroma piecemeal is predicted.
In specific implementation, can utilize bi-linear filter that the described adjacent motion vector of going up piece and left piece is predicted, obtain described predictive vector.
For example, can by following bi-linear filter formula obtain predictive vector (predX, predY):
PredX=(aX1+bX2+u1)/(a+b), predY=(aY1+bY2+u2)/(a+b), wherein, predX, predY are respectively predictive vector X component in the horizontal direction, Y component in vertical direction; X1, X2 are respectively the described adjacent X component of going up piece and left block motion vector; Y1, Y2 are respectively the described adjacent Y component of going up piece and left block motion vector; A, b are natural number; 0<u1, u2<a+b.
Be appreciated that a, b is respectively the described weight that connects piece and left piece mutually; In practice, be to improve arithmetic speed, can get a+b and be 2 n power, wherein, n is a natural number.
For example, if adjacent upward piece, left piece all are in the macro block at current chroma piecemeal place, perhaps, all be not in the macro block at current chroma piece place, then can give piece and the same weight of left piece, be yet, a=b=1, at this moment, described formula can be predX=(X1+X2+u1)/2, predX=(Y1+Y2+u2)/2.
And for example, piece and current chroma piecemeal are at same macro block on adjacent, and left piece does not exist, and then can give piece weight 3, and left piece weight is 1; Otherwise, can give piece weight 1, left piece weight is 3.
In addition, described u1 is used for when (aX1+bX2) is aliquant to (a+b) described result being rounded up, for example, a=1, b=3, X1=3, X2==1, then aX1+bX2=6 can not be divided exactly 4, at this moment, can get u1=(a+b)/2=2; The value rule of u2 and u1 is similar with u1, so do not give unnecessary details at this.
If the described predictive vector of step 303 is different from the motion vector of corresponding bright piecemeal, then divide in the block motion vector from (0,0), predictive vector and corresponding bright, select a motion vector as described colourity piecemeal.
When described predictive vector was different from the motion vector of corresponding bright piecemeal, the present invention can be according to following rule, from (0,0), predictive vector and corresponding bright divide select among the block motion vector three optimum:
Rule one, image fault degree minimum;
The image fault degree generally is meant picture quality, and available in practice SAD (absolute difference and, Sum ofAbsolute Difference) represents; In practice, can compare the sad value that (0,0), predictive vector and corresponding bright are divided 3 vector points of block motion vector, select the motion vector of the minimum described colourity piecemeal of conduct.
Rule two, rate distortion costs minimum.
In the video coding, described rate distortion (Rate Distortion) mainly refers to image fault degree and the encoder bit rate correlation between the two.
In practice, can utilize Lagrangian least square formula, carry out rate-distortion optimization (RDO, Rate Distortion Optimization): its general purpose just is, under with as far as possible little encoder bit rate, the image fault degree that obtains is few as much as possible, in order to spend minimum rate distortion costs.
For example, the computing formula of a RDO value is D+lamda*R, wherein, the D representative image distortion factor, available SAD represents that R is a bit number, also is the bit number that motion vector and residual coding need, lamda is an empirical value, can determine according to actual conditions.
Be appreciated that those skilled in the art can the integration algorithm complexity and coding efficiency select above-mentioned two kinds of rules, for example, when encoder has requirement to complexity, can selective rule one; And coding efficiency is had requirement at encoder, and and when complexity do not required, can selective rule two, the present invention is not limited this.
The present invention will compare the RDO or the sad value of three vector points at most, and is little to the influence of complexity; And, the effect of precision and refinement has been played in the fortune merit vector calibration of chromatic component, thereby can have been improved the performance of chroma coder.
Because the brightness piecemeal of an image macro and colourity piecemeal are corresponding, therefore, in a preferred embodiment of the present invention, described method can also comprise:
When the motion vector of described colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal.
In addition, the colourity piecemeal for need not to carry out the estimation calibration can also carry out multiplexing operation to it, and therefore, in another kind of preferred embodiment of the present invention, described method can also comprise:
For the colourity piecemeal, be (0,0) at the motion vector of its corresponding bright piecemeal, perhaps, described movable information does not satisfy prerequisite, perhaps, when the motion vector of described predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal.
With reference to figure 5, show the flow chart of a kind of method for estimating embodiment of the present invention, specifically can comprise:
Step 501, the brightness piecemeal in the two field picture macro block is carried out estimation, obtain one group of best block mode and corresponding motion vector of dividing;
In practice, motion estimation algorithm carries out on luminance component; Described estimation obtains one group of best block mode and corresponding motion vector of dividing often at the brightness module under the multicomponent block mode.
Step 502, divide each colourity piecemeal under the block mode,, then utilize its adjacent motion vector of going up piece, left piece and upper left, obtain its corresponding movable information if the motion vector of its corresponding bright piecemeal is not (0,0) for this best;
In specific implementation, described movable information mainly can comprise following classification:
Classification 1, exercise intensity information;
The described step of obtaining exercise intensity information can comprise:
For the colourity piecemeal, calculate its adjacent absolute value summation that goes up piece, left piece and upper left block motion vector;
According to described absolute value summation, obtain described exercise intensity information;
Classification 2, movement differential information.
The described step of obtaining movement differential information can comprise:
For the colourity piecemeal, calculate its adjacent first relative motion vectors, second relative motion vectors that goes up upper left relatively of piece, left piece respectively;
According to the absolute value summation of described first relative motion vectors, second relative motion vectors, obtain described movement differential degree information.
Step 503, when described movable information satisfies prerequisite, utilize the adjacent motion vector of going up piece and left piece of colourity piecemeal, the vector of described colourity piecemeal is predicted, obtain predictive vector;
For example, when described movable information comprises exercise intensity information and movement differential information, described prerequisite can for, described exercise intensity information is not less than first threshold, and described movement differential information is not less than second threshold value.
In video coding, because the adjacent correlation maximum that goes up piece and left piece and current chroma piecemeal, so select described adjacent upward piece and left piece that the vector of current chroma piecemeal is predicted.
In specific implementation, can utilize bi-linear filter that the described adjacent motion vector of going up piece and left piece is predicted, obtain described predictive vector.
For example, can by following bi-linear filter formula obtain predictive vector (predX, predY):
PredX=(aX1+bX2+u1)/(a+b), predY=(aY1+bY2+u2)/(a+b), wherein, predX, predY are respectively predictive vector X component in the horizontal direction, Y component in vertical direction; X1, X2 are respectively the described adjacent X component of going up piece and left block motion vector; Y1, Y2 are respectively the described adjacent Y component of going up piece and left block motion vector; A, b are natural number; 0<u1, u2<a+b.
If the described predictive vector of step 504 is different from the motion vector of corresponding bright piecemeal, then divide in the block motion vector from (0,0), predictive vector and corresponding bright, select a motion vector as described colourity piecemeal;
For example, can selection rate distortion cost minimum or the vector of image fault degree minimum, as the motion vector of described colourity piecemeal.
Step 505, when the motion vector of described colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal;
Step 506, for the colourity piecemeal, motion vector at its corresponding bright piecemeal is (0,0), perhaps, described movable information does not satisfy prerequisite, perhaps, when the motion vector of described predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal.
For making those skilled in the art understand the present invention better, below be that example describes with the motion estimation process of an image macro.
Step S1, the brightness piecemeal in the two field picture macro block is carried out estimation, obtain one group of best block mode and corresponding motion vector of dividing;
For example, the macro block for 16 * 16 carries out the estimation of luminance component under four kinds of branch block modes shown in Figure 1, obtains one group of best block mode and corresponding motion vector of dividing, and for example divides block mode (4).
Step S2, divide each colourity piecemeal under the block mode for this best, if the motion vector of its corresponding bright piecemeal is (0,0), execution in step S3 then, otherwise, execution in step S4;
Step S3, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal;
Step S4, utilize its adjacent motion vector of going up piece, left piece and upper left, obtain its corresponding movable information;
Step S5, judge whether described movable information satisfies prerequisite, if, execution in step S6 then, otherwise, step S3 returned;
The exercise intensity information motion_level=7 that supposes step S4 acquisition is greater than first threshold 6, and movement differential information motion_diff=3 is greater than second threshold value 2, and also, described movable information satisfies prerequisite.
Step S6, utilize the adjacent motion vector of going up piece and left piece, the vector of described colourity piecemeal is predicted, obtain predictive vector;
Step S7, judge whether described predictive vector is identical with the motion vector of corresponding bright piecemeal, if, then return step S3, otherwise, execution in step S8;
Step S8, divide in the block motion vector motion vector of the described colourity piecemeal of conduct of selection rate distortion cost minimum or image fault degree minimum from (0,0), predictive vector and corresponding bright;
For example, according to formula predX=(X1+X2+1)/2, predY=(Y1+Y2+1)/2 obtains predX=-5, and predY=-5 is different from the motion vector of corresponding bright piecemeal; So the RDO value by more described 3 vector points, obtain selection result (predX, predY).
Step S9, when described selection result is different from the motion vector of corresponding bright piecemeal, with the motion vector of described selection result as the corresponding bright piecemeal.
Need to prove that for the current chroma piecemeal, it is adjacent goes up piece, left piece and upper left and can be in same macro block with it, also can be different; In addition, its do not exist adjacent among piece, left piece and upper left during any adjacent piece, for example, the C piece in Fig. 4 is in the image during first piecemeal, there is not adjacent piece in it, motion vector that should neighbour's piece can be made as zero vector (0,0).
The estimation that more than is primarily aimed at macro block in the image of YCbCr4:2:0 sample format is described in detail, be appreciated that, the sample format of described image can also be YCbCr4:2:2, YCbCr4:4:4 etc., the present invention goes for the motion calibration of colourity module on the arbitrary component of Cb, Cr and estimates that the sample format concrete to image do not limited.
Corresponding with the such alignment method, the invention also discloses the calibrating installation in a kind of estimation, referring to Fig. 6, specifically can comprise:
Movable information acquisition module 601, in order to for each the colourity piecemeal in the two field picture macro block, if the motion vector of its corresponding bright piecemeal is not (0,0), then utilize its adjacent motion vector of going up piece, left piece and upper left, obtain its corresponding movable information;
Prediction module 602 is used for when described movable information satisfies prerequisite, utilizes the adjacent motion vector of going up piece and left piece of colourity piecemeal, and the vector of described colourity piecemeal is predicted, obtains predictive vector;
Select module 603, be used for when described predictive vector is different from the motion vector of corresponding bright piecemeal, dividing in the block motion vector, select a motion vector as described colourity piecemeal from (0,0), predictive vector and corresponding bright.
In practice, described movable information can comprise exercise intensity information and movement differential information; At this moment, described prerequisite can for, described exercise intensity information is not less than first threshold, and described movement differential information is not less than second threshold value.
For obtaining above-mentioned movable information, in specific implementation, following submodule can be set in described movable information acquisition module 601:
Absolute value summation meter operator module C1 is used for for the colourity piecemeal, calculates its adjacent absolute value summation that goes up piece, left piece and upper left block motion vector;
Exercise intensity information is obtained submodule C2, is used for obtaining described exercise intensity information according to described absolute value summation;
Relative motion vectors calculating sub module C3 is used for for the colourity piecemeal, calculates its adjacent first relative motion vectors, second relative motion vectors that goes up upper left relatively of piece, left piece respectively;
Movement differential degree information is obtained submodule C4, is used for the absolute value summation according to described first relative motion vectors, second relative motion vectors, obtains described movement differential degree information.
In addition, in practice, can design described prediction module 602, the described adjacent motion vector of going up piece and left piece be predicted, obtain described predictive vector in order to utilize bi-linear filter.
For example, described prediction module 602, can be used for by following bi-linear filter formula obtain predictive vector (predX, predY):
PredX=(aX1+bX2+u1)/(a+b), predY=(aY1+bY2+u2)/(a+b), wherein, predX, predY are respectively predictive vector X component in the horizontal direction, Y component in vertical direction; X1, X2 are respectively the described adjacent X component of going up piece and left block motion vector; Y1, Y2 are respectively the described adjacent Y component of going up piece and left block motion vector; A, b are natural number; 0<u1, u2<a+b.
Described selection module 603 can adopt one or more in the following submodule:
First calculating sub module is used for calculating respectively the rate distortion costs that (0,0), predictive vector and corresponding bright are divided block motion vector, and with the vector of the rate distortion costs minimum motion vector as the colourity piecemeal;
Second calculating sub module is used for calculating respectively the image fault degree that (0,0), predictive vector and corresponding bright are divided block motion vector, and divides block motion vector with the vector of image fault degree minimum as colourity.
Because the brightness piecemeal of an image macro and colourity piecemeal are corresponding, therefore, in a preferred embodiment of the present invention, described device can also comprise:
First Multiplexing module is used for when the motion vector of described colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal.
In addition, the colourity piecemeal for need not to carry out the estimation calibration can also carry out multiplexing operation to it, and therefore, in another kind of preferred embodiment of the present invention, described device can also comprise:
Second Multiplexing module, in order to for the colourity piecemeal, motion vector at its corresponding bright piecemeal is (0,0), perhaps, described movable information does not satisfy prerequisite, perhaps, when the motion vector of described predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal.
For calibrating installation, because it is similar substantially to calibration steps embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of calibration steps embodiment.
Corresponding with the aforementioned movement method of estimation, the invention also discloses a kind of movement estimation apparatus of chromatic component, referring to Fig. 7, specifically can comprise:
Brightness estimation module 701 is used for the brightness piecemeal of a two field picture macro block is carried out estimation, obtains one group of best block mode and corresponding motion vector of dividing;
Movable information acquisition module 702, in order to divide each the colourity piecemeal under the block mode for this best, if the motion vector of its corresponding bright piecemeal is not (0,0), then utilize its adjacent motion vector of going up piece, left piece and upper left, obtain its corresponding movable information;
Prediction module 703 is used for when described movable information satisfies prerequisite, utilizes the adjacent motion vector of going up piece and left piece of colourity piecemeal, and the vector of described colourity piecemeal is predicted, obtains predictive vector;
Select module 704, be used for when described predictive vector is different from the motion vector of corresponding bright piecemeal, dividing in the block motion vector, select a motion vector as described colourity piecemeal from (0,0), predictive vector and corresponding bright;
First Multiplexing module 705 is used for when the motion vector of described colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal;
Second Multiplexing module 706, in order to for the colourity piecemeal, motion vector at its corresponding bright piecemeal is (0,0), perhaps, described movable information does not satisfy prerequisite, perhaps, when the motion vector of described predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal.
In practice, described movable information can comprise exercise intensity information and movement differential information; At this moment, described prerequisite can for, described exercise intensity information is not less than first threshold, and described movement differential information is not less than second threshold value.
For obtaining above-mentioned movable information, in specific implementation, following submodule can be set in described movable information acquisition module 701:
Absolute value summation meter operator module is used for for the colourity piecemeal, calculates its adjacent absolute value summation that goes up piece, left piece and upper left block motion vector;
Exercise intensity information is obtained submodule, is used for obtaining described exercise intensity information according to described absolute value summation;
The relative motion vectors calculating sub module is used for for the colourity piecemeal, calculates its adjacent first relative motion vectors, second relative motion vectors that goes up upper left relatively of piece, left piece respectively;
Movement differential degree information is obtained submodule, is used for the absolute value summation according to described first relative motion vectors, second relative motion vectors, obtains described movement differential degree information.
In addition, in practice, can design described prediction module 703, the described adjacent motion vector of going up piece and left piece be predicted, obtain described predictive vector in order to utilize bi-linear filter.
Described selection module 704 can adopt one or more in the following submodule:
First calculating sub module is used for calculating respectively the rate distortion costs that (0,0), predictive vector and corresponding bright are divided block motion vector, and with the vector of the rate distortion costs minimum motion vector as the colourity piecemeal;
Second calculating sub module is used for calculating respectively the image fault degree that (0,0), predictive vector and corresponding bright are divided block motion vector, and with the vector of the image fault degree minimum motion vector as the colourity piecemeal.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.
The present invention can be applied to the estimation of chromatic component in the video coding, in order to improving the accuracy as a result of colourity estimation, thereby can improve the performance of chroma coder greatly.
More than to the calibration steps in a kind of estimation provided by the present invention and device, a kind of method for estimating and device, be described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.