Changeset 90 in SHVCSoftware for branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder


Ignore:
Timestamp:
20 Mar 2013, 22:00:39 (12 years ago)
Author:
seregin
Message:

splitting parameter sets for layers

Location:
branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecSlice.cpp

    r54 r90  
    4141//! \{
    4242
     43#if SVC_EXTENSION
     44  ParameterSetMap<TComVPS> ParameterSetManagerDecoder::m_vpsBuffer(MAX_NUM_VPS);
     45#endif
     46
    4347//////////////////////////////////////////////////////////////////////
    4448// Construction/Destruction
     
    398402
    399403ParameterSetManagerDecoder::ParameterSetManagerDecoder()
     404#if SVC_EXTENSION
     405: m_spsBuffer(MAX_NUM_SPS)
     406, m_ppsBuffer(MAX_NUM_PPS)
     407#else
    400408: m_vpsBuffer(MAX_NUM_VPS)
    401409, m_spsBuffer(MAX_NUM_SPS)
    402410, m_ppsBuffer(MAX_NUM_PPS)
     411#endif
    403412{
    404413}
  • branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecSlice.h

    r54 r90  
    111111
    112112private:
     113#if SVC_EXTENSION
     114  static ParameterSetMap<TComVPS> m_vpsBuffer;
     115#else
    113116  ParameterSetMap<TComVPS> m_vpsBuffer;
     117#endif
    114118  ParameterSetMap<TComSPS> m_spsBuffer;
    115119  ParameterSetMap<TComPPS> m_ppsBuffer;
  • branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.cpp

    r76 r90  
    4040
    4141#if SVC_EXTENSION
    42 ParameterSetManagerDecoder TDecTop::m_parameterSetManagerDecoder;  // storage for parameter sets
    4342UInt  TDecTop::m_prevPOC = MAX_UINT;
    4443UInt  TDecTop::m_uiPrevLayerId = MAX_UINT;
     
    332331  printf("\ninserting lost poc : %d\n",iLostPoc);
    333332  TComSlice cFillSlice;
     333#if SVC_EXTENSION
     334  cFillSlice.setSPS( m_parameterSetManagerDecoder[m_layerId].getFirstSPS() );
     335  cFillSlice.setPPS( m_parameterSetManagerDecoder[m_layerId].getFirstPPS() );
     336  cFillSlice.initSlice( m_layerId );
     337#else
    334338  cFillSlice.setSPS( m_parameterSetManagerDecoder.getFirstSPS() );
    335339  cFillSlice.setPPS( m_parameterSetManagerDecoder.getFirstPPS() );
    336 #if SVC_EXTENSION
    337   cFillSlice.initSlice( m_parameterSetManagerDecoder.getFirstSPS()->getLayerId() );
    338 #else
    339340  cFillSlice.initSlice();
    340341#endif
    341342  TComPic *cFillPic;
    342343  xGetNewPicBuffer(&cFillSlice,cFillPic);
     344#if SVC_EXTENSION
     345  cFillPic->getSlice(0)->setSPS( m_parameterSetManagerDecoder[m_layerId].getFirstSPS() );
     346  cFillPic->getSlice(0)->setPPS( m_parameterSetManagerDecoder[m_layerId].getFirstPPS() );
     347  cFillPic->getSlice(0)->initSlice( m_layerId );
     348#else
    343349  cFillPic->getSlice(0)->setSPS( m_parameterSetManagerDecoder.getFirstSPS() );
    344350  cFillPic->getSlice(0)->setPPS( m_parameterSetManagerDecoder.getFirstPPS() );
    345 #if SVC_EXTENSION
    346   cFillPic->getSlice(0)->initSlice( cFillPic->getLayerId() );
    347 #else
    348351  cFillPic->getSlice(0)->initSlice();
    349352#endif
     
    388391Void TDecTop::xActivateParameterSets()
    389392{
     393#if SVC_EXTENSION
     394  m_parameterSetManagerDecoder[m_layerId].applyPrefetchedPS();
     395 
     396  TComPPS *pps = m_parameterSetManagerDecoder[m_layerId].getPPS(m_apcSlicePilot->getPPSId());
     397  assert (pps != 0);
     398
     399  TComSPS *sps = m_parameterSetManagerDecoder[m_layerId].getSPS(pps->getSPSId());
     400  assert (sps != 0);
     401
     402  if( false == m_parameterSetManagerDecoder[m_layerId].activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot->getIdrPicFlag()) )
     403#else
    390404  m_parameterSetManagerDecoder.applyPrefetchedPS();
    391405 
     
    396410  assert (sps != 0);
    397411
    398 #if SVC_EXTENSION
    399   if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot->getIdrPicFlag(), m_apcSlicePilot->getLayerId() ))
    400 #else
    401412  if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->getIdrPicFlag()))
    402413#endif
     
    460471  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
    461472
     473#if SVC_EXTENSION
     474  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder[m_layerId]);
     475#else
    462476  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder);
     477#endif
    463478  if (m_apcSlicePilot->isNextSlice())
    464479  {
     
    713728  {
    714729    pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA );
    715 #if !REF_IDX_FRAMEWORK || AVC_SYNTAX
    716730    // Set reference list
    717731    pcSlice->setRefPicList( m_cListPic );
    718 #endif
    719732
    720733#if SVC_EXTENSION   
     
    756769
    757770#if REF_IDX_FRAMEWORK
    758 #if !AVC_SYNTAX
    759     // Set reference list
    760     pcSlice->setRefPicList( m_cListPic );
    761 #endif
    762771    if(m_layerId > 0)
    763772    {
     
    869878 
    870879  m_cEntropyDecoder.decodeVPS( vps );
     880#if SVC_EXTENSION
     881  m_parameterSetManagerDecoder[0].storePrefetchedVPS(vps);
     882#else
    871883  m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 
     884#endif
    872885}
    873886
     
    879892#endif
    880893  m_cEntropyDecoder.decodeSPS( sps );
     894#if SVC_EXTENSION
     895  m_parameterSetManagerDecoder[m_layerId].storePrefetchedSPS(sps);
     896#else
    881897  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
     898#endif
    882899#if REF_IDX_MFM
    883900  m_pcSPS = sps;
     
    896913  TComPPS* pps = new TComPPS();
    897914  m_cEntropyDecoder.decodePPS( pps );
     915#if SVC_EXTENSION
     916  m_parameterSetManagerDecoder[m_layerId].storePrefetchedPPS( pps );
     917#else
    898918  m_parameterSetManagerDecoder.storePrefetchedPPS( pps );
     919#endif
    899920
    900921  if( pps->getDependentSliceSegmentsEnabledFlag() )
     
    914935Void TDecTop::xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType )
    915936{
     937#if SVC_EXTENSION
     938  if(nalUnitType == NAL_UNIT_SEI_SUFFIX)
     939  {
     940    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );
     941  }
     942  else
     943  {
     944    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );
     945    SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS);
     946    if (activeParamSets.size()>0)
     947    {
     948      SEIActiveParameterSets *seiAps = (SEIActiveParameterSets*)(*activeParamSets.begin());
     949      m_parameterSetManagerDecoder[m_layerId].applyPrefetchedPS();
     950      assert(seiAps->activeSeqParamSetId.size()>0);
     951      if (! m_parameterSetManagerDecoder[m_layerId].activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))
     952      {
     953        printf ("Warning SPS activation with Active parameter set SEI failed");
     954      }
     955    }
     956  }
     957#else
    916958  if(nalUnitType == NAL_UNIT_SEI_SUFFIX)
    917959  {
     
    933975    }
    934976  }
     977#endif
    935978}
    936979
  • branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.h

    r54 r90  
    7373  TComList<TComPic*>      m_cListPic;         //  Dynamic buffer
    7474#if SVC_EXTENSION
    75   static ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets
     75  ParameterSetManagerDecoder m_parameterSetManagerDecoder[MAX_LAYERS];  // storage for parameter sets
    7676#else
    7777  ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets
Note: See TracChangeset for help on using the changeset viewer.