Block based weighting factor for joint motion vector difference coding mode
Aspects of the disclosure include a method for video decoding that includes receiving coding information for a block indicating that the block is coded with a joint motion vector difference (JMVD) coding mode and a compound weighted prediction mode and includes scaling factor information of the JMVD coding mode. When the scaling factor information indicates that each scaling factor of vertical and horizontal components of a plurality of MVDs associated with respective reference frames of the block is 1, the method includes determining a weighting factor of the compound weighted prediction mode based on a weighting factor index signaled in a bitstream and a list of weighting factors. The method includes determining, using the JMVD coding mode, motion information associated with the respective reference frames based on the scaling factors and reconstructing, using the compound weighted prediction mode, the block based on the motion information and the determined weighting factor.
1 . A method of video decoding, the method comprising:
receiving a bitstream including coding information for a block in a frame, the coding information indicating that the block is coded with a joint motion vector difference (JMVD) coding mode and a compound weighted prediction mode, the coding information further including scaling factor information of the JMVD coding mode; when the scaling factor information indicates that each scaling factor of both vertical and horizontal components of a plurality of MVDs associated with respective reference frames of the block is 1, determining a weighting factor of the compound weighted prediction mode based on a weighting factor index signaled in the bitstream and a list of weighting factors, the list of weighting factors including the weighting factor;
determining, using the JMVD coding mode, motion information associated with the respective reference frames of the block based on the scaling factors of the vertical and horizontal components of the plurality of MVDs associated with the respective reference frames of the block; and
reconstructing, using the compound weighted prediction mode, the block based on the motion information associated with the respective reference frames of the block and the determined weighting factor.
2 . The method of claim 1 , further comprising:
when the scaling factor information indicates that one of the scaling factors of the vertical and horizontal components of the plurality of MVDs associated with the respective reference frames of the block is not 1, determining the weighting factor of the compound weighted prediction mode based on the weighting factor index and a subset of the list of weighting factors.
3 . The method of claim 1 , wherein
the scaling factor information indicates that each scaling factor of the vertical and horizontal components of the plurality of MVDs associated with the respective reference frames of the block is 1,
the coding information for the block indicates a joint MVD,
the reference frames of the block include a first reference frame with the weighting factor and a second reference frame with a second weighting factor,
the plurality of MVDs associated with the respective reference frames of the block includes a first MVD associated with the first reference frame and a second MVD associated with the second reference frame, and
the determining the motion information includes:
determining the first MVD based on the joint MVD, and
determining the second MVD based on the joint MVD, the scaling factors of the vertical and horizontal components of the second MVD that are 1, a first picture order count (POC) difference being between the first reference frame and the frame, and a second POC difference being between the second reference frame and the frame.
4 . The method of claim 3 , wherein
the first MVD is equal to the joint MVD, and
the second MVD is equal to the joint MVD×(the second POC difference/the first POC difference).
5 . The method of claim 3 , wherein the reconstructing comprises:
obtaining a prediction block of the block by averaging a first reference block in the first reference frame with the weighting factor and a second reference block in the second reference frame with the second weighting factor, and
reconstructing the block based on the prediction block.
6 . The method of claim 1 , wherein
the reference frames include a first reference frame with the weighting factor and a second reference frame with a second weighting factor and a sum of the weighting factor and the second weighting factor is a constant.
7 . The method of claim 6 , wherein
the constant is 16.
8 . The method of claim 7 , wherein the list of weighting factors includes five weight factors.
9 . The method of claim 1 , wherein a context for signaling the weighting factor index depends on the scaling factor information.
10 . A method of video encoding, the method comprising:
determining motion information associated with respective reference frames of a block in a frame, the block being coded with a joint motion vector difference (JMVD) coding mode and a compound weighted prediction mode;
determining scaling factor information using the JMVD coding mode, the scaling factor information indicating whether each scaling factor of both vertical and horizontal components of a plurality of motion vector differences (MVDs) associated with respective reference frames of the block is 1;
when the scaling factor information indicates that each scaling factor of the vertical and horizontal components of the plurality of MVDs associated with the respective reference frames of the block is 1, determining a weighting factor of the compound weighted prediction mode based on a list of weighting factors, the list of weighting factors including the weighting factor;
encoding, using the compound weighted prediction mode, the block based on the motion information associated with the respective reference frames of the block and the determined weighting factor; and
encoding, in a bitstream, a weighting factor index that indicates the weighting factor, the scaling factor information of the JMVD coding mode, and information indicating that the block is coded with the JMVD coding mode and the compound weighted prediction mode.
11 . The method of claim 10 , further comprising:
when the scaling factor information indicates that one of the scaling factors of the vertical and horizontal components of the plurality of MVDs associated with respective reference frames of the block is not 1, determining the weighting factor of the compound weighted prediction mode based on a subset of the list of weighting factors.
12 . The method of claim 10 , wherein
the scaling factor information indicates that each scaling factor of the vertical and horizontal components of the plurality of MVDs associated with the respective reference frames of the block is 1,
the reference frames of the block include a first reference frame with the weighting factor and a second reference frame with a second weighting factor,
the plurality of MVDs associated with the respective reference frames of the block includes a first MVD associated with the first reference frame and a second MVD associated with the second reference frame,
the motion information includes the first MVD and the second MVD, and
the information for the block indicates a joint MVD that is based on the first MVD, and each of the scaling factors of both the vertical and horizontal components of the second MVD are 1.
13 . The method of claim 12 , wherein
the first MVD is equal to the joint MVD, and
the second MVD is equal to the joint MVD×(a second picture order count (POC) difference/a first POC difference), the first POC difference being between the first reference frame and the frame, and the second POC difference being between the second reference frame and the frame.
14 . The method of claim 12 , wherein the encoding comprises:
obtaining a prediction block of the block by averaging a first reference block in the first reference frame with the weighting factor and a second reference block in the second reference frame with the second weighting factor, and
encoding the block based on the prediction block.
15 . The method of claim 10 , wherein
the reference frames include a first reference frame with the weighting factor and a second reference frame with a second weighting factor and a sum of the weighting factor and the second weighting factor is a constant.
16 . The method of claim 15 , wherein
the constant is 16.
17 . The method of claim 16 , wherein the list of weighting factors includes five weight factors.
18 . The method of claim 10 , wherein a context for encoding the weighting factor index depends on the scaling factor information.
19 . A method of processing visual media data, the method comprising:
processing a bitstream of the visual media data according to a format rule, wherein
the bitstream includes coding information for a block in a frame, the coding information indicating that the block is coded with a joint motion vector difference (JMVD) coding mode and a compound weighted prediction mode, the coding information further including scaling factor information of the JMVD coding mode; and
the format rule specifies that:
when the scaling factor information indicates that each scaling factor of both vertical and horizontal components of a plurality of MVDs associated with respective reference frames of the block is 1, a weighting factor of the compound weighted prediction mode is determined based on a weighting factor index signaled in the bitstream and a list of weighting factors, the list of weighting factors including the weighting factor;
motion information associated with the respective reference frames of the block is determined using the JMVD coding mode and based on the scaling factors of the vertical and horizontal components of the plurality of MVDs associated with the respective reference frames of the block; and
the block is reconstructed using the compound weighted prediction mode and based on the motion information associated with the respective reference frames of the block and the determined weighting factor.
20 . The method of claim 19 , wherein
the scaling factor information indicates that each scaling factor of the vertical and horizontal components of the plurality of MVDs associated with the respective reference frames of the block is 1,
the coding information for the block indicates a joint MVD,
the reference frames of the block include a first reference frame with the weighting factor and a second reference frame with a second weighting factor,
the plurality of MVDs associated with the respective reference frames of the block includes a first MVD associated with the first reference frame and a second MVD associated with the second reference frame, and
the format rule specifies that:
the first MVD is determined based on the joint MVD, and
the second MVD is determined based on the joint MVD, the scaling factors of the vertical and horizontal components of the second MVD that are 1, a first picture order count (POC) difference being between the first reference frame and the frame, and a second POC difference being between the second reference frame and the frame.