Ignore:
Timestamp:
18 Oct 2013, 04:44:23 (11 years ago)
Author:
kwu-htm
Message:

Macro enclosed and cleaned-up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncCu.cpp

    r637 r638  
    103103 
    104104  m_bEncodeDQP = false;
    105 #if RATE_CONTROL_LAMBDA_DOMAIN && (!M0036_RC_IMPROVEMENT || KWU_RC_MADPRED_E0227)
     105#if RATE_CONTROL_LAMBDA_DOMAIN
     106#if !M0036_RC_IMPROVEMENT
     107  m_LCUPredictionSAD = 0;
     108  m_addSADDepth      = 0;
     109  m_temporalSAD      = 0;
     110#endif
     111#if M0036_RC_IMPROVEMENT && KWU_RC_MADPRED_E0227
     112  m_LCUPredictionSAD = 0;
     113  m_addSADDepth      = 0;
     114  m_temporalSAD      = 0;
     115#endif
     116#endif
     117#if KWU_RC_MADPRED_E0227
    106118  m_LCUPredictionSAD = 0;
    107119  m_addSADDepth      = 0;
     
    257269  m_ppcTempCU[0]->initCU( rpcCU->getPic(), rpcCU->getAddr() );
    258270
    259 #if (RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT) || KWU_RC_MADPRED_E0227
     271#if RATE_CONTROL_LAMBDA_DOMAIN
     272#if !M0036_RC_IMPROVEMENT
     273  m_LCUPredictionSAD = 0;
    260274  m_addSADDepth      = 0;
     275  m_temporalSAD      = 0;
     276#endif
     277#if M0036_RC_IMPROVEMENT && KWU_RC_MADPRED_E0227
    261278  m_LCUPredictionSAD = 0;
     279  m_addSADDepth      = 0;
     280  m_temporalSAD      = 0;
     281#endif
     282#endif
     283#if KWU_RC_MADPRED_E0227
     284  m_LCUPredictionSAD = 0;
     285  m_addSADDepth      = 0;
    262286  m_temporalSAD      = 0;
    263287  m_spatialSAD       = 0;
     
    673697    }
    674698
    675 #if (RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT) || KWU_RC_MADPRED_E0227
     699#if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT
    676700    if ( uiDepth <= m_addSADDepth )
    677701    {
     
    679703      m_addSADDepth = uiDepth;
    680704    }
     705#endif
     706#if RATE_CONTROL_LAMBDA_DOMAIN && M0036_RC_IMPROVEMENT && KWU_RC_MADPRED_E0227
     707    if ( uiDepth <= m_addSADDepth )
     708    {
     709      m_LCUPredictionSAD += m_temporalSAD;
     710      m_addSADDepth = uiDepth;
     711    }
     712#endif
     713#if !RATE_CONTROL_LAMBDA_DOMAIN && KWU_RC_MADPRED_E0227
     714if ( uiDepth <= m_addSADDepth )
     715{
     716  m_LCUPredictionSAD += m_temporalSAD;
     717  m_addSADDepth = uiDepth;
     718}
    681719#endif
    682720#if !RATE_CONTROL_LAMBDA_DOMAIN && KWU_FIX_URQ
     
    10221060          {
    10231061            xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
    1024 #if (RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT) || KWU_RC_MADPRED_E0227
     1062#if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT
     1063            if ( uiDepth <= m_addSADDepth )
     1064            {
     1065              m_LCUPredictionSAD += m_spatialSAD;
     1066              m_addSADDepth = uiDepth;
     1067            }
     1068#elif RATE_CONTROL_LAMBDA_DOMAIN && KWU_RC_MADPRED_E0227
     1069            if ( uiDepth <= m_addSADDepth )
     1070            {
     1071              m_LCUPredictionSAD += m_spatialSAD;
     1072              m_addSADDepth = uiDepth;
     1073            }
     1074#endif
     1075#if !RATE_CONTROL_LAMBDA_DOMAIN && KWU_RC_MADPRED_E0227
    10251076            if ( uiDepth <= m_addSADDepth )
    10261077            {
     
    22612312  rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    22622313 
    2263 #if RATE_CONTROL_LAMBDA_DOMAIN && (!M0036_RC_IMPROVEMENT || KWU_RC_MADPRED_E0227)
     2314#if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT
     2315  UChar uhDepth = rpcTempCU->getDepth( 0 );
     2316  if ( m_pcEncCfg->getUseRateCtrl() && m_pcEncCfg->getLCULevelRC() && eSize == SIZE_2Nx2N && uhDepth <= m_addSADDepth )
     2317  {
     2318    UInt SAD = m_pcRdCost->getSADPart( g_bitDepthY, m_ppcPredYuvTemp[uhDepth]->getLumaAddr(), m_ppcPredYuvTemp[uhDepth]->getStride(),
     2319      m_ppcOrigYuv[uhDepth]->getLumaAddr(), m_ppcOrigYuv[uhDepth]->getStride(),
     2320      rpcTempCU->getWidth(0), rpcTempCU->getHeight(0) );
     2321    m_spatialSAD = (Int)SAD;
     2322  }
     2323#elif RATE_CONTROL_LAMBDA_DOMAIN && KWU_RC_MADPRED_E0227
    22642324  UChar uhDepth = rpcTempCU->getDepth( 0 );
    22652325  if ( m_pcEncCfg->getUseRateCtrl() && m_pcEncCfg->getLCULevelRC() && eSize == SIZE_2Nx2N && uhDepth <= m_addSADDepth )
Note: See TracChangeset for help on using the changeset viewer.