On boundary padding motion vector clipping in image/video coding
A method for coding video data implemented by a video coding apparatus. The method includes clipping a motion vector of a padding sample to be within a motion vector range, wherein the motion vector range is based on a maximum padding dimension of an extended area around a video unit of a video; and converting between the video unit of the video and a bitstream in accordance with the motion vector as constrained.
1 . A method of processing video data, comprising:
generating, during a conversion between a first block of a video and a bitstream of the video, a motion vector that points to a first picture, wherein an extended area of the first picture is filled with padding samples;
clipping the motion vector of the first block to be within a motion vector range based on a maximum allowed padding dimension of the extended area of the first picture; and
performing the conversion based on the clipped motion vector,
wherein a prediction block of the first block is derived from the first picture; and
wherein the extended area is filled on a block by block basis, and is avoided to be filled on a sample by sample basis.
2 . The method of claim 1 , wherein the motion vector is clipped when the motion vector of the first block points to a block which locates outside the first picture.
3 . The method of claim 1 , wherein the extended area is filled with predicted samples generated by an inter prediction mode, an intra prediction mode, or an intra block copy (IBC) mode.
4 . The method of claim 3 , wherein the extended area of the first picture defines extended boundaries for the first picture, and the motion vector as clipped points to a second block which locates within the extended boundaries of the first picture.
5 . The method of claim 4 , wherein the first picture and the extended area collectively form a boundary-extended picture, and wherein a size of the boundary-extended picture is dependent upon a size of the first picture, a vertical padding dimension and a horizontal padding dimension of the extended area.
6 . The method of claim 4 , wherein all motion vectors used for a motion compensation are within the extended boundaries of the first picture.
7 . The method of claim 5 , wherein motion vectors used to derive the padded samples during a motion compensated picture boundary padding process are clipped based on the size of the boundary-extended picture.
8 . The method of claim 7 , wherein the motion vectors are clipped so that corresponding predicted blocks locate within the extended boundaries of the first picture.
9 . The method of claim 7 , wherein the motion vectors are clipped so that no sample exceeding the extended boundaries of the first picture is fetched for the motion compensation of the predicted block.
10 . The method of claim 1 , wherein each block used for the block by block basis has a size of M×N, and wherein M and N represent two or more luma samples, where M and N are positive integers.
11 . The method of claim 10 , wherein N=2 or M=2 or N=4 or M=4 in luma samples.
12 . The method of claim 10 , wherein each block used for the block by block basis has a minimum motion-compensated padding unit size of M×N, where M and N are positive integers.
13 . The method of claim 1 , wherein the conversion includes encoding the video into the bitstream.
14 . The method of claim 1 , wherein the conversion includes decoding the video from the bitstream.
15 . An apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to:
generate, during a conversion between a first block of a video and a bitstream of the video, a motion vector that points to a first picture, wherein an extended area of the first picture is filled with padding samples;
clip the motion vector of the first block to be within a motion vector range based on a maximum allowed padding dimension of the extended area of the first picture; and
perform the conversion based on the clipped motion vector,
wherein a prediction block of the first block is derived from the first picture; and
wherein the extended area is filled on a block by block basis, and is avoided to be filled on a sample by sample basis.
16 . The apparatus of claim 15 , wherein the extended area is filled with predicted samples generated by an inter prediction mode, an intra prediction mode, or an intra block copy (IBC) mode.
17 . The apparatus of claim 16 , wherein the extended area of the first picture defines extended boundaries for the first picture, and the motion vector as clipped points to a second block which locates within the extended boundaries of the first picture.
18 . The apparatus of claim 17 , wherein the first picture and the extended area collectively form a boundary-extended picture, and wherein a size of the boundary-extended picture is dependent upon a size of the first picture, a vertical padding dimension and a horizontal padding dimension of the extended area.
19 . A non-transitory computer-readable storage medium storing instructions that cause a processor to:
generate, during a conversion between a first block of a video and a bitstream of the video, a motion vector that points to a first picture, wherein an extended area of the first picture is filled with padding samples;
clip the motion vector of the first block to be within a motion vector range based on a maximum allowed padding dimension of the extended area of the first picture; and
perform the conversion based on the clipped motion vector,
wherein a prediction block of the first block is derived from the first picture; and
wherein the extended area is filled on a block by block basis, and is avoided to be filled on a sample by sample basis.
20 . A method of storing a bitstream of a video, comprising:
generating, for a first block of a video, a motion vector that points to a first picture, wherein an extended area of the first picture is filled with padding samples;
clipping the motion vector of the first block to be within a motion vector range, wherein the motion vector range is based on a maximum allowed padding dimension of the extended area of the first picture;
generating the bitstream based on the clipped motion vector, and
storing the bitstream in a non-transitory computer-readable recording medium,
wherein a prediction block of the first block is derived from the first picture; and
wherein the extended area is filled on a block by block basis, and is avoided to be filled on a sample by sample basis.