Opened 11 months ago

# [Multilayer Profiles] Potential Mismatch of VTM22.0 & Specification Related To Derivation Process For Merge Motion Vector Difference

Reported by: Owned by: ksthey minor H.266/VVC v4 spec H.266/VVC v3 vzakharc, yuwenhe, jvet@…

### Description

In "8.5.2.7 Derivation process for merge motion vector difference", Equation 563:
mMvdL1[ 0 ] = Sign( currPocDiffL0 ) == Sign( currPocDiffL1 ) ? mMvdL0[ 0 ] : −mMvdL0[ 0 ].

The equivalent code is in VTM22.0, InterPrediction.cpp, MergeCtx::getMmvdDeltaMv(), starting from line 2478:

if ((poc1 - currPoc)*(poc0 - currPoc) > 0)
{

deltaMv[1] = deltaMv[0];

}
else
{

deltaMv[1].set(-1 * deltaMv[0].getHor(), -1 * deltaMv[0].getVer());

}

According to specification, definition of Sign(x):
Sign(x) = 1; x > 0
Sign(x) = 0; x == 0
Sign(x) = -1; x < 0

Let's assume:

• result of condition below in specification as r_spec: r_spec = Sign( currPocDiffL0 ) == Sign( currPocDiffL1 )
• result of condition below in VTM22.0 as r_vtm: r_vtm = (currPocDiffL1 * currPocDiffL0 > 0)

Use combination of currPocDiffL0 & currPocDiffL1 as input:
1.) (currPocDiffL0 < 0) && (currPocDiffL1 < 0)

r_spec = 1; r_vtm = 1; ==> r_spec == r_vtm;

2.) (currPocDiffL0 < 0) && (currPocDiffL1 > 0)

r_spec = 0; r_vtm = 0; ==> r_spec == r_vtm;

3.) (currPocDiffL0 > 0) && (currPocDiffL1 < 0)

r_spec = 0; r_vtm = 0; ==> r_spec == r_vtm;

4.) (currPocDiffL0 < 0) && (currPocDiffL1 < 0)

r_spec = 1; r_vtm = 1; ==> r_spec == r_vtm;

5.) (currPocDiffL0 == 0) && (currPocDiffL1 != 0)

r_spec = 1; r_vtm = 1; ==> r_spec == r_vtm;

6.) (currPocDiffL0 != 0) && (currPocDiffL1 == 0)

r_spec = 1; r_vtm = 1; ==> r_spec == r_vtm;

7.) (currPocDiffL0 == 0) && (currPocDiffL1 == 0)

r_spec = 1; r_vtm = 0; ==> r_spec != r_vtm;

Case 5, 6 & 7 are only possible in multilayer profile (current picture and reference picture same POC, but different layers).
As shown above, for case 7, results of specification & VTM are different.

So, which is the correct one? specification or VTM?

### comment:1 Changed 11 months ago by ksthey

• Component changed from 360Lib to spec

### comment:2 Changed 5 months ago by bbross

• Milestone set to H.266/VVC v4
• Version set to H.266/VVC v3

Thanks for reporting and I see the mismatch for the multi-layer case. This should be fixed in v4 but before, we need to clarify which one is the intended behaviour.

Note: See TracTickets for help on using tickets.