Image encoding/decoding method and recording medium therefor
The present invention relates to a method for encoding/decoding a video. To this end, the method for decoding a video may include: generating a merge candidate list of a current block including at least one merge candidate corresponding to each of a plurality of reference picture lists; determining at least one piece of motion information by using the merge candidate list; and generating a prediction block of the current block by using the determined at least one piece of motion information.
1. A method for decoding a video, the method comprising:
generating a merge candidate list of a current block including at least one merge candidate;
determining motion information of the current block by using the merge candidate list;
generating a plurality of temporary prediction blocks based on the motion information of the current block;
generating a prediction block of the current block by applying a weighting factor and an offset to the generated plurality of temporary prediction blocks;
generating a residual block of the current block by inverse-transform and inverse-quantization; and
generating a reconstructing block of the current block based on the prediction block and the residual block,
wherein the weighting factor is derived by index information for specifying a weight factor applied to the current block among weight factors included in a predefined weighting factor set, and
wherein the index information is derived from index information of neighboring blocks of the current block for specifying the weight factor applied to the current block.
2. The method of claim 1 , wherein the merge candidate list includes at least one of a spatial merge candidate derived from a spatial neighbor block of the current block and a temporal merge candidate derived from a collocated block of the current block, and
wherein the temporal merge candidate is derived from a sub-block of the collocated block of the current block.
3. The method of claim 1 , wherein the predefined weighting factor set comprises a positive weighting factor and a negative weighting factor.
4. The method of claim 1 , wherein the merge candidate list is shared in blocks that are smaller than a predetermined block in size or are deeper than the predetermined block in depth.
5. The method of claim 1 , wherein when the current block is smaller than a predetermined block in size or is deeper than the predetermined block in depth, the merge candidate list is generated based on a higher block of the current block, the higher block being equal to the predetermined block in size or in depth.
6. A method for encoding a video, the method comprising:
generating a merge candidate list of a current block including at least one merge candidate;
determining motion information of the current block by using the merge candidate list;
generating a plurality of temporary prediction blocks based on the motion information of the current block;
generating a prediction block of the current block by applying a weighting factor and an offset to the generated plurality of temporary prediction blocks; and
generating a residual block of the current block based on the current block and the prediction block,
wherein the weighting factor is derived by index information for specifying a weight factor applied to the current block among weight factors included in a predefined weighting factor set, and
wherein the index information is derived from index information of neighboring blocks of the current block for specifying the weight factor applied to the current block.
7. The method of claim 6 , wherein the merge candidate list includes at least one of a spatial merge candidate derived from a spatial neighbor block of the current block and a temporal merge candidate derived from a collocated block of the current block, and
wherein the temporal merge candidate is derived from a sub-block of the collocated block of the current block.
8. The method of claim 6 , wherein the predefined weighting factor set comprises a positive weighting factor and a negative weighting factor.
9. The method of claim 6 , wherein the merge candidate list is shared in blocks that are smaller than a predetermined block in size or are deeper than the predetermined block in depth.
10. The method of claim 6 , wherein when the current block is smaller than a predetermined block in size or is deeper than the predetermined block in depth, the merge candidate list is generated based on a higher block of the current block, the higher block being equal to the predetermined block in size or in depth.
11. A non-transitory computer readable medium storing a bitstream formed by a method for encoding a video, wherein the method comprises:
generating a merge candidate list of a current block including at least one merge candidate;
determining motion information of the current block by using the merge candidate list;
generating a plurality of temporary prediction blocks based on the motion information of the current block;
generating a prediction block of the current block by applying a weighting factor and an offset to the generated plurality of temporary prediction blocks; and
generating a residual block of the current block based on the current block and the prediction block,
wherein the weighting factor is derived by index information for specifying a weight factor applied to the current block among weight factors included in a predefined weighting factor set, and
wherein the index information is derived from index information of neighboring blocks of the current block for specifying the weight factor applied to the current block.