Ticket #833: chroma_qp_offset_bug.patch

File chroma_qp_offset_bug.patch, 1.3 KB (added by bheng, 9 years ago)
  • source/Lib/TLibEncoder/TEncSearch.cpp

     
    49824982      if( uiAbsSumV )
    49834983      {
    49844984        Pel *pcResiCurrV = m_pcQTTempTComYuv[uiQTTempAccessLayer].getCrAddr( absTUPartIdxC );
    4985         if( !uiAbsSumU )
    4986         {
    4987           Int curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();
    4988           m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset );
    4989         }
     4985        Int curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();
     4986        m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset );
     4987
    49904988        Int scalingListType = 3 + g_eTTable[(Int)TEXT_CHROMA_V];
    49914989        assert(scalingListType < 6);
    49924990        m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_CHROMA,REG_DCT, pcResiCurrV, m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), pcCoeffCurrV, trWidthC, trHeightC, scalingListType );