Image encoding/decoding method and apparatus, and recording medium storing bitstream
The present specification discloses a method of decoding an image. The method includes obtaining a motion vector of a collocated block included in a reference picture of a current block in a temporal motion buffer; changing a format of the obtained motion vector; and deriving the motion vector, in which the format is changed, into a temporal motion vector of the current block.
1. A method of decoding an image, the method comprising:
constructing a motion vector candidate list of a current block, the motion vector candidate list comprising a spatial motion vector candidate and a temporal motion vector candidate; and
obtaining a motion vector of the current block based on a motion vector candidate selected from the motion vector candidate list,
wherein the spatial motion vector candidate is derived from a motion vector of a spatial neighboring block of the current block,
wherein the temporal motion vector candidate is derived from a modified motion vector of a collocated block of the current block,
wherein the modified motion vector of the collocated block is obtained by changing a representation format of a motion vector of the collocated block obtained from a temporal motion buffer, and
wherein changing of the representation format is performed for deriving the temporal motion vector candidate but is not applied for deriving the spatial motion vector candidate.
2. The method of claim 1 , wherein a bit-length of the modified motion vector is greater than the motion vector of the collocated block obtained from the temporal motion buffer.
3. The method of claim 1 , wherein the motion vector of a floating point format is changed to the modified motion vector of a fixed bit-length by changing the representation format.
4. The method of claim 3 , further comprising:
scaling the modified motion vector of the collocated block; and
clipping the scaled modified motion vector within a dynamic range of the fixed bit-length.
5. The method of claim 3 , wherein the motion vector of the floating point format is consisted of 6 bits signed mantissa and 4 bits exponent and the fixed bit-length is 18 bits.
6. A method of encoding an image, the method comprising:
constructing a motion vector candidate list of a current block, the motion vector candidate list comprising a spatial motion vector candidate and a temporal motion vector candidate; and
obtaining a motion vector of the current block based on a motion vector candidate selected from the motion vector candidate list,
wherein the spatial motion vector candidate is derived from a motion vector of a spatial neighboring block of the current block,
wherein the temporal motion vector candidate is derived from a modified motion vector of a collocated block of the current block,
wherein the modified motion vector of the collocated block is obtained by changing a representation format of a motion vector of the collocated block obtained from a temporal motion buffer, and
wherein changing of the representation format is performed for deriving the temporal motion vector candidate but is not applied for deriving the spatial motion vector candidate.
7. The method of claim 6 , wherein a bit-length of the modified motion vector is greater than the motion vector of the collocated block obtained from the temporal motion buffer.
8. The method of claim 6 , wherein the motion vector of a floating point format is changed to the modified motion vector of a fixed bit-length by changing the representation format.
9. The method of claim 6 , further comprising:
scaling the modified motion vector of the collocated block; and
clipping the scaled modified motion vector within a dynamic range of the fixed bit-length.
10. The method of claim 9 , wherein the motion vector of the floating point format is consisted of 6 bits signed mantissa and 4 bits exponent and the fixed bit-length is 18 bits.
11. A computer-readable non-transitory recording medium including a bitstream encoded by an encoding method comprising:
constructing a motion vector candidate list of a current block, the motion vector candidate list comprising a spatial motion vector candidate and a temporal motion vector candidate; and
obtaining a motion vector of the current block based on a motion vector candidate selected from the motion vector candidate list,
wherein the spatial motion vector candidate is derived from a motion vector of a spatial neighboring block of the current block,
wherein the temporal motion vector candidate is derived from a modified motion vector of a collocated block of the current block,
wherein the modified motion vector of the collocated block is obtained by changing a representation format of a motion vector of the collocated block obtained from a temporal motion buffer, and
wherein changing of the representation format is performed for deriving the temporal motion vector candidate but is not applied for deriving the spatial motion vector candidate.