Ignore:
Timestamp:
4 May 2015, 18:38:08 (9 years ago)
Author:
tech
Message:

Update to HM-16.5.
Starting point for further re-activation of 3D-tools.

Includes:

active:

  • MV-HEVC
  • 3D-HLS (apart from DLT)
  • VSO

inactive:

  • remaining 3D-HEVC tools.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev0/source/Lib/TLibDecoder/TDecTop.h

    r1196 r1200  
    22 * License, included below. This software may be subject to other third party
    33 * and contributor rights, including patent rights, and no such rights are
    4  * granted under this license. 
     4 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2015, ITU/ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    4444#include "TLibCommon/TComPic.h"
    4545#include "TLibCommon/TComTrQuant.h"
     46#include "TLibCommon/TComPrediction.h"
    4647#include "TLibCommon/SEI.h"
    4748
     
    5253#include "SEIread.h"
    5354
    54 struct InputNALUnit;
     55class InputNALUnit;
    5556
    5657//! \ingroup TLibDecoder
     
    6162// ====================================================================================================================
    6263
    63 #if H_MV
     64#if NH_MV
    6465class TAppDecTop;
    6566#endif
    66 #if H_3D
     67#if NH_3D
    6768class CamParsCollector
    6869{
     
    7172  ~CamParsCollector ();
    7273
    73   Void  init        ( FILE* pCodedScaleOffsetFile, TComVPS* vps );
     74  Void  init        ( const TComVPS* vps );
     75  Void  setCodeScaleOffsetFile( FILE* pCodedScaleOffsetFile ) { m_pCodedScaleOffsetFile = pCodedScaleOffsetFile; };     
    7476
    7577  Void  uninit      ();
     
    9597  Int**   m_aaiCodedScale;
    9698 
    97   TComVPS* m_vps;
     99  const TComVPS* m_vps;
    98100  Int**    m_receivedIdc;
    99101  Int      m_lastPoc;
     
    180182private:
    181183  Int                     m_iMaxRefPicNum;
    182  
     184
    183185  NalUnitType             m_associatedIRAPType; ///< NAL unit type of the associated IRAP picture
    184186  Int                     m_pocCRA;            ///< POC number of the latest CRA picture
     
    186188
    187189  TComList<TComPic*>      m_cListPic;         //  Dynamic buffer
    188 #if H_MV
     190#if NH_MV
    189191  Bool*                    m_layerInitilizedFlag; // initialization Layers
    190   static ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets
    191   Int                      m_targetOptLayerSetIdx;
     192  static ParameterSetManager m_parameterSetManager;  // storage for parameter sets
     193  Int                      m_targetOlsIdx;
    192194#else
    193   ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets
     195  ParameterSetManager     m_parameterSetManager;  // storage for parameter sets
    194196#endif
    195197  TComSlice*              m_apcSlicePilot;
    196  
    197   SEIMessages             m_SEIs; ///< List of SEI messages that have been received before the first slice and between slices
     198
     199  SEIMessages             m_SEIs; ///< List of SEI messages that have been received before the first slice and between slices, excluding prefix SEIs...
    198200
    199201  // functional classes
     
    212214
    213215  Bool isSkipPictureForBLA(Int& iPOCLastDisplay);
     216#if NH_MV
     217  Bool isRandomAccessSkipPicture(Int& iSkipFrame,  Int& iPOCLastDisplay, const TComVPS* vps);
     218#else
    214219  Bool isRandomAccessSkipPicture(Int& iSkipFrame,  Int& iPOCLastDisplay);
     220#endif
    215221  TComPic*                m_pcPic;
    216222  UInt                    m_uiSliceIdx;
    217223  Int                     m_prevPOC;
     224  Int                     m_prevTid0POC;
    218225  Bool                    m_bFirstSliceInPicture;
    219226  Bool                    m_bFirstSliceInSequence;
    220227  Bool                    m_prevSliceSkipped;
    221228  Int                     m_skippedPOC;
    222 #if SETTING_NO_OUT_PIC_PRIOR 
    223229  Bool                    m_bFirstSliceInBitstream;
    224230  Int                     m_lastPOCNoOutputPriorPics;
    225231  Bool                    m_isNoOutputPriorPics;
    226232  Bool                    m_craNoRaslOutputFlag;    //value of variable NoRaslOutputFlag of the last CRA pic
    227 #endif
    228 #if H_MV
     233#if O0043_BEST_EFFORT_DECODING
     234  UInt                    m_forceDecodeBitDepth;
     235#endif
     236  std::ostream           *m_pDecodedSEIOutputStream;
     237
     238  Bool                    m_warningMessageSkipPicture;
     239#if NH_MV
    229240  Bool                    m_isLastNALWasEos;
    230241#endif
    231242
    232 #if H_MV
    233   // For H_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer 
     243#if NH_MV
     244  // For NH_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer 
    234245  Int                     m_layerId;
    235246  Int                     m_viewId;
     
    237248  std::vector<TComPic*>   m_refPicSetInterLayer0;
    238249  std::vector<TComPic*>   m_refPicSetInterLayer1;
    239 #if H_3D
     250#if NH_3D
    240251  Int                     m_viewIndex;
    241252  Bool                    m_isDepth;
     
    245256#endif
    246257
     258  std::list<InputNALUnit*> m_prefixSEINALUs; /// Buffered up prefix SEI NAL Units.
    247259public:
    248260  TDecTop();
    249261  virtual ~TDecTop();
    250  
     262
    251263  Void  create  ();
    252264  Void  destroy ();
    253265
    254   void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); }
     266  Void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); }
    255267
    256268  Void  init();
    257 #if H_MV 
     269#if NH_MV 
    258270  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer, Bool& sliceSkippedFlag );
    259271  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
     
    261273  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay);
    262274#endif
    263  
    264275  Void  deletePicBuffer();
    265 #if H_MV
    266   TComVPS* getActiveVPS() { return m_parameterSetManagerDecoder.getActiveVPS( ); }
    267   TComSPS* getActiveSPS() { return m_parameterSetManagerDecoder.getActiveSPS( m_layerId ); }
    268 #else
    269   TComSPS* getActiveSPS() { return m_parameterSetManagerDecoder.getActiveSPS(); }
    270 #endif
    271 
    272 #if H_MV
     276
     277#if NH_MV
     278  const TComVPS* getActiveVPS() { return m_parameterSetManager.getActiveVPS( ); }
     279  const TComSPS* getActiveSPS() { return m_parameterSetManager.getActiveSPS( m_layerId ); }
     280#endif
     281
     282#if NH_MV
    273283  Void endPicDecoding(Int& poc, TComList<TComPic*>*& rpcListPic,  std::vector<Int>& targetDecLayerIdSet); 
    274 #else
    275   Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic);
    276 #endif
    277  
    278 #if SETTING_NO_OUT_PIC_PRIOR 
    279   Void  checkNoOutputPriorPics (TComList<TComPic*>*& rpcListPic);
     284#else 
     285  Void  executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic);
     286#endif
     287  Void  checkNoOutputPriorPics (TComList<TComPic*>* rpcListPic);
    280288
    281289  Bool  getNoOutputPriorPicsFlag () { return m_isNoOutputPriorPics; }
    282   Void  setNoOutputPriorPicsFlag (bool val) { m_isNoOutputPriorPics = val; }
    283 #endif
    284 #if H_MV   
     290  Void  setNoOutputPriorPicsFlag (Bool val) { m_isNoOutputPriorPics = val; }
     291  Void  setFirstSliceInPicture (bool val)  { m_bFirstSliceInPicture = val; }
     292  Bool  getFirstSliceInSequence ()         { return m_bFirstSliceInSequence; }
     293  Void  setFirstSliceInSequence (bool val) { m_bFirstSliceInSequence = val; }
     294#if O0043_BEST_EFFORT_DECODING
     295  Void  setForceDecodeBitDepth(UInt bitDepth) { m_forceDecodeBitDepth = bitDepth; }
     296#endif
     297  Void  setDecodedSEIMessageOutputStream(std::ostream *pOpStream) { m_pDecodedSEIOutputStream = pOpStream; }
     298  UInt  getNumberOfChecksumErrorsDetected() const { return m_cGopDecoder.getNumberOfChecksumErrorsDetected(); }
     299#if NH_MV   
    285300  TComPic*                getPic                ( Int poc );
    286301  TComList<TComPic*>*     getListPic            ()               { return &m_cListPic;  } 
    287302  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    288303  Void                    setLayerInitilizedFlags( Bool* val )    { m_layerInitilizedFlag = val; }
    289   Void                    setTargetOptLayerSetIdx( Int targetOptLayerSetIdx ) { m_targetOptLayerSetIdx = targetOptLayerSetIdx; }   
    290   TComVPS*                getPrefetchedVPS      ()               { return m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); }; //Assuming that currently only one VPS is present.
     304  Void                    setTargetOlsIdx       ( Int targetOlsIdx ) { m_targetOlsIdx = targetOlsIdx; }   
     305  Int                     getTargetOlsIdx       ( )                  { return m_targetOlsIdx; }   
    291306  Int                     getCurrPoc            ()               { return m_apcSlicePilot->getPOC(); }
    292307  Void                    setLayerId            ( Int layer)     { m_layerId = layer;   }
     
    294309  Void                    setViewId             ( Int viewId  )  { m_viewId  = viewId;  }
    295310  Int                     getViewId             ()               { return m_viewId;     } 
    296 #if H_3D   
     311  Void                    initFromActiveVps     ( const TComVPS* vps );
     312#if NH_3D   
    297313  Void                    setViewIndex          ( Int viewIndex  )  { m_viewIndex  = viewIndex;  }
    298314  Int                     getViewIndex          ()               { return m_viewIndex;     } 
     
    301317  Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
    302318
    303   Void                    setProfileIdc();
     319
    304320  Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }   
    305321#endif
    306322#endif
     323
    307324protected:
    308   Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
     325  Void  xGetNewPicBuffer  (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
    309326  Void  xCreateLostPicture (Int iLostPOC);
    310327
    311328  Void      xActivateParameterSets();
    312 #if H_MV 
     329#if NH_MV 
    313330  TComPic*  xGetPic( Int layerId, Int poc );
    314331  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ); 
     
    316333  Void      xCeckNoClrasOutput();
    317334
    318   Bool      xAllRefLayersInitilized();
     335  Bool      xAllRefLayersInitilized( const TComVPS* vps );
    319336#else
    320337  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
    321338#endif
    322   Void      xDecodeVPS();
    323   Void      xDecodeSPS();
    324   Void      xDecodePPS();
    325   Void      xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType );
     339  Void      xDecodeVPS(const std::vector<UChar> &naluData);
     340  Void      xDecodeSPS(const std::vector<UChar> &naluData);
     341  Void      xDecodePPS(const std::vector<UChar> &naluData);
     342  Void      xUpdatePreviousTid0POC( TComSlice *pSlice ) { if ((pSlice->getTLayer()==0) && (pSlice->isReferenceNalu() && (pSlice->getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL_R)&& (pSlice->getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL_R))) { m_prevTid0POC=pSlice->getPOC(); } }
     343
     344  Void      xParsePrefixSEImessages();
     345  Void      xParsePrefixSEIsForUnknownVCLNal();
    326346
    327347};// END CLASS DEFINITION TDecTop
Note: See TracChangeset for help on using the changeset viewer.