Image encoding/decoding method and device for performing prof, and method for transmitting bitstream
Abstract
An image encoding/decoding method and apparatus are provided. An image decoding method according to the present disclosure is performed by an image decoding apparatus. The image decoding method may comprise deriving a prediction sample of a current block based on motion information of the current block, determining whether prediction refinement with optical flow (PROF) applies to the current block, deriving, based on that the PROF applies to the current block, a difference motion vector for each sample position in the current block, deriving a gradient for each sample position in the current block, deriving a PROF offset based on the difference motion vector and the gradient, and deriving a refined prediction sample for the current block based on the PROF offset.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1. An image decoding method performed by an image decoding apparatus, the image decoding method comprising:
deriving a prediction sample of a current block based on motion information of the current block;
determining whether prediction refinement with optical flow (PROF) applies to the current block;
deriving, based on that the PROF applies to the current block, a difference motion vector for each sample position in the current block;
deriving a gradient for each sample position in the current block;
deriving a PROF offset based on the difference motion vector and the gradient; and
deriving a refined prediction sample for the current block based on the PROF offset,
wherein the deriving the gradient comprises right-shifting a neighboring prediction sample value at each sample position in the current block by a first shift, and
wherein a value of the first shift is fixed as 6.
2. The image decoding method of claim 1 ,
wherein the deriving the difference motion vector comprises clipping the rounded difference motion vector in a predetermined range, and
wherein the predetermined range is set based on a fixed value dmvLimit derived regardless of a bit depth of the current block.
3. The image decoding method of claim 2 ,
wherein the predetermined range is specified by a minimum value and a maximum value derived based on dmvLimit, and
wherein an absolute value of the minimum value and an absolute value of the maximum value are set to the same value.
4. The image decoding method of claim 3 ,
wherein the minimum value is (−dmvLimit+1) and the maximum value is (dmvLimit−1).
5. The image decoding method of claim 2 ,
wherein dmvLimit is (1<<5).
6. The image decoding method of claim 1 ,
wherein a PROF offset derived in the deriving the PROF offset is clipped in a predetermined range.
7. The image decoding method of claim 6 ,
wherein the predetermined range in which the PROF offset is clipped is set based on a value dILimit derived based on a bit depth of the current block.
8. The image decoding method of claim 7 ,
wherein the predetermined range in which the PROF offset is clipped is [−dILimit, dILimit−1].
9. The image decoding method of claim 7 ,
wherein dILimit is (1<<max(13, Bitdepth+1)).
10. An image encoding method performed by an image encoding apparatus, the image encoding method comprising:
deriving a prediction sample of a current block based on motion information of the current block;
determining whether prediction refinement with optical flow (PROF) applies to the current block;
deriving, based on that the PROF applies to the current block, a difference motion vector for each sample position in the current block;
deriving a gradient for each sample position in the current block;
deriving a PROF offset based on the difference motion vector and the gradient; and
deriving a refined prediction sample for the current block based on the PROF offset,
wherein the deriving the gradient comprises right-shifting a neighboring prediction sample value at each sample position in the current block by a first shift, and
wherein a value of the first shift is fixed as 6.
11. A method of transmitting a bitstream generated by an image encoding method, the image encoding method comprising:
deriving a prediction sample of a current block based on motion information of the current block;
determining whether prediction refinement with optical flow (PROF) applies to the current block;
deriving, based on that the PROF applies to the current block, a difference motion vector for each sample position in the current block;
deriving a gradient for each sample position in the current block;
deriving a PROF offset based on the difference motion vector and the gradient; and
deriving a refined prediction sample for the current block based on the PROF offset,
wherein the deriving the gradient comprises right-shifting a neighboring prediction sample value at each sample position in the current block by a first shift, and
wherein a value of the first shift is fixed as 6.
12. A non-transitory computer-readable medium storing a bitstream generated by the image encoding method of claim 10 .Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.