Image encoding/decoding method and apparatus, and recording medium storing bitstream
An image decoding/encoding method and apparatus according to the present disclosure may: generate a candidate list for predicting a first motion vector of a current block; derive a control point vector of the current block on the basis of a candidate index of the current block and the candidate list; correct the control point vector of the current block on the basis of a predetermined delta motion vector; derive the first motion vector of the current block on the basis of the corrected control point vector; and perform inter prediction on the current block by using the first motion vector of the current block.
1 . An image decoding method, comprising:
generating a candidate list for predicting a first motion vector of a current block;
deriving control point vectors of the current block based on a candidate index of the current block and the candidate list, the control point vectors including at least two of a first control point vector corresponding to a top-left corner position of the current block, a second control point vector corresponding to a top-right corner position of the current block, a third control point vector corresponding to a bottom-left corner position of the current block, or a fourth control point vector corresponding to a bottom-right corner position of the current block;
modifying the control point vectors of the current block based on a predetermined delta motion vector;
deriving the first motion vector of the current block based on the modified control point vectors; and
performing inter prediction on the current block using the first motion vector of the current block,
wherein modifying the control point vectors of the current block comprises:
determining a sum of absolute difference (SAD) array based on a search range for modifying the control point vectors, the SAD array including a plurality of SADs for search positions within the search range, an SAD being calculated based on a difference between an L0 block and an L1 block, the L0 and L1 blocks being specified based on at least one of the control point vectors; and
determining the delta motion vector based on the plurality of SADs belonging to the SAD array.
2 . The method of claim 1 , wherein determining the SAD array comprises:
deriving a modified control point vector by applying a predetermined offset to one of the control point vectors of the current block;
deriving a second motion vector in units of subblocks of the current block based on the modified control point vector and any other of the control point vectors; and
calculating the SAD based on the difference between the L0 block and the L1 block specified based on the derived second motion vector.
3 . The method of claim 2 , wherein the L0 block and the L1 block are composed of L0 subblocks and L1 subblocks each corresponding to subblocks belonging to the current block.
4 . The method of claim 2 , wherein the L0 block and the L1 block are specified based on a subblock corresponding to a position of the modified control point vector among subblocks in the current block.
5 . The method of claim 2 , wherein the L0 block and the L1 block are specified based on a subblock corresponding to a position of the modified control point vector among subblocks in the current block and at least one neighboring subblock adjacent to the subblock.
6 . The method of claim 1 , wherein determining the SAD array comprises:
deriving a modified control point vector by applying a predetermined offset to one of the control point vectors of the current block; and
calculating the SAD based on the difference between the L0 block and the L1 block specified based on the modified control point vector.
7 . The method of claim 1 , wherein determining the SAD array comprises:
deriving a second motion vector of the current block based on the control point vector of the current block;
deriving a modified second motion vector by applying a predetermined offset to the second motion vector of the current block; and
calculating the SAD based on the difference between the L0 block and the L1 block specified based on the modified second motion vector.
8 . The method of claim 1 , wherein modifying the control point vector is adaptively performed by considering a type of a candidate indicated by the candidate index among a plurality of candidates belonging to the candidate list.
9 . The method of claim 1 , wherein modifying the control point vector is adaptively performed based on at least one of a first flag indicating whether modification is allowed for a control point vector of a block coded in an affine mode or a second flag indicating whether modification is applied to the control point vector.
10 . The method of claim 1 , wherein a control point vector to be modified among the control point vectors of the current block is determined by considering at least one of a position of a neighboring block coded in an affine mode or a type of an affine model of the current block.
11 . The method of claim 1 , wherein one of the control point vectors of the current block shares the same delta motion vector with another one of the control point vectors of the current block.
12 . The method of claim 1 , wherein a type of an affine model for the current block is changed based on a number of the modified control point vectors.
13 . An image encoding method, comprising:
generating a candidate list for predicting a first motion vector of a current block;
determining a control point vector of the current block based on the candidate list, the control point vector including at least one of a first control point vector corresponding to a top-left corner position of the current block or a second control point vector corresponding to a top-right corner position of the current block;
modifying the control point vector of the current block based on a predetermined delta motion vector;
deriving the first motion vector of the current block based on the modified control point vector; and
performing inter prediction on the current block using the first motion vector of the current block,
wherein modifying the control point vectors of the current block comprises:
determining a sum of absolute difference (SAD) array based on a search range for modifying the control point vector, the SAD array including a plurality of SADs for search positions within the search range, an SAD being calculated based on a difference between an L0 block and an L1 block, the L0 and L1 blocks being specified based on the control point vector; and
determining the delta motion vector based on the plurality of SADs belonging to the SAD array.
14 . A non-transitory computer readable storage medium storing a bitstream generated by an image encoding method according to claim 13 .
15 . A method of transmitting data for image information, the method comprising:
generating a candidate list for predicting a first motion vector of a current block;
determining a control point vector of the current block based on the candidate list, the control point vector including at least one of a first control point vector corresponding to a top-left corner position of the current block or a second control point vector corresponding to a top-right corner position of the current block;
modifying the control point vector of the current block based on a predetermined delta motion vector;
deriving the first motion vector of the current block based on the modified control point vector;
performing inter prediction on the current block using the first motion vector of the current block;
generating a bitstream by encoding the current block based on a prediction block of the current block generated through the inter prediction; and
transmitting the data including the bitstream,
wherein modifying the control point vectors of the current block comprises:
determining a sum of absolute difference (SAD) array based on a search range for modifying the control point vector, the SAD array including a plurality of SADs for search positions within the search range, an SAD being calculated based on a difference between an L0 block and an L1 block, the L0 and L1 blocks being specified based on the control point vector; and
determining the delta motion vector based on the plurality of SADs belonging to the SAD array.