Changeset 1317 in 3DVCSoftware for branches/HTM-15.0-dev0/source/Lib/TLibDecoder/TDecTop.h
- Timestamp:
- 4 Sep 2015, 21:28:58 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.0-dev0/source/Lib/TLibDecoder/TDecTop.h
r1313 r1317 81 81 Int**** getBaseViewShiftLUTI() { return m_aiBaseViewShiftLUT; } 82 82 83 #if !NH_3D_FIX_TICKET_10184 #if NH_3D_IV_MERGE85 Void copyCamParamForSlice( TComSlice* pcSlice );86 #endif87 #endif88 89 83 private: 90 84 Void xResetReceivedIdc( Bool overWriteFlag ); … … 182 176 { 183 177 private: 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 198 189 TComSlice* m_apcSlicePilot; 199 190 … … 215 206 216 207 Bool isSkipPictureForBLA(Int& iPOCLastDisplay); 217 #if NH_MV 218 Bool isRandomAccessSkipPicture(Int& iSkipFrame, Int& iPOCLastDisplay, const TComVPS* vps); 219 #else 208 #if !NH_MV 220 209 Bool isRandomAccessSkipPicture(Int& iSkipFrame, Int& iPOCLastDisplay); 221 210 #endif 211 222 212 TComPic* m_pcPic; 223 213 UInt m_uiSliceIdx; 214 #if !NH_MV 224 215 Int m_prevPOC; 225 216 Int m_prevTid0POC; 226 Bool m_bFirstSliceInPicture; 217 Bool m_bFirstSliceInPicture; 227 218 Bool m_bFirstSliceInSequence; 228 219 Bool m_prevSliceSkipped; … … 232 223 Bool m_isNoOutputPriorPics; 233 224 Bool m_craNoRaslOutputFlag; //value of variable NoRaslOutputFlag of the last CRA pic 225 #endif 226 234 227 #if O0043_BEST_EFFORT_DECODING 235 228 UInt m_forceDecodeBitDepth; 236 229 #endif 230 231 237 232 std::ostream *m_pDecodedSEIOutputStream; 238 233 234 #if !NH_MV 239 235 Bool m_warningMessageSkipPicture; 236 #endif 237 240 238 #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 246 247 Int m_layerId; 247 248 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 252 250 Int m_viewIndex; 253 251 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; 257 277 #endif 258 278 … … 268 288 269 289 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 274 291 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay); 275 #endif276 292 Void deletePicBuffer(); 277 293 278 #if NH_MV279 const TComVPS* getActiveVPS() { return m_parameterSetManager.getActiveVPS( ); }280 const TComSPS* getActiveSPS() { return m_parameterSetManager.getActiveSPS( m_layerId ); }281 #endif282 283 #if NH_MV284 Void endPicDecoding(Int& poc, TComList<TComPic*>*& rpcListPic, std::vector<Int>& targetDecLayerIdSet);285 #else286 294 Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic); 287 #endif288 295 Void checkNoOutputPriorPics (TComList<TComPic*>* rpcListPic); 289 296 290 297 Bool getNoOutputPriorPicsFlag () { return m_isNoOutputPriorPics; } 291 298 Void setNoOutputPriorPicsFlag (Bool val) { m_isNoOutputPriorPics = val; } 299 292 300 Void setFirstSliceInPicture (bool val) { m_bFirstSliceInPicture = val; } 301 293 302 Bool getFirstSliceInSequence () { return m_bFirstSliceInSequence; } 294 303 Void setFirstSliceInSequence (bool val) { m_bFirstSliceInSequence = val; } 304 #endif 305 295 306 #if O0043_BEST_EFFORT_DECODING 296 307 Void setForceDecodeBitDepth(UInt bitDepth) { m_forceDecodeBitDepth = bitDepth; } 297 308 #endif 309 298 310 Void setDecodedSEIMessageOutputStream(std::ostream *pOpStream) { m_pDecodedSEIOutputStream = pOpStream; } 299 311 UInt getNumberOfChecksumErrorsDetected() const { return m_cGopDecoder.getNumberOfChecksumErrorsDetected(); } 312 300 313 #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; } 313 351 #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; } 323 388 #endif 324 389 325 390 protected: 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); 329 395 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 340 399 Void xDecodeVPS(const std::vector<UChar> &naluData); 341 400 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 343 403 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 344 405 345 406 Void xParsePrefixSEImessages(); 346 407 Void xParsePrefixSEIsForUnknownVCLNal(); 347 408 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 348 428 };// END CLASS DEFINITION TDecTop 349 429 350 430 351 431 //! \} 352 353 432 #endif // __TDECTOP__ 354 433
Note: See TracChangeset for help on using the changeset viewer.