Opened 11 years ago Closed 11 years ago #1271 closed defect (fixed)Inference of slice_chroma_qp_adjustment_enabled_flag is not correctly implemented
Description
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 RExt__O0044_CU_ADAPTIVE_CHROMA_QP_OFFSET if (rpcSlice->getPPS()->getChromaQpAdjTableSize() > 0) { READ_FLAG(uiCode, "slice_chroma_qp_adjustment_enabled_flag"); rpcSlice->setUseChromaQpAdj(uiCode != 0); } #endif
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 RExt__O0044_CU_ADAPTIVE_CHROMA_QP_OFFSET if (rpcSlice->getPPS()->getChromaQpAdjTableSize() > 0) { READ_FLAG(uiCode, "slice_chroma_qp_adjustment_enabled_flag"); rpcSlice->setUseChromaQpAdj(uiCode != 0); } else rpcSlice->setUseChromaQpAdj(false); #endif
I guess a similar correction may be needed for the encoder. Change History (3)comment:1 Changed 11 years ago by DefaultCC Plugin
comment:2 Changed 11 years ago by jackhcomment:3 Changed 11 years ago by karlsharman
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
|
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().