Systems and methods for explicit signaling of scaling factors for joint coding of motion vector difference
Systems and methods for receiving a coded video bitstream including a current frame, a first reference frame and a second reference frame associated with a current block in the current frame, a joint motion vector difference (JMVD) associated with the first reference frame and the second reference frame, and a flag indicating whether one or more scaling factors are used to derive a motion vector difference (MVD) from the JMVD. A first/second MVD associated with the first/second reference frame may be derived based on applying a first/second scaling factor in the one or more scaling factors to the JMVD or based on a distance between the first/second reference frame and the current frame. The current block may be decoded based on the first MVD and the second MVD.
1. A method comprising:
receiving a coded video bitstream including a current frame, a first reference frame and a second reference frame associated with a current block in the current frame, a joint motion vector difference (JMVD) associated with the first reference frame and the second reference frame, and a flag indicating whether one or more scaling factors are used to derive a motion vector difference (MVD) from the JMVD;
deriving a first MVD associated with the first reference frame based on applying a first scaling factor in the one or more scaling factors to the JMVD or based on a distance between the first reference frame and the current frame;
deriving a second MVD associated with the second reference frame based on applying a second scaling factor in the one or more scaling factors to the JMVD or based on a distance between the second reference frame and the current frame; and
decoding the current block based on the first MVD and the second MVD.
2. The method of claim 1 , wherein the signaling flag includes a pair of scaling factors for the first reference frame and the second reference frame.
3. The method of claim 1 , wherein the one or more scaling factors are restricted to values of 2 n , where n is an integer value.
4. The method of claim 1 , wherein the one or more scaling factors are restricted to values of m/M, where M=2 n and m and n are integer values.
5. The method of claim 1 , wherein the one or more scaling factors is one scaling factor and, when the signaling flag indicates that the one scaling factor is not equal to a first default value, the one scaling factor is used to derive one of the first MVD and the second MVD, and a scaling factor used to derive the other one of the first MVD and the second MVD is a second default value different than the first default value.
6. The method of claim 1 , wherein a context for signaling the one or more scaling factors is based on encoded information of the current block or one or more neighboring blocks to the current block.
7. The method of claim 6 , wherein the context is based on a block size of the current block, wherein the one or more scaling factors include a first set of scaling factors when the block size of the current block is equal to or smaller than a first threshold size, and the one or more scaling factors include a second set of scaling factors when the block size of the current block is larger than the first threshold size.
8. The method of claim 6 , wherein the block size corresponds to one or more of a block width, a block height, a number of pixels in current block, a minimum block width, a minimum block height, a maximum block width, and a maximum block height.
9. The method of claim 6 , wherein the context is based on whether a motion vector prediction (MVP) for the current block is symmetric.
10. The method of claim 6 , wherein the context is based on an index of a motion vector prediction (MVP) candidate for the current block.
11. The method of claim 1 , wherein a syntax is signaled in one of a sequence header, frame header, or slice header to indicate whether the signaling flag is included in the coded bitstream.
12. The method of claim 1 , wherein the first reference frame belongs to a list of backward reference frames and the second reference frame belongs to a list of forward reference frames, or the first reference frame belongs to a list of forward reference frames, and the second reference frame belongs to a list of backward reference frames.
13. The method of claim 1 , wherein the first MVD and/or the second MVD is derived according to
derived_mvd
=
td
1
td
0
*
scaled_factor
*
joint_mvd
,
when td1 is greater than td0, and according to
derived_mvd
=
td
0
td
1
*
scaled_factor
*
joint_mvd
,
when td0 is greater than td1,
wherein td0 corresponds to the distance between the first reference frame and the current frame, and td1 corresponds to a distance between the second reference frame and the current frame.
14. The method of claim 1 , wherein first MVD and/or the second MVD is derived according to
derived_mvd
=
td
1
td
0
*
scaled_factor
M
*
joint_mvd
,
when td1 is greater than td0, and according to
derived_mvd
=
td
0
td
1
*
scaled_factor
M
*
joint_mvd
,
when td0 is greater than td1,
wherein td0 corresponds to a distance between the current frame and the first reference frame, td1 corresponds to a distance between the current frame and the second reference frame, and M corresponds to 2 n where n is an integer.
15. An apparatus comprising:
a memory storing program code; and
at least one processor configured to execute the program code and operate as instructed by the program code, the programming code including:
receiving code configured to cause at least one of the at least one processor to receive a coded video bitstream including a current frame, a first reference frame and a second reference frame associated with a current block in the current frame, a joint motion vector difference (JMVD) associated with the first reference frame and the second reference frame, and a flag indicating whether one or more scaling factors are used to derive a motion vector difference (MVD) from the JMVD;
deriving code configured to cause at least one of the at least one processor to derive a first MVD associated with the first reference frame based on applying a first scaling factor in the one or more scaling factors to the JMVD or based on a distance between the first reference frame and the current frame;
deriving code configured to cause at least one of the at least one processor to derive a second MVD associated with the second reference frame based on applying a second scaling factor in the one or more scaling factors to the JMVD or based on a distance between the second reference frame and the current frame; and
decoding code configured to cause at least one of the at least one processor to decode the current block based on the first MVD and the second MVD.
16. The apparatus of claim 15 , wherein the one or more scaling factors is one scaling factor and, when the signaling flag indicates that the one scaling factor is not equal to a first default value, the one scaling factor is used to derive one of the first MVD and the second MVD, and a scaling factor used to derive the other one of the first MVD and the second MVD is a second default value different than the first default value.
17. The apparatus of claim 15 , wherein a context for signaling the one or more scaling factors is based on encoded information of the current block or one or more neighboring blocks to the current block.
18. A non-transitory computer readable medium that stores computer readable program code which, when executed by a processor, cause the processor to at least:
receive a coded video bitstream including a current frame, a first reference frame and a second reference frame associated with a current block in the current frame, a joint motion vector difference (JMVD) associated with the first reference frame and the second reference frame, and a flag indicating whether one or more scaling factors are used to derive a motion vector difference (MVD) from the JMVD;
derive a first MVD associated with the first reference frame based on applying a first scaling factor in the one or more scaling factors to the JMVD or based on a distance between the first reference frame and the current frame;
derive a second MVD associated with the second reference frame based on applying a second scaling factor in the one or more scaling factors to the JMVD or based on a distance between the second reference frame and the current frame; and
decode the current block based on the first MVD and the second MVD.
19. The non-transitory computer readable medium of claim 18 , wherein the one or more scaling factors is one scaling factor and, when the signaling flag indicates that the one scaling factor is not equal to a first default value, the one scaling factor is used to derive one of the first MVD and the second MVD, and a scaling factor used to derive the other one of the first MVD and the second MVD is a second default value different than the first default value.
20. The non-transitory computer readable medium of claim 18 , wherein a context for signaling the one or more scaling factors is based on encoded information of the current block or one or more neighboring blocks to the current block.