Changeset 582 in SHVCSoftware for branches/SHM-5.0-dev/source/Lib/TLibDecoder
- Timestamp:
- 31 Jan 2014, 20:35:21 (11 years ago)
- 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 1425 1425 } 1426 1426 #endif 1427 #if RESOLUTION_BASED_DPB 1428 vps->assignSubDpbIndices(); 1429 #endif 1427 1430 READ_FLAG(uiCode, "max_one_active_ref_layer_flag" ); 1428 1431 vps->setMaxOneActiveRefLayerFlag(uiCode); … … 1587 1590 { 1588 1591 UInt uiCode; 1592 #if !RESOLUTION_BASED_DPB 1589 1593 vps->deriveNumberOfSubDpbs(); 1594 #endif 1590 1595 for(Int i = 1; i < vps->getNumOutputLayerSets(); i++) 1591 1596 { … … 1622 1627 } 1623 1628 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 1624 1645 READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" ); vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode); 1625 1646 } -
branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
r567 r582 86 86 m_bRefreshPending = false; 87 87 #endif 88 #if RESOLUTION_BASED_DPB 89 m_subDpbIdx = -1; 90 #endif 88 91 } 89 92 … … 306 309 else 307 310 { 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 308 316 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 309 318 } 310 319 #else … … 816 825 // Following check should go wherever the VPS is activated 817 826 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()); 818 831 #endif 819 832 m_apcSlicePilot->initSlice( nalu.m_layerId ); … … 2108 2121 } 2109 2122 #endif 2123 #if RESOLUTION_BASED_DPB 2124 Void 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 2110 2138 //! \} -
branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.h
r562 r582 144 144 Bool m_bRefreshPending; 145 145 #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 147 150 public: 148 151 TDecTop(); … … 262 265 ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; } 263 266 #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 264 272 };// END CLASS DEFINITION TDecTop 265 273
Note: See TracChangeset for help on using the changeset viewer.