Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComPic.h
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComPic.h
r1179 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. 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC4 * granted under this license. 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 36 36 */ 37 37 38 39 38 #ifndef __TCOMPIC__ 40 39 #define __TCOMPIC__ … … 45 44 #include "TComPicYuv.h" 46 45 #include "TComBitStream.h" 47 #include "SEI.h"48 46 49 47 //! \ingroup TLibCommon … … 55 53 56 54 /// picture class (symbol + YUV buffers) 55 57 56 class TComPic 58 57 { 58 public: 59 typedef enum { PIC_YUV_ORG=0, PIC_YUV_REC=1, PIC_YUV_TRUE_ORG=2, NUM_PIC_YUV=3 } PIC_YUV_T; 60 // TRUE_ORG is the input file without any pre-encoder colour space conversion (but with possible bit depth increment) 61 TComPicYuv* getPicYuvTrueOrg() { return m_apcPicYuv[PIC_YUV_TRUE_ORG]; } 62 59 63 private: 60 64 UInt m_uiTLayer; // Temporal layer 61 65 Bool m_bUsedByCurr; // Used by current picture 62 66 Bool m_bIsLongTerm; // IS long term picture 63 TComPicSym* m_apcPicSym; // Symbol 64 65 TComPicYuv* m_apcPicYuv[2]; // Texture, 0:org / 1:rec 66 67 TComPicSym m_picSym; // Symbol 68 TComPicYuv* m_apcPicYuv[NUM_PIC_YUV]; 69 67 70 TComPicYuv* m_pcPicYuvPred; // Prediction 68 71 TComPicYuv* m_pcPicYuvResi; // Residual 69 72 Bool m_bReconstructed; 70 73 Bool m_bNeededForOutput; 71 #if H_MV74 #if NH_MV 72 75 Bool m_bPicOutputFlag; // Semantics variable 73 76 #endif 74 77 UInt m_uiCurrSliceIdx; // Index of current slice 75 78 Bool m_bCheckLTMSB; 76 77 Int m_numReorderPics[MAX_TLAYER]; 78 Window m_conformanceWindow; 79 Window m_defaultDisplayWindow; 80 81 bool m_isTop; 82 bool m_isField; 83 79 80 Bool m_isTop; 81 Bool m_isField; 82 84 83 std::vector<std::vector<TComDataCU*> > m_vSliceCUDataLink; 85 84 86 85 SEIMessages m_SEIs; ///< Any SEI messages that have been received. If !NULL we own the object. 87 88 #if H_MV 86 #if NH_MV 89 87 Int m_layerId; 90 88 Int m_viewId; 91 #if H_3D89 #if NH_3D 92 90 Int m_viewIndex; 93 91 Bool m_isDepth; … … 96 94 #endif 97 95 #endif 98 #if H_3D_QTLPC96 #if NH_3D_QTLPC 99 97 Bool m_bReduceBitsQTL; 100 98 #endif 101 #if H_3D_NBDV99 #if NH_3D_NBDV 102 100 UInt m_uiRapRefIdx; 103 101 RefPicList m_eRapRefList; 104 102 Int m_iNumDdvCandPics; 105 Bool m_abTIVRINCurrRL 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 lists 106 104 Int m_aiTexToDepRef [2][MAX_NUM_REF]; 107 105 #endif 106 108 107 public: 109 108 TComPic(); 110 109 virtual ~TComPic(); 111 112 Void create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, 113 Int *numReorderPics, Bool bIsVirtual = false ); 114 110 111 Void create( const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual /*= false*/ ); 112 115 113 virtual Void destroy(); 116 117 UInt getTLayer() { return m_uiTLayer; }114 115 UInt getTLayer() const { return m_uiTLayer; } 118 116 Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } 119 120 #if H_MV 117 #if NH_MV 121 118 Void setLayerId ( Int layerId ) { m_layerId = layerId; } 122 119 Int getLayerId () { return m_layerId; } 123 120 Void setViewId ( Int viewId ) { m_viewId = viewId; } 124 121 Int getViewId () { return m_viewId; } 125 #if H_3D122 #if NH_3D 126 123 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 127 124 Int getViewIndex () { return m_viewIndex; } … … 135 132 #endif 136 133 #endif 137 #if H_3D_QTLPC134 #if NH_3D_QTLPC 138 135 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; } 139 136 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; } 140 137 #endif 141 Bool getUsedByCurr() { return m_bUsedByCurr; } 138 139 Bool getUsedByCurr() const { return m_bUsedByCurr; } 142 140 Void setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; } 143 Bool getIsLongTerm() { return m_bIsLongTerm; }141 Bool getIsLongTerm() const { return m_bIsLongTerm; } 144 142 Void setIsLongTerm( Bool lt ) { m_bIsLongTerm = lt; } 145 143 Void setCheckLTMSBPresent (Bool b ) {m_bCheckLTMSB=b;} 146 144 Bool getCheckLTMSBPresent () { return m_bCheckLTMSB;} 147 145 148 TComPicSym* getPicSym() { return m_apcPicSym; } 149 TComSlice* getSlice(Int i) { return m_apcPicSym->getSlice(i); } 150 Int getPOC() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getPOC(); } 151 TComDataCU*& getCU( UInt uiCUAddr ) { return m_apcPicSym->getCU( uiCUAddr ); } 152 153 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[0]; } 154 TComPicYuv* getPicYuvRec() { return m_apcPicYuv[1]; } 155 146 TComPicSym* getPicSym() { return &m_picSym; } 147 TComSlice* getSlice(Int i) { return m_picSym.getSlice(i); } 148 Int getPOC() const { return m_picSym.getSlice(m_uiCurrSliceIdx)->getPOC(); } 149 TComDataCU* getCtu( UInt ctuRsAddr ) { return m_picSym.getCtu( ctuRsAddr ); } 150 const TComDataCU* getCtu( UInt ctuRsAddr ) const { return m_picSym.getCtu( ctuRsAddr ); } 151 152 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[PIC_YUV_ORG]; } 153 TComPicYuv* getPicYuvRec() { return m_apcPicYuv[PIC_YUV_REC]; } 154 156 155 TComPicYuv* getPicYuvPred() { return m_pcPicYuvPred; } 157 156 TComPicYuv* getPicYuvResi() { return m_pcPicYuvResi; } 158 157 Void setPicYuvPred( TComPicYuv* pcPicYuv ) { m_pcPicYuvPred = pcPicYuv; } 159 158 Void setPicYuvResi( TComPicYuv* pcPicYuv ) { m_pcPicYuvResi = pcPicYuv; } 160 161 UInt getNum CUsInFrame() { return m_apcPicSym->getNumberOfCUsInFrame(); }162 UInt getNumPartIn Width() { return m_apcPicSym->getNumPartInWidth();}163 UInt getNumPartIn Height() { return m_apcPicSym->getNumPartInHeight();}164 UInt getNumPart InCU() { return m_apcPicSym->getNumPartition();}165 UInt getFrameWidthInC U() { return m_apcPicSym->getFrameWidthInCU();}166 UInt getFrameHeightInC U() { return m_apcPicSym->getFrameHeightInCU();}167 UInt getMinCUWidth() { return m_apcPicSym->getMinCUWidth();}168 UInt getMinCUHeight() { return m_apcPicSym->getMinCUHeight();}169 170 UInt getParPelX(UChar uhPartIdx) { return getParPelX(uhPartIdx); }171 UInt getParPelY(UChar uhPartIdx) { return getParPelX(uhPartIdx); }172 173 Int getStride() { return m_apcPicYuv[1]->getStride(); }174 Int get CStride() { return m_apcPicYuv[1]->getCStride(); }175 159 160 UInt getNumberOfCtusInFrame() const { return m_picSym.getNumberOfCtusInFrame(); } 161 UInt getNumPartInCtuWidth() const { return m_picSym.getNumPartInCtuWidth(); } 162 UInt getNumPartInCtuHeight() const { return m_picSym.getNumPartInCtuHeight(); } 163 UInt getNumPartitionsInCtu() const { return m_picSym.getNumPartitionsInCtu(); } 164 UInt getFrameWidthInCtus() const { return m_picSym.getFrameWidthInCtus(); } 165 UInt getFrameHeightInCtus() const { return m_picSym.getFrameHeightInCtus(); } 166 UInt getMinCUWidth() const { return m_picSym.getMinCUWidth(); } 167 UInt getMinCUHeight() const { return m_picSym.getMinCUHeight(); } 168 169 Int getStride(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getStride(id); } 170 Int getComponentScaleX(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getComponentScaleX(id); } 171 Int getComponentScaleY(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getComponentScaleY(id); } 172 ChromaFormat getChromaFormat() const { return m_apcPicYuv[PIC_YUV_REC]->getChromaFormat(); } 173 Int getNumberValidComponents() const { return m_apcPicYuv[PIC_YUV_REC]->getNumberValidComponents(); } 174 176 175 Void setReconMark (Bool b) { m_bReconstructed = b; } 177 Bool getReconMark () { return m_bReconstructed; }176 Bool getReconMark () const { return m_bReconstructed; } 178 177 Void setOutputMark (Bool b) { m_bNeededForOutput = b; } 179 Bool getOutputMark () { return m_bNeededForOutput; }180 #if H_MV178 Bool getOutputMark () const { return m_bNeededForOutput; } 179 #if NH_MV 181 180 Void setPicOutputFlag(Bool b) { m_bPicOutputFlag = b; } 182 181 Bool getPicOutputFlag() { return m_bPicOutputFlag ; } 183 182 #endif 184 185 Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } 186 Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; }187 # if H_3D183 #if NH_3D 184 #if NH_3D_ARP 185 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ); 186 #endif 188 187 Void compressMotion(Int scale); 189 188 #else 190 Void compressMotion(); 191 #endif 192 UInt getCurrSliceIdx() { return m_uiCurrSliceIdx; }189 Void compressMotion(); 190 #endif 191 UInt getCurrSliceIdx() const { return m_uiCurrSliceIdx; } 193 192 Void setCurrSliceIdx(UInt i) { m_uiCurrSliceIdx = i; } 194 UInt getNumAllocatedSlice() {return m_apcPicSym->getNumAllocatedSlice();}195 Void allocateNewSlice() {m_ apcPicSym->allocateNewSlice(); }196 Void clearSliceBuffer() {m_ apcPicSym->clearSliceBuffer(); }197 198 Window& getConformanceWindow() { return m_conformanceWindow; }199 Window & getDefDisplayWindow() { return m_defaultDisplayWindow; }193 UInt getNumAllocatedSlice() const {return m_picSym.getNumAllocatedSlice();} 194 Void allocateNewSlice() {m_picSym.allocateNewSlice(); } 195 Void clearSliceBuffer() {m_picSym.clearSliceBuffer(); } 196 197 const Window& getConformanceWindow() const { return m_picSym.getSPS().getConformanceWindow(); } 198 Window getDefDisplayWindow() const { return m_picSym.getSPS().getVuiParametersPresentFlag() ? m_picSym.getSPS().getVuiParameters()->getDefaultDisplayWindow() : Window(); } 200 199 201 200 Bool getSAOMergeAvailability(Int currAddr, Int mergeAddr); 202 201 202 UInt getSubstreamForCtuAddr(const UInt ctuAddr, const Bool bAddressInRaster, TComSlice *pcSlice); 203 203 204 /* field coding parameters*/ 204 205 205 Void setTopField( bool b) {m_isTop = b;}206 bool isTopField() {return m_isTop;}207 Void setField( bool b) {m_isField = b;}208 bool isField() {return m_isField;}209 210 #if H_MV206 Void setTopField(Bool b) {m_isTop = b;} 207 Bool isTopField() {return m_isTop;} 208 Void setField(Bool b) {m_isField = b;} 209 Bool isField() {return m_isField;} 210 211 #if NH_MV 211 212 Void print( Bool legend ); 212 213 #endif 213 #if H_3D_NBDV214 #if NH_3D_NBDV 214 215 Int getNumDdvCandPics() {return m_iNumDdvCandPics; } 215 216 Int getDisCandRefPictures(Int iColPOC); … … 224 225 Int isTextRefValid(Int iTextRefDir, Int iTextRefIdx); 225 226 #endif 227 226 228 /** transfer ownership of seis to this picture */ 227 void setSEIs(SEIMessages& seis) { m_SEIs = seis; }229 Void setSEIs(SEIMessages& seis) { m_SEIs = seis; } 228 230 229 231 /** … … 236 238 * Pointer is valid until this->destroy() is called */ 237 239 const SEIMessages& getSEIs() const { return m_SEIs; } 238 239 240 };// END CLASS DEFINITION TComPic 240 241 241 #if H_MV242 #if NH_MV 242 243 class TComPicLists 243 244 { 244 245 private: 245 246 TComList<TComList<TComPic*>*> m_lists; 246 #if H_3D247 TComVPS* m_vps;247 #if NH_3D 248 const TComVPS* m_vps; 248 249 #endif 249 250 public: 250 251 Void push_back( TComList<TComPic*>* list ) { m_lists.push_back( list ); } 251 252 Int size () { return (Int) m_lists.size(); } 252 #if H_3D_ARP253 #if NH_3D_ARP 253 254 TComList<TComPic*>* getPicList ( Int layerIdInNuh ); 254 255 #endif 255 256 TComPic* getPic ( Int layerIdInNuh, Int poc ); 256 257 TComPicYuv* getPicYuv( Int layerIdInNuh, Int poc, Bool recon ); 257 #if H_3D258 Void setVPS ( TComVPS* vps ) { m_vps = vps; };258 #if NH_3D 259 Void setVPS ( const TComVPS* vps ) { m_vps = vps; }; 259 260 TComPic* getPic ( Int viewIndex, Bool depthFlag, Int poc ); 260 261 TComPicYuv* getPicYuv( Int viewIndex, Bool depthFlag, Int poc, Bool recon ); … … 266 267 267 268 #endif 269 268 270 //! \} 269 271
Note: See TracChangeset for help on using the changeset viewer.