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/Lib/TLibDecoder/TDecTop.h

    r1313 r1317  
    8181  Int**** getBaseViewShiftLUTI()  { return m_aiBaseViewShiftLUT;   }
    8282
    83 #if !NH_3D_FIX_TICKET_101
    84 #if NH_3D_IV_MERGE
    85   Void  copyCamParamForSlice( TComSlice* pcSlice );
    86 #endif
    87 #endif
    88 
    8983private:
    9084  Void xResetReceivedIdc( Bool overWriteFlag );
     
    182176{
    183177private:
    184   Int                     m_iMaxRefPicNum;
    185 
    186   NalUnitType             m_associatedIRAPType; ///< NAL unit type of the associated IRAP picture
    187   Int                     m_pocCRA;            ///< POC number of the latest CRA picture
    188   Int                     m_pocRandomAccess;   ///< POC number of the random access point (the first IDR or CRA picture)
    189 
    190   TComList<TComPic*>      m_cListPic;         //  Dynamic buffer
    191 #if NH_MV
    192   Bool*                    m_layerInitilizedFlag; // initialization Layers
    193   static ParameterSetManager m_parameterSetManager;  // storage for parameter sets
    194   Int                      m_targetOlsIdx;
    195 #else
    196   ParameterSetManager     m_parameterSetManager;  // storage for parameter sets
    197 #endif
     178  Int                         m_iMaxRefPicNum;
     179                             
     180  NalUnitType                 m_associatedIRAPType; ///< NAL unit type of the associated IRAP picture
     181#if !NH_MV
     182  Int                         m_pocCRA;            ///< POC number of the latest CRA picture
     183  Int                         m_pocRandomAccess;   ///< POC number of the random access point (the first IDR or CRA picture)
     184 
     185  TComList<TComPic*>           m_cListPic;         //  Dynamic buffer
     186  ParameterSetManager          m_parameterSetManager;  // storage for parameter sets
     187#endif
     188
    198189  TComSlice*              m_apcSlicePilot;
    199190
     
    215206
    216207  Bool isSkipPictureForBLA(Int& iPOCLastDisplay);
    217 #if NH_MV
    218   Bool isRandomAccessSkipPicture(Int& iSkipFrame,  Int& iPOCLastDisplay, const TComVPS* vps);
    219 #else
     208#if !NH_MV
    220209  Bool isRandomAccessSkipPicture(Int& iSkipFrame,  Int& iPOCLastDisplay);
    221210#endif
     211
    222212  TComPic*                m_pcPic;
    223213  UInt                    m_uiSliceIdx;
     214#if !NH_MV
    224215  Int                     m_prevPOC;
    225216  Int                     m_prevTid0POC;
    226   Bool                    m_bFirstSliceInPicture;
     217  Bool                    m_bFirstSliceInPicture; 
    227218  Bool                    m_bFirstSliceInSequence;
    228219  Bool                    m_prevSliceSkipped;
     
    232223  Bool                    m_isNoOutputPriorPics;
    233224  Bool                    m_craNoRaslOutputFlag;    //value of variable NoRaslOutputFlag of the last CRA pic
     225#endif
     226 
    234227#if O0043_BEST_EFFORT_DECODING
    235228  UInt                    m_forceDecodeBitDepth;
    236229#endif
     230
     231
    237232  std::ostream           *m_pDecodedSEIOutputStream;
    238233
     234#if !NH_MV
    239235  Bool                    m_warningMessageSkipPicture;
     236#endif
     237
    240238#if NH_MV
    241   Bool                    m_isLastNALWasEos;
    242 #endif
    243 
    244 #if NH_MV
    245   // For NH_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer 
     239  // Class interface
     240  static ParameterSetManager  m_parameterSetManager;  // storage for parameter sets
     241  TComPicLists*           m_dpb;
     242#if NH_3D
     243  CamParsCollector*       m_pcCamParsCollector;
     244#endif
     245
     246  // Layer identification
    246247  Int                     m_layerId;
    247248  Int                     m_viewId;
    248   TComPicLists*           m_ivPicLists;
    249   std::vector<TComPic*>   m_refPicSetInterLayer0;
    250   std::vector<TComPic*>   m_refPicSetInterLayer1;
    251 #if NH_3D
     249#if NH_3D                 
    252250  Int                     m_viewIndex;
    253251  Bool                    m_isDepth;
    254   CamParsCollector*       m_pcCamParsCollector;
    255   Int                     m_profileIdc;
    256 #endif
     252#endif
     253
     254  // Layer set
     255  Int                     m_targetOlsIdx;
     256  Int                     m_smallestLayerId;
     257  Bool                    m_isInOwnTargetDecLayerIdList;   
     258
     259  // Decoding processes
     260  DecodingProcess         m_decodingProcess;
     261  DecodingProcess         m_decProcPocAndRps;
     262
     263  // Decoding state
     264  Bool*                   m_firstPicInLayerDecodedFlag;   
     265   
     266  Int                     m_prevPicOrderCnt;
     267  Int                     m_prevTid0PicPicOrderCntMsb;
     268  Int                     m_prevTid0PicSlicePicOrderCntLsb;
     269 
     270  Int*                    m_lastPresentPocResetIdc;
     271  Bool*                   m_pocDecrementedInDpbFlag;
     272
     273  Int                     m_prevIrapPoc;
     274  Int64                   m_prevIrapDecodingOrder;
     275  Int64                   m_prevStsaDecOrder;
     276  Int                     m_prevStsaTemporalId;
    257277#endif
    258278
     
    268288
    269289  Void  init();
    270 #if NH_MV 
    271   Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer, Bool& sliceSkippedFlag );
    272   Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
    273 #else 
     290#if !NH_MV
    274291  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay);
    275 #endif
    276292  Void  deletePicBuffer();
    277293
    278 #if NH_MV
    279   const TComVPS* getActiveVPS() { return m_parameterSetManager.getActiveVPS( ); }
    280   const TComSPS* getActiveSPS() { return m_parameterSetManager.getActiveSPS( m_layerId ); }
    281 #endif
    282 
    283 #if NH_MV
    284   Void endPicDecoding(Int& poc, TComList<TComPic*>*& rpcListPic,  std::vector<Int>& targetDecLayerIdSet); 
    285 #else 
    286294  Void  executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic);
    287 #endif
    288295  Void  checkNoOutputPriorPics (TComList<TComPic*>* rpcListPic);
    289296
    290297  Bool  getNoOutputPriorPicsFlag () { return m_isNoOutputPriorPics; }
    291298  Void  setNoOutputPriorPicsFlag (Bool val) { m_isNoOutputPriorPics = val; }
     299 
    292300  Void  setFirstSliceInPicture (bool val)  { m_bFirstSliceInPicture = val; }
     301
    293302  Bool  getFirstSliceInSequence ()         { return m_bFirstSliceInSequence; }
    294303  Void  setFirstSliceInSequence (bool val) { m_bFirstSliceInSequence = val; }
     304#endif
     305
    295306#if O0043_BEST_EFFORT_DECODING
    296307  Void  setForceDecodeBitDepth(UInt bitDepth) { m_forceDecodeBitDepth = bitDepth; }
    297308#endif
     309
    298310  Void  setDecodedSEIMessageOutputStream(std::ostream *pOpStream) { m_pDecodedSEIOutputStream = pOpStream; }
    299311  UInt  getNumberOfChecksumErrorsDetected() const { return m_cGopDecoder.getNumberOfChecksumErrorsDetected(); }
     312
    300313#if NH_MV   
    301   TComPic*                getPic                ( Int poc );
    302   TComList<TComPic*>*     getListPic            ()               { return &m_cListPic;  } 
    303   Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    304   Void                    setLayerInitilizedFlags( Bool* val )    { m_layerInitilizedFlag = val; }
    305   Void                    setTargetOlsIdx       ( Int targetOlsIdx ) { m_targetOlsIdx = targetOlsIdx; }   
    306   Int                     getTargetOlsIdx       ( )                  { return m_targetOlsIdx; }   
    307   Int                     getCurrPoc            ()               { return m_apcSlicePilot->getPOC(); }
    308   Void                    setLayerId            ( Int layer)     { m_layerId = layer;   }
    309   Int                     getLayerId            ()               { return m_layerId;    }
    310   Void                    setViewId             ( Int viewId  )  { m_viewId  = viewId;  }
    311   Int                     getViewId             ()               { return m_viewId;     } 
    312   Void                    initFromActiveVps     ( const TComVPS* vps );
     314
     315  /////////////////////////
     316  // For access from TAppDecTop
     317  /////////////////////////
     318
     319  // Non VCL decoding
     320  Bool       decodeNonVclNalu            ( InputNALUnit& nalu );                                   
     321                                   
     322  // Start picture decoding         
     323  Int        preDecodePoc                ( Bool firstPicInLayerDecodedFlag, Bool isFstPicOfAllLayOfPocResetPer, Bool isPocResettingPicture );
     324  Void       inferPocResetPeriodId       ( );
     325  Void       decodeSliceHeader           ( InputNALUnit &nalu );   
     326
     327  // Picture decoding
     328  Void       activatePSsAndInitPicOrSlice( TComPic* newPic );
     329  Void       decodePocAndRps             ( );
     330  Void       genUnavailableRefPics       ( );                               
     331  Void       decodeSliceSegment          ( InputNALUnit &nalu );
     332                                   
     333  // End Picture decoding           
     334  Void       executeLoopFilters          ( );
     335  Void       finalizePic( );
     336 
     337  //////////////////////////
     338  // For access from slice
     339  /////////////////////////
     340  Void       initFromActiveVps           ( const TComVPS* vps );
     341
     342  //////////////////////////
     343  // General access
     344  /////////////////////////
     345 
     346  // Picture identification
     347  Void       setLayerId            ( Int layer )       { m_layerId = layer;   }
     348  Int        getLayerId            ( )                 { return m_layerId;    }
     349  Void       setViewId             ( Int viewId )      { m_viewId  = viewId;  }
     350  Int        getViewId             ( )                 { return m_viewId;     } 
    313351#if NH_3D   
    314   Void                    setViewIndex          ( Int viewIndex  )  { m_viewIndex  = viewIndex;  }
    315   Int                     getViewIndex          ()               { return m_viewIndex;     } 
    316   Void                    setIsDepth            ( Bool isDepth ) { m_isDepth = isDepth; }
    317   Bool                    getIsDepth            ()               { return m_isDepth;    }
    318   Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
    319 
    320 
    321   Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }   
    322 #endif
     352  Void       setViewIndex          ( Int viewIndex )   { m_viewIndex  = viewIndex;  }
     353  Int        getViewIndex          ( )                 { return m_viewIndex;     } 
     354  Void       setIsDepth            ( Bool isDepth )    { m_isDepth = isDepth; }
     355  Bool       getIsDepth            ( )                 { return m_isDepth;    }
     356#endif
     357
     358  // Classes
     359  Void       setDpb                ( TComPicLists* picLists) { m_dpb = picLists; }
     360#if NH_3D                                       
     361  Void       setCamParsCollector   ( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
     362#endif
     363
     364  // Slice pilot access
     365  TComSlice* getSlicePilot                ( )               { return m_apcSlicePilot; }
     366                                                                         
     367  // Decoding state                                                     
     368  Bool      getFirstSliceSegementInPicFlag( );             
     369  Void      setFirstPicInLayerDecodedFlag(Bool* val )      { m_firstPicInLayerDecodedFlag = val;  }
     370  Void      setPocDecrementedInDPBFlag   (Bool* val )      { m_pocDecrementedInDpbFlag = val;  } 
     371  Void      setLastPresentPocResetIdc    (Int*  val )      { m_lastPresentPocResetIdc  = val;  }
     372                                                           
     373  // Layer sets                                                         
     374  Void      setTargetOlsIdx        ( Int targetOlsIdx )    { m_targetOlsIdx = targetOlsIdx; }   
     375  Int       getTargetOlsIdx        ( )                     { return m_targetOlsIdx; }   
     376  Int       getSmallestLayerId     ( )                     { return m_smallestLayerId; }   
     377  Bool      getIsInOwnTargetDecLayerIdList()               { return m_isInOwnTargetDecLayerIdList; }
     378                                                                         
     379  // Decoding processes identification                                   
     380  Bool      decProcClause8( )                              { return ( m_decodingProcess == CLAUSE_8 ); }
     381  Bool      decProcAnnexF ( )                              { return ( decProcAnnexG() || decProcAnnexH() || decProcAnnexI() ); }
     382  Bool      decProcAnnexG ( )                              { return ( m_decodingProcess == ANNEX_G || decProcAnnexI() ); }
     383  Bool      decProcAnnexH ( )                              { return ( m_decodingProcess == ANNEX_H  ); }
     384  Bool      decProcAnnexI ( )                              { return ( m_decodingProcess == ANNEX_I  ); }
     385                                                                         
     386  DecodingProcess getDecodingProcess ( ) const                   { return m_decodingProcess;                }
     387  Void      setDecProcPocAndRps( DecodingProcess decProc ) { m_decProcPocAndRps = decProc; }   
    323388#endif
    324389
    325390protected:
    326   Void  xGetNewPicBuffer  (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
    327   Void  xCreateLostPicture (Int iLostPOC);
    328 
     391
     392#if !NH_MV
     393  Void      xGetNewPicBuffer  (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
     394  Void      xCreateLostPicture (Int iLostPOC);
    329395  Void      xActivateParameterSets();
    330 #if NH_MV 
    331   TComPic*  xGetPic( Int layerId, Int poc );
    332   Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ); 
    333   Void      xResetPocInPicBuffer();
    334   Void      xCeckNoClrasOutput();
    335 
    336   Bool      xAllRefLayersInitilized( const TComVPS* vps );
    337 #else
    338   Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
    339 #endif
     396  Bool      xDecodeSlice                   (InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
     397#endif
     398
    340399  Void      xDecodeVPS(const std::vector<UChar> &naluData);
    341400  Void      xDecodeSPS(const std::vector<UChar> &naluData);
    342   Void      xDecodePPS(const std::vector<UChar> &naluData);
     401  Void      xDecodePPS(const std::vector<UChar> &naluData); 
     402#if !NH_MV
    343403  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(); } }
     404#endif
    344405
    345406  Void      xParsePrefixSEImessages();
    346407  Void      xParsePrefixSEIsForUnknownVCLNal();
    347408
     409#if NH_MV
     410  // POC
     411  Void      x831DecProcForPicOrderCount         ( );
     412  Void      xF831DecProcForPicOrderCount        ( );
     413  Int       xGetCurrMsb                         ( Int cl, Int pl, Int pm, Int ml );
     414
     415  //RPS                                         
     416  Void      x832DecProcForRefPicSet             ( Bool annexFModifications );
     417  Void      xF832DecProcForRefPicSet            ( );
     418  Void      xG813DecProcForInterLayerRefPicSet  ( );
     419
     420  // Unavailable Pics
     421  Void      x8331GenDecProcForGenUnavilRefPics  ( );
     422  TComPic*  x8332GenOfOneUnavailPic             ( Bool calledFromCl8331 );
     423  Void      xF817DecProcForGenUnavRefPicForPicsFrstInDecOrderInLay();
     424  Void      xF833DecProcForGenUnavRefPics       ( ); 
     425  Void      xCheckUnavailableRefPics            ( );
     426#endif
     427
    348428};// END CLASS DEFINITION TDecTop
    349429
    350430
    351431//! \}
    352 
    353432#endif // __TDECTOP__
    354433
Note: See TracChangeset for help on using the changeset viewer.