Changeset 374 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
28 Aug 2013, 15:33:12 (12 years ago)
Author:
nokia
Message:

Integration of "early picture marking" of JCTVC-L0188 and fix to ILR_RESTR.

File:
1 edited

Legend:

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

    r370 r374  
    576576    pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR));
    577577#if SVC_EXTENSION
     578#if ILR_RESTR && ILR_RESTR_FIX
     579    Int interLayerPredLayerIdcTmp[MAX_VPS_LAYER_ID_PLUS1];
     580    Int activeNumILRRefIdxTmp = 0;
     581#endif
    578582    if (m_layerId > 0)
    579583    {
     
    587591#endif
    588592        pcSlice->setBaseColPic( *cListPic, refLayerIdc );
     593
     594#if ILR_RESTR && ILR_RESTR_FIX
     595        // Apply temporal layer restriction to inter-layer prediction
     596        Int maxSubLayerForILPPlus1 = m_pcEncTop->getVPS()->getMaxSublayerForIlpPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerId());
     597        if( ((Int)(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getRapPicFlag()) )
     598        {
     599          interLayerPredLayerIdcTmp[activeNumILRRefIdxTmp++] = refLayerIdc; // add picture to the list of valid inter-layer pictures
     600        }
     601        else
     602        {
     603          continue; // ILP is not valid due to temporal layer restriction
     604        }
     605#endif
    589606
    590607#if SCALED_REF_LAYER_OFFSETS
     
    628645#endif
    629646      }
     647
     648#if ILR_RESTR && ILR_RESTR_FIX
     649      // Update the list of active inter-layer pictures
     650      for ( Int i = 0; i < activeNumILRRefIdxTmp; i++)
     651      {
     652        pcSlice->setInterLayerPredLayerIdc( interLayerPredLayerIdcTmp[i], i );
     653      }
     654      pcSlice->setActiveNumILRRefIdx( activeNumILRRefIdxTmp );
     655      if ( pcSlice->getActiveNumILRRefIdx() == 0 )
     656      {
     657        // No valid inter-layer pictures -> disable inter-layer prediction
     658        pcSlice->setInterLayerPredEnabledFlag(false);
     659      }
     660#endif
     661
    630662    }
    631663#endif
Note: See TracChangeset for help on using the changeset viewer.