Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecTop.h
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecTop.h
r1196 r1313 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 (); 76 Void setSlice (TComSlice* pcSlice );78 Void setSlice ( const TComSlice* pcSlice ); 77 79 78 80 Bool isInitialized() const { return m_bInitialized; } 79 81 Int**** getBaseViewShiftLUTI() { return m_aiBaseViewShiftLUT; } 80 82 81 #if H_3D_IV_MERGE 83 #if !NH_3D_FIX_TICKET_101 84 #if NH_3D_IV_MERGE 82 85 Void copyCamParamForSlice( TComSlice* pcSlice ); 83 86 #endif 84 87 #endif 85 88 86 89 private: … … 95 98 Int** m_aaiCodedScale; 96 99 97 TComVPS* m_vps;100 const TComVPS* m_vps; 98 101 Int** m_receivedIdc; 99 102 Int m_lastPoc; … … 105 108 UInt m_uiBitDepthForLUT; 106 109 UInt m_iLog2Precision; 107 UInt m_uiInputBitDepth;110 // UInt m_uiInputBitDepth; 108 111 109 112 // look-up tables … … 174 177 }; 175 178 176 #endif // H_3D179 #endif //NH_3D 177 180 /// decoder class 178 181 class TDecTop … … 180 183 private: 181 184 Int m_iMaxRefPicNum; 182 185 183 186 NalUnitType m_associatedIRAPType; ///< NAL unit type of the associated IRAP picture 184 187 Int m_pocCRA; ///< POC number of the latest CRA picture … … 186 189 187 190 TComList<TComPic*> m_cListPic; // Dynamic buffer 188 #if H_MV191 #if NH_MV 189 192 Bool* m_layerInitilizedFlag; // initialization Layers 190 static ParameterSetManager Decoder m_parameterSetManagerDecoder; // storage for parameter sets191 Int m_targetO ptLayerSetIdx;193 static ParameterSetManager m_parameterSetManager; // storage for parameter sets 194 Int m_targetOlsIdx; 192 195 #else 193 ParameterSetManager Decoder m_parameterSetManagerDecoder; // storage for parameter sets196 ParameterSetManager m_parameterSetManager; // storage for parameter sets 194 197 #endif 195 198 TComSlice* m_apcSlicePilot; 196 197 SEIMessages m_SEIs; ///< List of SEI messages that have been received before the first slice and between slices 199 200 SEIMessages m_SEIs; ///< List of SEI messages that have been received before the first slice and between slices, excluding prefix SEIs... 198 201 199 202 // functional classes … … 212 215 213 216 Bool isSkipPictureForBLA(Int& iPOCLastDisplay); 217 #if NH_MV 218 Bool isRandomAccessSkipPicture(Int& iSkipFrame, Int& iPOCLastDisplay, const TComVPS* vps); 219 #else 214 220 Bool isRandomAccessSkipPicture(Int& iSkipFrame, Int& iPOCLastDisplay); 221 #endif 215 222 TComPic* m_pcPic; 216 223 UInt m_uiSliceIdx; 217 224 Int m_prevPOC; 225 Int m_prevTid0POC; 218 226 Bool m_bFirstSliceInPicture; 219 227 Bool m_bFirstSliceInSequence; 220 228 Bool m_prevSliceSkipped; 221 229 Int m_skippedPOC; 222 #if SETTING_NO_OUT_PIC_PRIOR223 230 Bool m_bFirstSliceInBitstream; 224 231 Int m_lastPOCNoOutputPriorPics; 225 232 Bool m_isNoOutputPriorPics; 226 233 Bool m_craNoRaslOutputFlag; //value of variable NoRaslOutputFlag of the last CRA pic 227 #endif 228 #if H_MV 234 #if O0043_BEST_EFFORT_DECODING 235 UInt m_forceDecodeBitDepth; 236 #endif 237 std::ostream *m_pDecodedSEIOutputStream; 238 239 Bool m_warningMessageSkipPicture; 240 #if NH_MV 229 241 Bool m_isLastNALWasEos; 230 242 #endif 231 243 232 #if H_MV233 // For H_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer244 #if NH_MV 245 // For NH_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer 234 246 Int m_layerId; 235 247 Int m_viewId; … … 237 249 std::vector<TComPic*> m_refPicSetInterLayer0; 238 250 std::vector<TComPic*> m_refPicSetInterLayer1; 239 #if H_3D251 #if NH_3D 240 252 Int m_viewIndex; 241 253 Bool m_isDepth; … … 245 257 #endif 246 258 259 std::list<InputNALUnit*> m_prefixSEINALUs; /// Buffered up prefix SEI NAL Units. 247 260 public: 248 261 TDecTop(); 249 262 virtual ~TDecTop(); 250 263 251 264 Void create (); 252 265 Void destroy (); 253 266 254 void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); }267 Void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); } 255 268 256 269 Void init(); 257 #if H_MV270 #if NH_MV 258 271 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer, Bool& sliceSkippedFlag ); 259 272 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer ); … … 261 274 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay); 262 275 #endif 263 264 276 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 277 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 273 284 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); 285 #else 286 Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic); 287 #endif 288 Void checkNoOutputPriorPics (TComList<TComPic*>* rpcListPic); 280 289 281 290 Bool getNoOutputPriorPicsFlag () { return m_isNoOutputPriorPics; } 282 Void setNoOutputPriorPicsFlag (bool val) { m_isNoOutputPriorPics = val; } 283 #endif 284 #if H_MV 291 Void setNoOutputPriorPicsFlag (Bool val) { m_isNoOutputPriorPics = val; } 292 Void setFirstSliceInPicture (bool val) { m_bFirstSliceInPicture = val; } 293 Bool getFirstSliceInSequence () { return m_bFirstSliceInSequence; } 294 Void setFirstSliceInSequence (bool val) { m_bFirstSliceInSequence = val; } 295 #if O0043_BEST_EFFORT_DECODING 296 Void setForceDecodeBitDepth(UInt bitDepth) { m_forceDecodeBitDepth = bitDepth; } 297 #endif 298 Void setDecodedSEIMessageOutputStream(std::ostream *pOpStream) { m_pDecodedSEIOutputStream = pOpStream; } 299 UInt getNumberOfChecksumErrorsDetected() const { return m_cGopDecoder.getNumberOfChecksumErrorsDetected(); } 300 #if NH_MV 285 301 TComPic* getPic ( Int poc ); 286 302 TComList<TComPic*>* getListPic () { return &m_cListPic; } 287 303 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 288 304 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.305 Void setTargetOlsIdx ( Int targetOlsIdx ) { m_targetOlsIdx = targetOlsIdx; } 306 Int getTargetOlsIdx ( ) { return m_targetOlsIdx; } 291 307 Int getCurrPoc () { return m_apcSlicePilot->getPOC(); } 292 308 Void setLayerId ( Int layer) { m_layerId = layer; } … … 294 310 Void setViewId ( Int viewId ) { m_viewId = viewId; } 295 311 Int getViewId () { return m_viewId; } 296 #if H_3D 312 Void initFromActiveVps ( const TComVPS* vps ); 313 #if NH_3D 297 314 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 298 315 Int getViewIndex () { return m_viewIndex; } … … 301 318 Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; } 302 319 303 Void setProfileIdc(); 320 304 321 Bool decProcAnnexI() { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); } 305 322 #endif 306 323 #endif 324 307 325 protected: 308 Void xGetNewPicBuffer ( TComSlice* pcSlice, TComPic*& rpcPic);326 Void xGetNewPicBuffer (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer); 309 327 Void xCreateLostPicture (Int iLostPOC); 310 328 311 329 Void xActivateParameterSets(); 312 #if H_MV330 #if NH_MV 313 331 TComPic* xGetPic( Int layerId, Int poc ); 314 332 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ); … … 316 334 Void xCeckNoClrasOutput(); 317 335 318 Bool xAllRefLayersInitilized( );336 Bool xAllRefLayersInitilized( const TComVPS* vps ); 319 337 #else 320 338 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay); 321 339 #endif 322 Void xDecodeVPS(); 323 Void xDecodeSPS(); 324 Void xDecodePPS(); 325 Void xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ); 340 Void xDecodeVPS(const std::vector<UChar> &naluData); 341 Void xDecodeSPS(const std::vector<UChar> &naluData); 342 Void xDecodePPS(const std::vector<UChar> &naluData); 343 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(); } } 344 345 Void xParsePrefixSEImessages(); 346 Void xParsePrefixSEIsForUnknownVCLNal(); 326 347 327 348 };// END CLASS DEFINITION TDecTop
Note: See TracChangeset for help on using the changeset viewer.