Ignore:
Timestamp:
4 Sep 2015, 21:28:58 (9 years ago)
Author:
tech
Message:

Clean-ups. HLS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.0-dev0/source/App/TAppDecoder/TAppDecTop.h

    r1313 r1317  
    6060{
    6161private:
    62   // class interface
     62  // class interface 
    6363#if NH_MV
    6464  TDecTop*                        m_tDecTop             [ MAX_NUM_LAYERS ];    ///< decoder classes
    6565  TVideoIOYuv*                    m_tVideoIOYuvReconFile[ MAX_NUM_LAYERS ];    ///< reconstruction YUV class
    66   Int                             m_layerIdToDecIdx     [ MAX_NUM_LAYER_IDS ]; ///< maping from layer id to decoder index
     66  Int                             m_layerIdToDecIdx     [ MAX_NUM_LAYER_IDS ]; ///< mapping from layer id to decoder index
    6767  Int                             m_numDecoders;                               ///< number of decoder instances
    68   TComPicLists                    m_ivPicLists;                                ///< picture buffers of decoder instances
    69   Bool                            m_layerInitilizedFlags[ MAX_NUM_LAYER_IDS ]; ///< for layerwise startup
     68  TComPicLists                    m_dpb;                                       ///< picture buffers of decoder instances
     69
     70  TComPic*                        m_curPic;                                    ///< currently decoded picture
     71  TComAu                          m_curAu;                                     ///< currently decoded Au
     72 
     73  // Random access related
     74  Bool                            m_handleCraAsBlaFlag;
     75  Bool                            m_handleCraAsBlaFlagSetByExtMeans;
     76  Bool                            m_noClrasOutputFlag;
     77  Bool                            m_noClrasOutputFlagSetByExtMeans;
     78  Bool                            m_noRaslOutputFlagAssocIrap           [ MAX_NUM_LAYER_IDS ];
     79
     80  // Layer wise startup
     81  Bool                            m_firstPicInLayerDecodedFlag          [ MAX_NUM_LAYER_IDS ];
     82  Bool                            m_layerInitilizedFlag                 [ MAX_NUM_LAYER_IDS ];
     83  Bool                            m_layerResetFlag;
     84
     85  // DPB related variables
     86  Int                             m_maxNumReorderPics;
     87  Int                             m_maxLatencyIncreasePlus1;
     88  Int                             m_maxLatencyValue;
     89  Int                             m_maxDecPicBufferingMinus1            [ MAX_NUM_LAYER_IDS ];
     90
     91  // Poc resetting
     92  Int                             m_lastPresentPocResetIdc              [ MAX_NUM_LAYER_IDS ];
     93  Bool                            m_firstPicInPocResettingPeriodReceived[ MAX_NUM_LAYER_IDS ];
     94  Bool                            m_pocDecrementedInDpbFlag             [ MAX_NUM_LAYER_IDS ];
     95  Bool                            m_newPicIsFstPicOfAllLayOfPocResetPer;
     96  Bool                            m_newPicIsPocResettingPic;
     97
     98  // General decoding state
     99  Bool                            m_newVpsActivatedbyCurAu;
     100  Bool                            m_newVpsActivatedbyCurPic;
     101  Bool                            m_eosInLayer                          [ MAX_NUM_LAYER_IDS ];
     102  Bool                            m_initilizedFromVPS;
     103  Bool                            m_firstSliceInBitstream;
     104  UInt64                          m_decodingOrder                       [ MAX_NUM_LAYER_IDS ];
     105  UInt64                          m_totalNumofPicsReceived;
     106  Bool                            m_cvsStartFound;
     107  Int                             m_smallestLayerId;
     108
     109  // Decoding processes for current  picture
     110  DecodingProcess                 m_decProcPocAndRps;
     111  DecodingProcess                 m_decProcCvsg;
     112 
     113  // Active parameter sets
     114  const TComPPS*                  m_pps;                                ///< active PPS
     115  const TComSPS*                  m_sps;                                ///< active SPS
    70116  const TComVPS*                  m_vps;                                ///< active VPS
     117
     118  Bool                            m_reconOpen           [ MAX_NUM_LAYERS ]; ///< reconstruction file opened
     119#if NH_3D
     120  FILE*                           m_pScaleOffsetFile;
     121  CamParsCollector                m_cCamParsCollector;
     122#endif
    71123#else
    72124  TDecTop                         m_cTDecTop;                     ///< decoder class
    73125  TVideoIOYuv                     m_cTVideoIOYuvReconFile;        ///< reconstruction YUV class
    74 #endif
    75126  // for output control
    76 #if NH_MV
    77   Int                             m_pocLastDisplay      [ MAX_NUM_LAYERS ]; ///< last POC in display order
    78   Bool                            m_reconOpen           [ MAX_NUM_LAYERS ]; ///< reconstruction file opened
    79   Bool                            m_markedForOutput;
    80 #else
    81127  Int                             m_iPOCLastDisplay;              ///< last POC in display order
    82128#endif
    83   std::ofstream                   m_seiMessageFileStream;         ///< Used for outputing SEI messages.
    84 
    85 #if NH_3D
    86   FILE*                           m_pScaleOffsetFile;
    87   CamParsCollector                m_cCamParsCollector;
    88 #endif
     129  std::ofstream                   m_seiMessageFileStream;         ///< Used for outputing SEI messages. 
    89130public:
    90131  TAppDecTop();
     
    95136  Void  decode            (); ///< main decoding function
    96137#if NH_MV
    97   UInt  getNumberOfChecksumErrorsDetected( ) const
    98   {
    99     UInt numOfChecksumErrors = 0;
    100     for (Int i = 0; i < m_numDecoders; i++ )
    101     {
    102       numOfChecksumErrors += getNumberOfChecksumErrorsDetected( i );
    103     }
    104     return numOfChecksumErrors;
    105   }
    106 
     138  UInt  getNumberOfChecksumErrorsDetected( ) const;
    107139  UInt  getNumberOfChecksumErrorsDetected( Int decIdx ) const { return m_tDecTop[decIdx]->getNumberOfChecksumErrorsDetected(); }
    108 
    109140#else
    110141  UInt  getNumberOfChecksumErrorsDetected() const { return m_cTDecTop.getNumberOfChecksumErrorsDetected(); }
     
    112143
    113144protected:
     145
    114146  Void  xCreateDecLib     (); ///< create internal classes
    115147  Void  xDestroyDecLib    (); ///< destroy internal classes
    116148  Void  xInitDecLib       (); ///< initialize decoder class
    117149
    118 #if NH_MV
    119   Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
    120 
    121   Void  xMarkForOutput   ( Bool allLayersDecoded, Int pocLastPic, Int layerIdLastPic );         
    122   Void  xMarkAltOutPic    ( Int targetOutputLayer, Int pocLastPic );
    123 
    124   Void  xFlushOutput      ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file
    125   Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false );
    126 #else
     150#if !NH_MV
    127151  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file
    128152  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file
    129 #endif
    130   Bool  isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
     153  Bool  isNaluWithinTargetDecLayerIdSet    ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
     154
     155#else
     156  // Process NAL units
     157  Bool xExtractAndRewrite                  ( InputNALUnit* nalu );
     158  Void xProcessVclNalu                     ( InputNALUnit nalu );
     159  Bool xIsSkipVclNalu                      ( InputNALUnit& nalu, Bool isFirstSliceOfPic );
     160  Void xProcessNonVclNalu                  ( InputNALUnit nalu );
     161  Void xTerminateDecoding                  ( );
     162
     163  // Process slice
     164  Void xDecodeFirstSliceOfPicture          ( InputNALUnit nalu, Bool sliceIsFirstOfNewAu ); 
     165  Void xDecodeFollowSliceOfPicture         ( InputNALUnit nalu );
     166
     167  // Process picture 
     168  Void xFinalizePreviousPictures           ( Bool sliceIsFirstOfNewAU );
     169  Void xFinalizePic                        ( Bool curPicIsLastInAu );
     170  Void xFinalizeAU                         ( );
     171  Void xPicDecoding                        ( DecProcPart curPart, Bool picPosInAuIndication );
     172
     173  // Clause 8
     174  Void x812CvsgDecodingProcess             ( Int decIdx );
     175  Void x813decProcForCodPicWithLIdZero     ( DecProcPart curPart );
     176
     177  // Annex C (DPB)
     178  Void xC522OutputAndRemOfPicsFromDpb      ( );
     179  Void xC523PicDecMarkAddBumpAndStor       ( );
     180  Void xC524Bumping                        ( );
     181
     182  // Annex F.8
     183  Void xF811GeneralDecProc                 ( InputNALUnit nalu );
     184  Void xF812CvsgDecodingProcess            ( Int decIdx );
     185  Void xF813ComDecProcForACodedPic         ( DecProcPart curPart, Bool picPosInAuIndication );
     186  Void xF814decProcForCodPicWithLIdZero    ( DecProcPart curPart );
     187  Void xF816decProcEndDecOfCodPicLIdGrtZero( );
     188
     189  // Annex F.13 (DPB)
     190  Void xF13521InitDpb                      ( );
     191  Void xF13522OutputAndRemOfPicsFromDpb    ( Bool beforePocDerivation );
     192  Void xF13523PicDecMarkAddBumpAndStor     ( Bool curPicIsLastInAu   );
     193  Void xF13524Bumping                      ( TComList<TComAu*> aus );
     194
     195  // Helpers
     196  TDecTop* xGetDecoder                     ( InputNALUnit& nalu ); 
     197  Int   xGetDecoderIdx                     ( Int layerId, Bool createFlag = false );
     198  Int   xPreDecodePoc                      ( InputNALUnit& nalu );
     199  Bool  xDetectNewAu                       ( InputNALUnit& nalu );
     200  Void  xDetectNewPocResettingPeriod       ( InputNALUnit& nalu );
     201  Bool  xIsNaluInTargetDecLayerIdSet       ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
     202  Bool  xAllRefLayersInitilized            ( Int curLayerId );
     203  Void  xInitFileIO                        ( ); 
     204  Void  xOpenReconFile                     ( TComPic* curPic );
     205  Void  xFlushOutput                       ( );
     206  Void  xCropAndOutput                     ( TComPic* curPic ); 
     207#endif
    131208};
    132209
     
    134211
    135212#endif
    136 
Note: See TracChangeset for help on using the changeset viewer.