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 said movable information satisfies prerequisite, utilize the adjacent motion vector of going up piece and left piece of colourity piecemeal, the vector of said colourity piecemeal is predicted, obtain predictive vector;
If said 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 said colourity piecemeal;
Wherein, said movable information comprises exercise intensity information and movement differential information;
The said 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 said absolute value summation, obtain said exercise intensity information;
The said 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 said first relative motion vectors, second relative motion vectors, obtain said movement differential information.
Preferably, said prerequisite is that said exercise intensity information is not less than first threshold, and said movement differential information is not less than second threshold value.
Preferably, the said step that the motion vector of colourity piecemeal is predicted does, utilizes bi-linear filter that the said adjacent motion vector of going up piece and left piece is predicted, obtains said predictive vector.
Preferably, the said step of utilizing bi-linear filter to predict does, through 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 said adjacent X component of going up piece and left block motion vector; Y1, Y2 are respectively the said adjacent Y component of going up piece and left block motion vector; A, b are natural number; O<u1, u2<a+b.
Preferably, the step of the motion vector of said selection colourity piecemeal comprises:
Calculate the rate distortion costs that (0,0), predictive vector and corresponding bright are divided block motion vector respectively, and the vector that rate distortion costs is minimum is as the motion vector of colourity piecemeal;
Perhaps, calculate the image fault degree that (0,0), predictive vector and corresponding bright are divided block motion vector respectively, and the vector that the image fault degree is minimum is as the motion vector of colourity piecemeal.
Preferably, said calibration steps also comprises:
When the motion vector of said colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal.
Preferably, said calibration steps also comprises:
For the colourity piecemeal, be (0,0) at the motion vector of its corresponding bright piecemeal; Perhaps, said movable information does not satisfy prerequisite, perhaps; When the motion vector of said 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 two field picture macro block carries out estimation, obtains one group of best block mode and corresponding motion vector of dividing;
Divide each the 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 said movable information satisfies prerequisite, utilize the adjacent motion vector of going up piece and left piece of colourity piecemeal, the vector of said colourity piecemeal is predicted, obtain predictive vector;
If said 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 said colourity piecemeal;
When the motion vector of said colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with the motion vector of said 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 said predictive vector and corresponding bright piecemeal is identical, with the motion vector of its corresponding bright piecemeal motion vector as this colourity piecemeal;
Wherein, said movable information comprises exercise intensity information and movement differential information;
The said 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 said absolute value summation, obtain said exercise intensity information;
The said 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 said first relative motion vectors, second relative motion vectors, obtain said movement differential information.
Preferably, said prerequisite is that said exercise intensity information is not less than first threshold, and said movement differential information is not less than second threshold value.
Preferably, the said step that the vector of colourity piecemeal is predicted does, utilizes bi-linear filter that the said adjacent motion vector of going up piece and left piece is predicted, obtains said 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 said movable information satisfies prerequisite, utilizes the adjacent motion vector of going up piece and left piece of colourity piecemeal, and the vector of said colourity piecemeal is predicted, obtains predictive vector;
Select module, be used for when said predictive vector is different from the motion vector of corresponding bright piecemeal, dividing in the block motion vector, select a motion vector as said colourity piecemeal from (0,0), predictive vector and corresponding bright;
Wherein, said movable information comprises exercise intensity information and movement differential information;
Said 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 said exercise intensity information according to said 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 information is obtained submodule, is used for the absolute value summation according to said first relative motion vectors, second relative motion vectors, obtains said movement differential information.
Preferably, said prerequisite is that said exercise intensity information is not less than first threshold, and said movement differential information is not less than second threshold value.
Preferably, said prediction module is predicted the said adjacent motion vector of going up piece and left piece in order to utilize bi-linear filter, obtains said predictive vector.
Preferably, said 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 the vector that rate distortion costs is minimum is as the motion vector of 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 the vector that the image fault degree is minimum is as the motion vector of colourity piecemeal.
Preferably, said calibrating installation also comprises:
First Multiplexing module is used for when the motion vector of said colourity piecemeal is different from the motion vector of corresponding bright piecemeal, with its motion vector as the corresponding bright piecemeal.
Preferably, said calibrating installation also comprises:
Second Multiplexing module in order to for the colourity piecemeal, is (0 at the motion vector of its corresponding bright piecemeal; 0); Perhaps, said movable information does not satisfy prerequisite, perhaps; When the motion vector of said 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 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 said movable information satisfies prerequisite, utilizes the adjacent motion vector of going up piece and left piece of colourity piecemeal, and the vector of said colourity piecemeal is predicted, obtains predictive vector;
Select module, be used for when said predictive vector is different from the motion vector of corresponding bright piecemeal, dividing in the block motion vector, select a motion vector as said colourity piecemeal from (0,0), predictive vector and corresponding bright;
First Multiplexing module is used for when the motion vector of said 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, is (0 at the motion vector of its corresponding bright piecemeal; 0); Perhaps, said movable information does not satisfy prerequisite, perhaps; When the motion vector of said predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal;
Wherein, said movable information comprises exercise intensity information and movement differential information;
Said 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 said exercise intensity information according to said 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 information is obtained submodule, is used for the absolute value summation according to said first relative motion vectors, second relative motion vectors, obtains said movement differential information.
Preferably, said prerequisite is that said exercise intensity information is not less than first threshold, and said movement differential information is not less than second threshold value.
Preferably, said prediction module is predicted the said adjacent motion vector of going up piece and left piece in order to utilize bi-linear filter, obtains said predictive vector.
Preferably, said 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 the vector that rate distortion costs is minimum is as the motion vector of 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 the vector that the image fault degree is minimum is as the motion vector of 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 with this current colourity piecemeal, left piece and upper left correlation; Search obtains the object of its estimation calibration; Predict to this object then, obtain predictive vector, last; When said predictive vector is different from the motion vector of corresponding bright piecemeal; Divide in the block motion vector motion vector of the said colourity piecemeal of conduct that the minimum perhaps image fault degree of selection rate distortion cost is minimum from (0,0), predictive vector and corresponding bright; 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 make above-mentioned purpose of the present invention, feature and advantage can be more obviously understandable, below in conjunction with accompanying drawing and embodiment the present invention done further detailed explanation.
One of core idea of the embodiment of the invention is, according to the motion vector of corresponding bright piecemeal, the motion vector of colourity piecemeal is done the estimation calibration in the certain limit; Because said estimation calibration can not influence under the situation of computational complexity basically; 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 that concerning a colourity piecemeal, its adjacent upward piece, left piece and upper left correlation with this colourity piecemeal are bigger; Also be; The said 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 concrete the realization, said 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 concrete the realization, the said 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 said 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 said absolute value summation.
Substep A2, according to said absolute value summation, obtain said exercise intensity information;
Suppose to represent said 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, said ">>" 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).
Can find out that the value of motion_level is big more, 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 that those skilled in the art can adopt other implementation to obtain the value of motion_level as required as an example, and the present invention does not limit this.
Classification 2, movement differential information.
Said exercise intensity information can reflect the motion severe 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 concrete the realization, the said 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 said first relative motion vectors, second relative motion vectors, obtain said movement differential degree information.
Example on the correspondence can at first be calculated the absolute value summation of said 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 through movement differential degree information motion_diff=x>>2.
Can find out that the value of movement differential degree information motion_diff is big more, 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 that those skilled in the art can adopt other implementation to obtain the value of motion_diff as required as an example, and the present invention does not limit this.
Step 302, when said movable information satisfies prerequisite, utilize the adjacent motion vector of going up piece and left piece of colourity piecemeal, the vector of said 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 said movable information comprises exercise intensity information and movement differential information, said prerequisite can for, said exercise intensity information is not less than first threshold, and said movement differential information is not less than second threshold value.
With Fig. 4 is example, can its adjacent X, Y direction motion vector hypothesis that goes up piece, left piece and upper left be the motion_level value 6 that calculated at 1 o'clock as said 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 said second threshold value is made as the numerical value less than 2.
Be appreciated that above-mentioned is that those skilled in the art can be provided with said prerequisite according to actual conditions as an example; 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 does not limit this.
In video coding, because the adjacent correlation maximum that goes up piece and left piece and current chroma piecemeal, so select said adjacent upward piece and left piece that the vector of current chroma piecemeal is predicted.
In concrete the realization, bi-linear filter capable of using is predicted the said adjacent motion vector of going up piece and left piece, is obtained said predictive vector.
For example, can through 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 said adjacent X component of going up piece and left block motion vector; Y1, Y2 are respectively the said 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 said weight that connects piece and left piece mutually; In reality, 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, said 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, said u1 is used for when (aX1+bX2) is aliquant to (a+b), said 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 said 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 said colourity piecemeal.
When said 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 SAD in reality (absolute difference with, Sum ofAbsolute Difference) representes; In reality, 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 said colourity piecemeal of conduct.
Rule two, rate distortion costs minimum.
In the video coding, said rate distortion (Rate Distortion) mainly refers to image fault degree and the encoder bit rate correlation between the two.
In reality; Lagrangian least square formula capable of using; Carry out rate-distortion optimization (RDO, Rate Distortion Optimization): purpose just is as the one of which, 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 representes that R is a bit number, also is the bit number that motion vector and residual coding need, lamda is an empirical value, can confirm 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 does not limit 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 kind of preferred embodiment of the present invention, said method can also comprise:
When the motion vector of said 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, said method can also comprise:
For the colourity piecemeal, be (0,0) at the motion vector of its corresponding bright piecemeal; Perhaps, said movable information does not satisfy prerequisite, perhaps; When the motion vector of said 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 reality, motion estimation algorithm carries out on luminance component; Said estimation obtains one group of best block mode and corresponding motion vector of dividing often to the brightness module under the multicomponent block mode.
Step 502, divide each the 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 concrete the realization, said movable information mainly can comprise following classification:
Classification 1, exercise intensity information;
The said 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 said absolute value summation, obtain said exercise intensity information;
Classification 2, movement differential information.
The said 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 said first relative motion vectors, second relative motion vectors, obtain said movement differential degree information.
Step 503, when said movable information satisfies prerequisite, utilize the adjacent motion vector of going up piece and left piece of colourity piecemeal, the vector of said colourity piecemeal is predicted, obtain predictive vector;
For example, when said movable information comprises exercise intensity information and movement differential information, said prerequisite can for, said exercise intensity information is not less than first threshold, and said 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 said adjacent upward piece and left piece that the vector of current chroma piecemeal is predicted.
In concrete the realization, bi-linear filter capable of using is predicted the said adjacent motion vector of going up piece and left piece, is obtained said predictive vector.
For example, can through 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 said adjacent X component of going up piece and left block motion vector; Y1, Y2 are respectively the said adjacent Y component of going up piece and left block motion vector; A, b are natural number; 0<u1, u2<a+b.
If the said 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 said colourity piecemeal;
For example, can the selection rate distortion cost minimum or vector that the image fault degree is minimum, as the motion vector of said colourity piecemeal.
Step 505, when the motion vector of said 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; Said movable information does not satisfy prerequisite; Perhaps, when the motion vector of said 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 the 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 said 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 promptly, said movable information satisfies prerequisite.
Step S6, utilize the adjacent motion vector of going up piece and left piece, the vector of said colourity piecemeal is predicted, obtain predictive vector;
Step S7, judge whether said 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 minimum or said colourity piecemeal of conduct that the image fault degree is minimum of selection rate distortion cost 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 through more said 3 vector points, obtain selection result (predX, predY).
Step S9, when said selection result is different from the motion vector of corresponding bright piecemeal, with the motion vector of said 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, can motion vector that should neighbour's piece 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 has been carried out detailed introduction; Be appreciated that; The sample format of said image can also be YCbCr4:2:2; YCbCr4:4:4 etc., the present invention go for the motion calibration of colourity module on Cb, the arbitrary component of Cr and estimate that the sample format concrete to image do not limit.
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 said movable information satisfies prerequisite, utilizes the adjacent motion vector of going up piece and left piece of colourity piecemeal, and the vector of said colourity piecemeal is predicted, obtains predictive vector;
Select module 603, be used for when said predictive vector is different from the motion vector of corresponding bright piecemeal, dividing in the block motion vector, select a motion vector as said colourity piecemeal from (0,0), predictive vector and corresponding bright.
In reality, said movable information can comprise exercise intensity information and movement differential information; At this moment, said prerequisite can for, said exercise intensity information is not less than first threshold, and said movement differential information is not less than second threshold value.
For obtaining above-mentioned movable information, in concrete the realization, following submodule can be set in said 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 said exercise intensity information according to said 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 said first relative motion vectors, second relative motion vectors, obtains said movement differential degree information.
In addition, in reality, can design said prediction module 602, the said adjacent motion vector of going up piece and left piece predicted, obtain said predictive vector in order to utilize bi-linear filter.
For example, said prediction module 602, can be used for through 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 said adjacent X component of going up piece and left block motion vector; Y1, Y2 are respectively the said adjacent Y component of going up piece and left block motion vector; A, b are natural number; 0<u1, u2<a+b.
Said 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 the vector that rate distortion costs is minimum is as the motion vector of 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 the vector that the image fault degree is minimum divides block motion vector as colourity.
Because the brightness piecemeal of an image macro and colourity piecemeal are corresponding, therefore, in a kind of preferred embodiment of the present invention, said device can also comprise:
First Multiplexing module is used for when the motion vector of said 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, said device can also comprise:
Second Multiplexing module in order to for the colourity piecemeal, is (0 at the motion vector of its corresponding bright piecemeal; 0); Perhaps, said movable information does not satisfy prerequisite, perhaps; When the motion vector of said 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 basically with 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 said movable information satisfies prerequisite, utilizes the adjacent motion vector of going up piece and left piece of colourity piecemeal, and the vector of said colourity piecemeal is predicted, obtains predictive vector;
Select module 704, be used for when said predictive vector is different from the motion vector of corresponding bright piecemeal, dividing in the block motion vector, select a motion vector as said colourity piecemeal from (0,0), predictive vector and corresponding bright;
First Multiplexing module 705 is used for when the motion vector of said 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, is (0 at the motion vector of its corresponding bright piecemeal; 0); Perhaps, said movable information does not satisfy prerequisite, perhaps; When the motion vector of said predictive vector and corresponding bright piecemeal is identical, with the motion vector of corresponding bright piecemeal motion vector as this colourity piecemeal.
In reality, said movable information can comprise exercise intensity information and movement differential information; At this moment, said prerequisite can for, said exercise intensity information is not less than first threshold, and said movement differential information is not less than second threshold value.
For obtaining above-mentioned movable information, in concrete the realization, following submodule can be set in said 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 said exercise intensity information according to said 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 said first relative motion vectors, second relative motion vectors, obtains said movement differential degree information.
In addition, in reality, can design said prediction module 703, the said adjacent motion vector of going up piece and left piece predicted, obtain said predictive vector in order to utilize bi-linear filter.
Said 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 the vector that rate distortion costs is minimum is as the motion vector of 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 the vector that the image fault degree is minimum is as the motion vector of 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; Carried out detailed introduction; Used concrete example among this paper 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 on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.