Ticket #312: TDecEntropy_t312.patch

File TDecEntropy_t312.patch, 1.3 KB (added by zhyang123, 13 years ago)
  • TDecEntropy.cpp

     
    637637 
    638638  if( uiLog2TrafoSize <= pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() )
    639639  {
    640     const Bool bFirstCbfOfCU = uiLog2TrafoSize == pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() || uiTrDepth == 0;
     640    const Bool bFirstCbfOfCU = (uiLog2TrafoSize == pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() && (uiLog2TrafoSize > 2 || uiInnerQuadIdx == 3))|| uiTrDepth == 0;
    641641    if( bFirstCbfOfCU )
    642642    {
    643643      pcCU->setCbfSubParts( 0, TEXT_CHROMA_U, uiAbsPartIdx, uiDepth );
     
    798798    UInt cbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA    , uiTrIdx );
    799799    UInt cbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
    800800    UInt cbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
    801     if( uiLog2TrafoSize == 2 )
    802     {
    803       UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
    804       if( ( uiAbsPartIdx % partNum ) == (partNum - 1) )
    805       {
    806         cbfU = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
    807         cbfV = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
    808       }
    809     }
    810801    if ( cbfY || cbfU || cbfV )
    811802    {
    812803      // dQP: only for LCU