Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComPicSym.h
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComPicSym.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. 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 41 41 42 42 // Include files 43 #include <deque> 43 44 #include "CommonDef.h" 44 45 #include "TComSlice.h" … … 57 58 { 58 59 private: 59 UInt m_ uiTileWidth;60 UInt m_ uiTileHeight;61 UInt m_ uiRightEdgePosInCU;62 UInt m_ uiBottomEdgePosInCU;63 UInt m_ uiFirstCUAddr;60 UInt m_tileWidthInCtus; 61 UInt m_tileHeightInCtus; 62 UInt m_rightEdgePosInCtus; 63 UInt m_bottomEdgePosInCtus; 64 UInt m_firstCtuRsAddr; 64 65 65 public: 66 public: 66 67 TComTile(); 67 68 virtual ~TComTile(); 68 69 69 Void setTileWidth ( UInt i ) { m_uiTileWidth= i; }70 UInt getTileWidth () { return m_uiTileWidth; }71 Void setTileHeight ( UInt i ) { m_uiTileHeight= i; }72 UInt getTileHeight () { return m_uiTileHeight; }73 Void setRightEdgePosInC U ( UInt i ) { m_uiRightEdgePosInCU= i; }74 UInt getRightEdgePosInC U () { return m_uiRightEdgePosInCU; }75 Void setBottomEdgePosInC U ( UInt i ) { m_uiBottomEdgePosInCU= i; }76 UInt getBottomEdgePosInC U () { return m_uiBottomEdgePosInCU; }77 Void setFirstC UAddr ( UInt i ) { m_uiFirstCUAddr = i; }78 UInt getFirstC UAddr () { return m_uiFirstCUAddr; }70 Void setTileWidthInCtus ( UInt i ) { m_tileWidthInCtus = i; } 71 UInt getTileWidthInCtus () const { return m_tileWidthInCtus; } 72 Void setTileHeightInCtus ( UInt i ) { m_tileHeightInCtus = i; } 73 UInt getTileHeightInCtus () const { return m_tileHeightInCtus; } 74 Void setRightEdgePosInCtus ( UInt i ) { m_rightEdgePosInCtus = i; } 75 UInt getRightEdgePosInCtus () const { return m_rightEdgePosInCtus; } 76 Void setBottomEdgePosInCtus ( UInt i ) { m_bottomEdgePosInCtus = i; } 77 UInt getBottomEdgePosInCtus () const { return m_bottomEdgePosInCtus; } 78 Void setFirstCtuRsAddr ( UInt i ) { m_firstCtuRsAddr = i; } 79 UInt getFirstCtuRsAddr () const { return m_firstCtuRsAddr; } 79 80 }; 80 81 … … 83 84 { 84 85 private: 85 UInt m_uiWidthInCU; 86 UInt m_uiHeightInCU; 87 88 UInt m_uiMaxCUWidth; 89 UInt m_uiMaxCUHeight; 86 UInt m_frameWidthInCtus; 87 UInt m_frameHeightInCtus; 88 90 89 UInt m_uiMinCUWidth; 91 90 UInt m_uiMinCUHeight; 92 91 93 92 UChar m_uhTotalDepth; ///< max. depth 94 UInt m_uiNumPartitions; 95 UInt m_uiNumPartInWidth; 96 UInt m_uiNumPartInHeight; 97 UInt m_uiNumCUsInFrame; 98 99 TComSlice** m_apcTComSlice; 100 UInt m_uiNumAllocatedSlice; 101 TComDataCU** m_apcTComDataCU; ///< array of CU data 102 103 Int m_iNumColumnsMinus1; 104 Int m_iNumRowsMinus1; 93 UInt m_numPartitionsInCtu; 94 UInt m_numPartInCtuWidth; 95 UInt m_numPartInCtuHeight; 96 UInt m_numCtusInFrame; 97 98 std::deque<TComSlice*> m_apSlices; 99 TComDataCU** m_pictureCtuArray; ///< array of CU data. 100 101 Int m_numTileColumnsMinus1; 102 Int m_numTileRowsMinus1; 105 103 std::vector<TComTile> m_tileParameters; 106 UInt* m_ puiCUOrderMap; //the map of LCU raster scan address relative to LCU encoding order107 UInt* m_puiTileIdxMap; // the map of the tile index relative to LCU raster scan address108 UInt* m_ puiInverseCUOrderMap;104 UInt* m_ctuTsToRsAddrMap; ///< for a given TS (Tile-Scan; coding order) address, returns the RS (Raster-Scan) address. cf CtbAddrTsToRs in specification. 105 UInt* m_puiTileIdxMap; ///< the map of the tile index relative to CTU raster scan address 106 UInt* m_ctuRsToTsAddrMap; ///< for a given RS (Raster-Scan) address, returns the TS (Tile-Scan; coding order) address. cf CtbAddrRsToTs in specification. 109 107 110 SAOBlkParam *m_saoBlkParams; 108 SAOBlkParam *m_saoBlkParams; 109 #if ADAPTIVE_QP_SELECTION 110 TCoeff* m_pParentARLBuffer; 111 #endif 112 TComSPS m_sps; 113 TComPPS m_pps; 114 115 Void xInitTiles( ); 116 Void xInitCtuTsRsAddrMaps(); 117 Void setNumTileColumnsMinus1( Int i ) { m_numTileColumnsMinus1 = i; } 118 Void setNumTileRowsMinus1( Int i ) { m_numTileRowsMinus1 = i; } 119 Void setCtuTsToRsAddrMap( Int ctuTsAddr, Int ctuRsAddr ) { *(m_ctuTsToRsAddrMap + ctuTsAddr) = ctuRsAddr; } 120 Void setCtuRsToTsAddrMap( Int ctuRsAddr, Int ctuTsOrder ) { *(m_ctuRsToTsAddrMap + ctuRsAddr) = ctuTsOrder; } 121 111 122 public: 112 Void create ( Int iPicWidth, Int iPicHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth );113 Void destroy ();123 Void create ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth ); 124 Void destroy (); 114 125 115 126 TComPicSym (); 116 TComSlice* getSlice(UInt i) { return m_apcTComSlice[i]; } 117 UInt getFrameWidthInCU() { return m_uiWidthInCU; } 118 UInt getFrameHeightInCU() { return m_uiHeightInCU; } 119 UInt getMinCUWidth() { return m_uiMinCUWidth; } 120 UInt getMinCUHeight() { return m_uiMinCUHeight; } 121 UInt getNumberOfCUsInFrame() { return m_uiNumCUsInFrame; } 122 TComDataCU*& getCU( UInt uiCUAddr ) { return m_apcTComDataCU[uiCUAddr]; } 123 124 Void setSlice(TComSlice* p, UInt i) { m_apcTComSlice[i] = p; } 125 UInt getNumAllocatedSlice() { return m_uiNumAllocatedSlice; } 126 Void allocateNewSlice(); 127 Void clearSliceBuffer(); 128 UInt getNumPartition() { return m_uiNumPartitions; } 129 UInt getNumPartInWidth() { return m_uiNumPartInWidth; } 130 UInt getNumPartInHeight() { return m_uiNumPartInHeight; } 131 Void setNumColumnsMinus1( Int i ) { m_iNumColumnsMinus1 = i; } 132 Int getNumColumnsMinus1() { return m_iNumColumnsMinus1; } 133 Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } 134 Int getNumRowsMinus1() { return m_iNumRowsMinus1; } 135 Int getNumTiles() { return (m_iNumRowsMinus1+1)*(m_iNumColumnsMinus1+1); } 136 TComTile* getTComTile ( UInt tileIdx ) { return &(m_tileParameters[tileIdx]); } 137 Void setCUOrderMap( Int encCUOrder, Int cuAddr ) { *(m_puiCUOrderMap + encCUOrder) = cuAddr; } 138 UInt getCUOrderMap( Int encCUOrder ) { return *(m_puiCUOrderMap + (encCUOrder>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : encCUOrder)); } 139 UInt getTileIdxMap( Int i ) { return *(m_puiTileIdxMap + i); } 140 Void setInverseCUOrderMap( Int cuAddr, Int encCUOrder ) { *(m_puiInverseCUOrderMap + cuAddr) = encCUOrder; } 141 UInt getInverseCUOrderMap( Int cuAddr ) { return *(m_puiInverseCUOrderMap + (cuAddr>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : cuAddr)); } 142 UInt getPicSCUEncOrder( UInt SCUAddr ); 143 UInt getPicSCUAddr( UInt SCUEncOrder ); 144 Void initTiles(TComPPS *pps); 145 UInt xCalculateNxtCUAddr( UInt uiCurrCUAddr ); 146 SAOBlkParam* getSAOBlkParam() { return m_saoBlkParams;} 147 Void deriveLoopFilterBoundaryAvailibility(Int ctu, Bool& isLeftAvail,Bool& isRightAvail,Bool& isAboveAvail,Bool& isBelowAvail,Bool& isAboveLeftAvail,Bool& isAboveRightAvail,Bool& isBelowLeftAvail,Bool& isBelowRightAvail); 127 TComSlice* getSlice(UInt i) { return m_apSlices[i]; } 128 const TComSlice* getSlice(UInt i) const { return m_apSlices[i]; } 129 UInt getFrameWidthInCtus() const { return m_frameWidthInCtus; } 130 UInt getFrameHeightInCtus() const { return m_frameHeightInCtus; } 131 UInt getMinCUWidth() const { return m_uiMinCUWidth; } 132 UInt getMinCUHeight() const { return m_uiMinCUHeight; } 133 UInt getNumberOfCtusInFrame() const { return m_numCtusInFrame; } 134 TComDataCU* getCtu( UInt ctuRsAddr ) { return m_pictureCtuArray[ctuRsAddr]; } 135 const TComDataCU* getCtu( UInt ctuRsAddr ) const { return m_pictureCtuArray[ctuRsAddr]; } 136 const TComSPS& getSPS() const { return m_sps; } 137 const TComPPS& getPPS() const { return m_pps; } 148 138 139 TComSlice * swapSliceObject(TComSlice* p, UInt i) { p->setSPS(&m_sps); p->setPPS(&m_pps); TComSlice *pTmp=m_apSlices[i];m_apSlices[i] = p; pTmp->setSPS(0); pTmp->setPPS(0); return pTmp; } 140 UInt getNumAllocatedSlice() const { return UInt(m_apSlices.size()); } 141 Void allocateNewSlice(); 142 Void clearSliceBuffer(); 143 UInt getNumPartitionsInCtu() const { return m_numPartitionsInCtu; } 144 UInt getNumPartInCtuWidth() const { return m_numPartInCtuWidth; } 145 UInt getNumPartInCtuHeight() const { return m_numPartInCtuHeight; } 146 Int getNumTileColumnsMinus1() const { return m_numTileColumnsMinus1; } 147 Int getNumTileRowsMinus1() const { return m_numTileRowsMinus1; } 148 Int getNumTiles() const { return (m_numTileRowsMinus1+1)*(m_numTileColumnsMinus1+1); } 149 TComTile* getTComTile ( UInt tileIdx ) { return &(m_tileParameters[tileIdx]); } 150 const TComTile* getTComTile ( UInt tileIdx ) const { return &(m_tileParameters[tileIdx]); } 151 UInt getCtuTsToRsAddrMap( Int ctuTsAddr ) const { return *(m_ctuTsToRsAddrMap + (ctuTsAddr>=m_numCtusInFrame ? m_numCtusInFrame : ctuTsAddr)); } 152 UInt getTileIdxMap( Int ctuRsAddr ) const { return *(m_puiTileIdxMap + ctuRsAddr); } 153 UInt getCtuRsToTsAddrMap( Int ctuRsAddr ) const { return *(m_ctuRsToTsAddrMap + (ctuRsAddr>=m_numCtusInFrame ? m_numCtusInFrame : ctuRsAddr)); } 154 SAOBlkParam* getSAOBlkParam() { return m_saoBlkParams;} 155 const SAOBlkParam* getSAOBlkParam() const { return m_saoBlkParams;} 156 Void deriveLoopFilterBoundaryAvailibility(Int ctuRsAddr, 157 Bool& isLeftAvail, Bool& isRightAvail, Bool& isAboveAvail, Bool& isBelowAvail, 158 Bool& isAboveLeftAvail, Bool& isAboveRightAvail, Bool& isBelowLeftAvail, Bool& isBelowRightAvail); 159 protected: 160 UInt xCalculateNextCtuRSAddr( UInt uiCurrCtuRSAddr ); 149 161 150 162 };// END CLASS DEFINITION TComPicSym
Note: See TracChangeset for help on using the changeset viewer.