﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
142	bug of dQP coding in LCEC	junxu		"Currently, dQP is encoded first by a flag indicating zero or nonzero dQP. If the flag shows nonzero dQP then the value of dQP is encoded by mapping a signed dQP to an unsigned codenumber. Then these codenumbers are encoded by unary code. For LCEC,     xWriteSvlc( iDQp ) from Void TEncCavlc::codeDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx ) is using the mapping
UInt  xConvertToUInt        ( Int iValue ) {  return ( iValue <= 0) ? -iValue<<1 : (iValue<<1)-1; }

The LCEC mapping is: 1->1, -1->2,2->3, -2->4....
 
The mapping used in CABAC is shown as the line below in  Void TEncSbac::codeDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx )

UInt uiDQp = (UInt)( iDQp > 0 ? ( 2 * iDQp - 2 ) : ( -2 * iDQp - 1 ) );

The CABAC mapping is: 1->0, -1->1,2->2, -2->3.... 

The problem is that LCEC mapping wastes the codenumber==0 and spends more bits to encode nonzero dQPs. Solution is to use the CABAC mapping for LCEC case to save bits.
"	defect	closed	minor		HM		fixed		fbossen ksuehring davidf jct-vc@…
