Changeset 1317 in 3DVCSoftware for branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComPic.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/TLibCommon/TComPic.h
r1313 r1317 54 54 /// picture class (symbol + YUV buffers) 55 55 56 57 58 #if NH_MV 59 class TComPic; 60 61 class TComDecodedRps 62 { 63 public: 64 65 TComDecodedRps() 66 { 67 m_refPicSetsCurr[0] = &m_refPicSetStCurrBefore; 68 m_refPicSetsCurr[1] = &m_refPicSetStCurrAfter ; 69 m_refPicSetsCurr[2] = &m_refPicSetLtCurr ; 70 71 m_refPicSetsLt [0] = &m_refPicSetLtCurr ; 72 m_refPicSetsLt [1] = &m_refPicSetLtFoll ; 73 74 m_refPicSetsAll [0] = &m_refPicSetStCurrBefore; 75 m_refPicSetsAll [1] = &m_refPicSetStCurrAfter ; 76 m_refPicSetsAll [2] = &m_refPicSetStFoll ; 77 m_refPicSetsAll [3] = &m_refPicSetLtCurr ; 78 m_refPicSetsAll [4] = &m_refPicSetLtFoll ; 79 }; 80 81 std::vector<Int> m_pocStCurrBefore; 82 std::vector<Int> m_pocStCurrAfter; 83 std::vector<Int> m_pocStFoll; 84 std::vector<Int> m_pocLtCurr; 85 std::vector<Int> m_pocLtFoll; 86 87 Int m_numPocStCurrBefore; 88 Int m_numPocStCurrAfter; 89 Int m_numPocStFoll; 90 Int m_numPocLtCurr; 91 Int m_numPocLtFoll; 92 93 std::vector<TComPic*> m_refPicSetStCurrBefore; 94 std::vector<TComPic*> m_refPicSetStCurrAfter; 95 std::vector<TComPic*> m_refPicSetStFoll; 96 std::vector<TComPic*> m_refPicSetLtCurr; 97 std::vector<TComPic*> m_refPicSetLtFoll; 98 99 std::vector<TComPic*>* m_refPicSetsCurr[3]; 100 std::vector<TComPic*>* m_refPicSetsLt [2]; 101 std::vector<TComPic*>* m_refPicSetsAll [5]; 102 103 // Annex F 104 Int m_numActiveRefLayerPics0; 105 Int m_numActiveRefLayerPics1; 106 107 std::vector<TComPic*> m_refPicSetInterLayer0; 108 std::vector<TComPic*> m_refPicSetInterLayer1; 109 }; 110 #endif 111 56 112 class TComPic 57 113 { … … 72 128 Bool m_bReconstructed; 73 129 Bool m_bNeededForOutput; 74 #if NH_MV 75 Bool m_bPicOutputFlag; // Semantics variable 76 #endif 130 77 131 UInt m_uiCurrSliceIdx; // Index of current slice 78 132 Bool m_bCheckLTMSB; … … 87 141 Int m_layerId; 88 142 Int m_viewId; 143 Bool m_bPicOutputFlag; // Semantics variable 144 Bool m_hasGeneratedRefPics; 145 Bool m_isPocResettingPic; 146 Bool m_isFstPicOfAllLayOfPocResetPer; 147 Int64 m_decodingOrder; 148 Bool m_noRaslOutputFlag; 149 Bool m_noClrasOutputFlag; 150 Int m_picLatencyCount; 151 Bool m_isGenerated; 152 Bool m_isGeneratedCl833; 153 Bool m_activatesNewVps; 154 TComDecodedRps m_decodedRps; 155 #endif 89 156 #if NH_3D 90 157 Int m_viewIndex; … … 92 159 Int** m_aaiCodedScale; 93 160 Int** m_aaiCodedOffset; 94 #endif95 #endif96 161 #if NH_3D_QTLPC 97 162 Bool m_bReduceBitsQTL; 98 163 #endif 99 164 #if NH_3D_NBDV 100 UInt m_uiRapRefIdx;101 RefPicList m_eRapRefList;102 Int m_iNumDdvCandPics;103 Bool m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists104 Int m_aiTexToDepRef [2][MAX_NUM_REF];105 #endif 106 165 UInt m_uiRapRefIdx; 166 RefPicList m_eRapRefList; 167 Int m_iNumDdvCandPics; 168 Bool m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists 169 Int m_aiTexToDepRef [2][MAX_NUM_REF]; 170 #endif 171 #endif 107 172 public: 108 173 TComPic(); … … 115 180 UInt getTLayer() const { return m_uiTLayer; } 116 181 Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } 117 #if NH_MV118 Void setLayerId ( Int layerId ) { m_layerId = layerId; }119 Int getLayerId () { return m_layerId; }120 Void setViewId ( Int viewId ) { m_viewId = viewId; }121 Int getViewId () { return m_viewId; }122 #if NH_3D123 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; }124 Int getViewIndex () { return m_viewIndex; }125 126 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; }127 Bool getIsDepth () { return m_isDepth; }128 129 Void setScaleOffset( Int** pS, Int** pO ) { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; }130 Int** getCodedScale () { return m_aaiCodedScale; }131 Int** getCodedOffset() { return m_aaiCodedOffset; }132 #endif133 #endif134 #if NH_3D_QTLPC135 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; }136 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; }137 #endif138 182 139 183 Bool getUsedByCurr() const { return m_bUsedByCurr; } … … 177 221 Void setOutputMark (Bool b) { m_bNeededForOutput = b; } 178 222 Bool getOutputMark () const { return m_bNeededForOutput; } 179 #if NH_MV 180 Void setPicOutputFlag(Bool b) { m_bPicOutputFlag = b; } 181 Bool getPicOutputFlag() { return m_bPicOutputFlag ; } 182 #endif 183 #if NH_3D 184 #if NH_3D_ARP 185 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ); 186 #endif 187 Void compressMotion(Int scale); 188 #else 223 224 #if !NH_3D 189 225 Void compressMotion(); 190 226 #endif … … 210 246 211 247 #if NH_MV 212 Void print( Bool legend ); 248 Void setLayerId ( Int layerId ) { m_layerId = layerId; } 249 Int getLayerId () { return m_layerId; } 250 251 Void setViewId ( Int viewId ) { m_viewId = viewId; } 252 Int getViewId () { return m_viewId; } 253 254 Void setPicOutputFlag(Bool b) { m_bPicOutputFlag = b; } 255 Bool getPicOutputFlag() { return m_bPicOutputFlag ; } 256 257 Bool getPocResetPeriodId(); 258 259 Void markAsUsedForShortTermReference(); 260 Void markAsUsedForLongTermReference(); 261 Void markAsUnusedForReference(); 262 263 Bool getMarkedUnUsedForReference(); 264 Bool getMarkedAsShortTerm(); 265 266 Void setHasGeneratedRefPics(Bool val) { m_hasGeneratedRefPics = val; } 267 Bool getHasGeneratedRefPics( ) { return m_hasGeneratedRefPics; } 268 269 Void setIsPocResettingPic(Bool val) { m_isPocResettingPic = val; } 270 Bool getIsPocResettingPic( ) { return m_isPocResettingPic; } 271 272 Void setIsFstPicOfAllLayOfPocResetPer(Bool val) { m_isFstPicOfAllLayOfPocResetPer = val; } 273 Bool getIsFstPicOfAllLayOfPocResetPer( ) { return m_isFstPicOfAllLayOfPocResetPer; } 274 275 Int64 getDecodingOrder( ) { return m_decodingOrder; } 276 Void setDecodingOrder( UInt64 val ) { m_decodingOrder = val; } 277 278 Bool getNoRaslOutputFlag() { return m_noRaslOutputFlag; } 279 Void setNoRaslOutputFlag( Bool b ) { m_noRaslOutputFlag = b; } 280 281 Bool getNoClrasOutputFlag() { return m_noClrasOutputFlag; } 282 Void setNoClrasOutputFlag( Bool b ) { m_noClrasOutputFlag = b; } 283 284 Int getPicLatencyCount() { return m_picLatencyCount; } 285 Void setPicLatencyCount( Int val ) { m_picLatencyCount = val; } 286 287 Bool getIsGenerated() const { return m_isGenerated; } 288 Void setIsGenerated( Bool b ) { m_isGenerated = b; } 289 290 Bool getIsGeneratedCl833() const { return m_isGeneratedCl833; } 291 Void setIsGeneratedCl833( Bool b ) { m_isGeneratedCl833 = b; } 292 293 Int getTemporalId( ) { return getSlice(0)->getTemporalId(); } 294 295 Bool getActivatesNewVps() { return m_activatesNewVps; } 296 Void setActivatesNewVps( Bool b ) { m_activatesNewVps = b; } 297 298 TComDecodedRps* getDecodedRps() { return &m_decodedRps; } 299 300 Bool isIrap() { return getSlice(0)->isIRAP(); } 301 Bool isBla () { return getSlice(0)->isBla (); } 302 Bool isIdr () { return getSlice(0)->isIdr (); } 303 Bool isCra () { return getSlice(0)->isCra (); } 304 Bool isSlnr () { return getSlice(0)->isSlnr (); } 305 Bool isRasl () { return getSlice(0)->isRasl (); } 306 Bool isRadl () { return getSlice(0)->isRadl (); } 307 Bool isStsa () { return getSlice(0)->isStsa (); } 308 Bool isTsa () { return getSlice(0)->isTsa (); } 309 310 Void print( Int outputLevel ); 311 312 #if NH_3D 313 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 314 Int getViewIndex () { return m_viewIndex; } 315 316 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 317 Bool getIsDepth () { return m_isDepth; } 318 319 Void setScaleOffset( Int** pS, Int** pO ) { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; } 320 Int** getCodedScale () { return m_aaiCodedScale; } 321 Int** getCodedOffset() { return m_aaiCodedOffset; } 322 323 Void compressMotion(Int scale); 324 Void printMotion( ); 325 #if NH_3D_ARP 326 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ); 327 #endif 328 #if NH_3D_QTLPC 329 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; } 330 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; } 213 331 #endif 214 332 #if NH_3D_NBDV 215 Int getNumDdvCandPics() {return m_iNumDdvCandPics; } 216 Int getDisCandRefPictures(Int iColPOC); 217 Void setRapRefIdx(UInt uiRapRefIdx) {m_uiRapRefIdx = uiRapRefIdx;} 218 Void setRapRefList(RefPicList eRefPicList) {m_eRapRefList = eRefPicList;} 219 Void setNumDdvCandPics (Int i) {m_iNumDdvCandPics = i; } 220 UInt getRapRefIdx() {return m_uiRapRefIdx; } 221 RefPicList getRapRefList() {return m_eRapRefList; } 222 Void checkTemporalIVRef(); 223 Bool isTempIVRefValid(Int currCandPic, Int iTempRefDir, Int iTempRefIdx); 224 Void checkTextureRef( ); 225 Int isTextRefValid(Int iTextRefDir, Int iTextRefIdx); 333 Int getNumDdvCandPics() { return m_iNumDdvCandPics; } 334 Int getDisCandRefPictures(Int iColPOC); 335 Void setRapRefIdx(UInt uiRapRefIdx) { m_uiRapRefIdx = uiRapRefIdx; } 336 Void setRapRefList(RefPicList eRefPicList) { m_eRapRefList = eRefPicList; } 337 Void setNumDdvCandPics (Int i) { m_iNumDdvCandPics = i; } 338 UInt getRapRefIdx() { return m_uiRapRefIdx; } 339 RefPicList getRapRefList() { return m_eRapRefList; } 340 Void checkTemporalIVRef(); 341 Bool isTempIVRefValid(Int currCandPic, Int iTempRefDir, Int iTempRefIdx); 342 Void checkTextureRef( ); 343 Int isTextRefValid(Int iTextRefDir, Int iTextRefIdx); 344 #endif 345 #endif 226 346 #endif 227 347 … … 241 361 242 362 #if NH_MV 363 364 class TComAu : public TComList<TComPic*> 365 { 366 367 public: 368 369 Int getPoc ( ) { assert(!empty()); return back()->getPOC (); } 370 Void setPicLatencyCount( Int picLatenyCount ); 371 Int getPicLatencyCount( ) { assert(!empty()); return back()->getPicLatencyCount(); } 372 TComPic* getPic ( Int nuhLayerId ); 373 Void addPic ( TComPic* pic, Bool pocUnkown ); 374 Bool containsPic ( TComPic* pic ); 375 }; 376 377 378 class TComSubDpb : public TComList<TComPic*> 379 { 380 private: 381 Int m_nuhLayerId; 382 public: 383 TComSubDpb( Int nuhLayerid ); 384 385 Int getLayerId ( ) { return m_nuhLayerId; } 386 387 TComPic* getPic ( Int poc ); 388 TComPic* getPicFromLsb ( Int pocLsb, Int maxPicOrderCntLsb ); 389 TComPic* getShortTermRefPic ( Int poc ); 390 TComList<TComPic*> getPicsMarkedNeedForOutput ( ); 391 392 Void markAllAsUnusedForReference ( ); 393 394 Void addPic ( TComPic* pic ); 395 Void removePics ( std::vector<TComPic*> picToRemove ); 396 Bool areAllPicsMarkedNotNeedForOutput( ); 397 }; 398 243 399 class TComPicLists 244 400 { 245 401 private: 246 TComList<TComList<TComPic*>*> m_lists; 247 #if NH_3D 248 const TComVPS* m_vps; 402 TComList<TComAu* > m_aus; 403 TComList<TComSubDpb*> m_subDpbs; 404 Bool m_printPicOutput; 405 #if NH_3D 406 const TComVPS* m_vps; 249 407 #endif 250 408 public: 251 Void push_back( TComList<TComPic*>* list ) { m_lists.push_back( list ); } 252 Int size () { return (Int) m_lists.size(); } 253 #if NH_3D_ARP 254 TComList<TComPic*>* getPicList ( Int layerIdInNuh ); 255 #endif 256 TComPic* getPic ( Int layerIdInNuh, Int poc ); 257 TComPicYuv* getPicYuv( Int layerIdInNuh, Int poc, Bool recon ); 258 #if NH_3D 259 Void setVPS ( const TComVPS* vps ) { m_vps = vps; }; 260 TComPic* getPic ( Int viewIndex, Bool depthFlag, Int poc ); 261 TComPicYuv* getPicYuv( Int viewIndex, Bool depthFlag, Int poc, Bool recon ); 409 ~TComPicLists(); 410 411 // Add and remove single pictures 412 Void addNewPic( TComPic* pic ); 413 Void removePic( TComPic* pic ); 414 415 // Get Pics 416 TComPic* getPic ( Int layerIdInNuh, Int poc ); 417 TComPicYuv* getPicYuv ( Int layerIdInNuh, Int poc, Bool recon ); 418 419 // Get and AUs and SubDPBs 420 TComSubDpb* getSubDpb ( Int nuhLayerId, Bool create ); 421 TComList<TComSubDpb*>* getSubDpbs ( ); 422 423 TComAu* addAu ( Int poc ); 424 TComAu* getAu ( Int poc, Bool create ); 425 TComList<TComAu*>* getAus ( ); 426 TComList<TComAu*> getAusHavingPicsMarkedForOutput( ); 427 428 // Mark pictures and set POCs 429 Void markSubDpbAsUnusedForReference ( Int layerIdInNuh ); 430 Void markSubDpbAsUnusedForReference ( TComSubDpb& subDpb ); 431 Void markAllSubDpbAsUnusedForReference( ); 432 Void decrementPocsInSubDpb ( Int nuhLayerId, Int deltaPocVal ); 433 434 // Empty Sub DPBs 435 Void emptyAllSubDpbs ( ); 436 Void emptySubDpbs ( TComList<TComSubDpb*>* subDpbs); 437 Void emptySubDpb ( TComSubDpb* subDpb); 438 Void emptySubDpb ( Int nuhLayerId ); 439 440 Void emptyNotNeedForOutputAndUnusedForRef ( ); 441 Void emptySubDpbNotNeedForOutputAndUnusedForRef( Int layerId ); 442 Void emptySubDpbNotNeedForOutputAndUnusedForRef( TComSubDpb subDpb ); 443 444 // For printing to std::out 445 Void setPrintPicOutput ( Bool printPicOutput ) { m_printPicOutput = printPicOutput; }; 446 Void print(); 447 448 #if NH_3D 449 Void setVPS ( const TComVPS* vps ) { m_vps = vps; }; 450 TComPic* getPic ( Int viewIndex, Bool depthFlag, Int poc ); 451 TComPicYuv* getPicYuv ( Int viewIndex, Bool depthFlag, Int poc, Bool recon ); 262 452 #endif 263 453 264 Void print( ); 265 266 }; // END CLASS DEFINITION TComPicLists 267 268 #endif 454 }; 455 456 // END CLASS DEFINITION TComPicLists 457 458 #endif 459 269 460 270 461 //! \}
Note: See TracChangeset for help on using the changeset viewer.