Method and apparatus for affine inter prediction with small subblocks
Aspects of the disclosure provide methods and apparatuses for video encoding/decoding. In some examples, an apparatus for video decoding includes processing circuitry. The processing circuitry is configured to decode prediction information of a block in a current picture from a coded video bitstream. The prediction information indicates an affine model in an inter prediction mode. The processing circuitry is configured to determine motion vectors of control points of the block according to the affine model. The processing circuitry is configured to determine a motion vector of a sub-block of the block from the determined motion vectors of the control points, one of a width and a height of the sub-block being less than 4. Further, the processing circuitry is configured to reconstruct at least a sample of the sub-block according to the determined motion vector.
1. A method for video decoding in a decoder, comprising:
decoding prediction information of a block in a current picture from a coded video bitstream, the prediction information indicating an affine model in an inter prediction mode;
determining control point motion vectors of control points of the block according to the affine model;
determining respective sub-block motion vectors of sub-blocks of the block based on the determined control point motion vectors of the control points and respective positions of the sub-blocks within the block, a size of the sub-blocks being based on whether a small sub-block affine mode is used, the small sub-block affine mode indicating that one of a width and a height of each of the sub-blocks is less than 4;
reconstructing the sub-blocks according to the respective sub-block motion vectors; and
in response to the small sub-block affine mode being used,
determining a reference motion vector of a partition in the block, the partition being less than an entirety of the block and including two or more of the sub-blocks, and
storing the determined reference motion vector of the partition in a memory, the reference motion vector being stored in the memory to represent motion information of an entirety of the partition and to be used for subsequent decoding of another block in the current picture.
2. The method according to claim 1 , wherein
the partition is a 4×4 block in the block, and
the determining the reference motion vector of the partition comprises determining the reference motion vector of the block partition in the block from the determined control point motion vectors of the control points of the block.
3. The method according to claim 1 , wherein the determining the reference motion vector of the partition comprises:
determining the reference motion vector of the partition according to the determined control point motion vectors of the control points of the block and a position of the partition; or
setting a sub-block motion vector of one of the two or more of the sub-blocks in the partition that is at a predetermined region of the partition as the reference motion vector of the partition representing the motion information of the entirety of the partition.
4. The method according to claim 1 , wherein
the partition is a 4×4 block in the block, and
the determining the reference motion vector of the partition comprises setting a sub-block motion vector of one of the two or more of the sub-blocks in the partition that is at a top-left region of the partition as the reference motion vector of the partition representing the motion information of the entirety of the partition.
5. The method according to claim 1 , wherein
the partition is a 4×4 block in the block, and
the determining the reference motion vector of the partition comprises setting a sub-block motion vector of one of the two or more of the sub-blocks in the partition that is at a bottom-right region of the partition as the reference motion vector of the partition representing the motion information of the entirety of the partition.
6. The method according to claim 1 , wherein
the partition is a 4×4 block in the block, and
the determining the reference motion vector of the partition comprises setting a sub-block motion vector of one of the two or more of the sub-blocks in the partition that includes a center sample of the partition as the reference motion vector of the partition representing the motion information of the entirety of the partition.
7. The method according to claim 1 , wherein
when the sub-block is a chroma block, the chroma block has a fixed size regardless of a size of a corresponding luma block.
8. The method according to claim 1 , wherein
the inter prediction mode is uni-prediction.
9. The method according to claim 1 , further comprising:
determining the small sub-block affine mode is used when the inter prediction mode is uni-prediction and a memory bandwidth of motion compensation for an 8×8 block including the sub-block is less than or equal to a threshold.
10. The method according to claim 1 , further comprising:
receiving an indicator indicating whether the small sub-block affine mode is used for the current picture or a tile group in the current picture; and
determining whether the small sub-block affine mode is used according to the received indicator.
11. An apparatus, comprising:
processing circuitry configured to:
decode prediction information of a block in a current picture from a coded video bitstream, the prediction information indicating an affine model in an inter prediction mode;
determine control point motion vectors of control points of the block according to the affine model;
determine respective sub-block motion vectors of sub-blocks of the block based on the determined control point motion vectors of the control points and respective positions of the sub-blocks within the block, a size of the sub-block being based on whether a small sub-block affine mode is used, the small sub-block affine mode indicating that one of a width and a height of each of the sub-blocks is less than 4;
reconstruct the sub-blocks according to the respective sub-block motion vectors; and
in response to the small sub-block affine mode being used,
determine a reference motion vector of a partition in the block, the partition being less than an entirety of the block and including two or more of the sub-blocks, and
store the determined reference motion vector of the partition in a memory, the reference motion vector being stored in the memory to represent motion information of an entirety of the partition and to be used for subsequent decoding of another block in the current picture.
12. The apparatus according to claim 11 , wherein
the partition is a 4×4 block in the block, and
the processing circuitry is further configured to determine the reference motion vector of the partition in the block from the determined control point motion vectors of the control points of the block.
13. The apparatus according to claim 11 , wherein
the partition is a 4×4 block in the block, and
the processing circuitry is further configured to set a sub-block motion vector of one of the two or more of the sub-blocks in the partition that is at a top-left region of the partition as the reference motion vector of the partition representing the motion information of the entirety of the partition.
14. The apparatus according to claim 11 , wherein
the partition is a 4×4 block in the block, and
the processing circuitry is further configured to set a sub-block motion vector of one of the two or more of the sub-blocks in the partition that is at a bottom-right region of the partition as the reference motion vector of the partition representing the motion information of the entirety of the partition.
15. The apparatus according to claim 11 , wherein
the partition is a 4×4 block in the block, and
the processing circuitry is further configured to set a sub-block motion vector of one of the two or more of the sub-blocks in the partition that includes a center sample of the partition as the reference motion vector of the partition representing the motion information of the entirety of the partition.
16. The apparatus according to claim 11 , wherein when the sub-block is a chroma block, the chroma block has a fixed size regardless of a size of a corresponding luma block.
17. The apparatus according to claim 11 , wherein the processing circuitry is further configured to
determine the small sub-block affine mode is used when the inter prediction mode is uni-prediction and a memory bandwidth of motion compensation for an 8×8 block including the sub-block is less than or equal to a threshold.
18. The apparatus according to claim 11 , wherein the processing circuitry is further configured to
receive an indicator indicating whether a small sub-block affine mode is used for the current picture or a tile group in the current picture, and
determine whether the small sub-block affine mode is used according to the received indicator.
19. A non-transitory computer-readable medium storing instructions which when executed by a computer for video decoding cause the computer to perform:
decoding prediction information of a block in a current picture from a coded video bitstream, the prediction information indicating an affine model in an inter prediction mode;
determining control point motion vectors of control points of the block according to the affine model;
determining respective sub-block motion vectors of sub-blocks of the block based on the determined control point motion vectors of the control points and respective positions of the sub-blocks within the block, a size of the sub-blocks being based on whether a small sub-block affine mode is used, the small sub-block affine mode indicating that one of a width and a height of each of the sub-blocks is less than 4;
reconstructing the sub-blocks according to the respective sub-block motion vectors; and
in response to the small sub-block affine mode being used,
determining a reference motion vector of a partition in the block, the partition being less than an entirety of the block and including two or more of the sub-blocks, and
storing the determined reference motion vector of the partition in a memory, the reference motion vector being stored in the memory to represent motion information of an entirety of the partition and to be used for subsequent decoding of another block in the current picture.
20. The non-transitory computer-readable medium according to claim 19 , wherein
the partition is a 4×4 block in the block, and
the determining the reference motion vector of the partition comprises determining the reference motion vector of the partition in the block from the determined control point motion vectors of the control points of the block.
21. The non-transitory computer-readable medium according to claim 19 , wherein
the partition is a 4×4 block in the block,
the determining the reference motion vector of the partition comprises setting a sub-block motion vector of one of the two or more of the sub-blocks in the partition that is at predetermined region of the partition as the reference motion vector of the partition representing the motion information of the entirety of the partition, and
the predetermined region of the partition is a top-left region of the partition, a bottom-right region of the partition, or a center region of the partition including a center sample of the block partition.