﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1618	[Multilayer Profiles] Potential Mismatch of VTM22.0 & Specification Related To Derivation Process For Merge Motion Vector Difference	ksthey		"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?"	defect	closed	minor	H.266/VVC v4	spec	H.266/VVC v3	invalid		vzakharc yuwenhe jvet@…
