図1に示すように、ソースコード:
#if AMP_MRG ボイドTEncCu :: xCheckRDCostInter(TComDataCU *&rpcBestCU、TComDataCU *&rpcTempCU、PartSize ePartSize DEBUG_STRING_FN_DECLARE(sdebugオプション)、ブールbUseMRG)は #ELSE ボイドTEncCuを:: xCheckRDCostInter(TComDataCU *&rpcBestCU、TComDataCU *&rpcTempCU、PartSize ePartSize) #endifの { DEBUG_STRING_NEW(STEST) UCHAR uhDepth = rpcTempCU-> getDepth(0 )。 rpcTempCU - > setDepthSubParts(uhDepth、0 ); rpcTempCU - > setSkipFlagSubParts(偽、0 、uhDepth)。 rpcTempCU - > setPartSizeSubParts(ePartSize、 0 、uhDepth)。 rpcTempCU - > setPredModeSubParts(MODE_INTER、0 、uhDepth)。 rpcTempCU - > setChromaQpAdjSubParts(rpcTempCU-> getCUTransquantBypass(0?)0:m_ChromaQpAdjIdc、0 、uhDepth)。 #ifの AMP_MRG rpcTempCU - > setMergeAMP(真の); m_pcPredSearch - > predInterSearch(rpcTempCU、m_ppcOrigYuv [uhDepth]、m_ppcPredYuvTemp [uhDepth]、m_ppcResiYuvTemp [uhDepth]、m_ppcRecoYuvTemp [uhDepth] DEBUG_STRING_PASS_INTO(STEST)、偽、bUseMRG)。 #elseの m_pcPredSearch - >predInterSearch(rpcTempCU、m_ppcOrigYuv [uhDepth]、m_ppcPredYuvTemp [uhDepth]、m_ppcResiYuvTemp [uhDepth]、m_ppcRecoYuvTemp [uhDepth])。 #endifの の#if AMP_MRG 場合(!rpcTempCU-> getMergeAMP()) { リターン。 } #endifの m_pcPredSearch - > encodeResAndCalcRdInterCU(rpcTempCU、m_ppcOrigYuv [uhDepth]、m_ppcPredYuvTemp [uhDepth]、m_ppcResiYuvTemp [uhDepth]、m_ppcResiYuvBest [uhDepth]、m_ppcRecoYuvTemp [uhDepth]、偽DEBUG_STRING_PASS_INTO(STEST))。 rpcTempCU - > getTotalCost()= m_pcRdCost-> calcRdCost(rpcTempCU-> getTotalBits()、rpcTempCU-> getTotalDistortion()); #ifdefのDEBUG_STRING DebugInterPredResiReco(STEST、 *(m_ppcPredYuvTemp [uhDepth])、*(m_ppcResiYuvBest [uhDepth])、*(m_ppcRecoYuvTemp [uhDepth])、DebugStringGetPredModeMask(rpcTempCU-> getPredictionMode(0 )))。 #endifの xCheckDQP(rpcTempCU)。 xCheckBestMode(rpcBestCU、rpcTempCU、uhDepth DEBUG_STRING_PASS_INTO(sdebugオプション)DEBUG_STRING_PASS_INTO(STEST))。 }