Changeset 1065 in SHVCSoftware for branches/SHM-dev/source


Ignore:
Timestamp:
5 Mar 2015, 00:20:51 (10 years ago)
Author:
seregin
Message:

fix index for m_ppcTEncTop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r1062 r1065  
    139139{
    140140#if JCTVC_M0259_LAMBDAREFINEMENT
    141   if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->getLayerIdx()]->getNumActiveRefLayers() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) )
    142   {
    143     Int layerIdx = slice->getLayerId();
     141  Int layerIdx = slice->getLayerIdx();
     142
     143  if( slice->getLayerId() > 0 && m_ppcTEncTop[layerIdx]->getNumActiveRefLayers() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) )
     144  {
    144145    UInt prevLayerIdx = 0;
    145     if (m_ppcTEncTop[layerIdx]->getNumActiveRefLayers() > 0)
     146    if( m_ppcTEncTop[layerIdx]->getNumActiveRefLayers() > 0 )
    146147    {
    147148      prevLayerIdx = m_ppcTEncTop[layerIdx]->getPredLayerIdx( m_ppcTEncTop[layerIdx]->getNumActiveRefLayers() - 1);
    148149    }
     150
    149151    Double gamma = xCalEnhLambdaFactor( m_ppcTEncTop[prevLayerIdx]->getQP() - m_ppcTEncTop[layerIdx]->getQP() ,
    150       1.0 * m_ppcTEncTop[layerIdx]->getSourceWidth() * m_ppcTEncTop[layerIdx]->getSourceHeight()
    151       / m_ppcTEncTop[prevLayerIdx]->getSourceWidth() / m_ppcTEncTop[prevLayerIdx]->getSourceHeight() );
     152                                        1.0 * m_ppcTEncTop[layerIdx]->getSourceWidth() * m_ppcTEncTop[layerIdx]->getSourceHeight()
     153                                        / m_ppcTEncTop[prevLayerIdx]->getSourceWidth() / m_ppcTEncTop[prevLayerIdx]->getSourceHeight() );
     154
    152155    dLambda *= gamma;
    153156  }
Note: See TracChangeset for help on using the changeset viewer.