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


Ignore:
Timestamp:
6 Jul 2015, 20:20:51 (10 years ago)
Author:
seregin
Message:

macro cleanup: RESOLUTION_BASED_DPB

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

Legend:

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

    r1095 r1100  
    34243424#endif
    34253425#endif
    3426 #if RESOLUTION_BASED_DPB
    3427   vps->assignSubDpbIndices();
    3428 #endif
    34293426  READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
    34303427  vps->setMaxOneActiveRefLayerFlag(uiCode);
     
    37853782#endif
    37863783
    3787 #if !RESOLUTION_BASED_DPB
    37883784  vps->deriveNumberOfSubDpbs();
    3789 #endif
     3785
    37903786  for(Int i = 1; i < vps->getNumOutputLayerSets(); i++)
    37913787  {
     
    38433839        }
    38443840        READ_UVLC( uiCode, "max_vps_num_reorder_pics[i][j]" );              vps->setMaxVpsNumReorderPics( i, j, uiCode);
    3845 #if RESOLUTION_BASED_DPB
    3846         if( vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) != vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) ) 
    3847         {
    3848           for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    3849           {
    3850             READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1[i][k][j]" ); vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode);
    3851           }
    3852         }
    3853         else  // vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) == vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet )
    3854         {         
    3855           for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    3856           {
    3857             vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, vps->getMaxVpsDecPicBufferingMinus1( i, k, j));
    3858           }
    3859         }
    3860 #endif
     3841
    38613842        READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" );        vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode);
    38623843      }
     
    38853866      if( !vps->getSubLayerDpbInfoPresentFlag(i, j) )  // If sub-layer DPB information is NOT present
    38863867      {
    3887 #if RESOLUTION_BASED_DPB
    3888         for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++)
    3889 #else
    38903868        for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    3891 #endif
    38923869        {
    38933870          vps->setMaxVpsDecPicBufferingMinus1( i, k, j, vps->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) );
    38943871        }
    38953872        vps->setMaxVpsNumReorderPics( i, j, vps->getMaxVpsNumReorderPics( i, j - 1) );
    3896 #if RESOLUTION_BASED_DPB
    3897         for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)
    3898         {
    3899           vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j - 1));
    3900         }
    3901 #endif
    39023873        vps->setMaxVpsLatencyIncreasePlus1( i, j, vps->getMaxVpsLatencyIncreasePlus1( i, j - 1 ) );
    39033874      }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1093 r1100  
    116116  m_firstPicInLayerDecodedFlag = false; 
    117117#endif
    118 #if RESOLUTION_BASED_DPB
    119   m_subDpbIdx = -1;
    120 #endif
    121118#if POC_RESET_IDC_DECODER
    122119  m_parseIdc = -1;
     
    280277  else
    281278  {
    282 #if RESOLUTION_BASED_DPB
    283     Int layerSetIdxForOutputLayerSet = pcSlice->getVPS()->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() );
    284     Int layerIdx = pcSlice->getVPS()->findLayerIdxInLayerSet( layerSetIdxForOutputLayerSet, pcSlice->getLayerId() );  assert( layerIdx != -1 );
    285     m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsLayerDecPicBuffMinus1( getCommonDecoderParams()->getTargetOutputLayerSetIdx(), layerIdx, pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
    286 #else
    287279    m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( m_commonDecoderParams->getTargetOutputLayerSetIdx(), pcSlice->getVPS()->getLayerIdcForOls( pcSlice->getVPS()->getOutputLayerSetIdx( m_commonDecoderParams->getTargetOutputLayerSetIdx()), pcSlice->getLayerId() ), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
    288 #endif
    289280  }
    290281#else
     
    759750  checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS());
    760751#endif
    761 #endif
    762 #if RESOLUTION_BASED_DPB
    763   // Following assignment should go wherever a new VPS is activated
    764   assignSubDpbs(m_apcSlicePilot->getVPS());
    765752#endif
    766753  m_apcSlicePilot->initSlice( nalu.m_layerId );
     
    28362823}
    28372824#endif
    2838 #if RESOLUTION_BASED_DPB
    2839 Void TDecTop::assignSubDpbs(TComVPS *vps)
    2840 {
    2841   if( m_subDpbIdx == -1 ) // Sub-DPB index is not already assigned
    2842   {
    2843     Int lsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() );
    2844 
    2845     Int layerIdx = vps->findLayerIdxInLayerSet( lsIdx, getLayerId() );
    2846     assert( layerIdx != -1 ); // Current layer should be found in the layer set.
    2847 
    2848     // Copy from the active VPS based on the layer ID.
    2849     m_subDpbIdx = vps->getSubDpbAssigned( lsIdx, layerIdx );
    2850   }
    2851 }
    2852 #endif
     2825
    28532826#if POC_RESET_IDC_DECODER
    28542827Void TDecTop::markAllPicsAsNoCurrAu(TComVPS *vps)
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r1093 r1100  
    168168  Int                     m_prevPicOrderCnt;
    169169#endif
    170 #if RESOLUTION_BASED_DPB
    171   Int                     m_subDpbIdx;     // Index to the sub-DPB that the layer belongs to.
    172                                            // When new VPS is activated, this should be re-initialized to -1
    173 #endif
    174170#if CONFORMANCE_BITSTREAM_MODE
    175171  Bool m_confModeFlag;
     
    293289  ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; }
    294290#endif
    295 #if RESOLUTION_BASED_DPB
    296   Void setSubDpbIdx(Int idx)    { m_subDpbIdx = idx; }
    297   Int  getSubDpbIdx()           { return m_subDpbIdx; }
    298   Void assignSubDpbs(TComVPS *vps);
    299 #endif
    300291#if CONFORMANCE_BITSTREAM_MODE
    301292  std::vector<TComPic>* getConfListPic() {return &m_confListPic; }
Note: See TracChangeset for help on using the changeset viewer.