CN102215395A - Video coding and decoding method and device - Google Patents

Video coding and decoding method and device Download PDF

Info

Publication number
CN102215395A
CN102215395A CN201010237812XA CN201010237812A CN102215395A CN 102215395 A CN102215395 A CN 102215395A CN 201010237812X A CN201010237812X A CN 201010237812XA CN 201010237812 A CN201010237812 A CN 201010237812A CN 102215395 A CN102215395 A CN 102215395A
Authority
CN
China
Prior art keywords
block
motion vector
image block
encoded
subimage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201010237812XA
Other languages
Chinese (zh)
Other versions
CN102215395B (en
Inventor
郑萧桢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 201010237812 priority Critical patent/CN102215395B/en
Publication of CN102215395A publication Critical patent/CN102215395A/en
Application granted granted Critical
Publication of CN102215395B publication Critical patent/CN102215395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to a video coding method which comprises the following steps: carrying out an irregular division on an image to be coded by selecting an irregular division mode from the preset multiple irregular division modes to obtain at least two different subimage blocks, and acquiring a reference image block of the subimage blocks according to the pixel values of the subimage blocks; acquiring a motion vector of the subimage blocks of the image block to be coded according to the reference image block; acquiring a reference motion vector of the subimage blocks according to the coded surrounding blocks of the subimage blocks of the image block to be coded; obtaining a motion vector difference according to the motion vector and the reference motion vector; and writing the motion vector difference in a code stream and sending to a decoding terminal. The embodiment of the invention also provides a decoding device for implementing the coding method.

Description

A kind of video coding-decoding method and device
Technical field
The present invention relates to the coding and decoding video field, video coding-decoding method and device that particularly a kind of irregular subimage block is divided.
Background technology
In existing video coding and decoding technology, general all is to obtain residual matrix by the pixel value of the image block of current frame image is done to differ from the pixel value of reference image block, then the residual matrix process that obtains is quantized, write in the code stream behind conversion and the entropy coding, send decoding end to motion vector information.Decoding end then reads bit stream from the code stream that obtains, pass through inverse quantization, inverse transformation then, obtain corresponding residual error, and then according to the motion vector information in the code stream, obtain the reference image block of current image block, with the residual error of current image block and the pixel value addition of reference image block, obtain the pixel value of current image block.
In the encoding-decoding process of prior art, no matter be the calculating of residual error, still searching of reference image block all is that the subimage block with image block is that unit carries out, and prior art the rule of subimage block also occurred being used to accordingly dividing and divides and irregular partitioning technology.It is that image block is divided into identical square subimage block that rule is divided, its advantage is that obtaining of various parameters is fairly simple, such as the reference motion vector that is used for the prediction reference picture position, but its shortcoming be exactly identical square subimage block shape often with image in contour of object differ greatly, thereby improved the difficulty of pixel prediction in the encoding and decoding.Accordingly, irregular partitioning technology then is that image block is divided into different rectangle, triangle even pentagon and irregular quadrilateral, to adapt to the requirement of different types of image, the problem of the pixel prediction aspect that is divided into of solution rule greatly, but it is corresponding, because shape irregular, non-regular partitioning technology are also facing to the difficult problem of the reference motion vector parameter of the motion vector that is used for the computed image piece.
Therefore, be necessary to provide a kind of decoding method and device, can simply obtain the reference motion vector of the subimage block in the irregular division.
Summary of the invention
The embodiment of the invention provides a kind of coding method, comprise: in default a plurality of irregular dividing mode, choose an irregular dividing mode and treat the image encoded piece and carry out irregular division, obtain at least two different subimage blocks, obtain the reference image block of described subimage block according to the pixel value of described subimage block; According to described reference image block, obtain the motion vector of the subimage block of described image block to be encoded; According to the peripheral piece of having encoded of the subimage block of described image block to be encoded and the irregular dividing mode of image block, obtain the reference motion vector of subimage block; According to described motion vector and described reference motion vector, obtain the motion vector difference; Described motion vector difference is written in the code stream, and sends to decoding end.The embodiment of the invention also provides a kind of code device of carrying out described coding method.
The embodiment of the invention also provides a kind of coding/decoding method accordingly, comprises the irregular dividing mode that obtains image block from code stream, obtains the motion vector difference of the subimage block of image block to be decoded; From the decoded peripheral piece of the subimage block of described image block to be decoded and the irregular dividing mode of image block to be decoded, obtain the reference motion vector of subimage block; According to the reference motion vector and the motion vector difference of described subimage block, obtain the motion vector of described subimage block; Obtain the reference image block of described subimage block according to described motion vector, and described subimage block is decoded with reference to the image subsection piece according to described, the embodiment of the invention also provides a kind of decoding device of carrying out described coding/decoding method.
The decoding method and the device that adopt the embodiment of the invention to provide can be simplified the acquisition and the calculating of reference motion vector under certain conditions, and the resource of having saved coding/decoding system has improved efficient.
Description of drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the invention, to do to introduce simply to the accompanying drawing of required use among the embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Figure 1 shows that the schematic diagram of the coding method that the embodiment of the invention provides;
Figure 2 shows that the schematic diagram of the irregular division methods that the embodiment of the invention provides;
Figure 3 shows that the peripheral piece distribution schematic diagram of the block to be encoded in the embodiment of the invention;
Figure 4 shows that the schematic diagram of the code device that the embodiment of the invention provides;
Figure 5 shows that the schematic diagram of the coding/decoding method that the embodiment of the invention provides;
Figure 6 shows that the schematic diagram of the decoding device that the embodiment of the invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Please refer to Fig. 1, the embodiment of the invention provides a kind of method for video coding, and it comprises:
Step 101: in default a plurality of irregular dividing mode, choose an irregular dividing mode and treat the image encoded piece and carry out irregular division, obtain at least two different subimage blocks, obtain the reference image block of described subimage block according to the pixel value of described subimage block;
In embodiments of the present invention, the described coded picture block for the treatment of is carried out irregular division, four kinds of irregular dividing mode have been comprised, please refer to Fig. 2 a~2d, these four kinds of dividing mode are respectively with 45 degree or 135 degree dividing lines image block to be encoded are divided into a leg-of-mutton subimage block and a pentagonal subimage block (being designated Mode0 and Mode1 respectively), and the subimage block (being designated Mode2 and Mode3 respectively) that image block to be encoded is divided into two inconsistent rectangles of size with the dividing line of vertical dividing line and level, parameter n wherein is the location parameter of irregular division, is used to represent the distance of the intersection point of described dividing line and described image block to be decoded.
In above-mentioned splitting scheme, when the dividing mode shown in image block employing Fig. 2 a and Fig. 2 b, if the value of n is 0, then image block is divided into two triangles.Because image block forms by pixel, so Mode0 and the pairing 135 degree boundary lines of Mode1 and 45 degree boundary lines are meant by what forms along the pixel on the border between subimage block and are similar to 135 degree and 45 lines of spending.
And the choosing of the irregular dividing mode in the described embodiment of the invention, the affirmation of location parameter and the affirmation of reference image block, can all attempt on one side by the irregular dividing mode that will preset and the location parameter that can select for use, and search corresponding best reference picture piece, at last the result is compared, therefrom choose preferred plan.In embodiments of the present invention, described preferred plan can certainly be adjusted this preferred plan according to other demands for marking off subimage block that comes and immediate dividing mode of reference image block pixel and the corresponding location parameter that searches.
Step 102:, according to described reference image block, obtain the motion vector of the subimage block of described image block to be encoded;
Step 103:, obtain the reference motion vector of subimage block according to the peripheral piece of having encoded of the subimage block of described image block to be encoded;
Concrete:
At first, judge whether described peripheral piece of having encoded meets preset condition, and in embodiments of the present invention, described preset condition comprises:
Described peripheral piece has adopted the irregular dividing mode identical with image block to be encoded;
The reference image block of described peripheral piece and the reference image block of described subimage block are in the same image.
Then, if there is a unique peripheral piece to satisfy preset condition, then the reference motion vector of described subimage block equals the motion vector of the described peripheral piece that satisfies condition.
If a plurality of above-mentioned conditions that satisfy are arranged in the described peripheral piece of having encoded, the then location parameter in the reference motion vector of the described subimage block peripheral piece that equals to satisfy condition and the motion vector of immediate that the peripheral piece of image block to be encoded.In embodiments of the present invention, describedly the most approachingly can be the difference minimum between location parameter, perhaps the absolute value minimum of the difference between location parameter.
If there is the location parameter of a plurality of peripheral pieces that satisfy condition identical, and approach the location parameter of described image block to be encoded equally, then the reference motion vector of described subimage block is got the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition, or the mean value of the motion vector of peripheral piece rounds.
In embodiments of the present invention, the whether approaching of described location parameter can be judged from numerical value, such as difference.
Step 104:, obtain the motion vector difference according to described motion vector and described reference motion vector;
Wherein, in embodiments of the present invention, describedly obtain the motion vector difference according to described motion vector and described reference motion vector, can obtain by the two being done difference, in other alternate embodiments, also can be by other mathematical method, set up motion vector difference and motion vector and the reference motion vector logical relation between the two, such as be divided by, logarithm calculating etc.
Step 105: described motion vector difference is written in the code stream.
Adopt the coding method that the embodiment of the invention provided, under preset condition, directly obtain the reference motion vector of subimage block according to the motion vector of subimage block, the irregular dividing mode of subimage block place image block, the irregular dividing mode of subimage block periphery piece, compared to complicated calculations of the prior art, can save number of coded bits effectively, improve code efficiency.
The reference image block that it is pointed out that image block, subimage block and peripheral piece in the such scheme is in order to narrate the noun of convenient definition.Image block in the such scheme is meant the base unit of image encoding, can comprise one in the image block to the experimental process image block.In existing video coding and decoding technology, image block can be macro block, and size is 16x16, and this moment, subimage block was called as sub-piece, and size can be 16x16,16x8,8x16,8x8,8x4,4x8,4x4, or the piece of the pointed irregular division of the present invention; Image block can also be the supermacro piece, and size is 32x32.This moment, subimage block was a sub-piece in macro block or the macro block, and size can be 32x32,32x16,16x32,16x16,16x8,8x16,8x8,8x4,4x8,4x4, or the piece of the pointed irregular division of the present invention.
The periphery piece is meant and current image block, or contiguous image block or the subimage block of current subimage block piece.Itself and current image block, or the position of current subimage block piece relation can be for adjacent, or the pixel value of fixed interval.The peripheral piece of current subimage block can be image block, or subimage block.
The reference image block of periphery piece can be above-mentioned image block, or above-mentioned subimage block.Therefore, if when the peripheral piece of current subimage block is image block, then the reference image block of the peripheral piece of current subimage block can be image block; If when the peripheral piece of current subimage block was subimage block, then the reference image block of the peripheral piece of current subimage block can be subimage block.
Below will provide a further implementation.
In the following implementation, because the peripheral piece of current image block or subimage block can be image block, or subimage block, be referred to as image block for ease of description, the size of all images piece can be inconsistent, the shape of all images piece or dividing mode can be inconsistent, and the size of image block is determined by the method for prior art.
As shown in Figure 3, be provided with image block A, B, C, D and E.Wherein E is a current image block, and A is the left adjacent block of E, and B is the last adjacent block of E, and C is the upper right adjacent block of E, and D is the upper left adjacent block of E.
If image block A, B, C, the motion vector of D are mvA, mvB, mvC, mvD.If image block A, B, C, the reference frame index value of D and E is refA, refB, refC, refD and refE.
Reference frame index value refers to the position of image in video sequence at the reference image block place of image block.When the reference frame index value of two image blocks was identical, the reference image block of these two image blocks was arranged in same image.
If image block A, B, C, the non-regular piece dividing mode of D and E is ModeA, ModeB, ModeC, ModeD and ModeE.
If image block A, or, B, or C, or D non-availability or do not use non-regular piece to divide then establish ModeA, or, ModeB, or, ModeC, or the value of ModeD is-1.
If image block A, B, C, it is posA, posB, posC, posD and posE that the non-regular piece of D and E is divided location parameter.
If image block A, or, B, or C, or D non-availability or do not use non-regular piece to divide then establish posA, or, posB, or, posC, or the value of posD is an enough big number, as 10000.
The reference motion vector of current image block E (or becoming motion vectors, predicted motion vector) is mvpE.
The acquiring method of mvpE is as follows:
If refA and refE value are equal and A and E have adopted identical irregular dividing mode, then establishing the CondionA value is 1, otherwise CondionA value 0, expression formula is: ConditonA=(refA==refE) ﹠amp; ﹠amp; (ModeA==ModeE).
If refB and refE value are equal and B and E have adopted identical irregular dividing mode, then establishing the CondionB value is 1, otherwise CondionB value 0, expression formula is: ConditonB=(refB==refE) ﹠amp; ﹠amp; (ModeB==ModeE).
If refC and refE value are equal and C and E have adopted identical irregular dividing mode, then establishing the CondionC value is 1, otherwise CondionC value 0, expression formula is: ConditonC=(refC==refE) ﹠amp; ﹠amp; (ModeC==ModeE).
If refD and refE value are equal and D and E have adopted identical irregular dividing mode, then establishing the CondionD value is 1, otherwise CondionD value 0, expression formula is: ConditonD=(refD==refE) ﹠amp; ﹠amp; (ModeD==ModeE).
If ConditonA==1 and ConditonB==0 and ConditonC==0, then mvpE=mvA;
If ConditonA==0 and ConditonB==1 and ConditonC==0, then mvpE=mvB;
If ConditonA==0 and ConditonB==0 and ConditonC==1, then mvpE=mvC;
If ConditonA, it is 1 that ConditonB and ConditonC have more than one value, and (X can be A then to get corresponding C onditonX value and be the location parameter posX of 1 image block X, or, B, or, C), calculate the absolute value of the difference of posE and these image block location parameters (posX) respectively, can obtain the absolute value images piece of minimal difference motion vector mvX (X can be A, or, B, or C) assignment is given mvpE;
If ConditonA, it is 1 that ConditonB and ConditonC have more than one value, and (X can be A to the location parameter posX of image block X, or, B, or, C) all equate and all can obtain the absolute value of minimal difference with the absolute value of the difference of posE, then mvpE equals the mean value of the motion vector of these image blocks, or the mean value that mvpE equals the motion vector of these image blocks rounds.
Accordingly, please refer to Fig. 3, the embodiment of the invention also provides a kind of respective coding device, and to carry out coding method provided by the present invention, it comprises:
Irregular division module 210, being used for choosing an irregular dividing mode in default a plurality of irregular dividing mode treats the image encoded piece and carries out irregular division, obtain at least two different subimage blocks, obtain the reference image block of described subimage block according to the pixel value of described subimage block;
Motion vector obtains module 220, is used for according to described reference image block, obtains the motion vector of the subimage block of described image block to be encoded;
Reference motion vector obtains module 230, according to the peripheral piece of having encoded of the subimage block of described image block to be encoded, obtains the reference motion vector of subimage block;
The peripheral piece of having encoded of described subimage block according to described image block to be encoded, the reference motion vector that obtains subimage block comprises:
Selection meets pre-conditioned peripheral piece;
Meet the reference motion vector that pre-conditioned peripheral piece obtains image block according to described, wherein,
Described preset condition comprises:
Described peripheral piece has adopted the irregular dividing mode identical with image block to be encoded;
The reference image block of described peripheral piece and the reference image block of described subimage block are in the same image.
Then, if there is a unique peripheral piece to satisfy preset condition, then the reference motion vector of described subimage block equals the motion vector of the described peripheral piece that satisfies condition.
If a plurality of above-mentioned conditions that satisfy are arranged in the described peripheral piece of having encoded, the then location parameter of irregular division and the motion vector of immediate that the peripheral piece of image block to be encoded in the reference motion vector of the described subimage block peripheral piece that equals to satisfy condition, in embodiments of the present invention, describedly the most approachingly can be the difference minimum of location parameter, perhaps the difference minimum of the absolute value of location parameter.
If there is the location parameter of a plurality of peripheral pieces that satisfy condition identical, and approach the location parameter of described image block to be encoded equally, then the reference motion vector of described subimage block is got the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition, or the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition rounds.
The motion vector difference obtains module 240, and it is poor to be used for described motion vector and described reference motion vector are done, and obtains the motion vector difference;
Motion vector difference writing module 250 is used for described motion vector difference is written to code stream.
Please refer to Fig. 4, the present invention also provides a kind of coding/decoding method, and it comprises
Step 301: the motion vector difference that from code stream, obtains the subimage block of image block to be decoded;
Step 302:, obtain the reference motion vector of subimage block according to the decoded peripheral piece of the subimage block of described image block to be decoded;
Concrete:
At first, judge whether described decoded peripheral piece meets preset condition, and in embodiments of the present invention, described preset condition comprises:
Described peripheral piece has adopted the irregular dividing mode identical with image block to be decoded;
The reference image block of described peripheral piece and the reference image block of described subimage block are in the same image.
Then, if there is a unique peripheral piece to satisfy preset condition, then the reference motion vector of described subimage block equals the motion vector of the described peripheral piece that satisfies condition.
If a plurality of above-mentioned conditions that satisfy are arranged in the described decoded peripheral piece, the then location parameter in the reference motion vector of the described subimage block peripheral piece that equals to satisfy condition and the motion vector of immediate that the peripheral piece of image block to be decoded, in embodiments of the present invention, describedly the most approachingly can be the difference minimum between location parameter, perhaps the absolute value minimum of the difference between location parameter.
If there is the location parameter of a plurality of peripheral pieces that satisfy condition identical, then the reference motion vector of described subimage block is got the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition, or the mean value of the motion vector of peripheral piece rounds.
Step 303:, obtain the motion vector of described subimage block according to the reference motion vector and the motion vector difference of described subimage block;
Describedly obtain the motion vector difference according to described motion vector difference and described reference motion vector, can carry out inverse operation according to the generation method of the motion vector difference of coding side obtains, can be described motion vector difference and described reference motion vector sum, or described motion vector difference and described reference motion vector is long-pending etc.
Step 304: search the reference image block of described subimage block according to described motion vector, and with reference to the image subsection piece described subimage block is decoded according to described.
The reference image block that it is pointed out that image block, subimage block and peripheral piece in the such scheme is in order to narrate the noun of convenient definition.Image block in the such scheme is meant the base unit of image encoding, can comprise one in the image block to the experimental process image block.In existing video coding and decoding technology, image block can be macro block, and size is 16x16, and this moment, subimage block was called as sub-piece, and size can be 16x16,16x8,8x16,8x8,8x4,4x8,4x4; Image block can also be the supermacro piece, and size is 32x32.This moment, subimage block was the sub-piece in macro block or the macro block, and size can be 32x32,32x16,16x32,16x16,16x8,8x16,8x8,8x4,4x8,4x4.
The periphery piece is meant and current image block, or contiguous image block or the subimage block of current subimage block piece.Itself and current image block, or the position of current subimage block piece relation can be for adjacent, or the pixel value of fixed interval.The peripheral piece of current subimage block can be image block, or subimage block.
The reference image block of periphery piece can be above-mentioned image block, or above-mentioned subimage block.Therefore, if when the peripheral piece of current subimage block is image block, then the reference image block of the peripheral piece of current subimage block can be image block; If when the peripheral piece of current subimage block was subimage block, then the reference image block of the peripheral piece of current subimage block can be subimage block.
Further,
Please refer to Fig. 3, be provided with image block A, B, C, D and E.Wherein E is a current image block, and A is the left adjacent block of E, and B is the last adjacent block of E, and C is the upper right adjacent block of E, and D is the upper left adjacent block of E.
If image block A, B, C, the motion vector of D are mvA, mvB, mvC, mvD.If image block A, B, C, the reference frame index value of D and E is refA, refB, refC, refD and refE.
Reference frame index value refers to the position of image in video sequence at the reference image block place of image block.When the reference frame index value of two image blocks was identical, the reference image block of these two image blocks was arranged in same image.
If image block A, B, C, the non-regular piece dividing mode of D and E is ModeA, ModeB, ModeC, ModeD and ModeE.
If image block A, or, B, or C, or D non-availability or do not use non-regular piece to divide then establish ModeA, or, ModeB, or, ModeC, or the value of ModeD is-1.
If image block A, B, C, it is posA, posB, posC, posD and posE that the non-regular piece of D and E is divided location parameter.
If image block A, or, B, or C, or D non-availability or do not use non-regular piece to divide then establish posA, or, posB, or, posC, or the value of posD is an enough big number, as 10000.
The reference motion vector of current image block E (or becoming motion vectors, predicted motion vector) is mvpE.
The acquiring method of mvpE is as follows:
If refA and refE value are equal and A and E have adopted identical irregular dividing mode, then establishing the CondionA value is 1, otherwise CondionA value 0, expression formula is: ConditonA=(refA==refE) ﹠amp; ﹠amp; (ModeA==ModeE).
If refB and refE value are equal and B and E have adopted identical irregular dividing mode, then establishing the CondionB value is 1, otherwise CondionB value 0, expression formula is: ConditonB=(refB==refE) ﹠amp; ﹠amp; (ModeB==ModeE).
If refC and refE value are equal and C and E have adopted identical irregular dividing mode, then establishing the CondionC value is 1, otherwise CondionC value 0, expression formula is: ConditonC=(refC==refE) ﹠amp; ﹠amp; (ModeC==ModeE).
If refD and refE value are equal and D and E have adopted identical irregular dividing mode, then establishing the CondionD value is 1, otherwise CondionD value 0, expression formula is: ConditonD=(refD==refE) ﹠amp; ﹠amp; (ModeD==ModeE).
If ConditonA==1 and ConditonB==0 and ConditonC==0, then mvpE=mvA;
If ConditonA==0 and ConditonB==1 and ConditonC==0, then mvpE=mvB;
If ConditonA==0 and ConditonB==0 and ConditonC==1, then mvpE=mvC;
If ConditonA, it is 1 that ConditonB and ConditonC have more than one value, and (X can be A then to get corresponding C onditonX value and be the location parameter posX of 1 image block X, or, B, or, C), calculate the absolute value of the difference of posE and these image block location parameters (posX) respectively, can obtain the absolute value images piece of minimal difference motion vector mvX (X can be A, or, B, or C) assignment is given mvpE;
If ConditonA, it is 1 that ConditonB and ConditonC have more than one value, and (X can be A to the location parameter posX of image block X, or, B, or, C) all equate and all can obtain the absolute value of minimal difference with the absolute value of the difference of posE, then mvpE equals the mean value of the motion vector of these image blocks, or the mean value that mvpE equals the motion vector of these image blocks rounds.
Please refer to Fig. 5, the embodiment of the invention also provides a kind of decoding device 400, is used to carry out above-mentioned decoding program, and it comprises:
The motion vector difference obtains module 410, is used for obtaining from code stream the motion vector difference of the subimage block of image block to be decoded;
Reference motion vector obtains module 420, is used for the decoded peripheral piece according to the subimage block of described image block to be decoded, obtains the reference motion vector of subimage block;
Concrete:
At first, reference motion vector acquisition module 420 judges whether described decoded peripheral piece meets preset condition, and in embodiments of the present invention, described preset condition comprises:
Described peripheral piece has adopted the irregular dividing mode identical with image block to be decoded;
The reference image block of described peripheral piece and the reference image block of described subimage block are in the same image.
Then, if there is a unique peripheral piece to satisfy preset condition, then the reference motion vector of described subimage block equals the motion vector of the described peripheral piece that satisfies condition.
If a plurality of above-mentioned conditions that satisfy are arranged in the described decoded peripheral piece, the then location parameter of irregular division and the motion vector of immediate that the peripheral piece of image block to be decoded in the reference motion vector of the described subimage block peripheral piece that equals to satisfy condition, in embodiments of the present invention, describedly the most approachingly can be the difference minimum of location parameter, perhaps the difference minimum of the absolute value of location parameter.
If there is the location parameter of a plurality of peripheral pieces that satisfy condition identical, and approach the location parameter of described image block to be decoded equally, then the reference motion vector of described subimage block is got the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition, or the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition rounds.
Motion vector obtains module 430, is used for reference motion vector and motion vector difference according to described subimage block, obtains the motion vector of described subimage block;
Decoder module 440 is used for searching according to described motion vector the reference image block of described subimage block, and described subimage block is decoded with reference to the image subsection piece according to described.
In the coding method or coding/decoding method that the embodiment of the invention provided, continuity according to picture material or texture, the present invention also provides another coding according to the subimage block of to be encoded or image block to be decoded/decoded peripheral piece, obtain the method for the reference motion vector of subimage block, described method comprises:
At first, judge describedly encode/whether decoded peripheral piece meet preset condition;
In embodiments of the present invention, described preset condition comprises: described peripheral piece has adopted and to be encoded/identical irregular dividing mode of image block to be decoded.
Wherein, when to be encoded/image block to be decoded adopt be passing through the horizontal bar separated time image block is divided into the horizontal division mode of two number of sub images pieces shown in Fig. 2 (d) time, if the left adjacent block of to be encoded/image block to be decoded has also adopted the horizontal division mode, then obtain the reference motion vector of current image block according to the motion vector of the left adjacent block of present encoding/decoded image blocks; If the left adjacent block of to be encoded/image block to be decoded does not adopt the last adjacent block of horizontal division mode and current encoded image piece to adopt the horizontal division mode, then obtain the reference motion vector of to be encoded/image block to be decoded according to the motion vector of the last adjacent block of to be encoded/image block to be decoded.
When to be encoded/image block to be decoded adopts passing through the vertical division line image block is divided into the vertical division mode of two number of sub images pieces shown in Fig. 2 (c), if the last adjacent block of to be encoded/image block to be decoded has also adopted the vertical division mode, then obtain the reference motion vector of to be encoded/image block to be decoded according to the motion vector of the last adjacent block of to be encoded/image block to be decoded; The left adjacent block of to be encoded/image block to be decoded has adopted the vertical division mode if the last adjacent block of to be encoded/image block to be decoded does not adopt the vertical division mode, then according to the reference motion vector of the to be encoded/image block to be decoded of motion vector acquisition of the adjacent image piece on to be encoded/image block to be decoded left side.
Further, above-mentioned according to be encoded/image block to be decoded the top or the method for the motion vector of the adjacent image piece on the left side reference motion vector that obtains current image block can for:
When to be encoded/image block to be decoded adopt be passing through the horizontal bar separated time image block is divided into the horizontal division mode of two number of sub images pieces shown in Fig. 2 (d) time, if the left adjacent block of to be encoded/image block to be decoded has also adopted the horizontal division mode, the reference motion vector of then to be encoded/image block to be decoded equal described to be encoded/motion vector of the left adjacent block of image block to be decoded; If the left adjacent block of to be encoded/image block to be decoded do not adopt the horizontal division mode and current to be encoded/the last adjacent block of image block to be decoded adopted the horizontal division mode, the reference motion vector of then to be encoded/image block to be decoded equals the motion vector of the last adjacent block of to be encoded/image block to be decoded;
When to be encoded/image block to be decoded adopts passing through the vertical division line image block is divided into the dividing mode of two number of sub images pieces shown in Fig. 2 (c), if the last adjacent block of to be encoded/image block to be decoded has also adopted the vertical division mode, the reference motion vector of then to be encoded/image block to be decoded equals the motion vector of adjacent block on to be encoded/image block to be decoded; The left adjacent block of to be encoded/image block to be decoded has adopted the vertical division mode if the last adjacent block of to be encoded/image block to be decoded does not adopt the vertical division mode, and the reference motion vector of then to be encoded/image block to be decoded equals the motion vector of the left adjacent block of to be encoded/image block to be decoded.
Need to understand, described in the present embodiment horizontal division mode and vertical division mode comprise image block are divided into two irregular dividing mode of rectangle subimage block that do not wait size, and the regular dividing mode (16x8 or 8x16) that image block evenly is divided into two equal image blocks.
When to be encoded/image block to be decoded adopts the method shown in Fig. 2 (a) or Fig. 2 (b) that image block is divided into a triangle and a pentagon, can ask for the reference motion vector of to be encoded/image block to be decoded according to the motion vector formula that in to be encoded/image block periphery piece to be decoded, has adopted the peripheral piece identical with the irregular dividing mode of to be encoded/image block to be decoded.
As alternate embodiments, the present invention also provides a kind of top or the motion vector of the adjacent image piece on left side method of obtaining the reference motion vector of current image block according to be encoded/image block to be decoded:
According to the reference frame index value of current image block, reach the reference frame index value and the motion vector thereof of adjacent block on the current image block, the reference motion that obtains current image block is an amount of; Perhaps
According to the reference frame index value of current image block, and the reference frame index value and the motion vector thereof of current image block left side adjacent block (promptly being in the peripheral piece of current image block left), the reference motion vector of acquisition current image block.
Below will provide a further implementation.
In the following implementation, because the peripheral piece of current image block or subimage block can be image block, or subimage block, be referred to as image block for ease of description, the size of all images piece can be inconsistent, the shape of all images piece or dividing mode can be inconsistent, and the size of image block is determined by the method for prior art.
As shown in Figure 3, be provided with image block A, B, C, D and E.Wherein E is a current image block, and A is the left adjacent block of E, and B is the last adjacent block of E, and C is the upper right adjacent block of E, and D is the upper left adjacent block of E.
Current image block has adopted non-rule to divide, and image block is divided into two number of sub images pieces, and the reference motion vector (or becoming motion vectors, predicted motion vector) of establishing the current image block first or the second number of sub images piece E is mvpE.
If image block A, or, B, or C, or D non-availability or do not use non-regular piece to divide then establish ModeA, or, ModeB, or, ModeC, or the value of ModeD is-1.
If image block A, B, C, D have adopted non-regular dividing mode, image block A then, B, C, D are divided into two number of sub images pieces, if adopted the image block A of non-regular dividing mode, B, C, the motion vector of D are mvA, mvB, mvC, mvD establishes above-mentioned image block A, B, C, the reference frame index value of the subimage block of D and E correspondence is refA, refB, refC, refD and refE.
Reference frame index value refers to the position of image in video sequence at the reference image block place of image block or subimage block.When the reference frame index value of two image blocks or subimage block was identical, the reference image block of these two image blocks or subimage block was arranged in same image.
If ModeE is the horizontal division mode, and ModeA also is the horizontal division mode, then the acquiring method of mvpE can for:
mvpE=mvA
Or, mvpE=((refE+1) * mvA * 768/ (refA+1)+384)/768
Above-mentioned publicity ((refE+1) * mvA * 768/ (refA+1)+384)/768 is actually carries out convergent-divergent to mvA, and piece A motion vector is zoomed to the reference picture pointed with current block E.
If ModeE is the horizontal division mode, ModeA is not the horizontal division mode for horizontal division mode ModeB, then the acquiring method of mvpE can for:
mvpE=mvB
Or, mvpE=((refE+1) * mvB * 768/ (refB+1)+384)/768
Above-mentioned formula ((refE+1) * mvB * 768/ (refB+1)+384)/768 is actually mvB is carried out convergent-divergent, and piece B motion vector is zoomed to the reference picture pointed with current block E.
If ModeE is the vertical division mode, and ModeB also is the vertical division mode, then the acquiring method of mvpE can for:
mvpE=mvB
Or, mvpE=((refE+1) * mvB * 768/ (refB+1)+384)/768
Above-mentioned publicity ((refE+1) * mvB * 768/ (refB+1)+384)/768 is actually carries out convergent-divergent to mvB, and piece B motion vector is zoomed to the reference picture pointed with current block E.
If ModeE is the vertical division mode, ModeB is not the vertical division mode for vertical division mode and ModeA, then the acquiring method of mvpE can for:
mvpE=mvA
Or, mvpE=((refE+1) * mvA * 768/ (refA+1)+384)/768
Above-mentioned formula ((refE+1) * mvA * 768/ (refA+1)+384)/768 is actually mvA is carried out convergent-divergent, and piece A motion vector is zoomed to the reference picture pointed with current block E.
The present invention also provides other alternate embodiments for the acquisition of the reference vector of image block, in following implementation, because the peripheral piece of current image block or subimage block can be image block, or subimage block, be referred to as image block for ease of description, the size of all images piece can be inconsistent, and the shape of all images piece or dividing mode can be inconsistent, and the size of image block is determined by the method for prior art.
As shown in Figure 3, be provided with image block A, B, C, D and E.Wherein E is a current image block, and A is the left adjacent block of E, and B is the last adjacent block of E, and C is the upper right adjacent block of E, and D is the upper left adjacent block of E.
Current image block has adopted non-rule to divide, and image block is divided into two number of sub images pieces, and the reference motion vector (or becoming motion vectors, predicted motion vector) of establishing the current image block first or the second number of sub images piece E is mvpE.
If image block A, or, B, or C, or D non-availability or do not use non-regular piece to divide then establish ModeA, or, ModeB, or, ModeC, or the value of ModeD is-1.
If image block A, B, C, D have adopted non-regular dividing mode, image block A then, B, C, D be divided into two number of sub images pieces (, if adopted the image block A of non-regular dividing mode, B, C, the motion vector of D are mvA, mvB, mvC, mvD establishes above-mentioned image block A, B, C, the reference frame index value of the subimage block of D and E correspondence is refA, refB, refC, refD and refE).
If ModeE is the horizontal division mode, and ModeA also is the horizontal division mode, then establish image block E first, the reference motion vector of the second number of sub images piece for (mvpE_y1, mvpE_x1) and (mvpE_y2, mvpE_x2), if image block A first, the reference motion vector of the second number of sub images piece is (mvA_y1, mvA_x1) and (mvA_y2, mvA_x2), (mvpE_y1, mvpE_x1) and (mvpE_y2, acquiring method mvpE_x2) can for:
mvpE_y1=mvA_y1
mvpE_x1=mvA_x1
mvpE_y2=mvA_y2
mvpE_x2=mvA_x2
If ModeE is the horizontal division mode, ModeA is not the horizontal division mode, and ModeB is the horizontal division mode simultaneously.If image block E first, the reference motion vector of the second number of sub images piece is (mvpE_y1, mvpE_x1) and (mvpE_y2, mvpE_x2), establish image block B first, the reference motion vector of the second number of sub images piece is (mvB_y1, mvB_x1) and (mvB_y2, mvB_x2).At this moment, the latter half (being the image block B second number of sub images piece) of image block B (going up adjacent block) is bigger with the possibility that current image block E belongs to an object together, and the motion vector degree of association of these two image blocks is higher.Therefore, (mvpE_y1, acquiring method mvpE_x1) can for:
mvpE_y1=mvB_y2
mvpE_x1=mvB_x2
In above-mentioned scene, the second number of sub images piece of image block E (being the latter half of the image block E) motion vector and the image block B motion vector degree of association are less, use the motion vector of this subimage block left side piece this moment, and just the motion vector of the part adjacent with image block E of image block A is more suitable.Here, establish image block A the part adjacent with second subimage block of image block E motion vector for (mvA_yclose, mvA_xclose).Therefore, (mvpE_y2, acquiring method mvpE_x2) can for:
mvpE_y2=mvA_yclose
mvpE_x2=mvA_xclose
If ModeE is the vertical division mode, and ModeA also is the vertical division mode, then establish image block E first, the reference motion vector of the second number of sub images piece for (mvpE_y1, mvpE_x1) and (mvpE_y2, mvpE_x2), if image block B first, the reference motion vector of the second number of sub images piece is (mvB_y1, mvB_x1) and (mvB_y2, mvB_x2), (mvpE_y1, mvpE_x1) and (mvpE_y2, acquiring method mvpE_x2) can for:
mvpE_y1=mvB_y1
mvpE_x1=mvB_x1
mvpE_y2=mvB_y2
mvpE_x2=mvB_x2
If ModeE is the vertical division mode, ModeB neither adopts the vertical division mode, and ModeA is the vertical division mode.If image block E first, the reference motion vector of the second number of sub images piece is (mvpE_y1, mvpE_x1) and (mvpE_y2, mvpE_x2), establish image block B first, the reference motion vector of the second number of sub images piece is (mvA_y1, mvA_x1) and (mvA_y2, mvA_x2).At this moment, the right half part of image block A (left adjacent block) (being the image block A second number of sub images piece) is bigger with the possibility that current image block E belongs to an object together, and the motion vector degree of association of these two image blocks is higher.Therefore, (mvpE_y1, acquiring method mvpE_x1) can for:
mvpE_y1=mvA_y2
mvpE_x1=mvA_x2
In above-mentioned scene, the second number of sub images piece of image block E (being the right half of the image block E) motion vector and the image block A motion vector degree of association are less, use the motion vector of adjacent block on this subimage block this moment, and the motion vector with the close part of image block E of just going up adjacent block B is more suitable.If image block B with image block E near the part motion vector be (mvB_yclose, mvB_xclose), therefore, (mvpE_y2, acquiring method mvpE_x2) can for:
mvpE_y2=mvA_yclose
mvpE_x2=mvA_xclose
If ModeE is upper left to the bottom right partition mode, promptly adopt dividing mode shown in Fig. 2 (a), and image block A (left adjacent block), B (going up adjacent block), there is and only has a dividing mode that employing is identical with ModeE among the D (upper left adjacent block), the motion vector of first and second image blocks of then establishing the image block of this employing dividing mode identical with ModeE is respectively (mvX_y1, mvX_x1), (mvX_y2, mvX_x2), if first of image block E, the reference motion vector of second subimage block is (mvpE_y1, mvpE_x1) and (mvpE_y2, mvpE_x2), then (mvpE_y1, mvpE_x1) and (mvpE_y2, acquiring method mvpE_x2) is:
mvpE_y1=mvX_y1
mvpE_x1=mvX_x1
mvpE_y2=mvX_y2
mvpE_x2=mvX_x2
If A, B, there is an above image block to adopt the partition mode identical among the D with ModeE, but only there is the reference frame index value of an image block identical with the current image block reference frame index value, the first and second subimage block motion vectors of then establishing this image block that dividing mode with current image block is identical and reference frame index value is identical are (mvX_y1, mvX_x1), (mvX_y2, mvX_x2), if image block E first, the reference motion vector of the second number of sub images piece is (mvpE_y1, mvpE_x1) and (mvpE_y2, mvpE_x2), X can be A or B or D, then (mvpE_y1, mvpE_x1) and (mvpE_y2, acquiring method mvpE_x2) is:
mvpE_y1=mvX_y1
mvpE_x1=mvX_x1
mvpE_y2=mvX_y2
mvpE_x2=mvX_x2
If ModeE is upper right to the lower-left partition mode, promptly adopt dividing mode shown in Fig. 2 (b), and image block A, B, there is and only has a partition mode that employing is identical with ModeE among the C, the block motion vector of first and second subimages of then establishing the image block of this employing partition mode identical with ModeE is (mvX_y1, mvX_x1), (mvX_y2, mvX_x2), if image block E first, the reference motion vector of the second number of sub images piece is (mvpE_y1, mvpE_x1) and (mvpE_y2, mvpE_x2), x can be A or B or C, then (mvpE_y1, mvpE_x1) and (mvpE_y2, acquiring method mvpE_x2) is:
mvpE_y1=mvX_y1
mvpE_x1=mvX_x1
mvpE_y2=mvX_y2
mvpE_x2=mvX_x2
If A, B, there is an above image block to adopt the partition mode identical among the C with ModeE, but only there is the reference frame index value of an image block identical with the current image block reference frame index value, the motion vector of then establishing first and second subimage blocks of this image block that dividing mode with current image block is identical and reference frame index value is identical is (mvX_y1, mvX_x1), (mvX_y2, mvX_x2), X can be A or B or C, if image block E first, the reference motion vector of the second number of sub images piece is (mvpE_y1, mvpE_x1) and (mvpE_y2, mvpE_x2), then (mvpE_y1, mvpE_x1) and (mvpE_y2, acquiring method mvpE_x2) is:
mvpE_y1=mvX_y1
mvpE_x1=mvX_x1
mvpE_y2=mvX_y2
mvpE_x2=mvX_x2
In said method, can also be according to the coding/decoded peripheral piece of the subimage block of to be encoded/image block to be decoded, and the irregular dividing mode of to be encoded/image block to be decoded obtains the reference motion vector of subimage block.
Concrete grammar is: coding/decoded peripheral piece of establishing the subimage block of to be encoded/image block to be decoded is A shown in Figure 3, B, C and D.If to be encoded/and image block to be decoded adopts horizontal division mode or vertical division mode, and the motion vector of then choosing peripheral piece A and B is used to obtain the reference motion vector of the subimage block of to be encoded/image block to be decoded; If to be encoded/and image block to be decoded adopts dividing mode shown in Fig. 2 (a), then chooses peripheral piece A, and the motion vector of B and C is used to obtain the reference motion vector of the subimage block of to be encoded/image block to be decoded; If to be encoded/and image block to be decoded adopts dividing mode shown in Fig. 2 (b), then chooses peripheral piece A, and the motion vector of B and D is used to obtain the reference motion vector of the subimage block of to be encoded/image block to be decoded.
The decoding method and the device that adopt the embodiment of the invention to provide can be simplified the acquisition and the calculating of reference motion vector under certain conditions, and the resource of having saved coding/decoding system has improved efficient.
More than multistage switched network and system that the embodiment of the invention provided are 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.

Claims (32)

1. a coding method is characterized in that, comprising:
Choosing an irregular dividing mode in default a plurality of irregular dividing mode treats the image encoded piece and carries out irregular division, obtain at least two different subimage blocks, obtain the reference image block of described subimage block according to the pixel value of described subimage block;
According to described reference image block, obtain the motion vector of the subimage block of described image block to be encoded; According to the peripheral piece of having encoded of the subimage block of described image block to be encoded and the irregular dividing mode of image block to be encoded, obtain the reference motion vector of subimage block;
According to described motion vector and described reference motion vector, obtain the motion vector difference;
Described motion vector difference is written in the code stream.
2. the coding method described in claim 1 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
Selection meets pre-conditioned peripheral piece;
Meet the reference motion vector that pre-conditioned peripheral piece obtains image block according to described, wherein,
Described preset condition comprises:
Described peripheral piece has adopted the irregular dividing mode identical with image block to be encoded;
The reference image block of described peripheral piece and the reference image block of described subimage block are in the same image.
3. the coding method described in claim 2 is characterized in that, if there is a unique peripheral piece to satisfy preset condition, then the reference motion vector of described subimage block equals the motion vector of the described peripheral piece that satisfies condition.
4. the coding method described in claim 2, it is characterized in that, if have in the described peripheral piece of having encoded a plurality of satisfy described pre-conditioned, then the reference motion vector of described subimage block equals the motion vector of that peripheral piece of difference minimum of the location parameter of location parameter in the peripheral piece that satisfies condition and image block to be encoded, or the reference motion vector of described subimage block equals the motion vector of that peripheral piece of absolute difference minimum of the location parameter of location parameter in the peripheral piece that satisfies condition and image block to be encoded.
5. the coding method described in claim 4, it is characterized in that, if the absolute difference minimum of the location parameter of the location parameter of a plurality of peripheral pieces that satisfy condition identical and location parameter in the peripheral piece that satisfies condition and image block to be encoded is arranged, if or the location parameter that a plurality of peripheral pieces that satisfy condition are arranged is identical and the absolute difference minimum of the location parameter of location parameter in the peripheral piece that satisfies condition and image block to be encoded, then the reference motion vector of described subimage block is got the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition, or the mean value that the reference motion vector of described subimage block is got the motion vector of described a plurality of peripheral pieces that satisfy condition rounds.
6. the coding method described in claim 1 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded and the irregular dividing mode of image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of image block to be encoded is the horizontal division mode,
When if the irregular dividing mode of the left adjacent block of described image block to be encoded is the horizontal division mode, then obtain the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of left adjacent block;
If the irregular dividing mode of the left adjacent block of described image block to be encoded is not the horizontal division mode, and the irregular dividing mode of the last adjacent block of described image block to be encoded is when being the horizontal division mode, then obtains the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of last adjacent block.
7. the coding method described in claim 1 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded and the irregular dividing mode of image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of image block to be encoded is the vertical division mode,
If the irregular dividing mode of the last adjacent block of described image block to be encoded is the vertical division mode, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of last adjacent block;
If the irregular dividing mode of the last adjacent block of described image block to be encoded is not the vertical division mode, and the irregular dividing mode of the left adjacent block of described image block to be encoded is when being the vertical division mode, obtains the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of left adjacent block.
8. the coding method described in claim 1 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded and the irregular dividing mode of image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of described image block to be encoded is divided into two triangles or triangle and a pentagon or two quadrangles with image block, if the peripheral piece of described image block to be encoded only has an image block dividing mode identical with the irregular dividing mode of described image block to be encoded, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of this image block; Perhaps
If the dividing mode that a plurality of image blocks are arranged in the peripheral piece of described image block to be encoded is identical with the irregular dividing mode of described image block to be encoded, then obtain the reference motion vector of described image block to be encoded according to the motion vector of the subimage block of the identical image block of the reference frame index value in described a plurality of image blocks with image block to be encoded.
9. as claim 6,7 or 8 described coding methods, it is characterized in that the method for the reference motion vector of the described subimage block that obtains described image block to be encoded according to left adjacent block or the motion vector of going up the subimage block of adjacent block comprises:
The reference motion vector of the subimage block of described image block to be encoded equals the motion vector of the subimage block of the left side or top image block; Or
Left adjacent block or the motion vector of going up the word image piece of adjacent block are zoomed to the subimage block reference picture pointed of described image block to be encoded, according to the motion vector behind the described convergent-divergent, obtain the reference motion vector of the subimage block of described image block to be encoded.
10. a code device is characterized in that, comprising:
Irregular division module, being used for choosing an irregular dividing mode in default a plurality of irregular dividing mode treats the image encoded piece and carries out irregular division, obtain at least two different subimage blocks, obtain the reference image block of described subimage block according to the pixel value of described subimage block;
Motion vector obtains module, is used for according to described reference image block, obtains the motion vector of the subimage block of described image block to be encoded;
Reference motion vector obtains module, is used for the peripheral piece of having encoded according to the subimage block of described image block to be encoded, obtains the reference motion vector of subimage block;
The motion vector difference obtains module, and it is poor to be used for described motion vector and described reference motion vector are done, and obtains the motion vector difference;
Motion vector difference writing module is used for described motion vector difference is written to code stream.
11. the coding method described in claim 10 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
Selection meets pre-conditioned peripheral piece;
Meet the reference motion vector that pre-conditioned peripheral piece obtains image block according to described, wherein,
Described preset condition comprises:
Described peripheral piece has adopted the irregular dividing mode identical with image block to be encoded;
The reference image block of described peripheral piece and the reference image block of described subimage block are in the same image.
12. the coding method described in claim 11 is characterized in that, if there is a unique peripheral piece to satisfy preset condition, then the reference motion vector of described subimage block equals the motion vector of the described peripheral piece that satisfies condition.
13. the coding method described in claim 11, it is characterized in that, if have in the described peripheral piece of having encoded a plurality of satisfy described pre-conditioned, then the reference motion vector of described subimage block equals the motion vector of that peripheral piece of difference minimum of the location parameter of the location parameter of irregular division in the peripheral piece that satisfies condition and image block to be encoded, or the motion vector of that peripheral piece of the absolute difference minimum of the location parameter of location parameter in the peripheral piece that satisfies condition and image block to be encoded.
14. the coding method described in claim 13, it is characterized in that, if the absolute difference minimum of the location parameter of the location parameter of a plurality of peripheral pieces that satisfy condition identical and location parameter in the peripheral piece that satisfies condition and image block to be encoded is arranged, if or the location parameter that a plurality of peripheral pieces that satisfy condition are arranged is identical and the absolute difference minimum of the location parameter of location parameter in the peripheral piece that satisfies condition and image block to be encoded, then the reference motion vector of described subimage block is got the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition, or the mean value that the reference motion vector of described subimage block is got the motion vector of described a plurality of peripheral pieces that satisfy condition rounds.
15. the code device described in claim 10 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of image block to be encoded is the horizontal division mode,
When if the irregular dividing mode of the left adjacent block of described image block to be encoded is the horizontal division mode, then obtain the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of left adjacent block;
If the irregular dividing mode of the left adjacent block of described image block to be encoded is not the horizontal division mode, and the irregular dividing mode of the last adjacent block of described image block to be encoded is when being the horizontal division mode, then obtains the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of last adjacent block.
16. the code device described in claim 10 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of image block to be encoded is the vertical division mode,
If the irregular dividing mode of the last adjacent block of described image block to be encoded is the vertical division mode,
Then obtain the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of last adjacent block;
If the irregular dividing mode of the last adjacent block of described image block to be encoded is not the vertical division mode, and the irregular dividing mode of the left adjacent block of described image block to be encoded is when being the vertical division mode, obtains the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of left adjacent block.
17. the code device described in claim 10 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of described image block to be encoded is divided into two triangles or triangle and a pentagon or two quadrangles with image block, if the peripheral piece of described image block to be encoded only has an image block dividing mode identical with the irregular dividing mode of described image block to be encoded, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of this image block; Perhaps
If the dividing mode that a plurality of image blocks are arranged in the peripheral piece of described image block to be encoded is identical with the irregular dividing mode of described image block to be encoded, then obtain the reference motion vector of described image block to be encoded according to the motion vector of the subimage block of the identical image block of the reference frame index value in described a plurality of image blocks with image block to be encoded.
18. the code device described in claim 15,16 or 17 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of described image block to be encoded is divided into two triangles or triangle and a pentagon or two quadrangles with image block, if the peripheral piece of described image block to be encoded only has an image block dividing mode identical with the irregular dividing mode of described image block to be encoded, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of this image block; Perhaps
If the dividing mode that a plurality of image blocks are arranged in the peripheral piece of described image block to be encoded is identical with the irregular dividing mode of described image block to be encoded, then obtain the reference motion vector of described image block to be encoded according to the motion vector of the subimage block of the identical image block of the reference frame index value in described a plurality of image blocks with image block to be encoded.
19. a coding/decoding method is characterized in that, comprising:
From code stream, obtain the irregular dividing mode of image block to be decoded;
From code stream, obtain the motion vector difference of the subimage block of image block to be decoded;
From the decoded peripheral piece of the subimage block of described image block to be decoded and the irregular dividing mode of image block, obtain the reference motion vector of subimage block;
According to the reference motion vector and the motion vector difference of described subimage block, obtain the motion vector of described subimage block;
Obtain the reference image block of described subimage block according to described motion vector, and with reference to the image subsection piece described subimage block is decoded according to described.
20. the coding/decoding method described in claim 19 is characterized in that obtaining according to described motion vector the reference image block of described subimage block, and comprises according to described described subimage block the decoding with reference to subimage block:
Selection meets pre-conditioned peripheral piece;
Meet the reference motion vector that pre-conditioned peripheral piece obtains image block according to described, wherein,
Described preset condition comprises:
Described peripheral piece has adopted the irregular dividing mode identical with image block to be decoded;
The reference image block of described peripheral piece and the reference image block of described subimage block are in the same image.
21. the coding/decoding method described in claim 20 is characterized in that, if there is a unique peripheral piece to satisfy preset condition, then the reference motion vector of described subimage block equals the motion vector of the described peripheral piece that satisfies condition.
22. the coding/decoding method described in claim 20, it is characterized in that, if have in the described decoded peripheral piece a plurality of satisfy described pre-conditioned, then the reference motion vector of described subimage block equals the motion vector of that peripheral piece of difference minimum of the location parameter of location parameter in the peripheral piece that satisfies condition and image block to be decoded, or the motion vector of that peripheral piece of the absolute difference minimum of the location parameter of location parameter in the peripheral piece that satisfies condition and image block to be decoded.
23. the coding/decoding method described in claim 22, it is characterized in that, if the absolute difference minimum of the location parameter of the location parameter of a plurality of peripheral pieces that satisfy condition identical and location parameter in the peripheral piece that satisfies condition and image block to be decoded is arranged, if or the location parameter that a plurality of peripheral pieces that satisfy condition are arranged is identical and the absolute difference minimum of the location parameter of location parameter in the peripheral piece that satisfies condition and image block to be decoded, then the reference motion vector of described subimage block is got the mean value of the motion vector of described a plurality of peripheral pieces that satisfy condition, or the mean value that the reference motion vector of described subimage block is got the motion vector of described a plurality of peripheral pieces that satisfy condition rounds.。
24. the coding/decoding method described in claim 19, the decoded peripheral piece of described subimage block from described image block to be decoded and the irregular dividing mode of image block, the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of image block to be decoded is the horizontal division mode,
When if the irregular dividing mode of the left adjacent block of described image block to be decoded is the horizontal division mode, then obtain the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of left adjacent block;
If the irregular dividing mode of the left adjacent block of described image block to be decoded is not the horizontal division mode, and the irregular dividing mode of the last adjacent block of described image block to be decoded is when being the horizontal division mode, then obtains the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of last adjacent block.
25. the coding/decoding method described in claim 19, the decoded peripheral piece of described subimage block from described image block to be decoded and the irregular dividing mode of image block, the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of image block to be decoded is the vertical division mode,
If the irregular dividing mode of the last adjacent block of described image block to be decoded is the vertical division mode, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of last adjacent block;
If the irregular dividing mode of the last adjacent block of described image block to be decoded is not the vertical division mode, and the irregular dividing mode of the left adjacent block of described image block to be decoded is when being the vertical division mode, obtains the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of left adjacent block.
26. the coding/decoding method described in claim 19, the decoded peripheral piece of described subimage block from described image block to be decoded and the irregular dividing mode of image block, the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of described image block to be decoded is divided into two triangles or triangle and a pentagon or two quadrangles with image block, if the peripheral piece of described image block to be decoded only has an image block dividing mode identical with the irregular dividing mode of described image block to be decoded, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of this image block; Perhaps
If the dividing mode that a plurality of image blocks are arranged in the peripheral piece of described image block to be decoded is identical with the irregular dividing mode of described image block to be decoded, then obtain the reference motion vector of described image block to be decoded according to the motion vector of the subimage block of the identical image block of the reference frame index value in described a plurality of image blocks with image block to be decoded.
27. as claim 24,25 or 26 described coding/decoding methods, the method for reference motion vector that the described motion vector that faces piece mutually or go up the subimage block of adjacent block according to a left side obtains the subimage block of described image block to be decoded comprises:
The reference motion vector of the subimage block of described image block to be decoded equals the motion vector of the subimage block of the left side or top image block; Or
Left adjacent block or the motion vector of going up the word image piece of adjacent block are zoomed to the subimage block reference picture pointed of described image block to be decoded, according to the motion vector behind the described convergent-divergent, obtain the reference motion vector of the subimage block of described image block to be decoded.
28. a decoding device is characterized in that, comprising:
The motion vector difference obtains module, is used for obtaining from code stream the motion vector difference of the subimage block of image block to be decoded;
Reference motion vector obtains module, is used for the decoded peripheral piece according to the subimage block of described image block to be decoded, obtains the reference motion vector of subimage block;
Motion vector obtains module, is used for reference motion vector and motion vector difference according to described subimage block, obtains the motion vector of described subimage block;
Decoder module is used for searching according to described motion vector the reference image block of described subimage block, and described subimage block is decoded with reference to the image subsection piece according to described.
29. the code device described in claim 28 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of image block to be encoded is the horizontal division mode,
When if the irregular dividing mode of the left adjacent block of described image block to be encoded is the horizontal division mode, then obtain the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of left adjacent block;
If the irregular dividing mode of the left adjacent block of described image block to be encoded is not the horizontal division mode, and the irregular dividing mode of the last adjacent block of described image block to be encoded is when being the horizontal division mode, then obtains the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of last adjacent block.
30. the code device described in claim 28 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of image block to be encoded is the vertical division mode,
If the irregular dividing mode of the last adjacent block of described image block to be encoded is the vertical division mode, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of last adjacent block;
If the irregular dividing mode of the last adjacent block of described image block to be encoded is not the vertical division mode, and the irregular dividing mode of the left adjacent block of described image block to be encoded is when being the vertical division mode, obtains the reference motion vector of the subimage block of current image block according to the motion vector of the subimage block of left adjacent block.
31. the code device described in claim 28 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of described image block to be encoded is divided into two triangles or triangle and a pentagon or two quadrangles with image block, if the peripheral piece of described image block to be encoded only has an image block dividing mode identical with the irregular dividing mode of described image block to be encoded, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of this image block; Perhaps
If the dividing mode that a plurality of image blocks are arranged in the peripheral piece of described image block to be encoded is identical with the irregular dividing mode of described image block to be encoded, then obtain the reference motion vector of described image block to be encoded according to the motion vector of the subimage block of the identical image block of the reference frame index value in described a plurality of image blocks with image block to be encoded.
32. the code device described in claim 29,30 or 31 is characterized in that, the peripheral piece of having encoded of described subimage block according to described image block to be encoded, and the reference motion vector that obtains subimage block comprises:
When the irregular dividing mode of described image block to be encoded is divided into two triangles or triangle and a pentagon or two quadrangles with image block, if the peripheral piece of described image block to be encoded only has an image block dividing mode identical with the irregular dividing mode of described image block to be encoded, then according to the reference motion vector of the subimage block of the motion vector acquisition current image block of the subimage block of this image block; Perhaps
If the dividing mode that a plurality of image blocks are arranged in the peripheral piece of described image block to be encoded is identical with the irregular dividing mode of described image block to be encoded, then obtain the reference motion vector of described image block to be encoded according to the motion vector of the subimage block of the identical image block of the reference frame index value in described a plurality of image blocks with image block to be encoded.
CN 201010237812 2010-04-09 2010-07-19 Video coding and decoding method and device Active CN102215395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010237812 CN102215395B (en) 2010-04-09 2010-07-19 Video coding and decoding method and device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201010147575.8 2010-04-09
CN201010147575 2010-04-09
CN 201010237812 CN102215395B (en) 2010-04-09 2010-07-19 Video coding and decoding method and device

Publications (2)

Publication Number Publication Date
CN102215395A true CN102215395A (en) 2011-10-12
CN102215395B CN102215395B (en) 2013-10-09

Family

ID=44746492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010237812 Active CN102215395B (en) 2010-04-09 2010-07-19 Video coding and decoding method and device

Country Status (1)

Country Link
CN (1) CN102215395B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104284188A (en) * 2014-10-11 2015-01-14 华为技术有限公司 Partitioning method for prediction block, encoding device and decoding device
CN105208381A (en) * 2014-06-25 2015-12-30 中兴通讯股份有限公司 Video coding method and apparatus
CN106464825A (en) * 2014-07-01 2017-02-22 索尼公司 Image processing device and method
CN109819255A (en) * 2018-12-28 2019-05-28 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment
CN110061813A (en) * 2019-04-09 2019-07-26 惠州Tcl移动通信有限公司 A kind of data-encoding scheme and coding/decoding method and relevant apparatus
WO2020140331A1 (en) * 2019-01-03 2020-07-09 深圳市大疆创新科技有限公司 Video image processing method and device
WO2021136361A1 (en) * 2019-12-30 2021-07-08 Beijing Bytedance Network Technology Co., Ltd. Motion vector difference for block with geometric partition
RU2776941C1 (en) * 2018-12-28 2022-07-29 Ханчжоу Хиквижн Диджитал Текнолоджи Ко., Лтд. Video encoding and decoding

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072356A (en) * 2006-05-12 2007-11-14 中国科学院计算技术研究所 Motion vector predicating method
CN101127913A (en) * 2006-08-18 2008-02-20 富士通株式会社 Interframe prediction processor with mechanism for providing locations of reference motion vectors
CN101263713A (en) * 2005-09-16 2008-09-10 索尼电子有限公司 Natural shaped region for motion compensation
CN101621693A (en) * 2009-07-31 2010-01-06 重庆大学 Frame frequency lifting method for combining target partition and irregular block compensation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101263713A (en) * 2005-09-16 2008-09-10 索尼电子有限公司 Natural shaped region for motion compensation
CN101072356A (en) * 2006-05-12 2007-11-14 中国科学院计算技术研究所 Motion vector predicating method
CN101127913A (en) * 2006-08-18 2008-02-20 富士通株式会社 Interframe prediction processor with mechanism for providing locations of reference motion vectors
CN101621693A (en) * 2009-07-31 2010-01-06 重庆大学 Frame frequency lifting method for combining target partition and irregular block compensation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KENNETH VERMEIRSCH ETC.: "New Macroblock Bipartitioning Modes for Inter Coding", 《ITU - TELECOMMUNICATIONS STANDARDIZATION SECTOR,STUDY GROUP 16 QUESTION 6,VIDEO CODING EXPERTS GROUP (VCEG),34TH MEETING: ANTALYA, TURKEY》 *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105208381A (en) * 2014-06-25 2015-12-30 中兴通讯股份有限公司 Video coding method and apparatus
WO2015196718A1 (en) * 2014-06-25 2015-12-30 中兴通讯股份有限公司 Video encoding method and device
CN106464825A (en) * 2014-07-01 2017-02-22 索尼公司 Image processing device and method
CN104284188A (en) * 2014-10-11 2015-01-14 华为技术有限公司 Partitioning method for prediction block, encoding device and decoding device
WO2016054975A1 (en) * 2014-10-11 2016-04-14 华为技术有限公司 Method for partitioning prediction block, encoding device and decoding device
CN104284188B (en) * 2014-10-11 2018-03-13 华为技术有限公司 Division methods, encoding device and the decoding device of prediction block
US10230953B2 (en) 2014-10-11 2019-03-12 Huawei Technologies Co., Ltd. Method for dividing prediction block, encoding device, and decoding device
US10834398B2 (en) 2014-10-11 2020-11-10 Huawei Technologies Co., Ltd. Method for dividing prediction block, encoding device, and decoding device
CN109862369B (en) * 2018-12-28 2020-05-12 杭州海康威视数字技术股份有限公司 Coding and decoding method and equipment thereof
CN109862369A (en) * 2018-12-28 2019-06-07 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment
US11889072B2 (en) 2018-12-28 2024-01-30 Hangzhou Hikvision Digital Technology Co., Ltd. Video encoding and decoding
CN109862368B (en) * 2018-12-28 2020-02-11 杭州海康威视数字技术股份有限公司 Coding and decoding method and equipment thereof
CN109862368A (en) * 2018-12-28 2019-06-07 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment
WO2020135033A1 (en) * 2018-12-28 2020-07-02 杭州海康威视数字技术股份有限公司 Video encoding and decoding
RU2776941C1 (en) * 2018-12-28 2022-07-29 Ханчжоу Хиквижн Диджитал Текнолоджи Ко., Лтд. Video encoding and decoding
CN109819255A (en) * 2018-12-28 2019-05-28 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment
US11178420B2 (en) 2019-01-03 2021-11-16 SZ DJI Technology Co., Ltd. Video image processing method and device
US11206422B2 (en) 2019-01-03 2021-12-21 SZ DJI Technology Co., Ltd. Video image processing method and device
WO2020140331A1 (en) * 2019-01-03 2020-07-09 深圳市大疆创新科技有限公司 Video image processing method and device
US11689736B2 (en) 2019-01-03 2023-06-27 SZ DJI Technology Co., Ltd. Video image processing method and device
US11743482B2 (en) 2019-01-03 2023-08-29 SZ DJI Technology Co., Ltd. Video image processing method and device
CN110061813B (en) * 2019-04-09 2022-10-04 惠州市仲恺Tcl智融科技小额贷款股份有限公司 Data encoding method, data decoding method and related devices
CN110061813A (en) * 2019-04-09 2019-07-26 惠州Tcl移动通信有限公司 A kind of data-encoding scheme and coding/decoding method and relevant apparatus
WO2021136361A1 (en) * 2019-12-30 2021-07-08 Beijing Bytedance Network Technology Co., Ltd. Motion vector difference for block with geometric partition
US12034966B2 (en) 2022-10-06 2024-07-09 Beijing Bytedance Network Technology Co., Ltd. Motion vector difference for block with geometric partition

Also Published As

Publication number Publication date
CN102215395B (en) 2013-10-09

Similar Documents

Publication Publication Date Title
CN102215395B (en) Video coding and decoding method and device
CN102970526B (en) A kind of method obtaining transform block size and module
CN107071437B (en) The method of decoding image for intra prediction
CN102215396A (en) Video coding and decoding methods and systems
CN102957907B (en) The acquisition methods of a kind of transform block positional information and module
TWI774141B (en) Method and apparatus for video conding
CN110892719A (en) Image encoding/decoding method and apparatus
CN104869402A (en) Method Of Decoding Video Data
CN103096067A (en) Method of generating reconstructed block
CN103096071A (en) Method Of Deriving Motion Information
CN104768011A (en) Image encoding and decoding method and related device
CN102648631A (en) Method and apparatus for encoding/decoding high resolution images
CN110557631A (en) Image prediction method and related device
CN103096069A (en) Method and apparatus of deriving intra predicion mode
TWI688266B (en) Method and apparatus for intra prediction fusion in image and video coding
CN103096068A (en) Method of generating quantized block
CN103096073A (en) Method Of Constructing Merge List
CN104170379A (en) Method and apparatus for image decoding
CN103152562A (en) Method of decoding motion vector
CN104581159A (en) Methods for determining block partition modes during video encoding and decoding and relevant devices
CN103096072A (en) Method Of Decoding Video Data
CN102685474A (en) Encoding and decoding method of prediction modes, encoding and decoding device and network system
CN103152563A (en) Apparatus of decoding video data
CN101511019A (en) Method and apparatus for estimating variable mode motion
CN113766222B (en) Encoding and decoding method, device and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant