Method and apparatus for deriving motion vector
Provided is an image decoding method performed by a decoding apparatus including deriving a temporary reference motion vector for a current block included in a current picture, deriving a reference motion vector for the current block by applying clipping to the temporary reference motion vector, deriving a motion vector for the current block based on the reference motion vector, deriving a predicted block for the current block based on the motion vector for the current block, and generating a reconstructed picture for the current picture based on the predicted block for the current block, wherein a number of bits of a binary code representing the reference motion vector is less than a number of bits of a binary code representing the temporary reference motion vector.
1. A decoding apparatus for an image decoding, the decoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
derive a temporary reference motion vector for a current block included in a current picture;
derive a reference motion vector for the current block by applying clipping to the temporary reference motion vector;
derive a motion vector for the current block based on the reference motion vector; and
derive prediction samples for the current block based on the motion vector for the current block;
wherein the reference motion vector is derived based on an equation below,
mv=Clip3(−2 17 ,2 17 −1,mv′), and
wherein the mv′ in the equation represents the temporary reference motion vector, and the my represents the reference motion vector.
2. An encoding apparatus for an image encoding, the encoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
derive a temporary reference motion vector for a current block included in a current picture;
derive a reference motion vector for the current block by applying clipping to the temporary reference motion vector;
derive a motion vector for the current block based on the reference motion vector;
derive prediction samples for the current block based on the motion vector for the current block; and
encode image information including information on the prediction samples,
wherein the reference motion vector is derived based on an equation below,
mv=Clip3(−2 17 ,2 17 −1,mv′), and
wherein the mv′ in the equation represents the temporary reference motion vector, and the my represents the reference motion vector.
3. An apparatus for transmitting data for an image, the apparatus comprising:
at least one processer configured to obtain a bitstream for the image, wherein the bitstream is generated based on deriving a temporary reference motion vector for a current block included in a current picture, deriving a reference motion vector for the current block by applying clipping to the temporary reference motion vector, deriving a motion vector for the current block based on the reference motion vector, deriving prediction samples for the current block based on the motion vector for the current block and encoding image information including information on the prediction samples; and
a transmitter configured to transmit the data comprising the bitstream,
wherein the reference motion vector is derived based on an equation below,
mv=Clip3(−2 17 ,2 17 −1,mv′), and
wherein the mv′ in the equation represents the temporary reference motion vector, and the my represents the reference motion vector.