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


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

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

Location:
branches/SHM-3.1-dev/source/Lib/TLibDecoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r372 r374  
    370370}
    371371
     372#if EARLY_REF_PIC_MARKING
     373Void TDecTop::earlyPicMarking(Int maxTemporalLayer, std::vector<Int>& targetDecLayerIdSet)
     374{
     375  UInt currTid = m_pcPic->getTLayer();
     376  UInt highestTid = (maxTemporalLayer >= 0) ? maxTemporalLayer : (m_pcPic->getSlice(0)->getSPS()->getMaxTLayers() - 1);
     377  UInt latestDecLayerId = m_layerId;
     378  UInt numTargetDecLayers = 0;
     379  Int targetDecLayerIdList[MAX_LAYERS];
     380  UInt latestDecIdx = 0;
     381  TComSlice* pcSlice = m_pcPic->getSlice(0);
     382
     383  if ( currTid != highestTid )  // Marking  process is only applicaple for highest decoded TLayer
     384  {
     385    return;
     386  }
     387
     388  // currPic must be marked as "used for reference" and must be a sub-layer non-reference picture
     389  if ( !((pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N  ||
     390          pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N    ||
     391          pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N   ||
     392          pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N   ||
     393          pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N   ||
     394          pcSlice->getNalUnitType() == NAL_UNIT_RESERVED_VCL_N10     ||
     395          pcSlice->getNalUnitType() == NAL_UNIT_RESERVED_VCL_N12     ||
     396          pcSlice->getNalUnitType() == NAL_UNIT_RESERVED_VCL_N14) && pcSlice->isReferenced()))
     397  {
     398    return;
     399  }
     400
     401  if ( targetDecLayerIdSet.size() == 0 ) // Cannot mark if we don't know the number of scalable layers
     402  {
     403    return;
     404  }
     405
     406  for (std::vector<Int>::iterator it = targetDecLayerIdSet.begin(); it != targetDecLayerIdSet.end(); it++)
     407  {
     408    if ( latestDecLayerId == (*it) )
     409    {
     410      latestDecIdx = numTargetDecLayers;
     411    }
     412    targetDecLayerIdList[numTargetDecLayers++] = (*it);
     413  }
     414
     415  Int remainingInterLayerReferencesFlag = 0;
     416  if ( currTid <= pcSlice->getVPS()->getMaxSublayerForIlpPlus1(latestDecLayerId) - 1 )
     417  {
     418    for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
     419    {
     420      for ( Int k = 0; k < m_ppcTDecTop[targetDecLayerIdList[j]]->getNumDirectRefLayers(); k++ )
     421      {
     422        if ( latestDecIdx == m_ppcTDecTop[targetDecLayerIdList[j]]->getRefLayerId(k) )
     423        {
     424          remainingInterLayerReferencesFlag = 1;
     425        }
     426      }
     427    }
     428  }
     429
     430  if ( remainingInterLayerReferencesFlag == 0 )
     431  {
     432    pcSlice->setReferenced(false);
     433  }
     434}
     435#endif
     436
    372437Void TDecTop::xCreateLostPicture(Int iLostPoc)
    373438{
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.h

    r345 r374  
    157157
    158158  Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic);
     159#if EARLY_REF_PIC_MARKING
     160  Void earlyPicMarking(Int maxTemporalLayer, std::vector<Int>& targetDecLayerIdList);
     161#endif
    159162
    160163#if SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.