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


Ignore:
Timestamp:
18 Jul 2015, 04:14:13 (10 years ago)
Author:
seregin
Message:

port rev 4326

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

Legend:

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

    r1260 r1292  
    9595
    9696    // Map the 64 CABAC states to their corresponding probability values
    97     static Double aStateToProbLPS[] = {0.50000000, 0.47460857, 0.45050660, 0.42762859, 0.40591239, 0.38529900, 0.36573242, 0.34715948, 0.32952974, 0.31279528, 0.29691064, 0.28183267, 0.26752040, 0.25393496, 0.24103941, 0.22879875, 0.21717969, 0.20615069, 0.19568177, 0.18574449, 0.17631186, 0.16735824, 0.15885931, 0.15079198, 0.14313433, 0.13586556, 0.12896592, 0.12241667, 0.11620000, 0.11029903, 0.10469773, 0.09938088, 0.09433404, 0.08954349, 0.08499621, 0.08067986, 0.07658271, 0.07269362, 0.06900203, 0.06549791, 0.06217174, 0.05901448, 0.05601756, 0.05317283, 0.05047256, 0.04790942, 0.04547644, 0.04316702, 0.04097487, 0.03889405, 0.03691890, 0.03504406, 0.03326442, 0.03157516, 0.02997168, 0.02844963, 0.02700488, 0.02563349, 0.02433175, 0.02309612, 0.02192323, 0.02080991, 0.01975312, 0.01875000};
     97    static const Double aStateToProbLPS[] = {0.50000000, 0.47460857, 0.45050660, 0.42762859, 0.40591239, 0.38529900, 0.36573242, 0.34715948, 0.32952974, 0.31279528, 0.29691064, 0.28183267, 0.26752040, 0.25393496, 0.24103941, 0.22879875, 0.21717969, 0.20615069, 0.19568177, 0.18574449, 0.17631186, 0.16735824, 0.15885931, 0.15079198, 0.14313433, 0.13586556, 0.12896592, 0.12241667, 0.11620000, 0.11029903, 0.10469773, 0.09938088, 0.09433404, 0.08954349, 0.08499621, 0.08067986, 0.07658271, 0.07269362, 0.06900203, 0.06549791, 0.06217174, 0.05901448, 0.05601756, 0.05317283, 0.05047256, 0.04790942, 0.04547644, 0.04316702, 0.04097487, 0.03889405, 0.03691890, 0.03504406, 0.03326442, 0.03157516, 0.02997168, 0.02844963, 0.02700488, 0.02563349, 0.02433175, 0.02309612, 0.02192323, 0.02080991, 0.01975312, 0.01875000};
    9898
    9999    Double probLPS          = aStateToProbLPS[ m_contextModel[ n ].getState() ];
  • branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h

    r1215 r1292  
    104104
    105105  SCuboid *** m_pCuboid;
    106   const static Int m_nVertexIdxOffset[4][3];
     106  static const Int m_nVertexIdxOffset[4][3];
    107107  std::vector<UInt> m_vRefLayerId;
    108108
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1290 r1292  
    34633463  }
    34643464
    3465 #if !LAYER_CTB
    3466   UInt uiMinUnitSize = m_pcPic->getMinCUWidth();
    3467 #endif
    3468 
    34693465  Int leftStartL = m_pcSlice->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset();
    34703466  Int topStartL  = m_pcSlice->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset();
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r1265 r1292  
    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
     112  static TCoeff* m_pcGlbArlCoeff[MAX_NUM_COMPONENT]; // global ARL buffer  // TODO: Remove this static member variable.
    113113  Bool           m_ArlCoeffIsAliasedAllocation;  ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d
    114114#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp

    r1290 r1292  
    254254UInt g_auiRasterToPelY  [ MAX_NUM_SPU_W*MAX_NUM_SPU_W ] = { 0, };
    255255
    256 UInt g_auiPUOffset[NUMBER_OF_PART_SIZES] = { 0, 8, 4, 4, 2, 10, 1, 5};
     256const UInt g_auiPUOffset[NUMBER_OF_PART_SIZES] = { 0, 8, 4, 4, 2, 10, 1, 5};
    257257
    258258Void initZscanToRaster ( Int iMaxDepth, Int iDepth, UInt uiStartVal, UInt*& rpuiCurrIdx )
     
    319319}
    320320
    321 Int g_quantScales[SCALING_LIST_REM_NUM] =
     321const Int g_quantScales[SCALING_LIST_REM_NUM] =
    322322{
    323323  26214,23302,20560,18396,16384,14564
    324324};
    325325
    326 Int g_invQuantScales[SCALING_LIST_REM_NUM] =
     326const Int g_invQuantScales[SCALING_LIST_REM_NUM] =
    327327{
    328328  40,45,51,57,64,72
     
    628628};
    629629
    630 Int g_quantTSDefault4x4[4*4] =
     630const Int g_quantTSDefault4x4[4*4] =
    631631{
    632632  16,16,16,16,
     
    636636};
    637637
    638 Int g_quantIntraDefault8x8[8*8] =
     638const Int g_quantIntraDefault8x8[8*8] =
    639639{
    640640  16,16,16,16,17,18,21,24,
     
    648648};
    649649
    650 Int g_quantInterDefault8x8[8*8] =
     650const Int g_quantInterDefault8x8[8*8] =
    651651{
    652652  16,16,16,16,17,18,20,24,
     
    660660};
    661661
    662 UInt g_scalingListSize   [SCALING_LIST_SIZE_NUM] = {16,64,256,1024};
    663 UInt g_scalingListSizeX  [SCALING_LIST_SIZE_NUM] = { 4, 8, 16,  32};
     662const UInt g_scalingListSize   [SCALING_LIST_SIZE_NUM] = {16,64,256,1024};
     663const UInt g_scalingListSizeX  [SCALING_LIST_SIZE_NUM] = { 4, 8, 16,  32};
    664664
    665665#if SVC_EXTENSION
     
    717717}
    718718#if LAYER_CTB
    719 UInt g_auiLayerMaxCUWidth[MAX_LAYERS];
    720 UInt g_auiLayerMaxCUHeight[MAX_LAYERS];
    721 UInt g_auiLayerMaxCUDepth[MAX_LAYERS];
    722 UInt g_auiLayerAddCUDepth[MAX_LAYERS];
    723719UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
    724720UInt g_auiLayerRasterToZscan[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.h

    r1290 r1292  
    8585Void         initRasterToPelXY ( UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxDepth );
    8686
    87 extern       UInt g_auiPUOffset[NUMBER_OF_PART_SIZES];
     87extern const UInt g_auiPUOffset[NUMBER_OF_PART_SIZES];
    8888
    8989#define QUANT_SHIFT                14 // Q(4) = 2^14
     
    100100#define SHIFT_INV_2ND              12 // Shift after second inverse transform stage
    101101
    102 extern Int g_quantScales[SCALING_LIST_REM_NUM];             // Q(QP%6)
    103 extern Int g_invQuantScales[SCALING_LIST_REM_NUM];          // IQ(QP%6)
     102extern const Int g_quantScales[SCALING_LIST_REM_NUM];             // Q(QP%6)
     103extern const Int g_invQuantScales[SCALING_LIST_REM_NUM];          // IQ(QP%6)
    104104
    105105#if RExt__HIGH_PRECISION_FORWARD_TRANSFORM
     
    207207extern const Char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM];
    208208
    209 extern Int g_quantTSDefault4x4[4*4];
    210 extern Int g_quantIntraDefault8x8[8*8];
    211 extern Int g_quantInterDefault8x8[8*8];
    212 
    213 extern UInt g_scalingListSize [SCALING_LIST_SIZE_NUM];
    214 extern UInt g_scalingListSizeX[SCALING_LIST_SIZE_NUM];
    215 extern UInt g_scalingListNum  [SCALING_LIST_SIZE_NUM];
     209extern const Int g_quantTSDefault4x4[4*4];
     210extern const Int g_quantIntraDefault8x8[8*8];
     211extern const Int g_quantInterDefault8x8[8*8];
     212
     213extern const UInt g_scalingListSize [SCALING_LIST_SIZE_NUM];
     214extern const UInt g_scalingListSizeX[SCALING_LIST_SIZE_NUM];
     215extern const UInt g_scalingListNum  [SCALING_LIST_SIZE_NUM];
    216216
    217217#if SVC_EXTENSION
     
    224224std::string NaluToStr( NalUnitType nalu );
    225225#if LAYER_CTB
    226 extern       UInt g_auiLayerMaxCUWidth[MAX_LAYERS];
    227 extern       UInt g_auiLayerMaxCUHeight[MAX_LAYERS];
    228 extern       UInt g_auiLayerMaxCUDepth[MAX_LAYERS];
    229 extern       UInt g_auiLayerAddCUDepth[MAX_LAYERS];
    230226extern       UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
    231227extern       UInt g_auiLayerRasterToZscan[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1291 r1292  
    27272727 * \returns pointer of quantization matrix
    27282728 */
    2729 Int* TComScalingList::getScalingListDefaultAddress(UInt sizeId, UInt listId)
    2730 {
    2731   Int *src = 0;
     2729const Int* TComScalingList::getScalingListDefaultAddress(UInt sizeId, UInt listId)
     2730{
     2731  const Int *src = 0;
    27322732  switch(sizeId)
    27332733  {
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1291 r1292  
    165165  UInt       getRefMatrixId(UInt sizeId, UInt listId) const                     { return m_refMatrixId[sizeId][listId];                      } //!< get reference matrix ID
    166166
    167   Int*      getScalingListDefaultAddress(UInt sizeId, UInt listId);                                                                           //!< get default matrix coefficient
     167  const Int* getScalingListDefaultAddress(UInt sizeId, UInt listId);                                                                           //!< get default matrix coefficient
    168168  Void       processDefaultMatrix(UInt sizeId, UInt listId);
    169169
     
    19091909  Int                        m_iAssociatedIRAP;
    19101910  NalUnitType                m_iAssociatedIRAPType;
    1911   static Int                 m_prevTid0POC;
     1911  static Int                 m_prevTid0POC; // TODO: Remove this static member variable.
    19121912  TComReferencePictureSet*   m_pcRPS;
    19131913  TComReferencePictureSet    m_LocalRPS;
  • branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp

    r1290 r1292  
    267267  }
    268268
    269   static const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_FORWARD];
     269  const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_FORWARD];
    270270
    271271  const Int shift_1st = (uiLog2TrSize +  bitDepth + TRANSFORM_MATRIX_SHIFT) - maxLog2TrDynamicRange;
     
    339339  }
    340340
    341   static const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_INVERSE];
     341  const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_INVERSE];
    342342
    343343  const Int shift_1st = TRANSFORM_MATRIX_SHIFT + 1; //1 has been added to shift_1st at the expense of shift_2nd
     
    864864Void xTrMxN(Int bitDepth, TCoeff *block, TCoeff *coeff, Int iWidth, Int iHeight, Bool useDST, const Int maxLog2TrDynamicRange)
    865865{
    866   static const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_FORWARD];
     866  const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_FORWARD];
    867867
    868868  const Int shift_1st = ((g_aucConvertToBit[iWidth] + 2) +  bitDepth + TRANSFORM_MATRIX_SHIFT) - maxLog2TrDynamicRange;
     
    931931Void xITrMxN(Int bitDepth, TCoeff *coeff, TCoeff *block, Int iWidth, Int iHeight, Bool useDST, const Int maxLog2TrDynamicRange)
    932932{
    933   static const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_INVERSE];
     933  const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_INVERSE];
    934934
    935935  Int shift_1st = TRANSFORM_MATRIX_SHIFT + 1; //1 has been added to shift_1st at the expense of shift_2nd
     
    18471847    }
    18481848
    1849     static const TCoeff pelMin=(TCoeff) std::numeric_limits<Pel>::min();
    1850     static const TCoeff pelMax=(TCoeff) std::numeric_limits<Pel>::max();
     1849    const TCoeff pelMin=(TCoeff) std::numeric_limits<Pel>::min();
     1850    const TCoeff pelMax=(TCoeff) std::numeric_limits<Pel>::max();
    18511851    if (rdpcmMode == RDPCM_VER)
    18521852    {
Note: See TracChangeset for help on using the changeset viewer.