Image encoding/decoding method and recording medium for same
The present invention relates to a method of performing motion compensation by using motion vector prediction. To this end, a method of decoding an image may include: generating multiple motion vector candidate lists according to an inter-prediction direction of a current block; deriving multiple motion vectors for the current block by using the multiple motion vector candidate lists; determining multiple prediction blocks for the current block by using the multiple motion vectors; and obtaining a final prediction block for the current block based on the multiple prediction blocks.
1. A method of decoding an image, the method comprising:
deriving multiple motion vectors for a current block according to an inter-prediction direction of the current block;
determining multiple prediction blocks for the current block by using the multiple motion vectors; and
obtaining a final prediction block for the current block based on a weighted sum of the multiple prediction blocks, and
wherein a weight of the current block for the weighted sum is derived based on a weight of a neighboring block of the current block.
2. The method of claim 1 , wherein the inter-prediction direction indicates uni-directional or bi-directional prediction.
3. The method of claim 1 , wherein the weight is determined differently for each of the multiple prediction blocks.
4. A method of encoding an image, the method comprising:
determining multiple prediction blocks for the current block; and
determining a final prediction block for the current block based on a weighted sum of the multiple prediction blocks, and
wherein a weight of the current block for the weighted sum is derived based on a weight of a neighboring block of the current block.
5. The method of claim 4 , wherein the weight is determined differently for each of the multiple prediction blocks.
6. A non-transitory computer readable recording medium comprising a bitstream,
the bitstream includes:
information about a merge index identifying respective motion information of multiple merge candidate lists, in a decoding method,
wherein the merge index is used for deriving multiple motion information for the current block,
wherein the multiple motion information is used to determine multiple prediction blocks for the current block,
wherein a weighted sum of the multiple prediction blocks is used for obtaining a final prediction block of the current block, and
wherein a weight of the current block for the weighted sum is derived based on a weight of a neighboring block of the current block.