IMAGE ENCODING AND DECODING METHOD AND IMAGE DECODING DEVICE
Disclosed are an image encoding and decoding method and an image decoding device for selecting a prediction candidate from reference blocks of a reference picture, which includes a current picture, and using the selected prediction candidate so as to derive motion information on a current block during image encoding and decoding. The image encoding and decoding method includes the steps of: configuring a spatial motion vector candidate; determining whether the reference picture of the current block is present within the current picture; and adding a spatial motion vector candidate in other block of the current picture encoded before the current block, when the reference picture of the current block is present within the current picture.
1 . An image encoding method, comprising:
configuring a spatial motion vector candidate (first candidate);
determining whether or not a reference picture of a current block is present within a current picture;
when the reference picture of the current block is present within the current picture, adding a spatial motion vector candidate (second candidate) of other blocks of the current picture and which are encoded before the current block;
when the reference picture of the current block is not present within the current picture, adding a temporal motion vector candidate (third candidate); and
performing reference pixel filtering based on a motion vector candidate including any one of the first candidate, the second candidate, and the third candidate.
2 . The image encoding method of claim 1 , before performing the reference pixel filtering, further comprising:
determining whether or not the current picture is the reference picture;
when the current picture is the reference picture, and a number of motion vector candidates within the combined list candidate is smaller than a preset number, adding a fixed candidate having preset fixed coordinates; and
when the current picture is not the reference picture, and a number of motion vector candidates within the combined list candidate is smaller than the preset number, adding a fixed candidate having (0, 0) coordinates.
3 . The image encoding method of claim 1 , after performing the reference pixel filtering, further comprising:
generating a prediction block by performing intra-prediction; and
encoding a prediction mode of the generated prediction block.
4 . The image encoding method of claim 1 , wherein the other blocks of the current picture are blocks facing the current block with a neighbor block of the current block therebetween, and includes a block that is encoded by performing inter-prediction for the current picture before the current block.
5 . An image decoding method, wherein the method generates a reconstructed image by entropy decoding an encoded image, performing dequantization for the decoded image, and performing inverse-transform for the dequantized image, the method comprising:
configuring a motion information prediction candidate group of the reconstructed image based on header information of the image obtained by entropy decoding;
changing a motion vector of a candidate block belonging to the candidate group according to a precision unit of a motion vector of a current block; and
calculating a difference value by subtracting the motion vector of the candidate block according to the precision unit from the motion vector of the current block.
6 . The image decoding method of claim 5 , wherein in the changing of the motion vector, the motion vector is scaled according to a first distance between a current picture at which the current block is positioned and a reference picture, and a second distance between a picture of the candidate block and a reference picture of a corresponding candidate block.
7 . The image decoding method of claim 6 , after the calculating of the difference value, further comprising: determining an interpolation precision of each reference picture based on an average distance of the first distance and the second distance.
8 . The image decoding method of claim 5 , wherein the changing of the motion vector is omitted when a reference picture of the current block and a reference picture of the candidate block are identical.
9 . The image decoding method of claim 5 , wherein in the changing of the motion vector, a motion vector of a neighbor block or adjacent block is changed to a motion vector precision unit of the current block according to the motion vector precision of the current block.
10 . The image decoding method of claim 9 , wherein the neighbor block is included in and positioned at another block with the current block.
11 . The image decoding method of claim 10 , wherein the neighbor block is a block in which a motion vector thereof is searched by performing inter-prediction before the current block.
12 . An image decoding method, comprising:
searching, when an interpolation precision of a reference picture is a first value, a precision of a motion vector for a first neighbor block of a current block referencing the reference picture, the precision being identical to the first value or being a second value greater than the first value;
searching a precision of a motion vector for a second neighbor block of the current block, the precision being a third value greater than the second value; and
decoding first information of the motion vectors for the first block and the second block based on matching information of the precisions of the motion vectors.
13 . The image decoding method of claim 12 , wherein the first value is a proper fraction, and the second value or the third value is an integer.
14 . The image decoding method of claim 12 , wherein the second value has a number of binary bits shorter than a number of binary bits of the third value when the second value has an occurrence frequency higher than an occurrence frequency of the third value within an index including the matching information.
15 . The image decoding method of claim 12 , wherein the first neighbor block or the second neighbor block is a block encoded by performing inter-prediction before the current block, and a reference picture of the first neighbor block or the second neighbor block is the current picture.
16 . The image decoding method of claim 12 , wherein the first neighbor block or the second neighbor block is included and positioned at another block that is spatially different from the current block.
17 . An image decoding device including a memory storing a program or a program code for image decoding, and a processor connected to the memory, wherein the processor, by the program:
searches, when an interpolation precision of a reference picture is a first value, a precision of a motion vector for a first neighbor block of a current block referencing the reference picture, the precision being identical to the first value or being a second value greater than the first value;
searches a precision of a motion vector for a second neighbor block of the current block, the precision being a third value greater than the second value; and
decodes an image based on information of the motion vectors for the first block and the second block and matching information of the precisions of the motion vectors.
18 . The image decoding device of the claim 17 , wherein the first value is a proper fraction, and the second value or the third value is an integer.
19 . The image decoding method of claim 17 , wherein the second value has a number of binary bits shorter than a number of binary bits of the third value when the second value has an occurrence frequency higher than an occurrence frequency of the third value within an index including the matching information.
20 . The image decoding method of claim 17 , wherein the first neighbor block or the second neighbor block is a block encoded by performing inter-prediction before the current block, and a reference picture of the first neighbor block or the second neighbor block is the current picture.