Changeset 532 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.cpp
- Timestamp:
- 2 Jan 2014, 07:21:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.cpp
r524 r532 95 95 96 96 m_bEncodeDQP = false; 97 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT98 m_LCUPredictionSAD = 0;99 m_addSADDepth = 0;100 m_temporalSAD = 0;101 #endif102 97 103 98 // initialize partition order. … … 243 238 m_ppcBestCU[0]->initCU( rpcCU->getPic(), rpcCU->getAddr() ); 244 239 m_ppcTempCU[0]->initCU( rpcCU->getPic(), rpcCU->getAddr() ); 245 246 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT247 m_addSADDepth = 0;248 m_LCUPredictionSAD = 0;249 m_temporalSAD = 0;250 #endif251 240 252 241 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI … … 433 422 } 434 423 435 #if RATE_CONTROL_LAMBDA_DOMAIN436 424 if ( m_pcEncCfg->getUseRateCtrl() ) 437 425 { … … 439 427 iMaxQP = m_pcRateCtrl->getRCQP(); 440 428 } 441 #else442 if(m_pcEncCfg->getUseRateCtrl())443 {444 Int qp = m_pcRateCtrl->getUnitQP();445 iMinQP = Clip3( MIN_QP, MAX_QP, qp);446 iMaxQP = Clip3( MIN_QP, MAX_QP, qp);447 }448 #endif449 429 450 430 // If slice start or slice end is within this cu... … … 538 518 } 539 519 } 540 541 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT542 if ( uiDepth <= m_addSADDepth )543 {544 m_LCUPredictionSAD += m_temporalSAD;545 m_addSADDepth = uiDepth;546 }547 #endif548 520 549 521 if(!earlyDetectionSkipMode) … … 796 768 { 797 769 bBoundary = true; 798 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT799 m_addSADDepth++;800 #endif801 770 } 802 771 … … 842 811 iMaxQP = iStartQP; 843 812 } 844 #if RATE_CONTROL_LAMBDA_DOMAIN845 813 if ( m_pcEncCfg->getUseRateCtrl() ) 846 814 { … … 848 816 iMaxQP = m_pcRateCtrl->getRCQP(); 849 817 } 850 #else851 if(m_pcEncCfg->getUseRateCtrl())852 {853 Int qp = m_pcRateCtrl->getUnitQP();854 iMinQP = Clip3( MIN_QP, MAX_QP, qp);855 iMaxQP = Clip3( MIN_QP, MAX_QP, qp);856 }857 #endif858 818 for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++) 859 819 { … … 1250 1210 } 1251 1211 1252 #if RATE_CONTROL_INTRA1253 1212 Int xCalcHADs8x8_ISlice(Pel *piOrg, Int iStrideOrg) 1254 1213 { … … 1365 1324 return(iSumHad); 1366 1325 } 1367 #endif1368 1326 1369 1327 /** check RD costs for a CU block encoded with merge … … 1542 1500 #endif 1543 1501 1544 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT1545 if ( m_pcEncCfg->getUseRateCtrl() && m_pcEncCfg->getLCULevelRC() && ePartSize == SIZE_2Nx2N && uhDepth <= m_addSADDepth )1546 {1547 UInt SAD = m_pcRdCost->getSADPart( g_bitDepthY, m_ppcPredYuvTemp[uhDepth]->getLumaAddr(), m_ppcPredYuvTemp[uhDepth]->getStride(),1548 m_ppcOrigYuv[uhDepth]->getLumaAddr(), m_ppcOrigYuv[uhDepth]->getStride(),1549 rpcTempCU->getWidth(0), rpcTempCU->getHeight(0) );1550 m_temporalSAD = (Int)SAD;1551 }1552 #endif1553 1554 1502 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false ); 1555 1503 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); … … 1582 1530 1583 1531 m_pcEntropyCoder->resetBits(); 1584 1585 1532 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) 1586 1533 { … … 1636 1583 1637 1584 m_pcEntropyCoder->resetBits(); 1638 1639 1585 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) 1640 1586 {
Note: See TracChangeset for help on using the changeset viewer.