Ticket #1276: ticket1276_r4158_proposed.patch

File ticket1276_r4158_proposed.patch, 1.6 KB (added by karlsharman, 10 years ago)

Proposed patch for r4158.

  • source/Lib/TLibEncoder/TEncCu.cpp

     
    681681      }
    682682    }
    683683
     684    m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]);
    684685    m_pcEntropyCoder->resetBits();
    685686    m_pcEntropyCoder->encodeSplitFlag( rpcBestCU, 0, uiDepth, true );
    686687    rpcBestCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits
    687688    rpcBestCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
    688689    rpcBestCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );
     690    m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]);
    689691
    690692    // Early CU determination
    691693    if( m_pcEncCfg->getUseEarlyCU() && rpcBestCU->isSkipped(0) )
     
    793795        }
    794796      }
    795797
     798      m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]);
    796799      if( !bBoundary )
    797800      {
    798801        m_pcEntropyCoder->resetBits();
     
    838841        }
    839842      }
    840843
    841       m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
     844      m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
    842845
    843846      // TODO: this does not account for the slice bytes already written. See other instances of FIXED_NUMBER_OF_BYTES
    844847      Bool isEndOfSlice        = rpcBestCU->getSlice()->getSliceMode()==FIXED_NUMBER_OF_BYTES