Opened 10 years ago

Closed 10 years ago

#1271 closed defect (fixed)

Inference of slice_chroma_qp_adjustment_enabled_flag is not correctly implemented

Reported by: jackh Owned by:
Priority: minor Milestone: HM+RExt-4.2
Component: HM RExt Version: RExt-4.1 (HM-12.0)
Keywords: Cc: davidf, karlsharman, jct-vc@…


We are currently adding range extensions support to Argon Streams. The head of the HM-range-extensions branch contains the following section in TDecCAVLC.cpp:

    if (rpcSlice->getPPS()->getChromaQpAdjTableSize() > 0)
      READ_FLAG(uiCode, "slice_chroma_qp_adjustment_enabled_flag"); rpcSlice->setUseChromaQpAdj(uiCode != 0);

This doesn't implement the spec rule that slice_chroma_qp_adjustment_enabled_flag is inferred to be zero when it isn't present. This causes problems when a non-zero value has been copied from another slice. The correct code would be:

    if (rpcSlice->getPPS()->getChromaQpAdjTableSize() > 0)
      READ_FLAG(uiCode, "slice_chroma_qp_adjustment_enabled_flag"); rpcSlice->setUseChromaQpAdj(uiCode != 0);
    else rpcSlice->setUseChromaQpAdj(false);

I guess a similar correction may be needed for the encoder.

Change History (3)

comment:1 Changed 10 years ago by DefaultCC Plugin

  • Cc davidf karlsharman jct-vc@… added

comment:2 Changed 10 years ago by jackh

Clarification: non-zero values are not 'copied' as such, but rather remain in m_apcSlicePilot from one picture to the next. initSlice(), called at the beginning of each new slice, doesn't do anything to m_ChromaQpAdjEnabled, so if it was set in a previous picture, it will remain set in the current picture. So if I have one picture that has a PPS with chroma_qp_adjustment_enabled_flag=1 and the last slice has slice_chroma_qp_adjustment_enabled_flag=1, and then I have another picture whose PPS has chroma_qp_adjustment_enabled_flag=0, slice_chroma_qp_adjustment_enabled_flag will remain set. So another solution might be to reset m_ChromaQpAdjEnabled in initSlice().

comment:3 Changed 10 years ago by karlsharman

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3908

Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber, Participant

  • David Flynn(Subscriber)
  • Jack Haughton(Reporter, Participant)
  • jct-vc@…(Subscriber)
  • Karl Sharman(Subscriber, Participant)
  • karl.sharman@…(Always)
  • Karsten Suehring(Always)