Changeset 601 in SHVCSoftware for branches/SHM-5.0-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
6 Feb 2014, 06:02:59 (11 years ago)
Author:
seregin
Message:

remove global array for SaoMaxOffsetQVal

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

Legend:

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

    r593 r601  
    4444//! \ingroup TLibCommon
    4545//! \{
     46#if !SVC_EXTENSION
    4647UInt g_saoMaxOffsetQVal[NUM_SAO_COMPONENTS];
     48#endif
    4749
    4850SAOOffset::SAOOffset()
     
    160162    Int bitDepthSample = (compIdx == SAO_Y)?g_bitDepthY:g_bitDepthC;
    161163    m_offsetStepLog2  [compIdx] = max(bitDepthSample - MAX_SAO_TRUNCATED_BITDEPTH, 0);
     164#if SVC_EXTENSION
     165    m_saoMaxOffsetQVal[compIdx] = (1<<(min(bitDepthSample,MAX_SAO_TRUNCATED_BITDEPTH)-5))-1; //Table 9-32, inclusive
     166#else
    162167    g_saoMaxOffsetQVal[compIdx] = (1<<(min(bitDepthSample,MAX_SAO_TRUNCATED_BITDEPTH)-5))-1; //Table 9-32, inclusive
     168#endif
    163169  }
    164170
     
    168174    Int bitDepthSample = (compIdx == SAO_Y)?g_bitDepthY:g_bitDepthC; //exclusive
    169175    Int maxSampleValue = (1<< bitDepthSample); //exclusive
     176#if SVC_EXTENSION
     177    Int maxOffsetValue = (m_saoMaxOffsetQVal[compIdx] << m_offsetStepLog2[compIdx]);
     178#else
    170179    Int maxOffsetValue = (g_saoMaxOffsetQVal[compIdx] << m_offsetStepLog2[compIdx]);
     180#endif
    171181
    172182    m_offsetClipTable[compIdx] = new Int[(maxSampleValue + maxOffsetValue -1)+ (maxOffsetValue)+1 ]; //positive & negative range plus 0
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h

    r593 r601  
    5353// Class definition
    5454// ====================================================================================================================
     55#if !SVC_EXTENSION
    5556extern UInt g_saoMaxOffsetQVal[NUM_SAO_COMPONENTS];
     57#endif
    5658
    5759class TComSampleAdaptiveOffset
     
    6971  Void reconstructBlkSAOParams(TComPic* pic, SAOBlkParam* saoBlkParams);
    7072  Void PCMLFDisableProcess (TComPic* pcPic);
     73#if SVC_EXTENSION
     74  UInt* getSaoMaxOffsetQVal() { return m_saoMaxOffsetQVal; }
     75#endif
    7176protected:
    7277  Void offsetBlock(Int compIdx, Int typeIdx, Int* offset, Pel* srcBlk, Pel* resBlk, Int srcStride, Int resStride,  Int width, Int height
     
    101106  Int*   m_offsetClipTable[NUM_SAO_COMPONENTS];
    102107  Short* m_signTable;
    103 
     108#if SVC_EXTENSION
     109  UInt m_saoMaxOffsetQVal[NUM_SAO_COMPONENTS];
     110#endif
    104111};
    105112
Note: See TracChangeset for help on using the changeset viewer.