Changeset 582 in SHVCSoftware for branches/SHM-5.0-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
31 Jan 2014, 20:35:21 (11 years ago)
Author:
qualcomm
Message:

JCTVC-P0192: Resolution-based sub-DPB management <MACRO: RESOLUTION_BASED_DPB)

This patch includes the signaling, and assignment of resolution-based sub-DPB indices. Bumping process will be included in a following patch.

From: Adarsh K. Ramasubramonian <aramasub@…>

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

Legend:

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

    r579 r582  
    14251425  }
    14261426#endif
     1427#if RESOLUTION_BASED_DPB
     1428  vps->assignSubDpbIndices();
     1429#endif
    14271430  READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
    14281431  vps->setMaxOneActiveRefLayerFlag(uiCode);
     
    15871590{
    15881591  UInt uiCode;
     1592#if !RESOLUTION_BASED_DPB
    15891593  vps->deriveNumberOfSubDpbs();
     1594#endif
    15901595  for(Int i = 1; i < vps->getNumOutputLayerSets(); i++)
    15911596  {
     
    16221627        }
    16231628        READ_UVLC( uiCode, "max_vps_num_reorder_pics[i][j]" );              vps->setMaxVpsNumReorderPics( i, j, uiCode);
     1629#if RESOLUTION_BASED_DPB
     1630        if( vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) != vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) ) 
     1631        {
     1632          for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
     1633          {
     1634            READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1[i][k][j]" ); vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode);
     1635          }
     1636        }
     1637        else  // vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) == vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet )
     1638        {         
     1639          for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
     1640          {
     1641            vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, vps->getMaxVpsDecPicBufferingMinus1( i, k, j));
     1642          }
     1643        }
     1644#endif
    16241645        READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" );        vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode);
    16251646      }
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r567 r582  
    8686  m_bRefreshPending            = false;
    8787#endif
     88#if RESOLUTION_BASED_DPB
     89  m_subDpbIdx = -1;
     90#endif
    8891}
    8992
     
    306309  else
    307310  {
     311#if RESOLUTION_BASED_DPB
     312    Int layerSetIdxForOutputLayerSet = pcSlice->getVPS()->getOutputLayerSetIdx( getCommonDecoderParams()->getOutputLayerSetIdx() );
     313    Int layerIdx = pcSlice->getVPS()->findLayerIdxInLayerSet( layerSetIdxForOutputLayerSet, pcSlice->getLayerId() );  assert( layerIdx != -1 );
     314    m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsLayerDecPicBuffMinus1( getCommonDecoderParams()->getOutputLayerSetIdx(), layerIdx, pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
     315#else
    308316    m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( getCommonDecoderParams()->getOutputLayerSetIdx(), pcSlice->getLayerId(), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
     317#endif
    309318  }
    310319#else
     
    816825  // Following check should go wherever the VPS is activated
    817826  checkValueOfOutputLayerSetIdx( m_apcSlicePilot->getVPS());
     827#endif
     828#if RESOLUTION_BASED_DPB
     829  // Following assignment should go wherever a new VPS is activated
     830  assignSubDpbs(m_apcSlicePilot->getVPS());
    818831#endif
    819832  m_apcSlicePilot->initSlice( nalu.m_layerId );
     
    21082121}
    21092122#endif
     2123#if RESOLUTION_BASED_DPB
     2124Void TDecTop::assignSubDpbs(TComVPS *vps)
     2125{
     2126  if( m_subDpbIdx == -1 ) // Sub-DPB index is not already assigned
     2127  {
     2128    Int lsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getOutputLayerSetIdx() );
     2129
     2130    Int layerIdx = vps->findLayerIdxInLayerSet( lsIdx, getLayerId() );
     2131    assert( layerIdx != -1 ); // Current layer should be found in the layer set.
     2132
     2133    // Copy from the active VPS based on the layer ID.
     2134    m_subDpbIdx = vps->getSubDpbAssigned( lsIdx, layerIdx );
     2135  }
     2136}
     2137#endif
    21102138//! \}
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.h

    r562 r582  
    144144  Bool                   m_bRefreshPending;
    145145#endif
    146 
     146#if RESOLUTION_BASED_DPB
     147  Int                    m_subDpbIdx;     // Index to the sub-DPB that the layer belongs to.
     148                                          // When new VPS is activated, this should be re-initialized to -1
     149#endif
    147150public:
    148151  TDecTop();
     
    262265  ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; }
    263266#endif
     267#if RESOLUTION_BASED_DPB
     268  Void setSubDpbIdx(Int idx)    { m_subDpbIdx = idx; }
     269  Int  getSubDpbIdx()           { return m_subDpbIdx; }
     270  Void assignSubDpbs(TComVPS *vps);
     271#endif
    264272};// END CLASS DEFINITION TDecTop
    265273
Note: See TracChangeset for help on using the changeset viewer.