﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1066	Mismatch between spec and VTM in derivation process of ctxInc for the syntax element mtt_split_cu_vertical_flag	wangyang.cs		"There is a mismatch between spec and VTM in derivation process of ctxInc for the syntax element mtt_split_cu_vertical_flag.

**In VTM-8.0, the derivation process is as follows:**
In {{{void DeriveCtx::CtxSplit()}}}
{{{
  ctxHv = 0;
  const unsigned numHor = ( canSplit[2] ? 1 : 0 ) + ( canSplit[4] ? 1 : 0 );
  const unsigned numVer = ( canSplit[3] ? 1 : 0 ) + ( canSplit[5] ? 1 : 0 );

  if( numVer == numHor )
  {
    const Area& area = partitioner.currArea().blocks[partitioner.chType];
    const unsigned wAbove       = cuAbove ? cuAbove->blocks[partitioner.chType].width  : 1;
    const unsigned hLeft        = cuLeft  ? cuLeft ->blocks[partitioner.chType].height : 1;
    const unsigned depAbove     = area.width / wAbove;
    const unsigned depLeft      = area.height / hLeft;
    if( depAbove == depLeft || !cuLeft || !cuAbove ) ctxHv = 0;
    else if( depAbove < depLeft ) ctxHv = 1;
    else ctxHv = 2;
  }
  else if( numVer < numHor )
  {
    ctxHv = 3;
  }
  else
  {
    ctxHv = 4;
  }
}}}

**Suggest changes in JVET-R2001-vA as follows:**

9.3.4.2.3 Derivation process of ctxIncfor the syntax element mtt_split_cu_vertical_flag
The assignment of ctxInc is specified as follows:
  –	If allowSplitBtVer + allowSplit[[span(style=color: #0000FF, TtVer)]][[ticket:1|BtHor]] is greater than allowSplit[[span(style=color: #0000FF, BtHor)]][[ticket:1|TtVer]] + allowSplitTtHor, ctxInc is set equal to 4.
  –	Otherwise, if allowSplitBtVer + allowSplit[[span(style=color: #0000FF, TtVer)]][[ticket:1|BtHor]] is less than allowSplit[[span(style=color: #0000FF, BtHor)]][[ticket:1|TtVer]] + allowSplitTtHor, ctxInc is set equal to [[ticket:1|4]][[span(style=color: #0000FF, 3)]].
  –	Otherwise, the following applies:
    –	The variables dA and dL are derived as follows
      dA = cbWidth / ( availableA ? CbWidth[ chType ][ xNbA ][ yNbA ] : 1 )	(1562)
      dL = cbHeight / ( availableL ? CbHeight[ chType ][ xNbL ][ yNbL ] : 1 )	(1563)
    –	If any of the following conditions is true, ctxInc is set equal to 0:
      –	dA is equal to dL,
      –	availableA is equal to FALSE,
      –	availableL is equal to FALSE.
    –	Otherwise, if dA is less then dL, ctxInc is set equal to 1.
    –	Otherwise, ctxInc is set equal to [[ticket:1|0]][[span(style=color: #0000FF, 2)]].

"	defect	closed	minor	VVC D7 vC	spec	VVC D8 vB	fixed		ksuehring bbross XiangLi fbossen jvet@… jvet@…
