Changeset 916 in SHVCSoftware for branches/SHM-upgrade/source/Lib/TLibCommon/TComPic.h
- Timestamp:
- 12 Nov 2014, 08:09:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/Lib/TLibCommon/TComPic.h
r901 r916 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. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2014, ITU/ISO/IEC … … 44 44 #include "TComPicYuv.h" 45 45 #include "TComBitStream.h" 46 #include "SEI.h"47 46 #if AVC_BASE 48 47 #include <fstream> … … 57 56 58 57 /// picture class (symbol + YUV buffers) 58 59 59 class TComPic 60 60 { 61 public: 62 typedef enum { PIC_YUV_ORG=0, PIC_YUV_REC=1, PIC_YUV_TRUE_ORG=2, NUM_PIC_YUV=3 } PIC_YUV_T; 63 // TRUE_ORG is the input file without any pre-encoder colour space conversion (but with possible bit depth increment) 64 TComPicYuv* getPicYuvTrueOrg() { return m_apcPicYuv[PIC_YUV_TRUE_ORG]; } 65 61 66 private: 62 67 UInt m_uiTLayer; // Temporal layer … … 64 69 Bool m_bIsLongTerm; // IS long term picture 65 70 TComPicSym* m_apcPicSym; // Symbol 66 67 TComPicYuv* m_apcPicYuv[2]; // Texture, 0:org / 1:rec 68 71 TComPicYuv* m_apcPicYuv[NUM_PIC_YUV]; 72 69 73 TComPicYuv* m_pcPicYuvPred; // Prediction 70 74 TComPicYuv* m_pcPicYuvResi; // Residual … … 73 77 UInt m_uiCurrSliceIdx; // Index of current slice 74 78 Bool m_bCheckLTMSB; 75 79 76 80 Int m_numReorderPics[MAX_TLAYER]; 77 81 Window m_conformanceWindow; … … 80 84 Bool m_isTop; 81 85 Bool m_isField; 82 86 83 87 std::vector<std::vector<TComDataCU*> > m_vSliceCUDataLink; 84 88 … … 103 107 104 108 #if SVC_EXTENSION 105 #if AUXILIARY_PICTURES106 109 Void create( Int iWidth, Int iHeight, ChromaFormat chromaFormatIDC, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, 107 110 Int *numReorderPics, TComSPS* pcSps = NULL, Bool bIsVirtual = false ); 108 111 #else 109 Void create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, 110 Int *numReorderPics, TComSPS* pcSps = NULL, Bool bIsVirtual = false ); 111 #endif 112 #else 113 Void create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, 114 Int *numReorderPics, Bool bIsVirtual = false ); 112 Void create( Int iWidth, Int iHeight, ChromaFormat chromaFormatIDC, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, 113 Int *numReorderPics,Bool bIsVirtual /*= false*/ ); 115 114 #endif //SVC_EXTENSION 116 115 117 116 virtual Void destroy(); 118 119 UInt getTLayer() { return m_uiTLayer; }117 118 UInt getTLayer() const { return m_uiTLayer; } 120 119 Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } 121 120 122 Bool getUsedByCurr() { return m_bUsedByCurr; }121 Bool getUsedByCurr() const { return m_bUsedByCurr; } 123 122 Void setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; } 124 Bool getIsLongTerm() { return m_bIsLongTerm; }123 Bool getIsLongTerm() const { return m_bIsLongTerm; } 125 124 Void setIsLongTerm( Bool lt ) { m_bIsLongTerm = lt; } 126 125 Void setCheckLTMSBPresent (Bool b ) {m_bCheckLTMSB=b;} … … 129 128 TComPicSym* getPicSym() { return m_apcPicSym; } 130 129 TComSlice* getSlice(Int i) { return m_apcPicSym->getSlice(i); } 131 Int getPOC() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getPOC(); } 132 TComDataCU*& getCU( UInt uiCUAddr ) { return m_apcPicSym->getCU( uiCUAddr ); } 133 134 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[0]; } 135 TComPicYuv* getPicYuvRec() { return m_apcPicYuv[1]; } 136 130 Int getPOC() const { return m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getPOC(); } 131 TComDataCU* getCtu( UInt ctuRsAddr ) { return m_apcPicSym->getCtu( ctuRsAddr ); } 132 const TComDataCU* getCtu( UInt ctuRsAddr ) const { return m_apcPicSym->getCtu( ctuRsAddr ); } 133 134 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[PIC_YUV_ORG]; } 135 TComPicYuv* getPicYuvRec() { return m_apcPicYuv[PIC_YUV_REC]; } 136 137 137 TComPicYuv* getPicYuvPred() { return m_pcPicYuvPred; } 138 138 TComPicYuv* getPicYuvResi() { return m_pcPicYuvResi; } 139 139 Void setPicYuvPred( TComPicYuv* pcPicYuv ) { m_pcPicYuvPred = pcPicYuv; } 140 140 Void setPicYuvResi( TComPicYuv* pcPicYuv ) { m_pcPicYuvResi = pcPicYuv; } 141 142 UInt getNum CUsInFrame() { return m_apcPicSym->getNumberOfCUsInFrame(); }143 UInt getNumPartIn Width() { return m_apcPicSym->getNumPartInWidth();}144 UInt getNumPartIn Height() { return m_apcPicSym->getNumPartInHeight();}145 UInt getNumPart InCU() { return m_apcPicSym->getNumPartition();}146 UInt getFrameWidthInC U() { return m_apcPicSym->getFrameWidthInCU();}147 UInt getFrameHeightInC U() { return m_apcPicSym->getFrameHeightInCU();}148 UInt getMinCUWidth() { return m_apcPicSym->getMinCUWidth();}149 UInt getMinCUHeight() { return m_apcPicSym->getMinCUHeight();}150 151 UInt getParPelX(UChar uhPartIdx) { return getParPelX(uhPartIdx); }152 UInt getParPelY(UChar uhPartIdx) { return getParPelX(uhPartIdx); }153 154 Int getStride() { return m_apcPicYuv[1]->getStride(); }155 Int get CStride() { return m_apcPicYuv[1]->getCStride(); }156 141 142 UInt getNumberOfCtusInFrame() const { return m_apcPicSym->getNumberOfCtusInFrame(); } 143 UInt getNumPartInCtuWidth() const { return m_apcPicSym->getNumPartInCtuWidth(); } 144 UInt getNumPartInCtuHeight() const { return m_apcPicSym->getNumPartInCtuHeight(); } 145 UInt getNumPartitionsInCtu() const { return m_apcPicSym->getNumPartitionsInCtu(); } 146 UInt getFrameWidthInCtus() const { return m_apcPicSym->getFrameWidthInCtus(); } 147 UInt getFrameHeightInCtus() const { return m_apcPicSym->getFrameHeightInCtus(); } 148 UInt getMinCUWidth() const { return m_apcPicSym->getMinCUWidth(); } 149 UInt getMinCUHeight() const { return m_apcPicSym->getMinCUHeight(); } 150 151 Int getStride(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getStride(id); } 152 Int getComponentScaleX(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getComponentScaleX(id); } 153 Int getComponentScaleY(const ComponentID id) const { return m_apcPicYuv[PIC_YUV_REC]->getComponentScaleY(id); } 154 ChromaFormat getChromaFormat() const { return m_apcPicYuv[PIC_YUV_REC]->getChromaFormat(); } 155 Int getNumberValidComponents() const { return m_apcPicYuv[PIC_YUV_REC]->getNumberValidComponents(); } 156 157 157 Void setReconMark (Bool b) { m_bReconstructed = b; } 158 Bool getReconMark () { return m_bReconstructed; }158 Bool getReconMark () const { return m_bReconstructed; } 159 159 Void setOutputMark (Bool b) { m_bNeededForOutput = b; } 160 Bool getOutputMark () { return m_bNeededForOutput; }161 160 Bool getOutputMark () const { return m_bNeededForOutput; } 161 162 162 Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } 163 163 Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } 164 164 165 Void compressMotion(); 166 UInt getCurrSliceIdx() { return m_uiCurrSliceIdx; }165 Void compressMotion(); 166 UInt getCurrSliceIdx() const { return m_uiCurrSliceIdx; } 167 167 Void setCurrSliceIdx(UInt i) { m_uiCurrSliceIdx = i; } 168 UInt getNumAllocatedSlice() {return m_apcPicSym->getNumAllocatedSlice();}168 UInt getNumAllocatedSlice() const {return m_apcPicSym->getNumAllocatedSlice();} 169 169 Void allocateNewSlice() {m_apcPicSym->allocateNewSlice(); } 170 170 Void clearSliceBuffer() {m_apcPicSym->clearSliceBuffer(); } … … 175 175 Bool getSAOMergeAvailability(Int currAddr, Int mergeAddr); 176 176 177 UInt getSubstreamForCtuAddr(const UInt ctuAddr, const Bool bAddressInRaster, TComSlice *pcSlice); 178 177 179 /* field coding parameters*/ 178 180 179 Void setTopField(bool b) {m_isTop = b;}180 Bool isTopField() {return m_isTop;}181 Void setField(bool b) {m_isField = b;}182 Bool isField() {return m_isField;}181 Void setTopField(Bool b) {m_isTop = b;} 182 Bool isTopField() {return m_isTop;} 183 Void setField(Bool b) {m_isField = b;} 184 Bool isField() {return m_isField;} 183 185 184 186 /** transfer ownership of seis to this picture */ 185 void setSEIs(SEIMessages& seis) { m_SEIs = seis; }187 Void setSEIs(SEIMessages& seis) { m_SEIs = seis; } 186 188 187 189 /** … … 214 216 Bool checkSameRefInfo(); 215 217 #endif 216 #if AUXILIARY_PICTURES 217 ChromaFormat getChromaFormat() const { return m_apcPicYuv[1]->getChromaFormat(); } 218 #endif 219 Void copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut); 220 #endif 221 218 Void copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut); 222 219 #if Q0048_CGS_3D_ASYMLUT 223 Void setFrameBit( Int n ) { m_nFrameBit = n; }224 Int getFrameBit() { return m_nFrameBit; }220 Void setFrameBit( Int n ) { m_nFrameBit = n; } 221 Int getFrameBit() { return m_nFrameBit; } 225 222 #endif 226 223 #if POC_RESET_IDC_DECODER 227 Bool isCurrAu() { return m_currAuFlag; } 228 Void setCurrAuFlag(Bool x) {m_currAuFlag = x; } 229 #endif 230 #if WPP_FIX 231 UInt getSubstreamForLCUAddr(const UInt uiLCUAddr, const Bool bAddressInRaster, TComSlice *pcSlice); 232 #endif 224 Bool isCurrAu() { return m_currAuFlag; } 225 Void setCurrAuFlag(Bool x) {m_currAuFlag = x; } 226 #endif 227 #endif //SVC_EXTENSION 233 228 };// END CLASS DEFINITION TComPic 234 229
Note: See TracChangeset for help on using the changeset viewer.