Method and device for encoding/decoding image and recording medium having bitstream stored thereon
The present invention relates to an image decoding method. The image decoding method comprises deriving initial motion information of a current block from at least one of motion information of a spatial neighbor block, motion information of a temporal neighbor block, and pre-defined motion information, generating refined motion information by performing motion information refinement for the initial motion information and generating a prediction block of the current block by using the refined motion information.
1 . An image decoding method, performed by a decoding apparatus, comprising:
obtaining image information including motion vector precision related information, wherein the motion vector precision related information represents a precision for motion vectors of a current block;
deriving the motion vector of the current block based on the motion vector precision related information;
deriving a prediction sample of the current block based on the motion vector; and
generating a reconstructed picture based on the prediction sample,
wherein the deriving the motion vector of the current block based on the motion vector precision related information comprises:
deriving a motion vector candidate list of the current block including spatial motion vector candidates, a plurality of temporal motion vector candidates, and an additional spatial motion vector candidate;
deriving a first motion vector and a second motion vector of the current block based on the motion vector candidate list;
deriving a first prediction block of the current block based on the first motion vector;
deriving a second prediction block of the current block based on the second motion vector;
deriving a final prediction block of the current block based on the first prediction block and the second prediction block,
wherein a specific region of the final prediction block is derived by applying a weighted sum of corresponding regions of the first prediction block and the second prediction block,
wherein a region excluding the specific region of the final prediction block is derived as a corresponding region of the first prediction block or the second prediction block,
wherein the precision for the motion vectors of the current block is derived to quarter pel precision, eighth pel precision or integer pel precision based on the motion vector precision related information,
wherein the plurality of temporal motion vector candidates are derived based on a process of scanning a plurality of blocks in a collocated picture,
wherein the plurality of blocks in the collocated picture are blocks within a collocated block and neighboring blocks of the collocated block,
wherein the blocks within the collocated block in the collocated picture include an upper left corner block, an upper right corner block, a lower left corner block and a lower right corner block within the collocated block,
wherein the neighboring blocks of the collocated block in the collocated picture include a block adjacent to the lower left of the collocated block and a block adjacent to the lower right of the collocated block,
wherein the collocated block is a block of a location in the collocated picture corresponding a current location of the current block,
wherein motion information of the collocated picture is stored in a M×N unit,
wherein M and N are predetermined integer values,
wherein the additional spatial motion vector candidate is derived after deriving the spatial motion vector candidates and the temporal motion vector candidates,
wherein the motion vector precision related information is a picture level parameter for a current picture, and
wherein the motion vector precision related information is decoded by a fixed-length binarization method.
2 . The image decoding method of claim 1 , the motion vector precision related information represents that a specific precision is used for a motion vector difference of the current block.
3 . The image decoding method of claim 1 , wherein the motion vector precision related information is decoded by a fixed-length binarization method.
4 . An image encoding method, performed by an encoding apparatus, comprising:
deriving motion vectors of a current block;
deriving a first prediction block of the current block based on the first motion vector;
deriving a second prediction block of the current block based on the second motion vector;
deriving a final prediction block of the current block based on the first prediction block and the second prediction block; and
encoding image information including motion vector precision related information,
wherein a specific region of the final prediction block is derived by applying a weighted sum of corresponding regions of the first prediction block and the second prediction block,
wherein a region excluding the specific region of the final prediction block is derived as a corresponding region of the first prediction block or the second prediction block,
wherein the motion vector precision related information represents precision for the motion vectors of the current block as quarter pel precision, eighth pel precision or integer pel precision,
wherein the deriving the motion vector of the current block comprises:
deriving a motion vector candidate list of the current block including spatial motion vector candidates, a plurality of temporal motion vector candidates, and an additional spatial motion vector candidate;
deriving the motion vector of the current block based on the motion vector candidate list,
wherein the plurality of temporal motion vector candidates are derived based on a process of scanning a plurality of blocks in a collocated picture,
wherein the plurality of blocks in the collocated picture are blocks within a collocated block and neighboring blocks of the collocated block in the collocated picture,
wherein the blocks within the collocated block in the collocated picture include an upper left corner block, an upper right corner block, a lower left corner block and a lower right corner block within the collocated block,
wherein the neighboring blocks of the collocated block in the collocated picture include a block adjacent to the lower left of the collocated block and a block adjacent to the lower right of the collocated block,
wherein the collocated block is a block of a location in the collocated picture corresponding a current location of the current block,
wherein motion information of the collocated picture is stored in a M×N unit,
wherein M and N are predetermined integer values,
wherein the additional spatial motion vector candidate is derived after deriving the spatial motion vector candidates and the temporal motion vector candidates,
wherein the motion vector precision related information is a picture level parameter for a current picture, and
wherein the motion vector precision related information is encoded by a fixed-length binarization method.
5 . The image encoding method of claim 4 , the motion vector precision related information represents that a specific precision is used for a motion vector difference of the current block.
6 . A transmission method of data for image, the method comprising:
obtaining a bitstream of image information including motion vector precision related information of a current block; and
transmitting the data including the bitstream of the image information including the motion vector precision related information,
wherein motion vectors of the current block is derived based on the motion vector precision related information, and
wherein the motion vector precision related information represents precision for the motion vector of the current block as quarter pel precision, eighth pel precision or integer pel precision,
wherein a first motion vector and a second motion vector of the current block are derived by deriving a motion vector candidate list of the current block including spatial motion vector candidates, a plurality of temporal motion vector candidates, and an additional spatial motion vector candidate and deriving the motion vector of the current block based on the motion vector candidate list,
wherein a first prediction block of the current block is derived based on the first motion vector, a second prediction block of the current block is derived based on the second motion vector, and a final prediction block of the current block is derived based on the first prediction block and the second prediction block,
wherein a specific region of the final prediction block is derived by applying a weighted sum of corresponding regions of the first prediction block and the second prediction block,
wherein a region excluding the specific region of the final prediction block is derived as a corresponding region of the first prediction block or the second prediction block,
wherein the plurality of temporal motion vector candidates are derived based on a process of scanning a plurality of blocks in a collocated picture,
wherein the plurality of blocks in the collocated picture are blocks within a collocated block and neighboring blocks of the collocated block,
wherein the blocks within the collocated block in the collocated picture include an upper left corner block, an upper right corner block, a lower left corner block and a lower right corner block within the collocated block,
wherein the neighboring blocks of the collocated block in the collocated picture include a block adjacent to the lower left of the collocated block and a block adjacent to the lower right of the collocated block,
wherein the collocated block is a block of a location in the collocated picture corresponding a current location of the current block,
wherein motion information of the collocated picture is stored in a M×N unit,
wherein M and N are predetermined integer values,
wherein the additional spatial motion vector candidate is derived after deriving the spatial motion vector candidates and the temporal motion vector candidates,
wherein the motion vector precision related information is a picture level parameter for a current picture, and
wherein the motion vector precision related information is encoded by a fixed-length binarization method.
7 . The transmission method of claim 6 , the motion vector precision related information represents that a specific precision is used for a motion vector difference of the current block.
8 . The image decoding method of claim 1 , wherein the process of the scanning is performed in a predetermined order of the blocks within the collocated block to the neighboring blocks of the collocated block.
9 . The image encoding method of claim 4 , wherein the process of the scanning is performed in a predetermined order of the blocks within the collocated block to the neighboring blocks of the collocated block.
10 . The transmission method of claim 6 , wherein the process of the scanning is performed in a predetermined order of the blocks within the collocated block to the neighboring blocks of the collocated block.
11 . The image decoding method of claim 1 , wherein the additional spatial motion vector candidate is a modified spatial motion vector candidate, and
wherein the modified spatial motion vector candidate derived based on information modified from a block of a spatial motion vector candidate.
12 . The image encoding method of claim 4 , wherein the additional spatial motion vector candidate is a modified spatial motion vector candidate, and
wherein the modified spatial motion vector candidate derived based on information modified from a block of a spatial motion vector candidate.
13 . The transmission method of claim 6 , wherein the additional spatial motion vector candidate is a modified spatial motion vector candidate, and
wherein the modified spatial motion vector candidate derived based on information modified from a block of a spatial motion vector candidate.
14 . The image decoding method of claim 1 , wherein a first region within the region excluding the specific region of the final prediction block is derived as a corresponding region of the first prediction block,
wherein a second region within the region excluding the specific region of the final prediction block is derived as a corresponding region of the second prediction block.
15 . The image encoding method of claim 4 , wherein a first region within the region excluding the specific region of the final prediction block is derived as a corresponding region of the first prediction block,
wherein a second region within the region excluding the specific region of the final prediction block is derived as a corresponding region of the second prediction block.
16 . The transmission method of claim 6 , wherein a first region within the region excluding the specific region of the final prediction block is derived as a corresponding region of the first prediction block,
wherein a second region within the region excluding the specific region of the final prediction block is derived as a corresponding region of the second prediction block.