Skip to content

fix #1485: add conformance check for LMCS

Taoran Lu requested to merge tlu/VVCSoftware_VTM:lmcs_conformance_check into master

conformance check is missing for LMCS in VTM decoder:

Constraint 1: It is a requirement of bitstream conformance that the following condition is true: ∑_(i=0)^15〖lmcsCW[ i ]〗 <= ( 1 << BitDepth ) − 1

Constraint 2: It is a requirement of bitstream conformance that, for i = lmcs_min_bin_idx..LmcsMaxBinIdx, when the value of LmcsPivot[ i ] is not a multiple of 1 << ( BitDepth − 5 ), the value of ( LmcsPivot[ i ] >> ( BitDepth − 5 ) ) shall not be equal to the value of ( LmcsPivot[ i + 1 ] >> ( BitDepth − 5 ) ).

Constraint 3: It is a requirement of bitstream conformance that, when lmcsCW[ i ] is not equal to 0, ( lmcsCW[ i ] + lmcsDeltaCrs ) shall be in the range of ( OrgCW >> 3 ) to ( ( OrgCW << 3 ) − 1 ), inclusive.

Encoder side check is also added for constraint 3 which is missing. (Constraint 1 and 2 are handled in encoder already).

Edited by Taoran Lu

Merge request reports