Changeset 1200 in 3DVCSoftware for branches/HTM-14.1-update-dev0/source/Lib/TLibDecoder/TDecTop.h
- Timestamp:
- 4 May 2015, 18:38:08 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev0/source/Lib/TLibDecoder/TDecTop.h
r1196 r1200 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 44 44 #include "TLibCommon/TComPic.h" 45 45 #include "TLibCommon/TComTrQuant.h" 46 #include "TLibCommon/TComPrediction.h" 46 47 #include "TLibCommon/SEI.h" 47 48 … … 52 53 #include "SEIread.h" 53 54 54 structInputNALUnit;55 class InputNALUnit; 55 56 56 57 //! \ingroup TLibDecoder … … 61 62 // ==================================================================================================================== 62 63 63 #if H_MV64 #if NH_MV 64 65 class TAppDecTop; 65 66 #endif 66 #if H_3D67 #if NH_3D 67 68 class CamParsCollector 68 69 { … … 71 72 ~CamParsCollector (); 72 73 73 Void init ( FILE* pCodedScaleOffsetFile, TComVPS* vps ); 74 Void init ( const TComVPS* vps ); 75 Void setCodeScaleOffsetFile( FILE* pCodedScaleOffsetFile ) { m_pCodedScaleOffsetFile = pCodedScaleOffsetFile; }; 74 76 75 77 Void uninit (); … … 95 97 Int** m_aaiCodedScale; 96 98 97 TComVPS* m_vps;99 const TComVPS* m_vps; 98 100 Int** m_receivedIdc; 99 101 Int m_lastPoc; … … 180 182 private: 181 183 Int m_iMaxRefPicNum; 182 184 183 185 NalUnitType m_associatedIRAPType; ///< NAL unit type of the associated IRAP picture 184 186 Int m_pocCRA; ///< POC number of the latest CRA picture … … 186 188 187 189 TComList<TComPic*> m_cListPic; // Dynamic buffer 188 #if H_MV190 #if NH_MV 189 191 Bool* m_layerInitilizedFlag; // initialization Layers 190 static ParameterSetManager Decoder m_parameterSetManagerDecoder; // storage for parameter sets191 Int m_targetO ptLayerSetIdx;192 static ParameterSetManager m_parameterSetManager; // storage for parameter sets 193 Int m_targetOlsIdx; 192 194 #else 193 ParameterSetManager Decoder m_parameterSetManagerDecoder; // storage for parameter sets195 ParameterSetManager m_parameterSetManager; // storage for parameter sets 194 196 #endif 195 197 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... 198 200 199 201 // functional classes … … 212 214 213 215 Bool isSkipPictureForBLA(Int& iPOCLastDisplay); 216 #if NH_MV 217 Bool isRandomAccessSkipPicture(Int& iSkipFrame, Int& iPOCLastDisplay, const TComVPS* vps); 218 #else 214 219 Bool isRandomAccessSkipPicture(Int& iSkipFrame, Int& iPOCLastDisplay); 220 #endif 215 221 TComPic* m_pcPic; 216 222 UInt m_uiSliceIdx; 217 223 Int m_prevPOC; 224 Int m_prevTid0POC; 218 225 Bool m_bFirstSliceInPicture; 219 226 Bool m_bFirstSliceInSequence; 220 227 Bool m_prevSliceSkipped; 221 228 Int m_skippedPOC; 222 #if SETTING_NO_OUT_PIC_PRIOR223 229 Bool m_bFirstSliceInBitstream; 224 230 Int m_lastPOCNoOutputPriorPics; 225 231 Bool m_isNoOutputPriorPics; 226 232 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 229 240 Bool m_isLastNALWasEos; 230 241 #endif 231 242 232 #if H_MV233 // For H_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer243 #if NH_MV 244 // For NH_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer 234 245 Int m_layerId; 235 246 Int m_viewId; … … 237 248 std::vector<TComPic*> m_refPicSetInterLayer0; 238 249 std::vector<TComPic*> m_refPicSetInterLayer1; 239 #if H_3D250 #if NH_3D 240 251 Int m_viewIndex; 241 252 Bool m_isDepth; … … 245 256 #endif 246 257 258 std::list<InputNALUnit*> m_prefixSEINALUs; /// Buffered up prefix SEI NAL Units. 247 259 public: 248 260 TDecTop(); 249 261 virtual ~TDecTop(); 250 262 251 263 Void create (); 252 264 Void destroy (); 253 265 254 void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); }266 Void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); } 255 267 256 268 Void init(); 257 #if H_MV269 #if NH_MV 258 270 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer, Bool& sliceSkippedFlag ); 259 271 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer ); … … 261 273 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay); 262 274 #endif 263 264 275 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 273 283 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); 280 288 281 289 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 285 300 TComPic* getPic ( Int poc ); 286 301 TComList<TComPic*>* getListPic () { return &m_cListPic; } 287 302 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 288 303 Void setLayerInitilizedFlags( Bool* val ) { m_layerInitilizedFlag = val; } 289 Void setTargetO ptLayerSetIdx( 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; } 291 306 Int getCurrPoc () { return m_apcSlicePilot->getPOC(); } 292 307 Void setLayerId ( Int layer) { m_layerId = layer; } … … 294 309 Void setViewId ( Int viewId ) { m_viewId = viewId; } 295 310 Int getViewId () { return m_viewId; } 296 #if H_3D 311 Void initFromActiveVps ( const TComVPS* vps ); 312 #if NH_3D 297 313 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 298 314 Int getViewIndex () { return m_viewIndex; } … … 301 317 Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; } 302 318 303 Void setProfileIdc(); 319 304 320 Bool decProcAnnexI() { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); } 305 321 #endif 306 322 #endif 323 307 324 protected: 308 Void xGetNewPicBuffer ( TComSlice* pcSlice, TComPic*& rpcPic);325 Void xGetNewPicBuffer (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer); 309 326 Void xCreateLostPicture (Int iLostPOC); 310 327 311 328 Void xActivateParameterSets(); 312 #if H_MV329 #if NH_MV 313 330 TComPic* xGetPic( Int layerId, Int poc ); 314 331 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ); … … 316 333 Void xCeckNoClrasOutput(); 317 334 318 Bool xAllRefLayersInitilized( );335 Bool xAllRefLayersInitilized( const TComVPS* vps ); 319 336 #else 320 337 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay); 321 338 #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(); 326 346 327 347 };// END CLASS DEFINITION TDecTop
Note: See TracChangeset for help on using the changeset viewer.