Changeset 1296 in SHVCSoftware


Ignore:
Timestamp:
20 Jul 2015, 20:52:58 (9 years ago)
Author:
seregin
Message:

port rev 4328 (TComDataCU::m_pcGlbArlCoeff)

Location:
branches/SHM-dev/source/Lib/TLibCommon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1292 r1296  
    4444//! \{
    4545
    46 #if ADAPTIVE_QP_SELECTION
    47   TCoeff * TComDataCU::m_pcGlbArlCoeff[MAX_NUM_COMPONENT] = { NULL, NULL, NULL };
    48 #endif
    49 
    5046// ====================================================================================================================
    5147// Constructor / destructor / create / destroy
     
    114110Void TComDataCU::create( ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize
    115111#if ADAPTIVE_QP_SELECTION
    116                         , Bool bGlobalRMARLBuffer
     112                        , TCoeff *pParentARLBuffer
    117113#endif
    118114                        )
     
    172168
    173169#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;
    189173        m_ArlCoeffIsAliasedAllocation = true;
     174        pParentARLBuffer += totalSize;
    190175      }
    191176      else
    192177      {
    193178        m_pcArlCoeff[compID] = (TCoeff*)xMalloc(TCoeff, totalSize);
     179        m_ArlCoeffIsAliasedAllocation = false;
    194180      }
    195181#endif
     
    342328          m_pcArlCoeff[comp] = NULL;
    343329        }
    344       }
    345 
    346       if ( m_pcGlbArlCoeff[comp] )
    347       {
    348         xFree(m_pcGlbArlCoeff[comp]);
    349         m_pcGlbArlCoeff[comp] = NULL;
    350330      }
    351331#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r1292 r1296  
    110110#if ADAPTIVE_QP_SELECTION
    111111  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.
    113112  Bool           m_ArlCoeffIsAliasedAllocation;  ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d
    114113#endif
     
    185184  Void          create                ( ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize
    186185#if ADAPTIVE_QP_SELECTION
    187     , Bool bGlobalRMARLBuffer = false
     186    , TCoeff *pParentARLBuffer = 0
    188187#endif
    189188    );
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp

    r1289 r1296  
    6565,m_ctuRsToTsAddrMap(NULL)
    6666,m_saoBlkParams(NULL)
     67,m_pParentARLBuffer(NULL)
    6768#if SVC_EXTENSION
    6869#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     
    118119  allocateNewSlice();
    119120
     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
    120128  for ( i=0; i<m_numCtusInFrame ; i++ )
    121129  {
     
    123131    m_pictureCtuArray[i]->create( chromaFormatIDC, m_numPartitionsInCtu, uiMaxCuWidth, uiMaxCuHeight, false, uiMaxCuWidth >> m_uhTotalDepth
    124132#if ADAPTIVE_QP_SELECTION
    125       , true
     133      , m_pParentARLBuffer
    126134#endif
    127135      );
     
    186194    delete[] m_saoBlkParams; m_saoBlkParams = NULL;
    187195  }
     196
     197  delete [] m_pParentARLBuffer;
     198  m_pParentARLBuffer = NULL;
    188199}
    189200
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h

    r1289 r1296  
    107107
    108108  SAOBlkParam  *m_saoBlkParams;
     109#if ADAPTIVE_QP_SELECTION
     110  TCoeff*       m_pParentARLBuffer;
     111#endif
    109112  TComSPS       m_sps;
    110113  TComPPS       m_pps;
Note: See TracChangeset for help on using the changeset viewer.