﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1362	Order of operations in LMCS equations	bheng		"I believe the LMCS equations below all need an extra parenthesis around the ... >> 11, due to the order of operations of the >> operator.

'''Section 8.5.6.7 - Equation 989:'''
   predSamplesInter [ x ][ y ] = Clip1( LmcsPivot[ idxY ] + ( ScaleCoeff[ idxY ] * ( predSamplesInter[ x ][ y ] − InputPivot[ idxY ] ) + ( 1  <<  10 ) )  >>  11 )


'''Section 8.7.5.2 - Equation 1191:'''
   predMapSamples[ i ][ j ] = LmcsPivot[ idxY ] + ( ScaleCoeff[ idxY ] * ( predSamples[ i ][ j ] − InputPivot[ idxY ] ) + ( 1  <<  10 ) )  >>  11


'''Section 8.8.2.2 - Equation 1200:'''
   invSample = InputPivot[ idxYInv ] + ( InvScaleCoeff[ idxYInv ] * ( lumaSample − LmcsPivot[ idxYInv ] ) + ( 1  <<  10 ) )  >>  11



Specifically, I would suggest the following:

   predSamplesInter [ x ][ y ] = Clip1( LmcsPivot[ idxY ] + ( ( ScaleCoeff[ idxY ] * ( predSamplesInter[ x ][ y ] − InputPivot[ idxY ] ) + ( 1  <<  10 ) )  >>  11 ) )


   predMapSamples[ i ][ j ] = LmcsPivot[ idxY ] + ( ( ScaleCoeff[ idxY ] * ( predSamples[ i ][ j ] − InputPivot[ idxY ] ) + ( 1  <<  10 ) )  >>  11 )


   invSample = InputPivot[ idxYInv ] + ( ( InvScaleCoeff[ idxYInv ] * ( lumaSample − LmcsPivot[ idxYInv ] ) + ( 1  <<  10 ) )  >>  11 )

"	defect	closed	minor		spec	VVC D10 vG	fixed		ksuehring bbross XiangLi fbossen jvet@…
