Opened 5 years ago

Closed 5 years ago

#282 closed defect (fixed)

Issue in tb(v) decoding description

Reported by: forayr Owned by:
Priority: minor Milestone:
Component: spec Version: VVC D5 v6
Keywords: Cc: ksuehring, bbross, XiangLi, fbossen, jvet@…

Description

In 9.4 Parsing process for truncated binary codes, the derivation of variable th is incomplete. For all maxVal below 256, the calculation in the specification return th = 7, which is not the case in the vtm.

In the spec:

thVal = 1 << 8
th = 8
while( thVal <= maxVal ) {
	th++
	thVal <<= 1
}
thβˆ’βˆ’

In vtm:

  int uiThresh;
  if( uiMaxSymbol > 256 )
  {
    int uiThreshVal = 1 << 8;
    uiThresh = 8;
    while( uiThreshVal <= uiMaxSymbol )
    {
      uiThresh++;
      uiThreshVal <<= 1;
    }
    uiThresh--;
  }
  else
  {
    uiThresh = g_tbMax[uiMaxSymbol];
  }

By the way, in the line 'b = n - val', 'n' is not defined in the spec and should be replaced by maxVal.

Change history (2)

comment:1 Changed 5 years ago by nanhu

For the variable 'th',
A fix could be:

thVal = 1
th = -1
while (thVal <= maxVal) {

th++
thVal <<= 1

}

In the line 'b = n - val', I agree that 'n' should be replaced by maxVal.

comment:2 Changed 5 years ago by bbross

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in D5 v7

Note: See TracTickets for help on using tickets.