Changeset 1385 in SHVCSoftware


Ignore:
Timestamp:
31 Jul 2015, 22:59:44 (9 years ago)
Author:
seregin
Message:

build the list and check for layers needed to be decoded

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

Legend:

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

    r1377 r1385  
    5454Int   TDecTop::m_crossLayerPocResetPeriodId    = -1;
    5555Int   TDecTop::m_crossLayerPocResetIdc         = -1;
     56std::vector<UInt> TDecTop::m_targetDecLayerIdList; // list of layers to be decoded according to the OLS index
    5657#endif
    5758
     
    19561957  if( nalu.m_nuhLayerId == 63 )
    19571958  { 
     1959    return false;
     1960  }
     1961
     1962  // skip NAL units of the layers not needed to be decoded specified by OLS
     1963  if( nalu.m_nalUnitType != NAL_UNIT_VPS && nalu.m_nalUnitType != NAL_UNIT_SPS && nalu.m_nalUnitType != NAL_UNIT_PPS &&
     1964      m_targetDecLayerIdList.size() && std::find( m_targetDecLayerIdList.begin(), m_targetDecLayerIdList.end(), nalu.m_nuhLayerId ) == m_targetDecLayerIdList.end() )
     1965  {
    19581966    return false;
    19591967  }
     
    23822390    if( vps->getOutputLayerFlag( targetOlsIdx, i ) )
    23832391    {
    2384       this->getLayerDec( vps->getLayerSetLayerIdList( targetLsIdx, i ) )->m_isOutputLayerFlag = true;
     2392      m_ppcTDecTop[vps->getLayerSetLayerIdList( targetLsIdx, i )]->m_isOutputLayerFlag = true;
    23852393    }
    23862394  }
     
    25202528  assert( targetOlsIdx >= 0 );
    25212529
     2530  // list of layers to be decoded is not built yet
     2531  m_targetDecLayerIdList.resize(0);
     2532
    25222533  UInt targetDecLayerSetIdx = vps->getOutputLayerSetIdx(targetOlsIdx);
    25232534  UInt lsIdx = targetDecLayerSetIdx;
    2524   UInt targetDecLayerIdList[MAX_LAYERS] = {0};
    2525 
    2526   for (UInt i = 0, j = 0; i < vps->getNumLayersInIdList(lsIdx); i++)
     2535 
     2536  for (UInt i = 0; i < vps->getNumLayersInIdList(lsIdx); i++)
    25272537  {
    25282538    if (vps->getNecessaryLayerFlag(targetOlsIdx, i))
    25292539    {
    2530       targetDecLayerIdList[j++] = vps->getLayerSetLayerIdList(lsIdx, i);
     2540      m_targetDecLayerIdList.push_back( vps->getLayerSetLayerIdList(lsIdx, i) );
    25312541    }
    25322542  }
     
    25422552  else
    25432553  {
    2544     smallestLayerId = targetDecLayerIdList[0];
     2554    smallestLayerId = m_targetDecLayerIdList[0];
    25452555  }
    25462556
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r1319 r1385  
    162162#endif
    163163  Bool                    m_isOutputLayerFlag;
     164  static std::vector<UInt> m_targetDecLayerIdList; // list of layers to be decoded according to the OLS index
    164165#endif //SVC_EXTENSION
    165166
Note: See TracChangeset for help on using the changeset viewer.