Method and apparatus for processing video signal
An image decoding method according to the present invention may comprise the steps of: deriving a merge candidate from a candidate block; generating a first merge candidate list including the merge candidate; specifying any one of a plurality of merge candidates included in the first merge candidate list; deriving affine vectors of a current block on the basis of motion information of the specified merge candidate; deriving a motion vector of a sub-block in the current block on the basis of the affine vectors; and performing motion compensation on the sub-block on the basis of the motion vector.
1. A method of decoding a video, the method comprising:
deriving an affine merge candidate from a neighboring block adjacent to a current block;
generating a merge candidate list including the affine merge candidate;
specifying one of a plurality of merge candidates included in the merge candidate list;
deriving first motion vectors of the current block based on the specified merge candidate;
deriving a second motion vector of the current block based on the first motion vectors of the current block, the second motion vector being derived in units of sub-blocks in the current block, each of the sub-blocks having a size of 4×4; and
performing motion compensation for the current block based on the second motion vector,
wherein the affine merge candidate is derived based on corner motion vectors of the neighboring block, and
wherein, based on whether the neighboring block is included in the same CTU (Coding Tree Unit) as the current block, positions of corners corresponding to the corner motion vectors used to derive the affine merge candidate are differently determined.
2. The method of claim 1 , wherein when the neighboring block is included in the same CTU as the current block, a top-left corner motion vector and a top-right corner motion vector of the neighboring block are used to derive the affine merge candidate, and
wherein when the neighboring block is not included in the same CTU as the current block, a bottom-left corner motion vector and a bottom-right corner motion vector of the neighboring block are used to derive the affine merge candidate.
3. The method of claim 2 , wherein the merge candidate list further includes a constructed affine merge candidate which is generated by combining translation motion vectors of a plurality of neighboring blocks.
4. The method of claim 3 , wherein the affine merge candidate is derived from one of top neighboring blocks adjacent to the current block, and
wherein the affine merge candidate is derived from available one which is found firstly by searching the top neighboring blocks in a pre-defined order.
5. A method of encoding a video, the method comprising:
encoding index information which specifies one of a plurality of merge candidates included in a merge candidate list; and
generating a bitstream including the index information,
wherein first motion vectors of the current block are determined based on the one of the plurality of merge candidates included in the merge candidate list,
wherein a second motion vector of the current block is derived, in units of sub-blocks in the current block, based on the first motion vectors,
wherein each of the sub-blocks has a size of 4×4,
wherein the merge candidate list includes an affine merge candidate which is derived based on corner motion vectors of a neighboring block adjacent to a current block, and
wherein, based on whether the neighboring block is included in the same CTU (Coding Tree Unit) as the current block, positions of corners corresponding to the corner motion vectors used to derive the affine merge candidate are differently determined.
6. The method of claim 5 , wherein when the neighboring block is included in the same CTU as the current block, a top-left corner motion vector and a top-right corner motion vector of the neighboring block are used to derive the affine merge candidate, and
wherein when the neighboring block is not included in the same CTU as the current block, a bottom-left corner motion vector and a bottom-right corner motion vector of the neighboring block are used to derive the affine merge candidate.
7. The method of claim 6 , wherein the merge candidate list further includes a constructed affine merge candidate which is generated by combining translation motion vectors of a plurality of neighboring blocks.
8. The method of claim 7 , wherein the affine merge candidate is derived from one of top neighboring blocks adjacent to the current block, and
wherein the affine merge candidate is derived from available one which is found firstly by searching the top neighboring blocks in a pre-defined order.
9. A non-transitory computer-readable storage medium storing a bitstream comprising:
index information which specifies one of a plurality of merge candidates included in a merge candidate list,
wherein first motion vectors of the current block are derived based on a merge candidate specified by the index information,
wherein a second motion vector of the current block is derived, in units of sub-blocks in the current block, based on the first motion vectors,
wherein each of the sub-blocks has a size of 4×4,
wherein the merge candidate list includes an affine merge candidate which is derived based on corner motion vectors of a neighboring block adjacent to a current block, and
wherein, based on whether the neighboring block is included in the same CTU (Coding Tree Unit) as the current block, positions of corners corresponding to the corner motion vectors used to derive the affine merge candidate are differently determined.