Changeset 608 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecTop.h
- Timestamp:
- 1 Sep 2013, 22:47:26 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecTop.h
r443 r608 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2013, 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/TComDepthMapGenerator.h"47 46 #include "TLibCommon/SEI.h" 48 47 … … 51 50 #include "TDecSbac.h" 52 51 #include "TDecCAVLC.h" 52 #include "SEIread.h" 53 53 54 54 struct InputNALUnit; … … 56 56 //! \ingroup TLibDecoder 57 57 //! \{ 58 59 #define APS_RESERVED_BUFFER_SIZE 2 //!< must be equal to or larger than 2 to handle bitstream parsing60 58 61 59 // ==================================================================================================================== … … 63 61 // ==================================================================================================================== 64 62 63 #if H_MV 65 64 class TAppDecTop; 66 65 #endif 66 #if H_3D 67 67 class CamParsCollector 68 68 { … … 75 75 Void setSlice ( TComSlice* pcSlice ); 76 76 77 Bool isInitialized() const { return m_bInitialized; } 78 79 #if MERL_VSP_C0152 77 Bool isInitialized() const { return m_bInitialized; } 80 78 Int**** getBaseViewShiftLUTI() { return m_aiBaseViewShiftLUT; } 81 #endif 79 82 80 private: 83 81 Bool xIsComplete (); … … 90 88 Int** m_aaiCodedOffset; 91 89 Int** m_aaiCodedScale; 92 Int* m_aiViewOrderIndex; 93 #if QC_MVHEVC_B0046 94 Int* m_aiViewId; 95 #endif 96 Int* m_aiViewReceived; 90 Int* m_aiViewId; 91 92 Bool* m_bViewReceived; 97 93 UInt m_uiCamParsCodedPrecision; 98 94 Bool m_bCamParsVaryOverTime; 99 Int m_iLastViewI d;95 Int m_iLastViewIndex; 100 96 Int m_iLastPOC; 101 UInt m_uiMaxViewI d;102 103 #if MERL_VSP_C0152 97 UInt m_uiMaxViewIndex; 98 99 104 100 UInt m_uiBitDepthForLUT; 105 101 UInt m_iLog2Precision; 106 102 UInt m_uiInputBitDepth; 103 107 104 // look-up tables 108 105 Double**** m_adBaseViewShiftLUT; ///< Disparity LUT … … 113 110 template<class T> Void xDeleteArray ( T*& rpt, UInt uiSize1, UInt uiSize2 ); 114 111 template<class T> Void xDeleteArray ( T*& rpt, UInt uiSize ); 115 #endif 116 117 }; 118 119 #if MERL_VSP_C0152 112 113 }; 114 120 115 template <class T> 121 116 Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 ) … … 174 169 }; 175 170 176 #endif 177 171 #endif //H_3D 178 172 /// decoder class 179 173 class TDecTop 180 174 { 181 175 private: 182 Int m_iGopSize; 183 Bool m_bGopSizeSet; 184 int m_iMaxRefPicNum; 185 186 Bool m_bRefreshPending; ///< refresh pending flag 176 Int m_iMaxRefPicNum; 177 187 178 Int m_pocCRA; ///< POC number of the latest CRA picture 179 Bool m_prevRAPisBLA; ///< true if the previous RAP (CRA/CRANT/BLA/BLANT/IDR) picture is a BLA/BLANT picture 188 180 Int m_pocRandomAccess; ///< POC number of the random access point (the first IDR or CRA picture) 189 181 190 UInt m_uiValidPS;191 182 TComList<TComPic*> m_cListPic; // Dynamic buffer 183 #if H_MV 184 static ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets 185 #else 192 186 ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets 193 TComRPSList m_RPSList; 187 #endif 194 188 TComSlice* m_apcSlicePilot; 195 189 196 SEI messages *m_SEIs; ///< "all" SEI messages. If not NULL, we own the object.190 SEIMessages m_SEIs; ///< List of SEI messages that have been received before the first slice and between slices 197 191 198 192 // functional classes … … 206 200 TDecSbac m_cSbacDecoder; 207 201 TDecBinCABAC m_cBinCABAC; 202 SEIReader m_seiReader; 208 203 TComLoopFilter m_cLoopFilter; 209 TComAdaptiveLoopFilter m_cAdaptiveLoopFilter;210 204 TComSampleAdaptiveOffset m_cSAO; 211 205 212 #if DEPTH_MAP_GENERATION 213 TComDepthMapGenerator m_cDepthMapGenerator; 214 #endif 215 #if H3D_IVRP & !QC_ARP_D0177 216 TComResidualGenerator m_cResidualGenerator; 217 #endif 218 206 Bool isSkipPictureForBLA(Int& iPOCLastDisplay); 219 207 Bool isRandomAccessSkipPicture(Int& iSkipFrame, Int& iPOCLastDisplay); 220 208 TComPic* m_pcPic; 221 209 UInt m_uiSliceIdx; 222 UInt m_uiLastSliceIdx;223 210 Int m_prevPOC; 224 211 Bool m_bFirstSliceInPicture; 225 212 Bool m_bFirstSliceInSequence; 226 213 #if H_MV 214 // For H_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer 215 Int m_layerId; 227 216 Int m_viewId; 217 TComPicLists* m_ivPicLists; 218 std::vector<TComPic*> m_refPicSetInterLayer; 219 #if H_3D 220 Int m_viewIndex; 228 221 Bool m_isDepth; 229 TAppDecTop* m_tAppDecTop;230 222 CamParsCollector* m_pcCamParsCollector; 231 NalUnitType m_nalUnitTypeBaseView; 223 #endif 224 #endif 232 225 233 226 public: … … 238 231 Void destroy (); 239 232 240 void setPictureDigestEnabled(bool enabled) { m_cGopDecoder.setPictureDigestEnabled(enabled); } 241 242 Void init( TAppDecTop* pcTAppDecTop, Bool bFirstInstance ); 233 void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); } 234 235 Void init(); 236 #if H_MV 237 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer ); 238 #else 243 239 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay); 240 #endif 244 241 245 242 Void deletePicBuffer(); 246 #if QC_MVHEVC_B0046 247 Void xCopySPS( TComSPS* pSPSV0); 248 Void xCopyPPS( TComPPS* pPPSV0); 249 Void xCopyVPS( TComVPS* pVPSV0); 250 #endif 251 #if H3D_IVRP 252 Void deleteExtraPicBuffers ( Int iPoc ); 253 #endif 254 Void compressMotion ( Int iPoc ); 255 256 Void executeDeblockAndAlf(UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, Int& iSkipFrame, Int& iPOCLastDisplay); 257 258 Void setViewId(Int viewId) { m_viewId = viewId;} 259 Int getViewId() { return m_viewId ;} 260 Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; } 261 262 #if DEPTH_MAP_GENERATION 263 TComDepthMapGenerator* getDepthMapGenerator () { return &m_cDepthMapGenerator; } 264 #endif 265 266 Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; } 267 268 TComList<TComPic*>* getListPic() { return &m_cListPic; } 269 Void setTAppDecTop( TAppDecTop* pcTAppDecTop ) { m_tAppDecTop = pcTAppDecTop; } 270 TAppDecTop* getTAppDecTop() { return m_tAppDecTop; } 271 NalUnitType getNalUnitTypeBaseView() { return m_nalUnitTypeBaseView; } 272 #if QC_MVHEVC_B0046 273 bool m_bFirstNal; //used to copy SPS, PPS, VPS 274 ParameterSetManagerDecoder* xGetParaSetDec () {return &m_parameterSetManagerDecoder;} 275 #endif 276 243 244 #if H_MV 245 Void endPicDecoding(Int& poc, TComList<TComPic*>*& rpcListPic, std::vector<Int>& targetDecLayerIdSet); 246 #else 247 Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic); 248 #endif 249 250 #if H_MV 251 TComPic* getPic ( Int poc ); 252 TComList<TComPic*>* getListPic () { return &m_cListPic; } 253 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 254 255 Int getCurrPoc () { return m_apcSlicePilot->getPOC(); } 256 Void setLayerId ( Int layer) { m_layerId = layer; } 257 Int getLayerId () { return m_layerId; } 258 Void setViewId ( Int viewId ) { m_viewId = viewId; } 259 Int getViewId () { return m_viewId; } 260 #if H_3D 261 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 262 Int getViewIndex () { return m_viewIndex; } 263 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 264 Bool getIsDepth () { return m_isDepth; } 265 Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; } 266 #endif 267 #endif 277 268 protected: 278 269 Void xGetNewPicBuffer (TComSlice* pcSlice, TComPic*& rpcPic); 279 Void xUpdateGopSize (TComSlice* pcSlice);280 270 Void xCreateLostPicture (Int iLostPOC); 281 271 282 Void decodeAPS( TComAPS* cAPS) { m_cEntropyDecoder.decodeAPS(cAPS); };283 272 Void xActivateParameterSets(); 273 #if H_MV 274 TComPic* xGetPic( Int layerId, Int poc ); 275 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag ); 276 #else 284 277 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay); 285 # if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046278 #endif 286 279 Void xDecodeVPS(); 287 #endif288 280 Void xDecodeSPS(); 289 281 Void xDecodePPS(); 290 Void xDecodeAPS(); 291 Void xDecodeSEI(); 292 293 Void allocAPS (TComAPS* pAPS); //!< memory allocation for APS 282 Void xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ); 283 294 284 };// END CLASS DEFINITION TDecTop 295 285
Note: See TracChangeset for help on using the changeset viewer.