Opened 18 months ago

Last modified 18 months ago

#1244 new enhancement

software/spec mismatch for APS chroma present flag from R0433 integration

Reported by: taoranlu Owned by:
Priority: minor Milestone:
Component: VTM Version:
Keywords: Cc: ksuehring, XiangLi, fbossen, jvet@…


There is a software/spec mismatch related to APS chroma present flag in current VTM master from the integration of R0433 (MR1767).
In VLCWriter.cpp (and corresponding VLCReader.cpp), when signal the LMCS APS, the condition if (pcAPS->chromaPresentFlag) should include the signalling both of the sign and abs of lmcs delta crs. In current VTM, only the abs is inside the if condition and sign is left out of the if condition.


if( aps_chroma_present_flag ) {

if( lmcs_delta_abs_crs > 0 )



Change history (3)

comment:1 Changed 18 months ago by fbossen

My understanding is that text and SW are equivalent.
When chromaPresentFlag is false, deltaCRS is set to 0 and absCRS is set to 0 and lmcs_delta_sign_crs_flag is not coded, as intended.

  int deltaCRS = pcAPS->chromaPresentFlag ? param.chrResScalingOffset : 0;
  int signCRS = (deltaCRS < 0) ? 1 : 0;
  int absCRS = (deltaCRS < 0) ? (-deltaCRS) : deltaCRS;
  if (pcAPS->chromaPresentFlag)
    WRITE_CODE(absCRS, 3, "lmcs_delta_abs_crs");
  if (absCRS > 0)
    WRITE_FLAG(signCRS, "lmcs_delta_sign_crs_flag");

comment:2 Changed 18 months ago by taoranlu

I agree it is working equivalently from software point of view. Just when people read the code, it is logically more clear that the condition should apply for both abs and sign. It is a trivial issue and it's fine if we stay as-is.

comment:3 Changed 18 months ago by fbossen

  • Type changed from defect to enhancement
Note: See TracTickets for help on using tickets.