Changeset 147 in SHVCSoftware for branches/SHM-2.0-dev
- Timestamp:
- 3 May 2013, 01:14:49 (12 years ago)
- Location:
- branches/SHM-2.0-dev/source/Lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h
r144 r147 64 64 #define SIMPLIFIED_MV_POS_SCALING 1 ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation 65 65 #define ILP_DECODED_PICTURE 1 ///< M0274: use decoded picture size for inter-layer prediction 66 #define JCTVC_M0259_LAMBDAREFINEMENT 1 ///< JCTVC-M0259: lambda refinement (encoder only optimization) 67 66 68 67 69 #define AVC_BASE 0 ///< YUV BL reading for AVC base SVC -
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r133 r147 337 337 } 338 338 339 #if JCTVC_M0259_LAMBDAREFINEMENT 340 if( rpcSlice->getLayerId() > 0 && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) ) 341 { 342 Int nCurLayer = rpcSlice->getLayerId(); 343 Double gamma = xCalEnhLambdaFactor( m_ppcTEncTop[nCurLayer-1]->getQP() - m_ppcTEncTop[nCurLayer]->getQP() , 344 1.0 * m_ppcTEncTop[nCurLayer]->getSourceWidth() * m_ppcTEncTop[nCurLayer]->getSourceHeight() 345 / m_ppcTEncTop[nCurLayer-1]->getSourceWidth() / m_ppcTEncTop[nCurLayer-1]->getSourceHeight() ); 346 dLambda *= gamma; 347 } 348 #endif 349 339 350 // store lambda 340 351 m_pcRdCost ->setLambda( dLambda ); … … 354 365 qpc = Clip3( 0, 57, iQP + chromaQPOffset); 355 366 weight = pow( 2.0, (iQP-g_aucChromaScale[qpc])/3.0 ); // takes into account of the chroma qp mapping and chroma qp Offset 367 #if JCTVC_M0259_LAMBDAREFINEMENT 368 if( rpcSlice->getLayerId() > 0 && m_pcCfg->getGOPSize() >= 8 && rpcSlice->isIntra() == false && depth == 0 ) 369 { 370 dLambda *= 1.1; 371 weight *= 1.15; 372 } 373 #endif 356 374 m_pcRdCost->setCrDistortionWeight(weight); 357 375 #endif … … 1852 1870 } 1853 1871 1872 #if JCTVC_M0259_LAMBDAREFINEMENT 1873 Double TEncSlice::xCalEnhLambdaFactor( Double deltaQP , Double beta ) 1874 { 1875 double tmp = beta * pow( 2.0 , deltaQP / 6 ); 1876 double gamma = tmp / ( tmp + 1 ); 1877 return( gamma ); 1878 } 1879 #endif 1854 1880 //! \} -
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncSlice.h
r133 r147 141 141 private: 142 142 Double xGetQPValueAccordingToLambda ( Double lambda ); 143 144 #if JCTVC_M0259_LAMBDAREFINEMENT 145 private: 146 Double xCalEnhLambdaFactor( Double deltaQP , Double beta ); 147 #endif 143 148 }; 144 149
Note: See TracChangeset for help on using the changeset viewer.