Sub-block based constraint on bi-prediction for out-of-boundary conditions
In a method of decoding performed in a decoder, a syntax element indicating a prediction mode associated with a current block in a current picture is received, the prediction mode being one of a uni-prediction mode and a bi-prediction mode. When the bi-prediction mode is applied to a first subblock of a plurality of subblocks of the current block and one of (i) a boundary of a first reference subblock is beyond a boundary of a first reference picture or (ii) a boundary of a second reference subblock is beyond a boundary of a second reference picture, the first subblock of the current block is reconstructed based on the uni-prediction mode such that the first subblock is reconstructed based on one of the first reference picture and the second reference picture.
1 . A method of decoding performed in a decoder, the method comprising:
receiving coded information of a plurality of subblocks of a current block in a current picture;
obtaining a syntax element indicating a prediction mode associated with the current block in the current picture, the prediction mode being one of a uni-prediction mode and a bi-prediction mode;
when the bi-prediction mode is applied to a first subblock of the plurality of subblocks, determining whether (i) a boundary of a first reference subblock in a first reference picture is positioned beyond a boundary of the first reference picture and (ii) a boundary of a second reference subblock in a second reference picture is positioned within a boundary of the second reference picture; and
when one of (i) the boundary of the first reference subblock is beyond the boundary of the first reference picture or (ii) the boundary of the second reference subblock is beyond the boundary of the second reference picture, reconstructing the first subblock of the current block based on the uni-prediction mode and one of the first reference picture and the second reference picture.
2 . The method of claim 1 , further comprising:
when (i) the boundary of the first reference subblock is positioned beyond the boundary of the first reference picture and (ii) the boundary of the second reference subblock is positioned within the boundary of the second reference picture, reconstructing the first subblock of the current block based on the first reference subblock in the first reference picture and the second reference subblock in the second reference picture.
3 . The method of claim 1 , wherein
one of a decoder-side motion vector refinement (DMVR) mode, a bi-directional optical flow (BDOF) mode, and a bi-prediction with coding unit-level weight (BCW) mode is excluded for the first subblock of the current block.
4 . The method of claim 1 , further comprising:
performing a decoder-side motion vector refinement (DMVR) on the first subblock to determine a first prediction subblock based on the first reference subblock in the first reference picture and a second prediction subblock based on the second reference subblock in the second reference picture; and
storing bi-prediction motion information for the first subblock that indicates the first subblock is predicted based on the first prediction subblock in the first reference picture and the second prediction subblock in the second reference picture.
5 . The method of claim 1 , wherein a size of the first subblock is equal to one of:
an affine subblock size based on an affine inter prediction mode being applied to the current block,
a subblock-based temporal motion vector prediction (SbTMVP) subblock size based on a SbTMVP mode being applied to the current block, and
a geometric partitioning mode (GPM) subblock size based on a GPM mode being applied to the current block.
6 . The method of claim 1 , further comprising:
when the first subblock is predicted by the uni-prediction mode according to a subblock-based bi-prediction constraint, storing uni-prediction motion information of the uni-prediction mode for the first subblock.
7 . The method of claim 1 , further comprising:
when at least one pixel of the first subblock is predicted by the uni-prediction mode according to a subblock-based bi-prediction constraint, storing uni-prediction motion information of the uni-prediction mode for the first subblock.
8 . The method of claim 1 , further comprising:
when (i) the first subblock is positioned in a blending area that is centered at a geometric partitioning boundary of the current block and (ii) the boundary of the first reference subblock of the first subblock in the first reference picture is beyond the boundary of the first reference picture, reconstructing the first subblock based on the second reference subblock in which the boundary of the second reference subblock is positioned within the boundary of the second reference picture.
9 . The method of claim 1 , wherein the determining comprises:
determining whether (i) the boundary of the first reference subblock in the first reference picture is positioned beyond the boundary of the first reference picture and (ii) the boundary of the second reference subblock in the second reference picture is positioned within the boundary of the second reference picture when the bi-prediction mode to be applied to the first subblock of the plurality of subblocks includes a pre-defined inter prediction mode.
10 . The method of claim 1 , wherein the determining comprises:
determining whether (i) the boundary of the first reference subblock in the first reference picture is positioned beyond the boundary of the first reference picture and (ii) the boundary of the second reference subblock in the second reference picture is positioned within the boundary of the second reference picture when the coded information includes a flag that indicates a constraint is to be applied to the bi-prediction mode.
11 . A method of video encoding performed in a video encoder, the method comprising:
determining whether a uni-prediction or a bi-prediction mode is applied to a first subblock of a plurality of subblocks of current block in a current picture, wherein the first subblock is predicted based on a first reference subblock in a first reference picture and a second reference subblock in a second reference picture;
when the bi-prediction mode is applied to the first subblock of the plurality of subblocks, determining whether (i) a boundary of the first reference subblock is positioned beyond a boundary of the first reference picture and (ii) a boundary of the second reference subblock is positioned within a boundary of the second reference picture; and
when one of (i) the boundary of the first reference subblock is beyond the boundary of the first reference picture or (ii) the boundary of the second reference subblock is beyond the boundary of the second reference picture, encoding the first subblock of the current block in a bitstream based on the uni-prediction mode and one of the first reference picture and the second reference picture.
12 . The method of claim 11 , further comprising:
when (i) the boundary of the first reference subblock is positioned beyond the boundary of the first reference picture and (ii) the boundary of the second reference subblock is positioned within the boundary of the second reference picture, encoding the first subblock of the current block based on the first reference subblock in the first reference picture and the second reference subblock in the second reference picture.
13 . The method of claim 11 , wherein
one of a decoder-side motion vector refinement (DMVR) mode, a bi-directional optical flow (BDOF) mode, and a bi-prediction with coding unit-level weight (BCW) mode is excluded for the first subblock of the current block.
14 . The method of claim 11 , further comprising:
performing a decoder-side motion vector refinement (DMVR) on the first subblock to determine a first prediction subblock based on the first reference subblock in the first reference picture and a second prediction subblock based on the second reference subblock in the second reference picture; and
storing bi-prediction motion information for the first subblock that indicates the first subblock is predicted based on the first prediction subblock in the first reference picture and the second prediction subblock in the second reference picture.
15 . The method of claim 11 , wherein a size of the first subblock is equal to one of:
an affine subblock size based on an affine inter prediction mode being applied to the current block,
a subblock-based temporal motion vector prediction (SbTMVP) subblock size based on a SbTMVP mode being applied to the current block, and
a geometric partitioning mode (GPM) subblock size based on a GPM mode being applied to the current block.
16 . The method of claim 11 , further comprising:
when the first subblock is predicted by the uni-prediction mode according to a subblock-based bi-prediction constraint, storing uni-prediction motion information of the uni-prediction mode for the first subblock.
17 . The method of claim 11 , further comprising:
when at least one pixel of the first subblock is predicted by the uni-prediction mode according to a subblock-based bi-prediction constraint, storing uni-prediction motion information of the uni-prediction mode for the first subblock.
18 . The method of claim 11 , further comprising:
when (i) the first subblock is positioned in a blending area that is centered at a geometric partitioning boundary of the current block and (ii) the boundary of the first reference subblock of the first subblock in the first reference picture is beyond the boundary of the first reference picture, encoding the first subblock based on the second reference subblock in which the boundary of the second reference subblock is positioned within the boundary of the second reference picture.
19 . The method of claim 11 , wherein the determining whether (i) the boundary of the first reference subblock in the first reference picture is positioned beyond the boundary of the first reference picture and (ii) the boundary of the second reference subblock in the second reference picture is positioned within the boundary of the second reference picture comprises:
determining whether (i) the boundary of the first reference subblock in the first reference picture is positioned beyond the boundary of the first reference picture and (ii) the boundary of the second reference subblock in the second reference picture is positioned within the boundary of the second reference picture when the bi-prediction mode to be applied to the first subblock of the plurality of subblocks includes a pre-defined inter prediction mode.
20 . A non-transitory computer-readable storage medium storing instructions which, when executed by a processor, cause the processor to perform a method of encoding a bitstream, the method comprising:
determining whether a uni-prediction or a bi-prediction mode is applied to a first subblock of a plurality of subblocks of current block in a current picture, wherein the first subblock is predicted based on a first reference subblock in a first reference picture and a second reference subblock in a second reference picture;
when the bi-prediction mode is applied to the first subblock of the plurality of subblocks, determining whether (i) a boundary of the first reference subblock is positioned beyond a boundary of the first reference picture and (ii) a boundary of the second reference subblock is positioned within a boundary of the second reference picture;
when one of (i) the boundary of the first reference subblock is beyond the boundary of the first reference picture or (ii) the boundary of the second reference subblock is beyond the boundary of the second reference picture, encoding the first subblock of the current block in the bitstream based on the uni-prediction mode and one of the first reference picture and the second reference picture; and
transmitting the bitstream.