[5] | 1 | /* The copyright in this software is being made available under the BSD |
---|
| 2 | * License, included below. This software may be subject to other third party |
---|
| 3 | * and contributor rights, including patent rights, and no such rights are |
---|
[1313] | 4 | * granted under this license. |
---|
[5] | 5 | * |
---|
[1313] | 6 | * Copyright (c) 2010-2015, ITU/ISO/IEC |
---|
[5] | 7 | * All rights reserved. |
---|
| 8 | * |
---|
| 9 | * Redistribution and use in source and binary forms, with or without |
---|
| 10 | * modification, are permitted provided that the following conditions are met: |
---|
| 11 | * |
---|
| 12 | * * Redistributions of source code must retain the above copyright notice, |
---|
| 13 | * this list of conditions and the following disclaimer. |
---|
| 14 | * * Redistributions in binary form must reproduce the above copyright notice, |
---|
| 15 | * this list of conditions and the following disclaimer in the documentation |
---|
| 16 | * and/or other materials provided with the distribution. |
---|
[56] | 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
[5] | 18 | * be used to endorse or promote products derived from this software without |
---|
| 19 | * specific prior written permission. |
---|
| 20 | * |
---|
| 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
| 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS |
---|
| 25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
| 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
| 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
| 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
| 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
| 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
---|
| 31 | * THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 32 | */ |
---|
[2] | 33 | |
---|
| 34 | /** \file TComPic.h |
---|
| 35 | \brief picture class (header) |
---|
| 36 | */ |
---|
| 37 | |
---|
| 38 | #ifndef __TCOMPIC__ |
---|
| 39 | #define __TCOMPIC__ |
---|
| 40 | |
---|
| 41 | // Include files |
---|
| 42 | #include "CommonDef.h" |
---|
| 43 | #include "TComPicSym.h" |
---|
| 44 | #include "TComPicYuv.h" |
---|
| 45 | #include "TComBitStream.h" |
---|
| 46 | |
---|
[56] | 47 | //! \ingroup TLibCommon |
---|
| 48 | //! \{ |
---|
| 49 | |
---|
[2] | 50 | // ==================================================================================================================== |
---|
| 51 | // Class definition |
---|
| 52 | // ==================================================================================================================== |
---|
| 53 | |
---|
| 54 | /// picture class (symbol + YUV buffers) |
---|
[1313] | 55 | |
---|
[1321] | 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 | |
---|
[2] | 112 | class TComPic |
---|
| 113 | { |
---|
[1313] | 114 | public: |
---|
| 115 | typedef enum { PIC_YUV_ORG=0, PIC_YUV_REC=1, PIC_YUV_TRUE_ORG=2, NUM_PIC_YUV=3 } PIC_YUV_T; |
---|
| 116 | // TRUE_ORG is the input file without any pre-encoder colour space conversion (but with possible bit depth increment) |
---|
| 117 | TComPicYuv* getPicYuvTrueOrg() { return m_apcPicYuv[PIC_YUV_TRUE_ORG]; } |
---|
| 118 | |
---|
[2] | 119 | private: |
---|
[56] | 120 | UInt m_uiTLayer; // Temporal layer |
---|
| 121 | Bool m_bUsedByCurr; // Used by current picture |
---|
| 122 | Bool m_bIsLongTerm; // IS long term picture |
---|
[1313] | 123 | TComPicSym m_picSym; // Symbol |
---|
| 124 | TComPicYuv* m_apcPicYuv[NUM_PIC_YUV]; |
---|
| 125 | |
---|
[2] | 126 | TComPicYuv* m_pcPicYuvPred; // Prediction |
---|
| 127 | TComPicYuv* m_pcPicYuvResi; // Residual |
---|
| 128 | Bool m_bReconstructed; |
---|
[56] | 129 | Bool m_bNeededForOutput; |
---|
[1321] | 130 | |
---|
[2] | 131 | UInt m_uiCurrSliceIdx; // Index of current slice |
---|
[608] | 132 | Bool m_bCheckLTMSB; |
---|
| 133 | |
---|
[1313] | 134 | Bool m_isTop; |
---|
| 135 | Bool m_isField; |
---|
| 136 | |
---|
[56] | 137 | std::vector<std::vector<TComDataCU*> > m_vSliceCUDataLink; |
---|
| 138 | |
---|
[608] | 139 | SEIMessages m_SEIs; ///< Any SEI messages that have been received. If !NULL we own the object. |
---|
[1313] | 140 | #if NH_MV |
---|
[608] | 141 | Int m_layerId; |
---|
| 142 | Int m_viewId; |
---|
[1321] | 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 |
---|
[1313] | 156 | #if NH_3D |
---|
[608] | 157 | Int m_viewIndex; |
---|
| 158 | Bool m_isDepth; |
---|
| 159 | Int** m_aaiCodedScale; |
---|
| 160 | Int** m_aaiCodedOffset; |
---|
[1313] | 161 | #if NH_3D_QTLPC |
---|
[189] | 162 | Bool m_bReduceBitsQTL; |
---|
[126] | 163 | #endif |
---|
[1313] | 164 | #if NH_3D_NBDV |
---|
[1321] | 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]; |
---|
[608] | 170 | #endif |
---|
[1321] | 171 | #endif |
---|
[2] | 172 | public: |
---|
| 173 | TComPic(); |
---|
| 174 | virtual ~TComPic(); |
---|
[1313] | 175 | |
---|
| 176 | Void create( const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual /*= false*/ ); |
---|
| 177 | |
---|
[56] | 178 | virtual Void destroy(); |
---|
[1313] | 179 | |
---|
| 180 | UInt getTLayer() const { return m_uiTLayer; } |
---|
[56] | 181 | Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } |
---|
[608] | 182 | |
---|
[1313] | 183 | Bool getUsedByCurr() const { return m_bUsedByCurr; } |
---|
[56] | 184 | Void setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; } |
---|
[1313] | 185 | Bool getIsLongTerm() const { return m_bIsLongTerm; } |
---|
[56] | 186 | Void setIsLongTerm( Bool lt ) { m_bIsLongTerm = lt; } |
---|
[608] | 187 | Void setCheckLTMSBPresent (Bool b ) {m_bCheckLTMSB=b;} |
---|
| 188 | Bool getCheckLTMSBPresent () { return m_bCheckLTMSB;} |
---|
[5] | 189 | |
---|
[1313] | 190 | TComPicSym* getPicSym() { return &m_picSym; } |
---|
| 191 | TComSlice* getSlice(Int i) { return m_picSym.getSlice(i); } |
---|
| 192 | Int getPOC() const { return m_picSym.getSlice(m_uiCurrSliceIdx)->getPOC(); } |
---|
| 193 | TComDataCU* getCtu( UInt ctuRsAddr ) { return m_picSym.getCtu( ctuRsAddr ); } |
---|
| 194 | const TComDataCU* getCtu( UInt ctuRsAddr ) const { return m_picSym.getCtu( ctuRsAddr ); } |
---|
| 195 | |
---|
| 196 | TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[PIC_YUV_ORG]; } |
---|
| 197 | TComPicYuv* getPicYuvRec() { return m_apcPicYuv[PIC_YUV_REC]; } |
---|
| 198 | |
---|
[56] | 199 | TComPicYuv* getPicYuvPred() { return m_pcPicYuvPred; } |
---|
| 200 | TComPicYuv* getPicYuvResi() { return m_pcPicYuvResi; } |
---|
| 201 | Void setPicYuvPred( TComPicYuv* pcPicYuv ) { m_pcPicYuvPred = pcPicYuv; } |
---|
| 202 | Void setPicYuvResi( TComPicYuv* pcPicYuv ) { m_pcPicYuvResi = pcPicYuv; } |
---|
[1313] | 203 | |
---|
| 204 | UInt getNumberOfCtusInFrame() const { return m_picSym.getNumberOfCtusInFrame(); } |
---|
| 205 | UInt getNumPartInCtuWidth() const { return m_picSym.getNumPartInCtuWidth(); } |
---|
| 206 | UInt getNumPartInCtuHeight() const { return m_picSym.getNumPartInCtuHeight(); } |
---|
| 207 | UInt getNumPartitionsInCtu() const { return m_picSym.getNumPartitionsInCtu(); } |
---|
| 208 | UInt getFrameWidthInCtus() const { return m_picSym.getFrameWidthInCtus(); } |
---|
| 209 | UInt getFrameHeightInCtus() const { return m_picSym.getFrameHeightInCtus(); } |
---|
| 210 | UInt getMinCUWidth() const { return m_picSym.getMinCUWidth(); } |
---|
| 211 | UInt getMinCUHeight() const { return m_picSym.getMinCUHeight(); } |
---|
| 212 | |
---|
| 213 | Int getStride(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getStride(id); } |
---|
| 214 | Int getComponentScaleX(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getComponentScaleX(id); } |
---|
| 215 | Int getComponentScaleY(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getComponentScaleY(id); } |
---|
| 216 | ChromaFormat getChromaFormat() const { return m_apcPicYuv[PIC_YUV_REC]->getChromaFormat(); } |
---|
| 217 | Int getNumberValidComponents() const { return m_apcPicYuv[PIC_YUV_REC]->getNumberValidComponents(); } |
---|
| 218 | |
---|
[2] | 219 | Void setReconMark (Bool b) { m_bReconstructed = b; } |
---|
[1313] | 220 | Bool getReconMark () const { return m_bReconstructed; } |
---|
[56] | 221 | Void setOutputMark (Bool b) { m_bNeededForOutput = b; } |
---|
[1313] | 222 | Bool getOutputMark () const { return m_bNeededForOutput; } |
---|
[1321] | 223 | |
---|
| 224 | #if !NH_3D |
---|
[1313] | 225 | Void compressMotion(); |
---|
[608] | 226 | #endif |
---|
[1313] | 227 | UInt getCurrSliceIdx() const { return m_uiCurrSliceIdx; } |
---|
[2] | 228 | Void setCurrSliceIdx(UInt i) { m_uiCurrSliceIdx = i; } |
---|
[1313] | 229 | UInt getNumAllocatedSlice() const {return m_picSym.getNumAllocatedSlice();} |
---|
| 230 | Void allocateNewSlice() {m_picSym.allocateNewSlice(); } |
---|
| 231 | Void clearSliceBuffer() {m_picSym.clearSliceBuffer(); } |
---|
[608] | 232 | |
---|
[1313] | 233 | const Window& getConformanceWindow() const { return m_picSym.getSPS().getConformanceWindow(); } |
---|
| 234 | Window getDefDisplayWindow() const { return m_picSym.getSPS().getVuiParametersPresentFlag() ? m_picSym.getSPS().getVuiParameters()->getDefaultDisplayWindow() : Window(); } |
---|
[608] | 235 | |
---|
[872] | 236 | Bool getSAOMergeAvailability(Int currAddr, Int mergeAddr); |
---|
[2] | 237 | |
---|
[1313] | 238 | UInt getSubstreamForCtuAddr(const UInt ctuAddr, const Bool bAddressInRaster, TComSlice *pcSlice); |
---|
| 239 | |
---|
[655] | 240 | /* field coding parameters*/ |
---|
| 241 | |
---|
[1313] | 242 | Void setTopField(Bool b) {m_isTop = b;} |
---|
| 243 | Bool isTopField() {return m_isTop;} |
---|
| 244 | Void setField(Bool b) {m_isField = b;} |
---|
| 245 | Bool isField() {return m_isField;} |
---|
[655] | 246 | |
---|
[1313] | 247 | #if NH_MV |
---|
[1321] | 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 ); |
---|
[608] | 327 | #endif |
---|
[1321] | 328 | #if NH_3D_QTLPC |
---|
| 329 | Bool getReduceBitsFlag () { return m_bReduceBitsQTL; } |
---|
| 330 | Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; } |
---|
| 331 | #endif |
---|
[1313] | 332 | #if NH_3D_NBDV |
---|
[1321] | 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); |
---|
[608] | 344 | #endif |
---|
[1321] | 345 | #endif |
---|
| 346 | #endif |
---|
[1313] | 347 | |
---|
[56] | 348 | /** transfer ownership of seis to this picture */ |
---|
[1313] | 349 | Void setSEIs(SEIMessages& seis) { m_SEIs = seis; } |
---|
[2] | 350 | |
---|
| 351 | /** |
---|
| 352 | * return the current list of SEI messages associated with this picture. |
---|
[56] | 353 | * Pointer is valid until this->destroy() is called */ |
---|
[608] | 354 | SEIMessages& getSEIs() { return m_SEIs; } |
---|
[2] | 355 | |
---|
| 356 | /** |
---|
| 357 | * return the current list of SEI messages associated with this picture. |
---|
[56] | 358 | * Pointer is valid until this->destroy() is called */ |
---|
[608] | 359 | const SEIMessages& getSEIs() const { return m_SEIs; } |
---|
[2] | 360 | };// END CLASS DEFINITION TComPic |
---|
| 361 | |
---|
[1313] | 362 | #if NH_MV |
---|
[1321] | 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 | |
---|
[608] | 399 | class TComPicLists |
---|
| 400 | { |
---|
| 401 | private: |
---|
[1321] | 402 | TComList<TComAu* > m_aus; |
---|
| 403 | TComList<TComSubDpb*> m_subDpbs; |
---|
| 404 | Bool m_printPicOutput; |
---|
| 405 | #if NH_3D |
---|
| 406 | const TComVPS* m_vps; |
---|
[608] | 407 | #endif |
---|
| 408 | public: |
---|
[1321] | 409 | TComPicLists() { m_printPicOutput = false; }; |
---|
| 410 | ~TComPicLists(); |
---|
| 411 | |
---|
| 412 | // Add and remove single pictures |
---|
| 413 | Void addNewPic( TComPic* pic ); |
---|
| 414 | Void removePic( TComPic* pic ); |
---|
| 415 | |
---|
| 416 | // Get Pics |
---|
| 417 | TComPic* getPic ( Int layerIdInNuh, Int poc ); |
---|
| 418 | TComPicYuv* getPicYuv ( Int layerIdInNuh, Int poc, Bool recon ); |
---|
| 419 | |
---|
| 420 | // Get and AUs and SubDPBs |
---|
| 421 | TComSubDpb* getSubDpb ( Int nuhLayerId, Bool create ); |
---|
| 422 | TComList<TComSubDpb*>* getSubDpbs ( ); |
---|
| 423 | |
---|
| 424 | TComAu* addAu ( Int poc ); |
---|
| 425 | TComAu* getAu ( Int poc, Bool create ); |
---|
| 426 | TComList<TComAu*>* getAus ( ); |
---|
| 427 | TComList<TComAu*> getAusHavingPicsMarkedForOutput( ); |
---|
| 428 | |
---|
| 429 | // Mark pictures and set POCs |
---|
| 430 | Void markSubDpbAsUnusedForReference ( Int layerIdInNuh ); |
---|
| 431 | Void markSubDpbAsUnusedForReference ( TComSubDpb& subDpb ); |
---|
| 432 | Void markAllSubDpbAsUnusedForReference( ); |
---|
| 433 | Void decrementPocsInSubDpb ( Int nuhLayerId, Int deltaPocVal ); |
---|
| 434 | |
---|
| 435 | // Empty Sub DPBs |
---|
| 436 | Void emptyAllSubDpbs ( ); |
---|
| 437 | Void emptySubDpbs ( TComList<TComSubDpb*>* subDpbs); |
---|
| 438 | Void emptySubDpb ( TComSubDpb* subDpb); |
---|
| 439 | Void emptySubDpb ( Int nuhLayerId ); |
---|
| 440 | |
---|
| 441 | Void emptyNotNeedForOutputAndUnusedForRef ( ); |
---|
| 442 | Void emptySubDpbNotNeedForOutputAndUnusedForRef( Int layerId ); |
---|
| 443 | Void emptySubDpbNotNeedForOutputAndUnusedForRef( TComSubDpb subDpb ); |
---|
| 444 | |
---|
| 445 | // For printing to std::out |
---|
| 446 | Void setPrintPicOutput ( Bool printPicOutput ) { m_printPicOutput = printPicOutput; }; |
---|
| 447 | Void print(); |
---|
| 448 | |
---|
| 449 | #if NH_3D |
---|
| 450 | Void setVPS ( const TComVPS* vps ) { m_vps = vps; }; |
---|
| 451 | TComPic* getPic ( Int viewIndex, Bool depthFlag, Int poc ); |
---|
| 452 | TComPicYuv* getPicYuv ( Int viewIndex, Bool depthFlag, Int poc, Bool recon ); |
---|
[608] | 453 | #endif |
---|
| 454 | |
---|
[1321] | 455 | }; |
---|
[608] | 456 | |
---|
[1321] | 457 | // END CLASS DEFINITION TComPicLists |
---|
[608] | 458 | |
---|
[1321] | 459 | #endif |
---|
[1313] | 460 | |
---|
[1321] | 461 | |
---|
[56] | 462 | //! \} |
---|
[2] | 463 | |
---|
| 464 | #endif // __TCOMPIC__ |
---|