Summary of the invention
The embodiment of the invention provides a kind of Zoom method and device, decoding method and system of motion vector, in order to improve the accuracy of motion vector convergent-divergent, improves the encoding compression efficient of field picture.
The embodiment of the invention provides a kind of Zoom method of motion vector, comprising:
According to the coordinate offset amount between end field picture and the top field picture first motion vector is carried out coordinate transform, obtain second motion vector;
Described second motion vector is carried out convergent-divergent, obtain the 3rd motion vector;
According to described coordinate offset amount described the 3rd motion vector is carried out the coordinate inverse transformation, obtain the 4th motion vector.
The embodiment of the invention provides a kind of device for zooming of motion vector, comprising:
First conversion module is used for according to the coordinate offset amount between end field picture and the top field picture first motion vector being carried out coordinate transform, obtains second motion vector;
Zoom module is used for described second motion vector is carried out convergent-divergent, obtains the 3rd motion vector;
Second conversion module is used for according to described coordinate offset amount described the 3rd motion vector being carried out the coordinate inverse transformation, obtains the 4th motion vector.
The embodiment of the invention provides a kind of coding method, comprising:
In cataloged procedure, when carrying out the motion-vector prediction processing, the step of motion vector being carried out convergent-divergent comprises:
According to the coordinate offset amount between end field picture and the top field picture first motion vector is carried out coordinate transform, obtain second motion vector;
Described second motion vector is carried out convergent-divergent, obtain the 3rd motion vector;
According to described coordinate offset amount described the 3rd motion vector is carried out the coordinate inverse transformation, obtain the 4th motion vector;
Described the 4th motion vector is used for motion-vector prediction to be handled.
The embodiment of the invention provides a kind of coding/decoding method, comprising:
In decode procedure, when carrying out the motion-vector prediction processing, the step of motion vector being carried out convergent-divergent comprises:
According to the coordinate offset amount between end field picture and the top field picture first motion vector is carried out coordinate transform, obtain second motion vector;
Described second motion vector is carried out convergent-divergent, obtain the 3rd motion vector;
According to described coordinate offset amount described the 3rd motion vector is carried out the coordinate inverse transformation, obtain the 4th motion vector;
Described the 4th motion vector is used for motion-vector prediction to be handled.
The embodiment of the invention provides a kind of coded system, comprising:
First device for zooming is used for first motion vector is carried out convergent-divergent, obtains the 4th motion vector;
First prediction unit is used for carrying out motion-vector prediction at the 4th motion vector that cataloged procedure obtains according to described first device for zooming and handles;
Wherein, described first device for zooming comprises:
First conversion module is used for according to the coordinate offset amount between end field picture and the top field picture first motion vector being carried out coordinate transform, obtains second motion vector;
Zoom module is used for described second motion vector is carried out convergent-divergent, obtains the 3rd motion vector;
Second conversion module is used for according to described coordinate offset amount described the 3rd motion vector being carried out the coordinate inverse transformation, obtains the 4th motion vector.
The embodiment of the invention provides a kind of decode system, comprising:
Second device for zooming is used for first motion vector is carried out convergent-divergent, obtains the 4th motion vector;
Second prediction unit is used for carrying out motion-vector prediction at the 4th motion vector that decode procedure obtains according to described second device for zooming and handles;
Wherein, described second device for zooming comprises:
First conversion module is used for according to the coordinate offset amount between end field picture and the top field picture first motion vector being carried out coordinate transform, obtains second motion vector;
Zoom module is used for described second motion vector is carried out convergent-divergent, obtains the 3rd motion vector;
Second conversion module is used for according to described coordinate offset amount described the 3rd motion vector being carried out the coordinate inverse transformation, obtains the 4th motion vector.
As shown from the above technical solution, embodiment of the invention skew on the locus according to top field picture and end field picture, motion vector before and after the convergent-divergent is carried out the half-pix compensation, carry out coordinate transform in other words, transform under the coordinate system of actual position relation between the reflection field picture, carry out the convergent-divergent of motion vector and handle, meet motion model more, guarantee the accuracy of motion vector convergent-divergent, improved the motion-vector prediction precision, thereby improved the encoding compression efficient of field picture.
Below in conjunction with accompanying drawing specific embodiments of the invention are described in further detail.
Embodiment
The Zoom method of the motion vector of the embodiment of the invention carries out coordinate transform according to the coordinate offset amount between end field picture and the top field picture to first motion vector, can obtain second motion vector; Second motion vector is carried out convergent-divergent handle, thereby can obtain the 3rd motion vector; According to above-mentioned coordinate offset amount the 3rd motion vector is carried out the coordinate inverse transformation, just can obtain the 4th motion vector, for carrying out follow-up motion-vector prediction.The Zoom method of the motion vector of the embodiment of the invention can guarantee the accuracy of motion vector convergent-divergent, thereby improves the motion-vector prediction precision, and the encoding compression efficient of field picture.
As shown in Figure 1, be the schematic flow sheet of first embodiment of the Zoom method of motion vector of the present invention.Present embodiment is applicable to the motion-vector prediction that carries out based on the spatial domain, may further comprise the steps:
Suppose that scaled motion vector is MV1, the motion vector behind the convergent-divergent is MV2.
Between step 101, top field picture and the end field picture coordinate offset amount delt.
For horizontally interlaced image, there are the skew of half-pixel in vertical direction in top field picture and end field picture, corresponding coordinate offset amount delt=0.5, and unit is whole pixel (pixel);
Step 102, the vertical component of scaled motion vector MV1 is carried out coordinate transform, obtain motion vector MV1 ' according to coordinate offset amount delt.
Scaled MV1 is the motion vector under the former coordinate system; MV1 ' after the corresponding coordinate transform is the motion vector under the new coordinate system.The operation of coordinate transform specifically comprises following situation (only the vertical component of MV1 being carried out coordinate transform):
When motion vector MV1 by top->bottom (top point to a field, the end), MV1 '=MV1+delt;
When motion vector MV1 by bottom->top (field, the end point to top), MV1 '=MV1-delt;
When motion vector MV1 by top->top (top point to top), MV1 '=MV1;
When motion vector MV1 by bottom->bottom (field, the end point to field, the end), MV1 '=MV1.
From above-mentioned situation as can be seen, when the parity of the field picture at the starting point of motion vector and terminal point place not simultaneously, need to consider the influence of coordinate offset delt;
Step 103, to the MV1 ' after the coordinate transform, carry out linear scale according to the rigid body uniform rectilinear motion model along the direction of MV1 ', obtain motion vector MV2 '.
Wherein, MV2 '=scale * MV1 '; In the formula, scale is a zoom factor, and it is relevant with the time gap of the motion vector of convergent-divergent front and back, and this time gap is that motion vector is projected in the length on the time shaft.
Step 104, carry out the coordinate inverse transformation, obtain motion vector MV2 according to the vertical component of the motion vector MV2 ' of coordinate offset amount delt after to convergent-divergent.
Motion vector MV2 ' behind the convergent-divergent is the motion vector under the new coordinate system; MV2 after the corresponding coordinate inverse transformation is the motion vector under the former coordinate system.The operation of coordinate transform specifically comprises following situation (only the vertical component of MV2 ' being carried out coordinate transform):
When motion vector MV2 by top->bottom (top point to a field, the end), MV2=MV2 '-delt;
When motion vector MV2 by bottom->top (field, the end point to top), MV2=MV2 '+delt;
When motion vector MV2 by top->top (top point to top), MV2=MV2 ';
When motion vector MV2 by bottom->bottom (field, the end point to field, the end), MV2=MV2 '.
From above-mentioned situation as can be seen, when the parity of the field picture at the starting point of motion vector and terminal point place not simultaneously, need to consider the influence of coordinate offset delt.
Present embodiment is the offset d elt on the locus according to top field picture and end field picture, its unit is identical with the unit of motion vector, motion vector MV1 before and after the convergent-divergent and MV2 ' are carried out the half-pix compensation, carry out coordinate transform in other words, transform under the coordinate system O ' of actual position relation between the reflection field picture, carrying out the convergent-divergent of motion vector handles, meet motion model more, guaranteed the accuracy of motion vector convergent-divergent, improve the motion-vector prediction precision, thereby improved the encoding compression efficient of field picture.
As shown in Figure 2, be the convergent-divergent schematic diagram of motion vector among first embodiment of the Zoom method of motion vector of the present invention.Original coordinates is O, and new coordinate is O ', and filled circles is represented the top field picture, and open circles is represented end field picture, and both difference are the position difference of field, the end.Under new coordinate system, exist the half-pixel on the vertical direction poor between field, top and the field, the end.New coordinate system has reflected the actual position relation between the field picture, and the convergent-divergent of motion vector should carry out under new coordinate system.Among the figure, time express time axle; Y axle remarked pixel position in vertical direction; Top represents the top field picture; Bottom represents end field picture; Delt is the coordinate offset amount; MV1 and MV2 are respectively the motion vector under the coordinate system O; MV1 ' and MV2 ' are respectively MV1 and MV2 and transform to motion vector under the coordinate system O '; Scale is a zoom factor, under illustrated case, and scale=3.Under new coordinate system, motion vector MV2 ' behind the convergent-divergent and scaled motion vector MV1 ' are overlapping.
Further, in the present embodiment, in step 101, if field picture has been adopted interpolation processing, so corresponding coordinate offset amount is calculated as follows: if adopt 1/4 interpolation, then coordinate offset amount delt=0.5 * 4=2, unit is 1/4 pixel, and the expression half-pixel is equivalent to 2 1/4 samples.For the interpolation method of other precision, can analogize.
Further, in the present embodiment, when the motion vector behind the convergent-divergent and the motion vector direction before the convergent-divergent not simultaneously, zoom factor scale related in the step 103 can be negative.
In the present embodiment, what above-mentioned motion vector was described is the motion of pixel.Further, motion vector can also be used to description block (Block) or macro block (Macro Block, motion MB).Piece and macro block are made up of the pixel of some.Macro block is made up of 16 * 16 pixels, and macro block can be divided into piece.
As shown in Figure 3, be the schematic flow sheet of second embodiment of the Zoom method of motion vector of the present invention.Present embodiment is applicable to the motion-vector prediction that carries out based on time domain, compares with a last embodiment, and the step 103 among the last embodiment item becomes:
Step 103 ', to the MV1 ' after the coordinate transform, carry out linear scale according to the rigid body uniform rectilinear motion model along the direction parallel with MV1 ', obtain motion vector MV2 '.
The starting point of motion vector MV2 ' behind scaled motion vector MV1 ' and the convergent-divergent is positioned on the different time-domain positions, but on the position, spatial domain corresponding relation is arranged.
As shown in Figure 4, be the convergent-divergent schematic diagram of motion vector among second embodiment of the Zoom method of motion vector of the present invention.Original coordinates is O, and new coordinate is O ', and filled circles is represented the top field picture, and open circles is represented end field picture, and both difference are the position difference of field, the end.Under new coordinate system, exist the half-pixel on the vertical direction poor between field, top and the field, the end.New coordinate system has reflected the actual position relation between the field picture, and the convergent-divergent of motion vector should carry out under new coordinate system.Among the figure, time express time axle; Y axle remarked pixel position in vertical direction; Top represents the top field picture; Bottom represents end field picture; Delt is the coordinate offset amount; MV1 and MV2 are respectively the motion vector under the coordinate system O; MV1 ' and MV2 ' are respectively MV1 and MV2 and transform to motion vector under the coordinate system O '; Scale is a zoom factor, under illustrated case, and scale=1/3.Under new coordinate system, the motion vector MV2 ' behind the convergent-divergent is parallel with scaled motion vector MV1 '.
Among the Zoom method embodiment of the invention described above motion vector, the skew on the locus according to top field picture and end field picture, after motion vector before and after the convergent-divergent carried out the half-pix compensation, carrying out the convergent-divergent of motion vector again handles, can guarantee the accuracy of motion vector convergent-divergent, improve the motion-vector prediction precision, thereby improved the encoding compression efficient of field picture.
As shown in Figure 5, be the structural representation of the device for zooming embodiment of motion vector of the present invention.Present embodiment comprises first conversion module 10, Zoom module 20 and second conversion module 30 that connects in turn.Wherein, the coordinate offset amount that first conversion module 10 is used between end field picture and the top field picture is carried out coordinate transform to first motion vector, obtains second motion vector; Zoom module 20 is used for described second motion vector is carried out convergent-divergent, obtains the 3rd motion vector; Second conversion module 30 is used for according to described coordinate offset amount described the 3rd motion vector being carried out the coordinate inverse transformation, obtains the 4th motion vector.
Among the device for zooming embodiment of the invention described above motion vector, the skew on the locus of first conversion module and second conversion module according to top field picture and end field picture, after respectively the motion vector before and after the convergent-divergent being carried out the half-pix compensation, carry out the convergent-divergent processing of motion vector again by Zoom module, can guarantee the accuracy of motion vector convergent-divergent, improve the motion-vector prediction precision, thereby improved the encoding compression efficient of field picture.
Further, still as shown in Figure 5, first conversion module 10 can comprise interconnective first recognition unit 11 and first converter unit 12 in the present embodiment.Wherein, first recognition unit 11 is used to discern the direction of described first motion vector; First converter unit 12 is used for according to the recognition result of described first recognition unit 11 and described coordinate offset amount the vertical component of described first motion vector being carried out coordinate transform, obtains second motion vector.Second conversion module 30 can comprise interconnective second recognition unit 31 and second converter unit 32.Second recognition unit 31 is used to discern the direction of described the 3rd motion vector; Second converter unit 32 is used for according to the recognition result of described second recognition unit 31 and described coordinate offset amount the vertical component of described the 3rd motion vector being carried out coordinate transform, obtains the 4th motion vector.
As shown in Figure 6, be the schematic flow sheet of coding method embodiment of the present invention.Present embodiment is in cataloged procedure, and when carrying out the motion-vector prediction processing, the step of motion vector being carried out convergent-divergent comprises:
Step 601, first motion vector is carried out coordinate transform, obtain second motion vector according to the coordinate offset amount between end field picture and the top field picture;
Step 602, described second motion vector is carried out convergent-divergent, obtain the 3rd motion vector;
Step 603, described the 3rd motion vector is carried out the coordinate inverse transformation, obtain the 4th motion vector according to described coordinate offset amount;
Step 604, described the 4th motion vector is used for the cataloged procedure motion-vector prediction handles.
Present embodiment when carrying out the motion-vector prediction processing, carries out convergent-divergent to motion vector and handles in cataloged procedure, promptly according to the coordinate offset amount between end field picture and the top field picture first motion vector is carried out coordinate transform, can obtain second motion vector; Second motion vector is carried out convergent-divergent handle, thereby can obtain the 3rd motion vector; According to above-mentioned coordinate offset amount the 3rd motion vector is carried out the coordinate inverse transformation, just can obtain the 4th motion vector; The 4th motion vector is used for motion-vector prediction to be handled.Present embodiment has guaranteed the accuracy of motion vector convergent-divergent, thereby has improved the motion-vector prediction precision, and the encoding compression efficient of field picture, has further improved the efficient of coding.
As shown in Figure 7, be the schematic flow sheet of coding/decoding method embodiment of the present invention.Present embodiment is in decode procedure, and when carrying out the motion-vector prediction processing, the step of motion vector being carried out convergent-divergent comprises:
Step 701, first motion vector is carried out coordinate transform, obtain second motion vector according to the coordinate offset amount between end field picture and the top field picture;
Step 702, described second motion vector is carried out convergent-divergent, obtain the 3rd motion vector;
Step 703, described the 3rd motion vector is carried out the coordinate inverse transformation, obtain the 4th motion vector according to described coordinate offset amount;
Step 704, the motion-vector prediction that described the 4th motion vector is used for decode procedure are handled.
Present embodiment when carrying out the motion-vector prediction processing, carries out convergent-divergent to motion vector and handles in decode procedure, promptly according to the coordinate offset amount between end field picture and the top field picture first motion vector is carried out coordinate transform, can obtain second motion vector; Second motion vector is carried out convergent-divergent handle, thereby can obtain the 3rd motion vector; According to above-mentioned coordinate offset amount the 3rd motion vector is carried out the coordinate inverse transformation, just can obtain the 4th motion vector; The 4th motion vector is used for motion-vector prediction to be handled.Present embodiment has guaranteed the accuracy of motion vector convergent-divergent, thereby has improved the motion-vector prediction precision, and the encoding compression efficient of field picture, has further improved the efficient of decoding.
As shown in Figure 8, be the structural representation of coded system embodiment of the present invention.Present embodiment comprises interconnective first device for zooming 1 and first prediction unit 2.Wherein, first device for zooming 1 is used for first motion vector is carried out convergent-divergent, obtains the 4th motion vector; First prediction unit 2 is used for carrying out motion-vector prediction at the 4th motion vector that cataloged procedure obtains according to first device for zooming 1 to be handled.Wherein, first device for zooming 1 can comprise first conversion module 10, Zoom module 20 and second conversion module 30 that connects in turn.Wherein, first conversion module 10 is used for according to the coordinate offset amount between end field picture and the top field picture first motion vector being carried out coordinate transform, obtains second motion vector; Zoom module 20 is used for described second motion vector is carried out convergent-divergent, obtains the 3rd motion vector; Second conversion module 30 is used for according to described coordinate offset amount described the 3rd motion vector being carried out the coordinate inverse transformation, obtains the 4th motion vector.
Among the invention described above coded system embodiment, the skew on the locus of first conversion module in first device for zooming and second conversion module according to top field picture and end field picture, after respectively the motion vector before and after the convergent-divergent being carried out the half-pix compensation, carry out the convergent-divergent processing of motion vector again by Zoom module, handle according to the motion-vector prediction that the 4th motion vector carries out in the cataloged procedure by first prediction unit at last, can guarantee the accuracy of motion vector convergent-divergent, improved the motion-vector prediction precision, thereby improved the encoding compression efficient of field picture, further improved the efficient of coding.
As shown in Figure 9, be the structural representation of decode system embodiment of the present invention.Present embodiment comprises interconnective second device for zooming 3 and second prediction unit 4.Wherein, first device for zooming 3 is used for first motion vector is carried out convergent-divergent, obtains the 4th motion vector; First prediction unit 4 is used for carrying out motion-vector prediction at the 4th motion vector that decode procedure obtains according to second device for zooming 3 to be handled.Wherein, first device for zooming 3 can comprise first conversion module 10, Zoom module 20 and second conversion module 30 that connects in turn.Wherein, first conversion module 10 is used for according to the coordinate offset amount between end field picture and the top field picture first motion vector being carried out coordinate transform, obtains second motion vector; Zoom module 20 is used for described second motion vector is carried out convergent-divergent, obtains the 3rd motion vector; Second conversion module 30 is used for according to described coordinate offset amount described the 3rd motion vector being carried out the coordinate inverse transformation, obtains the 4th motion vector.
Among the invention described above decode system embodiment, the skew on the locus of first conversion module in second device for zooming and second conversion module according to top field picture and end field picture, after respectively the motion vector before and after the convergent-divergent being carried out the half-pix compensation, carry out the convergent-divergent processing of motion vector again by Zoom module, handle according to the motion-vector prediction that the 4th motion vector carries out in the decode procedure by second prediction unit at last, can guarantee the accuracy of motion vector convergent-divergent, improved the motion-vector prediction precision, thereby improved the encoding compression efficient of field picture, further improved the efficient of decoding.
In the above embodiment of the present invention, there are the fact of the position deviation on the vertical direction in top field picture and end field picture, have influenced code efficiency.In the video coding framework, to consider that in motion vector prediction process other also will consider this point as interpolation, loop filtering etc. the above-mentioned this point.By improving interpolation, loop filtering, improve precision, thereby improve encoding compression efficient.
Through the above description of the embodiments, those of ordinary skill in the art can be well understood to the present invention and can realize by hardware, also can realize by the mode that software adds essential general hardware platform.Based on such understanding, technical scheme of the present invention can be written as computer executable program, and computer equipment can be realized method provided by the invention by carrying out this program.This computer executable program can be stored in the non-volatile memory medium and (comprise CD-ROM, USB flash disk, portable hard drive etc.).
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.