Ticket #1270: bug1270.patch

File bug1270.patch, 2.5 KB (added by jackh, 9 years ago)
  • source/Lib/TLibCommon/TComDataCU.h

     
    100100  Char*          m_phQP;               ///< array of QP values
    101101#if RExt__O0044_CU_ADAPTIVE_CHROMA_QP_OFFSET
    102102  UChar*         m_ChromaQpAdj;        ///< array of chroma QP adjustments (indexed)
     103  UInt           m_codedChromaQpAdj;
    103104#endif
    104105  UChar*         m_puhTrIdx;           ///< array of transform indices
    105106  UChar*         m_puhTransformSkip[MAX_NUM_COMPONENT];///< array of transform skipping flags
     
    274275  UChar         getChromaQpAdj        (Int idx)           const { return m_ChromaQpAdj[idx];  }
    275276  Void          setChromaQpAdj        (Int idx, UChar val)      { m_ChromaQpAdj[idx] = val;   }
    276277  Void          setChromaQpAdjSubParts( UChar val, Int absPartIdx, Int depth );
     278  Void          setCodedChromaQpAdj   ( Char qp )               { m_codedChromaQpAdj = qp;    }
     279  Char          getCodedChromaQpAdj   ()                        { return m_codedChromaQpAdj;  }
    277280#endif
    278281
    279282  Bool          isLosslessCoded       ( UInt absPartIdx );
  • source/Lib/TLibDecoder/TDecCu.cpp

     
    401401  {
    402402    pcCU->setQPSubParts( getdQPFlag()?pcCU->getRefQP(uiAbsPartIdx):pcCU->getCodedQP(), uiAbsPartIdx, uiDepth ); // set QP
    403403  }
    404 
     404#if RExt__O0044_CU_ADAPTIVE_CHROMA_QP_OFFSET
     405  if (pcCU->getSlice()->getUseChromaQpAdj() && !getIsChromaQpAdjCoded()) {
     406    pcCU->setChromaQpAdjSubParts( pcCU->getCodedChromaQpAdj(), uiAbsPartIdx, uiDepth ); // set QP
     407  }
     408#endif
    405409  ruiIsLast = xDecodeSliceEnd( pcCU, uiAbsPartIdx, uiDepth);
    406410}
    407411
  • source/Lib/TLibDecoder/TDecSbac.cpp

     
    10961096    xReadUnaryMaxSymbol( symbol,  &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, tableSize - 1 RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) );
    10971097    symbol++;
    10981098  }
    10991099 
    11001100  /* NB, symbol = 0 if outer flag is not set,
    11011101   *              1 if outer flag is set and there is no inner flag
    11021102   *              1+ otherwise */
    11031103  cu->setChromaQpAdjSubParts( symbol, absPartIdx, depth );
     1104  cu->setCodedChromaQpAdj(symbol);
    11041105}
    11051106#endif
    11061107