Methods and apparatus of video coding for deriving affine motion vectors for chroma components
View Patent ↗A method for video coding is provided. The method may include: arranging video data in a plurality of luma subblocks and a plurality of chroma subblocks, where each chroma subblock corresponds to one or more luma subblocks; and deriving an affine motion vector for a chroma subblock out of the chroma subblocks using motion vectors of the corresponding luma subblocks. The video data has a color sub-sampling format, and the corresponding luma subblocks are derived according to the color sub-sampling format.
1. A method for video decoding, comprising:
arranging video data in a plurality of luma subblocks and a plurality of chroma subblocks, wherein each chroma subblock corresponds to one or more luma subblocks, wherein the video data has a color sampling format, and the plurality of luma subblocks are derived according to the color sampling format;
determining the color sampling format of the video data;
deriving an affine motion vector in an affine Motion Vector Field (MVF) for a chroma subblock out of the plurality of chroma subblocks using an average luma motion vector derived from motion vectors of the corresponding luma subblocks, wherein the motion vectors from different corresponding luma subblocks are used for deriving the average luma motion vector according to different variables corresponding to different color sampling formats, wherein the motion vectors of the corresponding luma subblocks are derived by deriving affine motion vectors for the corresponding luma subblocks based on a control point based affine motion model and invoking a rounding process with the affine motion vectors of the corresponding luma subblocks, rightShift set equal to 7, and leftShift set equal to 0 as inputs, and
wherein the variables comprise a first variable and a second variable according to the color sampling formats, the first variable is SubWidthC indicating width of chroma subblocks and the second variable is SubHeightC indicating height of chroma subblocks,
in response to determining that both of the first variable and the second variable are equal to 1, the average luma motion vector is the motion vector of one corresponding luma subblock without the averaging process, wherein the one corresponding luma subblock is determined as a luma subblock of which the position is the same as that of the chroma subblock, and
in response to determining that the first variable is equal to 2 and the second variable is equal to 1, the average luma motion vector is derived by taking an average of the motion vectors of two corresponding luma subblocks, wherein the two corresponding luma subblocks are luma subblocks of which the horizontal positions are different from that of the chroma subblock and the vertical positions are the same as that of the chroma subblock.
2. The method of claim 1 , further comprising:
left shifting the motion vectors of control points of the corresponding luma subblocks; and
deriving the motion vectors of the corresponding luma subblocks by the left shifted motion vectors.
3. An apparatus for video decoding, comprising:
a processor; and
a memory configured to store instructions executable by the processor;
wherein the processor, upon execution of the instructions, is configured to:
arrange video data in a plurality of luma subblocks and a plurality of chroma subblocks, wherein each chroma subblock corresponds to one or more luma subblocks, wherein the video data has a color sampling format, and the plurality of luma subblocks are derived according to the color sampling format;
determine the color sampling format of the video data;
derive an affine motion vector in an affine Motion Vector Field (MVF) for a chroma subblock out of the plurality of chroma subblocks using an average luma motion vector derived from motion vectors of the corresponding luma subblocks, wherein the motion vectors from different corresponding luma subblocks are used for deriving the average luma motion vector according to different variables corresponding to different color sampling formats, wherein the motion vectors of the corresponding luma subblocks are derived by deriving affine motion vectors for the corresponding luma subblocks based on a control point based affine motion model and invoking a rounding process with the affine motion vectors of the corresponding luma subblocks, rightShift set equal to 7, and leftShift set equal to 0 as inputs, and
wherein the variables comprise a first variable and a second variable according to the color sampling formats, the first variable is SubWidthC indicating width of chroma subblocks and the second variable is SubHeightC indicating height of chroma subblocks,
in response to determining that both of the first variable and the second variable are equal to 1, the average luma motion vector is the motion vector of one corresponding luma subblock without the averaging process, wherein the one corresponding luma subblock is determined as a luma subblock of which the position is the same as that of the chroma subblock, and
in response to determining that the first variable is equal to 2 and the second variable is equal to 1, the average luma motion vector is derived by taking an average of the motion vectors of two corresponding luma subblocks, wherein the two corresponding luma subblocks are luma subblocks of which the horizontal positions are different from that of the chroma subblock and the vertical positions are the same as that of the chroma subblock.
4. The apparatus of claim 3 , wherein the processor is further configured to: left shift the motion vectors of control points of the corresponding luma subblocks and derive the motion vectors of the corresponding luma subblocks by the left shifted motion vectors.
5. A non-transitory computer readable storage medium, comprising instructions stored therein, wherein, when the instructions are executed by a processor, the instructions cause the processor to perform a method for video decoding and to store the decoded bitstream in the non-transitory computer-readable storage medium, the method for video decoding comprises:
arranging video data in a plurality of luma subblocks and a plurality of chroma subblocks, wherein each chroma subblock corresponds to one or more luma subblocks, wherein the video data has a color sampling format, and the plurality of luma subblocks are derived according to the color sampling format;
determining the color sampling format of the video data;
deriving an affine motion vector in an affine Motion Vector Field (MVF) for a chroma subblock out of the plurality of chroma subblocks using an average luma motion vector derived from motion vectors of the corresponding luma subblocks, wherein the motion vectors from different corresponding luma subblocks are used for deriving the average luma motion vector according to different variables corresponding to different color sampling formats, wherein the motion vectors of the corresponding luma subblocks are derived by deriving affine motion vectors for the corresponding luma subblocks based on a control point based affine motion model and invoking a rounding process with the affine motion vectors of the corresponding luma subblocks, rightShift set equal to 7, and leftShift set equal to 0 as inputs, and
wherein the variables comprise a first variable and a second variable according to the color sampling formats, the first variable is SubWidthC indicating width of chroma subblocks and the second variable is SubHeightC indicating height of chroma subblocks,
in response to determining that both of the first variable and the second variable are equal to 1, the average luma motion vector is the motion vector of one corresponding luma subblock without the averaging process, wherein the one corresponding luma subblock is determined as a luma subblock of which the position is the same as that of the chroma subblock, and
in response to determining that the first variable is equal to 2 and the second variable is equal to 1, the average luma motion vector is derived by taking an average of the motion vectors of two corresponding luma subblocks, wherein the two corresponding luma subblocks are luma subblocks of which the horizontal positions are different from that of the chroma subblock and the vertical positions are the same as that of the chroma subblock.
6. The non-transitory computer readable storage medium of claim 5 , wherein the method for video decoding further comprises: left shifting the motion vectors of control points of the corresponding luma subblocks and deriving the motion vectors of the corresponding luma subblocks by the left shifted motion vectors.