zoukankan      html  css  js  c++  java
  • HM16.0之PCM模式——xCheckIntraPCM

    参考:https://blog.csdn.net/cxy19931018/article/details/79781042

    1、源代码:

    /** Check R-D costs for a CU with PCM mode.
     * param rpcBestCU pointer to best mode CU data structure
     * param rpcTempCU pointer to testing mode CU data structure
     * 
    eturns Void
     *
     * 
    ote Current PCM implementation encodes sample values in a lossless way. The distortion of PCM mode CUs are zero. PCM mode is selected if the best mode yields bits greater than that of PCM mode.
     */
    Void TEncCu::xCheckIntraPCM( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU )
    {
      UInt uiDepth = rpcTempCU->getDepth( 0 );
      // 设置各种参数
      rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
    
    // 将IPCM Flag设置为true rpcTempCU
    ->setIPCMFlag(0, true); rpcTempCU->setIPCMFlagSubParts (true, 0, rpcTempCU->getDepth(0));
    rpcTempCU
    ->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth ); // 设置预测模式为帧内模式 rpcTempCU->setTrIdxSubParts ( 0, 0, uiDepth ); rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_ChromaQpAdjIdc, 0, uiDepth ); // 执行PCM模式的估计 m_pcPredSearch->IPCMSearch( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth]); m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]); m_pcEntropyCoder->resetBits(); if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) { m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0, true ); } m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0, true ); m_pcEntropyCoder->encodePartSize ( rpcTempCU, 0, uiDepth, true ); m_pcEntropyCoder->encodeIPCMInfo ( rpcTempCU, 0, true ); m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits(); rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); // 计算率失真的代价
    rpcTempCU
    ->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); xCheckDQP( rpcTempCU ); DEBUG_STRING_NEW(a) DEBUG_STRING_NEW(b) xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth DEBUG_STRING_PASS_INTO(a) DEBUG_STRING_PASS_INTO(b)); }
  • 相关阅读:
    backup-rsync主机配置
    msyqldump备份
    会话固定攻击(session fixation attack)
    正确理解 Session 的安全性
    Yii自定义辅助函数
    php缓冲机制及嵌套级别 ob_get_level
    method_exists 与 is_called
    给类动态添加新方法
    PHP Closure(闭包)类详解
    PHP Closure(闭包)类详解
  • 原文地址:https://www.cnblogs.com/lucifer1997/p/10997644.html
Copyright © 2011-2022 走看看