Opened 4 years ago

Closed 2 years ago

#1244 closed enhancement (worksforme)

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@…

Description

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.

Spec:

if( aps_chroma_present_flag ) {

lmcs_delta_abs_crs
if( lmcs_delta_abs_crs > 0 )

lmcs_delta_sign_crs_flag

}

Change history (4)

comment:1 Changed 4 years 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 4 years 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 4 years ago by fbossen

  • Type changed from defect to enhancement

comment:4 Changed 2 years ago by fbossen

  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.