• 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)); }
  • 相关阅读:
    用X++读取文本文件(txt文件)的例子
    找出整个AX系统使用某个扩展类型的所有表和字段
    关于代码操作AOT
    检查所有表Relations是否为unknown
    strSplit分隔文本以container返回
    POJ 1850, Code
    用匈牙利算法求二分图的最大匹配(转载)
    POJ 2533, Longest Ordered Subsequence
    POJ 1159, Palindrome
    POJ 3252, Round Numbers
  • 原文地址:https://www.cnblogs.com/lucifer1997/p/10997644.html
Copyright © 2020-2023  润新知