Changeset 147 in SHVCSoftware for branches/SHM-2.0-dev/source


Ignore:
Timestamp:
3 May 2013, 01:14:49 (12 years ago)
Author:
qualcomm
Message:

M0259: lambda refinement for RA configurations

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  
    6464#define SIMPLIFIED_MV_POS_SCALING        1      ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation
    6565#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
    6668
    6769#define AVC_BASE                         0      ///< YUV BL reading for AVC base SVC
  • branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r133 r147  
    337337  }
    338338
     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
    339350  // store lambda
    340351  m_pcRdCost ->setLambda( dLambda );
     
    354365  qpc = Clip3( 0, 57, iQP + chromaQPOffset);
    355366  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
    356374  m_pcRdCost->setCrDistortionWeight(weight);
    357375#endif
     
    18521870}
    18531871
     1872#if JCTVC_M0259_LAMBDAREFINEMENT
     1873Double 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
    18541880//! \}
  • branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncSlice.h

    r133 r147  
    141141private:
    142142  Double  xGetQPValueAccordingToLambda ( Double lambda );
     143
     144#if JCTVC_M0259_LAMBDAREFINEMENT
     145private:
     146  Double  xCalEnhLambdaFactor( Double deltaQP , Double beta );
     147#endif
    143148};
    144149
Note: See TracChangeset for help on using the changeset viewer.