Method and apparatus for encoding/decoding image and recording medium for storing bitstream
View Patent ↗Provided is a video decoding method comprising determining a first base motion vector of a current block for a first reference picture and a second base motion vector of the current block for a second reference picture, determining a first refinement motion vector by refining the first base motion vector by a first motion vector difference and determining a second refinement motion vector by refining the second base motion vector by a second motion vector difference, determining first and second prediction blocks of the current block based on the first refinement motion vector and the second refinement motion vector, and determining a final prediction block for the current block based on a weighted sum of the first prediction block and the second prediction block.
1 . A video decoding method comprising:
determining a first base motion vector of a current block for a first reference picture and a second base motion vector of the current block for a second reference picture;
determining a first motion vector difference in response to a first distance between a current picture including the current block and the first reference picture and a second distance between the current picture and the second reference picture being different, without parsing information regarding motion vector differences from a bitstream, wherein an absolute value of the first motion vector difference is limited within a predetermined range;
determining a second motion vector difference based on the first motion vector difference;
determining a first refinement motion vector by refining the first base motion vector by the first motion vector difference and a second refinement motion vector by refining the second base motion vector by the second motion vector difference;
determining first and second prediction blocks of the current block based on the first refinement motion vector and the second refinement motion vector; and
determining a final prediction block for the current block based on a weighted sum of the first prediction block and the second prediction block,
wherein the first motion vector difference is selected, based on a distortion between the first and second prediction blocks, obtained using the first motion vector difference, being minimal, and
wherein a first weight applied to the first prediction block and a second weight applied to the second prediction block are derived based on a result of a template matching among a first template corresponding to the first refinement motion vector, a second template corresponding to the second refinement motion vector, and a current template of the current block.
2 . The video decoding method of claim 1 , wherein the weighted sum of the first prediction block and the second prediction block is determined by a weight determined according to a distance between a current picture and the first reference picture and the distance between the current picture and the second reference picture.
3 . The video decoding method of claim 2 , wherein:
a first weight applied to the first prediction block is proportional to the distance between the current picture and the second reference picture; and
a second weight applied to the second prediction block is proportional to the distance between the current picture and the first reference picture.
4 . The video decoding method of claim 1 , wherein in the determining of the first refinement motion vector and the second refinement motion vector, a ratio of a magnitude of the first motion vector difference and a magnitude of the second motion vector difference is proportional to a ratio of the distance between the current picture and the first reference picture and the distance between the current picture and the second reference picture.
5 . The video decoding method of claim 1 , wherein the first refinement motion vector and the second refinement motion vector are determined to minimize distortion between a first template of the first prediction block indicated by the first refinement motion vector, a second template of the second prediction block indicated by the second refinement motion vector and a current template of the current block.
6 . The video decoding method of claim 5 , wherein the distortion is calculated based on a final template determined by a weighted average of the first template, the second template and the current template.
7 . The video decoding method of claim 6 , wherein in the weighted average of the first template and the second template, a first weight applied to the first template is proportional to a distance between a current picture and the second reference picture and a second weight applied to the second template is proportional to a distance between the current picture and the first reference picture.
8 . The video decoding method of claim 1 , wherein the weighted sum of the first prediction block and the second prediction block is determined by a weight determined based on a picture type of a current picture including the current block.
9 . The video decoding method of claim 1 , wherein the weighted sum of the first prediction block and the second prediction block is determined by a weight determined based on weight information generated by parsing a bitstream.
10 . A video encoding method comprising:
determining a first base motion vector of a current block for a first reference picture and a second base motion vector of the current block for a second reference picture;
determining a first motion vector difference in response to a first distance between a current picture including the current block and the first reference picture and a second distance between the current picture and the second reference picture being different, without parsing information regarding motion vector differences from a bitstream, wherein an absolute value of the first motion vector difference is limited within a predetermined range;
determining a second motion vector difference based on the first motion vector difference;
determining a first refinement motion vector by refining the first base motion vector by the first motion vector difference and a second refinement motion vector by refining the second base motion vector by the second motion vector difference;
determining first and second prediction blocks of the current block based on the first refinement motion vector and the second refinement motion vector; and
determining a final prediction block for the current block based on a weighted sum of the first prediction block and the second prediction block,
wherein the first motion vector difference is selected, based on a distortion between the first and second prediction blocks, obtained using the first motion vector difference being minimal, and
wherein a first weight applied to the first prediction block and a second weight applied to the second prediction block are derived based on a result of a template matching among a first template corresponding to the first refinement motion vector, a second template corresponding to the second refinement motion vector, and a current template of the current block.
11 . A method of transmitting a bitstream generated by a video encoding method, the method comprising:
encoding an image based on the video encoding method; and
transmitting a bitstream including the encoded image,
wherein the video encoding method comprises:
determining a first base motion vector of a current block for a first reference picture and a second base motion vector of the current block for a second reference picture;
determining a first motion vector difference in response to a first distance between a current picture including the current block and the first reference picture and a second distance between the current picture and the second reference picture being different, without parsing information regarding motion vector differences from a bitstream, wherein an absolute value of the first motion vector difference is limited within a predetermined range;
determining a second motion vector difference based on the first motion vector difference;
determining a first refinement motion vector by refining the first base motion vector by the first motion vector difference and determining a second refinement motion vector by refining the second base motion vector by the second motion vector difference;
determining first and second prediction blocks of the current block based on the first refinement motion vector and the second refinement motion vector; and
determining a final prediction block for the current block based on a weighted sum of the first prediction block and the second prediction block,
wherein the first motion vector difference is selected, based on a distortion between the first and second prediction blocks, obtained using the first motion vector difference being minimal, and
wherein a first weight applied to the first prediction block and a second weight applied to the second prediction block are derived based on a result of a template matching among a first template corresponding to the first refinement motion vector, a second template corresponding to the second refinement motion vector, and a current template of the current block.