Symmetric motion vector difference coding
Bi-directional optical flow (BDOF) may be bypassed, for a current coding block, based on whether symmetric motion vector difference (SMVD) is used in motion vector coding for the current coding block. A coding device (e.g., an encoder or a decoder) may determine whether to bypass BDOF for the current coding block based at least in part on an SMVD indication for the current coding block. The coding device may obtain the SMVD indication that indicates whether SMVD is used in motion vector coding for the current coding block. If SMVD indication indicates that SMVD is used in the motion vector coding for the current coding block, the coding device may bypass BDOF for the current coding block. The coding device may reconstruct the current coding block without performing BDOF if it determines to bypass BDOF for the current coding block.
1 . A device for video encoding, comprising:
a processor configured to:
obtain, for a video block, a first motion vector difference (MVD) associated with a reference picture of the video block;
determine, based on a symmetric motion vector difference (SMVD) indication indicating SMVD is used for the video block, a second MVD based on the first MVD associated with the reference picture, wherein the second MVD is symmetric to the first MVD;
obtain a first prediction block of the video block based on the first MVD and a second prediction block of the video block based on the second MVD;
determine a first weight and a second weight of bi-prediction with CU weights (BCW) for the video block;
apply the first weight of BCW to the first prediction block and the second weight of BCW to the second prediction block to obtain a third prediction block; and
encode the video block based on the third prediction block.
2 . The device of claim 1 , wherein the processor is further configured to:
determine a first motion vector predictor (MVP) associated with the video block and a second MVP associated with the video block;
determine a first motion vector (MV) of the video block based on the first MVD and the first MVP associated with the video block, wherein the first prediction block is determined based on the first MV of the video block; and
determine a second MV of the video block based on the second MVD and the second MVP associated with the video block, wherein the second prediction block is determined based on the second MV of the video block.
3 . The device of claim 1 , wherein the reference picture is associated with a first reference picture list of the video block, and the processor is further configured to determine the reference picture of the first reference picture list of the video block based on a picture order count (POC) of the reference picture and a POC of a current picture comprising the video block.
4 . The device of claim 1 , wherein the processor is further configured to:
determine the second weight based on the first weight; and
encode a weight index, wherein the weight index indicates the first weight.
5 . The device of claim 1 , wherein the processor is further configured to:
determine an initial motion vector (MV) using an initial MV candidate list, wherein the initial MV candidate list comprises an MV obtained using a uni-prediction search, an MV obtained using a bi-prediction search, and a plurality of MVs from an advanced motion vector prediction (AMVP) list;
perform an MVD search using the initial MV; and
determine, based on the MVD search, that the first MVD and the second MVD are to be used to encode the video block.
6 . The device of claim 5 , wherein the processor is further configured to:
perform the bi-prediction search;
determine that a rate distortion (RD) cost associated with the bi-prediction search is higher than an RD threshold; and
terminate the bi-prediction search based on the determination that the RD cost associated with the bi-prediction search is higher than the RD threshold.
7 . The device of claim 1 , wherein the processor is further configured to signal both a symmetric MVD flag and a weight index for explicit bi-prediction mode.
8 . A device for video decoding, comprising:
a processor configured to:
obtain, for a video block, a first motion vector difference (MVD) associated with a reference picture of the video block;
determine, based on a symmetric motion vector difference (SMVD) indication indicating SMVD is used for the video block, a second MVD based on the first MVD associated with the reference picture, wherein the second MVD is symmetric to the first MVD;
obtain a first prediction block of the video block based on the first MVD and a second prediction block of the video block based on the second MVD;
obtain a weight index of bi-prediction with CU weights (BCW) for the video block, wherein the weight index of BCW indicates a first weight and a second weight;
apply the first weight to the first prediction block and the second weight to the second prediction block to obtain a third prediction block; and
reconstruct the video block based on the third prediction block.
9 . The device of claim 8 , wherein the processor is further configured to:
determine a first motion vector predictor (MVP) and a second MVP associated with the video block;
determine a first motion vector (MV) of the video block based on the first MVD and the first MVP associated with the video block, wherein the first prediction block is determined based on the first MV of the video block; and
determine a second MV of the video block based on the second MVD and the second MVP associated with the video block, wherein the second prediction block is determined based on the second MV of the video block.
10 . The device of claim 8 , wherein the processor is further configured to:
determine, based on the weight index, the first weight of for the video block; and
determine the second weight based on the first weight.
11 . The device of claim 8 , wherein the reference picture is associated with a first reference picture list of the video block, and the processor is further configured to determine, based on the SMVD indicator indicating SMVD is enabled for the video block, the reference picture of the first reference picture list of the video block based on a picture order count (POC) of the reference picture and a POC of a current picture comprising the video block.
12 . The device of claim 8 , wherein the processor is further configured to obtain both a symmetric MVD flag and a weight index for explicit bi-prediction mode.
13 . A method for video encoding, comprising:
obtaining, for a video block, a first motion vector difference (MVD) associated with a reference picture of the video block;
determining, based on a symmetric motion vector difference (SMVD) indication indicating SMVD is used for the video block, a second MVD based on the first MVD associated with the reference picture, wherein the second MVD is symmetric to the first MVD;
obtaining a first prediction block of the video block based on the first MVD and a second prediction block of the video block based on the second MVD;
determining a first weight and a second weight of bi-prediction with CU weights (BCW) for the video block;
applying the first weight of BCW to the first prediction block and the second weight of BCW to the second prediction block to obtain a third prediction block; and
encoding the video block based on the third prediction block.
14 . The method of claim 13 , comprising:
determining a first motion vector predictor (MVP) associated with the video block and a second MVP associated with the video block;
determining a first motion vector (MV) of the video block based on the first MVD and the first MVP associated with the video block, wherein the first prediction block is determined based on the first MV of the video block; and
determining a second MV of the video block based on the second MVD and the second MVP associated with the video block, wherein the second prediction block is determined based on the second MV of the video block.
15 . The method of claim 13 , further comprising:
determining the second weight based on the first weight; and
encoding a weight index, wherein the weight index indicates the first weight.
16 . The method of claim 13 , further comprising signaling both a symmetric MVD flag and a weight index for explicit bi-prediction mode.
17 . A method for video decoding, comprising:
obtaining, for a video block, a first motion vector difference (MVD) associated with a reference picture of the video block;
determining, based on a symmetric motion vector difference (SMVD) indication indicating SMVD is used for the video block, a second MVD based on the first MVD associated with the reference picture, wherein the second MVD is symmetric to the first MVD;
obtaining a first prediction block of the video block based on the first MVD and a second prediction block of the video block based on the second MVD;
obtaining a weight index of bi-prediction with CU weights (BCW) for the video block, wherein the weight index of BCW indicates a first weight and a second weight;
applying the first weight to the first prediction block and the second weight to the second prediction block to obtain a third prediction block; and
reconstructing the video block based on the third prediction block.
18 . The method of claim 17 , further comprising:
determining, based on the weight index, the first weight for the video block; and
determining the second weight based on the first weight.
19 . The method of claim 17 , further comprising obtaining both a symmetric MVD flag and a weight index for explicit bi-prediction mode.