Inter-prediction mode-based image processing method and device therefor
Disclosed are a method for encoding a video signal and a device therefor. Specifically, a method for decoding an image based on an inter prediction mode comprises: generating a merging candidate list by using a spatial merge candidate and a temporal merge candidate of a current block; obtaining a merge index indicating a certain merge candidate in the merging candidate list; and generating a prediction block of the current block by using motion information of the certain merge candidate, wherein the generating of the merging candidate list may include adding a first merge candidate indicating a collocated block specified by motion information of the spatial merge candidate to the merging candidate list if a reference picture of the spatial merge candidate is same as a predetermined picture.
1. An apparatus for decoding a video signal, comprising:
a memory configured to store the video signal; and
a processor coupled with the memory,
wherein the processor is configured to:
obtain a reference picture index and a motion vector of a neighboring block of a current block;
derive a collocated block specified by the motion vector of the neighboring block, based on that a reference picture represented by the reference picture index of the neighboring block is same with a collocated picture;
add a merge candidate to a merge candidate list based on the collocated block;
obtain a merge index indicating a merge candidate among one or more merge candidates indicated in the merge candidate list; and
generate a prediction block of the current block based on the merge candidate,
wherein the collocated block is set to a block indicated by an L0 motion vector within the collocated picture based on that an L0 reference picture of the neighboring block is same with the collocated picture, and
wherein the collocated block is set to a block indicated by an L1 motion vector within the collocated picture based on that the L0 reference picture is different from the collocated picture, a slice type of the current block is B-slice, and an L1 reference picture of the neighboring block is same with the collocated picture.
2. The apparatus of claim 1 , wherein the neighboring block is located at a bottom of a left side of the current block.
3. The apparatus of claim 1 , wherein the collocated picture is determined in a slice header of a slice including the current block.
4. An apparatus for encoding a video signal, comprising:
a memory configured to store the video signal; and
a processor coupled with the memory,
wherein the processor is configured to:
obtain a reference picture index and a motion vector of a neighboring block of a current block;
derive a collocated block specified by the motion vector of the neighboring block, based on that a reference picture represented by the reference picture index of the neighboring block is same with a collocated picture;
add a merge candidate to a merge candidate list based on the collocated block;
generate prediction blocks of the current block based on merge candidates included in the merge candidate list; and
generate a merge index indicating a merge candidate selected among the merge candidates included the merge candidate list,
wherein the collocated block is set to a block indicated by an L0 motion vector within the collocated picture based on that an L0 reference picture of the neighboring block is same with the collocated picture, and
wherein the collocated block is set to a block indicated by an L1 motion vector within the collocated picture based on that the L0 reference picture is different from the collocated picture, a slice type of the current block is B-slice, and an L1 reference picture of the neighboring block is same with the collocated picture.
5. The apparatus of claim 4 , wherein the neighboring block of the current block is located at a bottom of a left side of the current block.
6. The apparatus of claim 4 , wherein the processor is further configured to define the collocated picture in a slice header of a slice including the current block.
7. A non-transitory computer-readable storage medium storing picture information generated by performing the steps of:
obtaining a reference picture index and a motion vector of a neighboring block of a current block;
deriving a collocated block specified by the motion vector of the neighboring block, based on that a reference picture represented by the reference picture index of the neighboring block is same with a collocated picture;
adding a merge candidate to a merge candidate list based on the collocated block;
generating prediction blocks of the current block based on merge candidates included in the merge candidate list; and
generating a merge index indicating a merge candidate selected among the merge candidates included the merge candidate list,
wherein the collocated block is set to a block indicated by an L0 motion vector within the collocated picture based on that an L0 reference picture of the neighboring block is same with the collocated picture, and
wherein the collocated block is set to a block indicated by an L1 motion vector within the collocated picture based on that the L0 reference picture is different from the collocated picture, a slice type of the current block is B-slice, and an L1 reference picture of the neighboring block is same with the collocated picture.
8. The non-transitory computer-readable storage medium of claim 7 , wherein the neighboring block is located at a bottom of a left side of the current block.
9. The non-transitory computer-readable storage medium of claim 7 , wherein the picture information is generated by defining the collocated picture in a slice header of a slice including the current block.