Changeset 1296 in SHVCSoftware
- Timestamp:
- 20 Jul 2015, 20:52:58 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1292 r1296 44 44 //! \{ 45 45 46 #if ADAPTIVE_QP_SELECTION47 TCoeff * TComDataCU::m_pcGlbArlCoeff[MAX_NUM_COMPONENT] = { NULL, NULL, NULL };48 #endif49 50 46 // ==================================================================================================================== 51 47 // Constructor / destructor / create / destroy … … 114 110 Void TComDataCU::create( ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize 115 111 #if ADAPTIVE_QP_SELECTION 116 , Bool bGlobalRMARLBuffer112 , TCoeff *pParentARLBuffer 117 113 #endif 118 114 ) … … 172 168 173 169 #if ADAPTIVE_QP_SELECTION 174 if( bGlobalRMARLBuffer ) 175 { 176 #if LAYER_CTB 177 if (m_pcGlbArlCoeff[compID] == NULL) 178 { 179 m_pcGlbArlCoeff[compID] = (TCoeff*)xMalloc(TCoeff, MAX_CU_SIZE * MAX_CU_SIZE); 180 } 181 #else 182 if (m_pcGlbArlCoeff[compID] == NULL) 183 { 184 m_pcGlbArlCoeff[compID] = (TCoeff*)xMalloc(TCoeff, totalSize); 185 } 186 #endif 187 188 m_pcArlCoeff[compID] = m_pcGlbArlCoeff[compID]; 170 if( pParentARLBuffer != 0 ) 171 { 172 m_pcArlCoeff[compID] = pParentARLBuffer; 189 173 m_ArlCoeffIsAliasedAllocation = true; 174 pParentARLBuffer += totalSize; 190 175 } 191 176 else 192 177 { 193 178 m_pcArlCoeff[compID] = (TCoeff*)xMalloc(TCoeff, totalSize); 179 m_ArlCoeffIsAliasedAllocation = false; 194 180 } 195 181 #endif … … 342 328 m_pcArlCoeff[comp] = NULL; 343 329 } 344 }345 346 if ( m_pcGlbArlCoeff[comp] )347 {348 xFree(m_pcGlbArlCoeff[comp]);349 m_pcGlbArlCoeff[comp] = NULL;350 330 } 351 331 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1292 r1296 110 110 #if ADAPTIVE_QP_SELECTION 111 111 TCoeff* m_pcArlCoeff[MAX_NUM_COMPONENT]; // ARL coefficient buffer (0->Y, 1->Cb, 2->Cr) 112 static TCoeff* m_pcGlbArlCoeff[MAX_NUM_COMPONENT]; // global ARL buffer // TODO: Remove this static member variable.113 112 Bool m_ArlCoeffIsAliasedAllocation; ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d 114 113 #endif … … 185 184 Void create ( ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize 186 185 #if ADAPTIVE_QP_SELECTION 187 , Bool bGlobalRMARLBuffer = false186 , TCoeff *pParentARLBuffer = 0 188 187 #endif 189 188 ); -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp
r1289 r1296 65 65 ,m_ctuRsToTsAddrMap(NULL) 66 66 ,m_saoBlkParams(NULL) 67 ,m_pParentARLBuffer(NULL) 67 68 #if SVC_EXTENSION 68 69 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI … … 118 119 allocateNewSlice(); 119 120 121 #if ADAPTIVE_QP_SELECTION 122 if (m_pParentARLBuffer == NULL) 123 { 124 m_pParentARLBuffer = new TCoeff[uiMaxCuWidth*uiMaxCuHeight*MAX_NUM_COMPONENT]; 125 } 126 #endif 127 120 128 for ( i=0; i<m_numCtusInFrame ; i++ ) 121 129 { … … 123 131 m_pictureCtuArray[i]->create( chromaFormatIDC, m_numPartitionsInCtu, uiMaxCuWidth, uiMaxCuHeight, false, uiMaxCuWidth >> m_uhTotalDepth 124 132 #if ADAPTIVE_QP_SELECTION 125 , true133 , m_pParentARLBuffer 126 134 #endif 127 135 ); … … 186 194 delete[] m_saoBlkParams; m_saoBlkParams = NULL; 187 195 } 196 197 delete [] m_pParentARLBuffer; 198 m_pParentARLBuffer = NULL; 188 199 } 189 200 -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h
r1289 r1296 107 107 108 108 SAOBlkParam *m_saoBlkParams; 109 #if ADAPTIVE_QP_SELECTION 110 TCoeff* m_pParentARLBuffer; 111 #endif 109 112 TComSPS m_sps; 110 113 TComPPS m_pps;
Note: See TracChangeset for help on using the changeset viewer.