Changeset 872 in SHVCSoftware


Ignore:
Timestamp:
18 Aug 2014, 22:31:55 (11 years ago)
Author:
qualcomm
Message:

Move calculation of MaxSubLayerInLayerSets to a separate function (Macro: SUB_LAYERS_IN_LAYER_SET)

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/SHM-dev/source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r869 r872  
    13061306#endif
    13071307#if VPS_TSLAYERS
    1308     vps->setMaxTSLayersPresentFlag(true);
    1309 
    1310     for( i = 0; i < vps->getMaxLayers(); i++ )
    1311     {
    1312       vps->setMaxTSLayersMinus1(i, vps->getMaxTLayers()-1);
    1313     }
     1308  vps->setMaxTSLayersPresentFlag(true);
     1309
     1310  for( i = 0; i < vps->getMaxLayers(); i++ )
     1311  {
     1312    vps->setMaxTSLayersMinus1(i, vps->getMaxTLayers()-1);
     1313  }
    13141314#endif
    13151315  vps->setMaxTidRefPresentFlag(m_maxTidRefPresentFlag);
     
    15861586    }
    15871587  }
     1588#endif
     1589#if SUB_LAYERS_IN_LAYER_SET
     1590  vps->calculateMaxSLInLayerSets();
    15881591#endif
    15891592  // Initialize dpb_size_table() for all ouput layer sets in the VPS extension
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r870 r872  
    31403140  }
    31413141  return numBits;
     3142}
     3143#endif
     3144#if SUB_LAYERS_IN_LAYER_SET
     3145Void TComVPS::calculateMaxSLInLayerSets()
     3146{
     3147  for(Int lsIdx = 0; lsIdx < getNumLayerSets(); lsIdx++)
     3148  {
     3149    UInt maxSLMinus1 = 0;
     3150    for(Int k = 0; k < getNumLayersInIdList(lsIdx); k++ ) {
     3151      Int  lId = getLayerSetLayerIdList(lsIdx, k);
     3152      maxSLMinus1 = std::max(maxSLMinus1, getMaxTSLayersMinus1(getLayerIdInVps(lId)));
     3153    }
     3154    setMaxSLayersInLayerSetMinus1(lsIdx,maxSLMinus1);
     3155  }
    31423156}
    31433157#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r869 r872  
    13141314  Void  checkNecessaryLayerFlagCondition();
    13151315#endif
     1316#if SUB_LAYERS_IN_LAYER_SET
     1317  Void  calculateMaxSLInLayerSets();
     1318#endif
    13161319#endif //SVC_EXTENSION
    13171320};
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r871 r872  
    6060#endif
    6161#define BSP_INIT_ARRIVAL_SEI             1      ///< JCTVC-R0231: Make signalling of vcl_initial_arrival_delay independent of NalHrdBpPresentFlag
     62#define SUB_LAYERS_IN_LAYER_SET          1      ///< Move calculation of MaxSubLayerInLayerSets to a separate function
    6263#define O0137_MAX_LAYERID                1      ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1
    6364
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r869 r872  
    21232123{
    21242124  UInt uiCode;
     2125#if SUB_LAYERS_IN_LAYER_SET
     2126  vps->calculateMaxSLInLayerSets();
     2127#else
    21252128#if DPB_PARAMS_MAXTLAYERS
    21262129#if BITRATE_PICRATE_SIGNALLING
     
    21512154  }
    21522155#endif
     2156#endif
    21532157
    21542158#if !RESOLUTION_BASED_DPB
     
    21612165#endif
    21622166    READ_FLAG( uiCode, "sub_layer_flag_info_present_flag[i]");  vps->setSubLayerFlagInfoPresentFlag( i, uiCode ? true : false );
     2167#if SUB_LAYERS_IN_LAYER_SET
     2168    for(Int j = 0; j <= vps->getMaxSLayersInLayerSetMinus1( layerSetIdxForOutputLayerSet ); j++)
     2169#else
    21632170#if DPB_PARAMS_MAXTLAYERS
    21642171#if BITRATE_PICRATE_SIGNALLING
     
    21692176#else
    21702177    for(Int j = 0; j <= vps->getMaxTLayers(); j++)
     2178#endif
    21712179#endif
    21722180    {
     
    22222230  }
    22232231
     2232#if !SUB_LAYERS_IN_LAYER_SET
    22242233#if BITRATE_PICRATE_SIGNALLING
    22252234  if( MaxSubLayersInLayerSetMinus1 )
     
    22272236    delete [] MaxSubLayersInLayerSetMinus1;
    22282237  }
     2238#endif
    22292239#endif
    22302240
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r869 r872  
    15061506Void TEncCavlc::codeVpsDpbSizeTable(TComVPS *vps)
    15071507{
     1508#if !SUB_LAYERS_IN_LAYER_SET  // MaxSLInLayerSets calculated earlier in the encoder
    15081509#if DPB_PARAMS_MAXTLAYERS
    15091510#if BITRATE_PICRATE_SIGNALLING
     
    15341535    }
    15351536#endif
     1537#endif
    15361538   
    15371539   
     
    15421544#endif
    15431545    WRITE_FLAG( vps->getSubLayerFlagInfoPresentFlag( i ), "sub_layer_flag_info_present_flag[i]");
     1546#if SUB_LAYERS_IN_LAYER_SET
     1547    for(Int j = 0; j <= vps->getMaxSLayersInLayerSetMinus1( layerSetIdxForOutputLayerSet ); j++)
     1548#else
    15441549#if DPB_PARAMS_MAXTLAYERS
    15451550#if BITRATE_PICRATE_SIGNALLING
     
    15501555#else
    15511556    for(Int j = 0; j < vps->getMaxTLayers(); j++)
     1557#endif
    15521558#endif
    15531559    {
     
    15851591  }
    15861592
     1593#if !SUB_LAYERS_IN_LAYER_SET
    15871594#if BITRATE_PICRATE_SIGNALLING
    15881595  if( MaxSubLayersInLayerSetMinus1 )
     
    15901597    delete [] MaxSubLayersInLayerSetMinus1;
    15911598  }
     1599#endif
    15921600#endif
    15931601}
Note: See TracChangeset for help on using the changeset viewer.