Changeset 738 in 3DVCSoftware for trunk/source/App/TAppDecoder


Ignore:
Timestamp:
10 Dec 2013, 13:50:12 (11 years ago)
Author:
tech
Message:

Merged HTM-9.0-dev0@731. (MV-HEVC 6 HLS)

Location:
trunk/source/App/TAppDecoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/App/TAppDecoder/TAppDecCfg.cpp

    r608 r738  
    8585  ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)")
    8686#if H_MV
     87#if H_MV_6_HRD_O0217_13
     88  ("TargetOptLayerSetIdx,x", m_targetOptLayerSetIdx, -1, "Target output layer set index. (default: -1, determine automatically to be equal to highest layer set index") // Should actually equal to 0 as default. However, this would cause only the base layer to be decoded. 
     89#else
    8790  ("MaxLayerId,-ls", m_maxLayerId, MAX_NUM_LAYER_IDS-1, "Maximum LayerId to be decoded.")
     91#endif
    8892#endif
    8993  ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers")
     
    124128  if ( !cfg_TargetDecLayerIdSetFile.empty() )
    125129  {
     130#if H_MV_6_HRD_O0217_13
     131    m_targetDecLayerIdSetFileEmpty = false;     
     132#endif
    126133    FILE* targetDecLayerIdSetFile = fopen ( cfg_TargetDecLayerIdSetFile.c_str(), "r" );
    127134    if ( targetDecLayerIdSetFile )
     
    167174  }
    168175#if H_MV
     176#if H_MV_6_HRD_O0217_13
     177  m_targetDecLayerIdSet.push_back( 0 );         // Only base layer at startup
     178#else
    169179  else
    170180  {
     
    174184    }
    175185  }
     186#endif
    176187#endif
    177188
  • trunk/source/App/TAppDecoder/TAppDecCfg.h

    r608 r738  
    5959  Char*         m_pchBitstreamFile;                   ///< input bitstream file name
    6060#if H_MV
     61#if H_MV_6_HRD_O0217_13
     62  Int           m_targetOptLayerSetIdx;               ///< target output layer set index
     63#endif
    6164  Int           m_maxLayerId;                         ///< maximum nuh_layer_id decoded
    6265  std::vector<Char*> m_pchReconFiles;                 ///< array of output reconstruction file name create from output reconstruction file name
     
    7477
    7578  std::vector<Int> m_targetDecLayerIdSet;             ///< set of LayerIds to be included in the sub-bitstream extraction process.
     79#if H_MV_6_HRD_O0217_13
     80  Bool          m_targetDecLayerIdSetFileEmpty;      ///< indication if target layers are given by file
     81#endif
    7682  Int           m_respectDefDispWindow;               ///< Only output content inside the default display window
    7783
     
    8389  : m_pchBitstreamFile(NULL)
    8490#if H_MV
     91#if !H_MV_6_HRD_O0217_13
    8592  , m_maxLayerId(0)
     93#endif
    8694#endif
    8795  , m_pchReconFile(NULL)
     
    9199  , m_iMaxTemporalLayer(-1)
    92100  , m_decodedPictureHashSEIEnabled(0)
     101#if H_MV_6_HRD_O0217_13
     102  , m_targetDecLayerIdSetFileEmpty(true)
     103#endif
    93104  , m_respectDefDispWindow(0)
    94105  {}
  • trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r655 r738  
    6161{
    6262#if H_MV
     63#if H_MV_LAYER_WISE_STARTUP
     64  for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++)
     65  {
     66    m_layerIdToDecIdx[i] = -1;
     67    m_layerInitilizedFlags[i] = false;
     68  }
     69#else
    6370  for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++) m_layerIdToDecIdx[i] = -1;
     71#endif
    6472#endif
    6573#if H_3D
     
    184192    Bool newSliceDiffPoc   = false;
    185193    Bool newSliceDiffLayer = false;
     194#if H_MV_FIX_SKIP_PICTURES
     195    Bool sliceSkippedFlag = false;
     196#endif
    186197#if H_3D
    187198    Bool allLayersDecoded  = false;     
     
    201212      read(nalu, nalUnit);
    202213#if H_MV     
     214#if !H_MV_6_HRD_O0217_13
    203215      Int decIdx     = xGetDecoderIdx( nalu.m_layerId , true );
    204      
     216#endif
     217#if H_MV_6_LAYER_ID_32
     218      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 )
     219#else           
    205220      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) )
     221#endif
    206222      {
    207223        bNewPicture = false;
     224#if H_MV_6_LAYER_ID_32
     225        if ( !bitstreamFile )
     226        {
     227          decIdxLastPic     = decIdxCurrPic;
     228        }
     229#endif
    208230      }
    209231      else
    210232      {
     233#if H_MV_6_HRD_O0217_13
     234        Int decIdx     = xGetDecoderIdx( nalu.m_layerId , true );     
     235#endif
    211236        newSliceDiffLayer = nalu.isSlice() && ( nalu.m_layerId != layerIdCurrPic ) && !firstSlice;
     237#if H_MV_FIX_SKIP_PICTURES
     238        newSliceDiffPoc   = m_tDecTop[decIdx]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[decIdx], newSliceDiffLayer, sliceSkippedFlag );
     239#else
    212240        newSliceDiffPoc   = m_tDecTop[decIdx]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[decIdx], newSliceDiffLayer );
     241#endif
    213242        // decode function only returns true when all of the following conditions are true
    214243        // - poc in particular layer changes
     
    216245        // - nalu.isSlice() == true     
    217246
     247#if H_MV_6_HRD_O0217_13
     248        // Update TargetDecLayerIdList only when not specified by layer id file, specification by file might actually out of conformance.
     249        if (nalu.m_nalUnitType == NAL_UNIT_VPS && m_targetDecLayerIdSetFileEmpty )
     250        {
     251          TComVPS* vps = m_tDecTop[decIdx]->getPrefetchedVPS();
     252          if ( m_targetOptLayerSetIdx == -1 )
     253          {
     254            // Not normative! Corresponds to specification by "External Means". (Should be set equal to 0, when no external means available. )
     255            m_targetOptLayerSetIdx = vps->getVpsNumLayerSetsMinus1();
     256          }
     257
     258          m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx );
     259        }
     260#endif
     261#if H_MV_FIX_SKIP_PICTURES
     262        bNewPicture       = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag;
     263        if ( nalu.isSlice() && firstSlice && !sliceSkippedFlag )       
     264#else
    218265        bNewPicture       = newSliceDiffLayer || newSliceDiffPoc;
    219266
    220267        if ( nalu.isSlice() && firstSlice )
     268#endif
    221269        {
    222270          layerIdCurrPic = nalu.m_layerId;
     
    832880{
    833881  Int decIdx = -1;
     882
     883#if H_MV_6_LAYER_ID_32
     884  if ( layerId > MAX_NUM_LAYER_IDS-1 ) 
     885  {
     886    return decIdx;
     887  }
     888#endif
     889
    834890  if ( m_layerIdToDecIdx[ layerId ] != -1 )
    835891  {     
     
    850906    m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
    851907    m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );
     908#if H_MV_LAYER_WISE_STARTUP
     909    m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags );
     910#endif
     911
    852912#if H_3D
    853913   m_tDecTop[ decIdx ]->setCamParsCollector( &m_cCamParsCollector );
  • trunk/source/App/TAppDecoder/TAppDecTop.h

    r655 r738  
    6767  Int                             m_numDecoders;                               ///< number of decoder instances
    6868  TComPicLists                    m_ivPicLists;                                ///< picture buffers of decoder instances
     69#if H_MV_LAYER_WISE_STARTUP
     70  Bool                            m_layerInitilizedFlags[ MAX_NUM_LAYER_IDS ]; ///< for layerwise startup
     71#endif
     72
    6973#else
    7074  TDecTop                         m_cTDecTop;                     ///< decoder class
Note: See TracChangeset for help on using the changeset viewer.