Ticket #1276: 1276.patch

File 1276.patch, 1.6 KB (added by libin, 10 years ago)
  • Lib/TLibEncoder/TEncCu.cpp

     
    656656      }
    657657    }
    658658
     659    m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]);
     660
    659661    m_pcEntropyCoder->resetBits();
    660662    m_pcEntropyCoder->encodeSplitFlag( rpcBestCU, 0, uiDepth, true );
    661663    rpcBestCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits
     
    662664    rpcBestCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
    663665    rpcBestCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );
    664666
     667    m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]);
     668
    665669    // Early CU determination
    666670    if( m_pcEncCfg->getUseEarlyCU() && rpcBestCU->isSkipped(0) )
    667671    {
     
    773777
    774778      if( !bBoundary )
    775779      {
     780        m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth + 1][CI_NEXT_BEST]);
     781
    776782        m_pcEntropyCoder->resetBits();
    777783        m_pcEntropyCoder->encodeSplitFlag( rpcTempCU, 0, uiDepth, true );
    778784
     
    823829        }
    824830      }
    825831
    826       m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
     832      m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
    827833
    828834      Bool isEndOfSlice        = rpcBestCU->getSlice()->getSliceMode()==FIXED_NUMBER_OF_BYTES
    829835                                 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceArgument()<<3);