﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
904	Mismatch with HM in derivation of ctxIdxInc for coeff_abs_level_greater1_flag	peterderivaz	bbross	"In some corner cases, the text and HM disagree on the value of lastGreater1Ctx.

In 9.2.3.1.5 ""Derivation process of ctxIdxInc for the syntax element coeff_abs_level_greater1_flag"" the variable lastGreater1Ctx is derived from the value of greater1Ctx in a previous subblock.

In the HM code, greater1Ctx is set to 0 as soon as a nonzero value for coeff_abs_level_greater1_flag is decoded:

See lines 1222->1229 of TDecSbac.cpp:

        if( uiBin == 1 )
        {
          c1 = 0;
          if (firstC2FlagIdx == -1)
          {
            firstC2FlagIdx = idx;
          }
        }

However, in the text, greater1Ctx is only cleared indirectly via the variable lastGreater1Flag.

The difference occurs when coeff_abs_level_greater1_flag is set and n equals 0 and greater1Ctx is nonzero.  The next time the process is called, it now has a different sub-block scan index i, and so the code that would clear greater1Ctx is not invoked.

This means that the reference code ends up with greater1Ctx=0, while the text still has greater1Ctx != 0.

"	defect	closed	minor	D10	Text	D10 (L1003) v28	fixed		bbross wjhan jct-vc@…
