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


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

port rev 4326

Location:
branches/SHM-dev/source
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1290 r1292  
    6666#endif
    6767{
     68  memset( m_apcTDecTop, NULL, sizeof(m_apcTDecTop) );
     69
    6870  for(UInt layer=0; layer < MAX_LAYERS; layer++)
    6971  {
  • TabularUnified branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h

    r1289 r1292  
    9595  Void  destroy           (); ///< destroy internal members
    9696  Void  decode            (); ///< main decoding function
     97#if SVC_EXTENSION
     98  UInt  getNumberOfChecksumErrorsDetected() const
     99  {
     100    UInt sum = 0;
     101
     102    for( UInt layerId = 0; layerId < MAX_NUM_LAYER_IDS; layerId++ )
     103    {
     104      if( m_apcTDecTop[layerId] )
     105      {
     106        sum += m_apcTDecTop[layerId]->getNumberOfChecksumErrorsDetected();
     107      }
     108    }
     109
     110    return sum;
     111  }
     112#else
     113  UInt  getNumberOfChecksumErrorsDetected() const { return m_cTDecTop.getNumberOfChecksumErrorsDetected(); }
     114#endif
    97115
    98116protected:
  • TabularUnified branches/SHM-dev/source/App/TAppDecoder/decmain.cpp

    r1259 r1292  
    4444//! \{
    4545
    46 Bool g_md5_mismatch = false; ///< top level flag that indicates if there has been a decoding mismatch
    47 
    4846// ====================================================================================================================
    4947// Main function
     
    5250int main(int argc, char* argv[])
    5351{
     52  Int returnCode = EXIT_SUCCESS;
    5453  TAppDecTop  cTAppDecTop;
    5554
     
    7372  {
    7473    cTAppDecTop.destroy();
    75     return 1;
     74    returnCode = EXIT_FAILURE;
     75    return returnCode;
    7676  }
    7777
     
    8383  cTAppDecTop.decode();
    8484
    85   if (g_md5_mismatch)
     85  if (cTAppDecTop.getNumberOfChecksumErrorsDetected() != 0)
    8686  {
    8787    printf("\n\n***ERROR*** A decoding mismatch occured: signalled md5sum does not match\n");
     88    returnCode = EXIT_FAILURE;
    8889  }
    8990
     
    9596  cTAppDecTop.destroy();
    9697
    97   return g_md5_mismatch ? EXIT_FAILURE : EXIT_SUCCESS;
     98  return returnCode;
    9899}
    99100
  • TabularUnified branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1290 r1292  
    10921092  {
    10931093    //2
    1094 #if LAYER_CTB
    1095     g_uiMaxCUWidth  = g_auiLayerMaxCUWidth[layer];
    1096     g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer];
    1097     g_uiMaxCUDepth  = g_auiLayerMaxCUDepth[layer];
    1098     g_uiAddCUDepth  = g_auiLayerAddCUDepth[layer];
    1099 #endif
    11001094    // Video I/O
    11011095    m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(),  false, m_acLayerCfg[layer].m_inputBitDepth, m_acLayerCfg[layer].m_MSBExtendedBitDepth, m_acLayerCfg[layer].m_internalBitDepth );  // read  mode
     
    11871181    //3
    11881182#if LAYER_CTB
    1189     g_uiMaxCUWidth  = g_auiLayerMaxCUWidth[layer];
    1190     g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer];
    1191     g_uiMaxCUDepth  = g_auiLayerMaxCUDepth[layer];
    1192     g_uiAddCUDepth  = g_auiLayerAddCUDepth[layer];
    1193 
    11941183    memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) );
    11951184    memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) );
     
    17891778        //7
    17901779#if LAYER_CTB
    1791         g_uiMaxCUWidth  = g_auiLayerMaxCUWidth[layer];
    1792         g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer];
    1793         g_uiMaxCUDepth  = g_auiLayerMaxCUDepth[layer];
    1794         g_uiAddCUDepth  = g_auiLayerAddCUDepth[layer];
    1795 
    17961780        memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) );
    17971781        memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) );
     
    19151899{
    19161900  UInt layer;
     1901  const TComVPS *vps = m_apcTEncTop[0]->getVPS();
     1902  const Int rateMultiplier = isField ? 2 : 1;
    19171903
    19181904  // set frame rate
    19191905  for(layer = 0; layer < m_numLayers; layer++)
    19201906  {
    1921     if(isField)
    1922     {
    1923       m_gcAnalyzeAll[layer].setFrmRate( m_acLayerCfg[layer].getFrameRate() * 2);
    1924       m_gcAnalyzeI[layer].setFrmRate( m_acLayerCfg[layer].getFrameRate() * 2 );
    1925       m_gcAnalyzeP[layer].setFrmRate( m_acLayerCfg[layer].getFrameRate() * 2 );
    1926       m_gcAnalyzeB[layer].setFrmRate( m_acLayerCfg[layer].getFrameRate() * 2 );
    1927     }
    1928     else
    1929     {
    1930       m_gcAnalyzeAll[layer].setFrmRate( m_acLayerCfg[layer].getFrameRate());
    1931       m_gcAnalyzeI[layer].setFrmRate( m_acLayerCfg[layer].getFrameRate() );
    1932       m_gcAnalyzeP[layer].setFrmRate( m_acLayerCfg[layer].getFrameRate() );
    1933       m_gcAnalyzeB[layer].setFrmRate( m_acLayerCfg[layer].getFrameRate() );
    1934     }
     1907    UInt layerId = vps->getLayerIdInNuh(layer);
     1908    m_apcTEncTop[layerId]->getAnalyzeAll()->setFrmRate( m_acLayerCfg[layer].getFrameRate() * rateMultiplier );
     1909    m_apcTEncTop[layerId]->getAnalyzeI()->setFrmRate( m_acLayerCfg[layer].getFrameRate() * rateMultiplier );
     1910    m_apcTEncTop[layerId]->getAnalyzeP()->setFrmRate( m_acLayerCfg[layer].getFrameRate() * rateMultiplier );
     1911    m_apcTEncTop[layerId]->getAnalyzeB()->setFrmRate( m_acLayerCfg[layer].getFrameRate() * rateMultiplier );
    19351912  }
    19361913
     
    19391916  for(layer = 0; layer < m_numLayers; layer++)
    19401917  {
    1941     const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
    1942 
    1943     m_gcAnalyzeAll[layer].printOut('a', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
     1918    const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]);   
     1919    m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeAll()->printOut('a', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
    19441920  }
    19451921
     
    19481924  {
    19491925    const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
    1950 
    1951     m_gcAnalyzeI[layer].printOut('i', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
     1926    m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeI()->printOut('i', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
    19521927  }
    19531928
     
    19561931  {
    19571932    const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
    1958 
    1959     m_gcAnalyzeP[layer].printOut('p', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
     1933    m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeP()->printOut('p', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
    19601934  }
    19611935
     
    19641938  {
    19651939    const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
    1966 
    1967     m_gcAnalyzeB[layer].printOut('b', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
    1968   }
     1940    m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeB()->printOut('b', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
     1941  }
     1942
     1943#if _SUMMARY_OUT_
     1944  for( layer = 0; layer < m_numLayers; layer++ )
     1945  {
     1946    m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeAll()->printSummary(chFmt, printSequenceMSE);
     1947  }
     1948#endif
     1949#if _SUMMARY_PIC_
     1950  for( layer = 0; layer < m_numLayers; layer++ )
     1951  {
     1952    m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeI()->printSummary(chFmt, printSequenceMSE,'I');
     1953    m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeP()->printSummary(chFmt, printSequenceMSE,'P');
     1954    m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeB()->printSummary(chFmt, printSequenceMSE,'B');
     1955  }
     1956#endif
    19691957
    19701958  if(isField)
     
    19731961    {
    19741962      const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
     1963      TEncAnalyze *analyze = m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeAllin();
    19751964
    19761965      //-- interlaced summary
    1977       m_gcAnalyzeAll_in.setFrmRate( m_acLayerCfg[layer].getFrameRate());
    1978       m_gcAnalyzeAll_in.setBits(m_gcAnalyzeB[layer].getBits());
     1966      analyze->setFrmRate( m_acLayerCfg[layer].getFrameRate());
     1967      analyze->setBits(m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeB()->getBits());
    19791968      // prior to the above statement, the interlace analyser does not contain the correct total number of bits.
    19801969
    19811970      printf( "\n\nSUMMARY INTERLACED ---------------------------------------------\n" );
    1982       m_gcAnalyzeAll_in.printOut('a', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
     1971      analyze->printOut('a', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
    19831972
    19841973#if _SUMMARY_OUT_
    1985       m_gcAnalyzeAll_in.printSummaryOutInterlaced();
    1986 #endif
    1987     }
    1988   }
     1974      analyze->printSummary(chFmt, printSequenceMSE);
     1975#endif
     1976    }
     1977  }   
    19891978
    19901979  printf("\n");
    1991   //printf("\nRVM: %.3lf\n" , xCalculateRVM());
     1980  for( layer = 0; layer < m_numLayers; layer++ )
     1981  {
     1982    printf("RVM[L%d]: %.3lf\n", layer, m_apcTEncTop[vps->getLayerIdInNuh(layer)]->calculateRVM());
     1983  }
     1984  printf("\n");
    19921985}
    1993 
    19941986#else
    19951987// ====================================================================================================================
  • TabularUnified branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.h

    r1259 r1292  
    100100  Void xWriteRecon(UInt layer, Int iNumEncoded);
    101101  Void xWriteStream(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits);
    102   Void printOutSummary(Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE);
     102  Void printOutSummary(Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE); 
    103103#else
    104104  Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits); ///< write bitstream to file
  • TabularUnified 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() ];
  • TabularUnified 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
  • TabularUnified 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();
  • TabularUnified 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
  • TabularUnified 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 ];
  • TabularUnified 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 ];
  • TabularUnified 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  {
  • TabularUnified 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;
  • TabularUnified 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    {
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r1287 r1292  
    5252#include <time.h>
    5353
    54 extern Bool g_md5_mismatch; ///< top level flag to signal when there is a decode problem
    55 
    5654#if CONFORMANCE_BITSTREAM_MODE
    5755Bool pocCompareFunction( const TComPic &pic1, const TComPic &pic2 )
     
    6361//! \ingroup TLibDecoder
    6462//! \{
    65 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths);
     63static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths, UInt &numChecksumErrors);
    6664// ====================================================================================================================
    6765// Constructor / destructor / initialization / destroy
     
    6967
    7068TDecGop::TDecGop()
     69 : m_numberOfChecksumErrorsDetected(0)
    7170{
    7271  m_dDecTime = 0;
     
    114113  m_pcSliceDecoder        = pcSliceDecoder;
    115114  m_pcLoopFilter          = pcLoopFilter;
    116   m_pcSAO  = pcSAO;
     115  m_pcSAO                 = pcSAO;
     116  m_numberOfChecksumErrorsDetected = 0;
     117
    117118#if SVC_EXTENSION   
    118119  m_ppcTDecTop            = ppcDecTop;
     
    247248    }
    248249#if SVC_EXTENSION
    249     calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getBitDepths());
    250 #else
    251     calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getSPS()->getBitDepths());
     250    calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getBitDepths(), m_numberOfChecksumErrorsDetected);
     251#else
     252    calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getSPS()->getBitDepths(), m_numberOfChecksumErrorsDetected);
    252253#endif
    253254  }
     
    279280 *            unk         - no SEI message was available for comparison
    280281 */
    281 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths)
     282static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths, UInt &numChecksumErrors)
    282283{
    283284  /* calculate MD5sum for entire reconstructed picture */
     
    334335  if (mismatch)
    335336  {
    336     g_md5_mismatch = true;
     337    numChecksumErrors++;
    337338    printf("[rx%s:%s] ", hashType, hashToString(pictureHashSEI->m_pictureHash, numChar).c_str());
    338339  }
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h

    r1259 r1292  
    8080  Double                m_dDecTime;
    8181  Int                   m_decodedPictureHashSEIEnabled;  ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
     82  UInt                  m_numberOfChecksumErrorsDetected;
    8283
    8384#if SVC_EXTENSION
     
    112113
    113114  Void setDecodedPictureHashSEIEnabled(Int enabled) { m_decodedPictureHashSEIEnabled = enabled; }
     115  UInt getNumberOfChecksumErrorsDetected() const { return m_numberOfChecksumErrorsDetected; }
     116
    114117#if SVC_EXTENSION
    115118  TDecTop*   getLayerDec(UInt layerId)  { return m_ppcTDecTop[layerId]; }
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1290 r1292  
    6363
    6464TDecTop::TDecTop()
    65   : m_pDecodedSEIOutputStream(NULL)
     65  : m_pDecodedSEIOutputStream(NULL),
     66    m_warningMessageSkipPicture(false)
    6667{
    6768  m_pcPic = 0;
     
    21672168    else
    21682169    {
    2169       static Bool warningMessage = false;
    2170       if(!warningMessage)
     2170      if(!m_warningMessageSkipPicture)
    21712171      {
    21722172        printf("\nWarning: this is not a valid random access point and the data is discarded until the first CRA picture");
    2173         warningMessage = true;
     2173        m_warningMessageSkipPicture = true;
    21742174      }
    21752175      return true;
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r1282 r1292  
    121121  std::ostream           *m_pDecodedSEIOutputStream;
    122122
     123  Bool                    m_warningMessageSkipPicture;
     124
    123125#if SVC_EXTENSION
    124126  Bool                    m_isLastNALWasEos;
     
    191193  Void  deletePicBuffer();
    192194
     195 
    193196  Void  executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic);
    194197  Void  checkNoOutputPriorPics (TComList<TComPic*>* rpcListPic);
     
    203206#endif
    204207  Void  setDecodedSEIMessageOutputStream(std::ostream *pOpStream) { m_pDecodedSEIOutputStream = pOpStream; }
     208  UInt  getNumberOfChecksumErrorsDetected() const { return m_cGopDecoder.getNumberOfChecksumErrorsDetected(); }
    205209
    206210#if SVC_EXTENSION
     
    259263protected:
    260264#if SVC_EXTENSION
    261   Void      xGetNewPicBuffer  ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
     265  Void  xGetNewPicBuffer  ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
    262266#else
    263   Void      xGetNewPicBuffer  (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
    264 #endif
    265   Void      xCreateLostPicture (Int iLostPOC);
     267  Void  xGetNewPicBuffer  (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer);
     268#endif
     269  Void  xCreateLostPicture (Int iLostPOC);
    266270
    267271  Void      xActivateParameterSets();
  • TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncAnalyze.cpp

    r1259 r1292  
    4545//////////////////////////////////////////////////////////////////////
    4646
    47 #if SVC_EXTENSION
    48 TEncAnalyze             m_gcAnalyzeAll [MAX_LAYERS];
    49 TEncAnalyze             m_gcAnalyzeI [MAX_LAYERS];
    50 TEncAnalyze             m_gcAnalyzeP [MAX_LAYERS];
    51 TEncAnalyze             m_gcAnalyzeB [MAX_LAYERS];
    52 #else
    53 TEncAnalyze             m_gcAnalyzeAll;
    54 TEncAnalyze             m_gcAnalyzeI;
    55 TEncAnalyze             m_gcAnalyzeP;
    56 TEncAnalyze             m_gcAnalyzeB;
    57 #endif
    58 
    59 TEncAnalyze             m_gcAnalyzeAll_in;
    6047
    6148//! \}
  • TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncAnalyze.h

    r1287 r1292  
    137137
    138138#if SVC_EXTENSION
    139   Void    printOut ( Char cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths, UInt layer )
     139  Void    printOut ( Char cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths, UInt layer = 0 )
    140140#else
    141141  Void    printOut ( Char cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths )
     
    451451};
    452452
    453 #if SVC_EXTENSION
    454 extern TEncAnalyze             m_gcAnalyzeAll [MAX_LAYERS];
    455 extern TEncAnalyze             m_gcAnalyzeI [MAX_LAYERS];
    456 extern TEncAnalyze             m_gcAnalyzeP [MAX_LAYERS];
    457 extern TEncAnalyze             m_gcAnalyzeB [MAX_LAYERS];
    458 #else
    459453extern TEncAnalyze             m_gcAnalyzeAll;
    460454extern TEncAnalyze             m_gcAnalyzeI;
    461455extern TEncAnalyze             m_gcAnalyzeP;
    462456extern TEncAnalyze             m_gcAnalyzeB;
    463 #endif
    464457
    465458extern TEncAnalyze             m_gcAnalyzeAll_in;
  • TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1291 r1292  
    29182918}
    29192919
    2920 #if !SVC_EXTENSION
    29212920Void TEncGOP::printOutSummary(UInt uiNumAllPicCoded, Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths)
    29222921{
     
    29712970  printf("\nRVM: %.3lf\n" , xCalculateRVM());
    29722971}
    2973 #endif
    29742972
    29752973Void TEncGOP::preLoopFilterPicAll( TComPic* pcPic, UInt64& ruiDist )
     
    32673265
    32683266  //===== add PSNR =====
    3269 #if SVC_EXTENSION
    3270   m_gcAnalyzeAll[pcPic->getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId)].addResult (dPSNR, (Double)uibits, MSEyuvframe);
    3271   TComSlice*  pcSlice = pcPic->getSlice(0);
    3272   if (pcSlice->isIntra())
    3273   {
    3274     m_gcAnalyzeI[pcPic->getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId)].addResult (dPSNR, (Double)uibits, MSEyuvframe);
    3275   }
    3276   if (pcSlice->isInterP())
    3277   {
    3278     m_gcAnalyzeP[pcPic->getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId)].addResult (dPSNR, (Double)uibits, MSEyuvframe);
    3279   }
    3280   if (pcSlice->isInterB())
    3281   {
    3282     m_gcAnalyzeB[pcPic->getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId)].addResult (dPSNR, (Double)uibits, MSEyuvframe);
    3283   }
    3284 #else
    32853267  m_gcAnalyzeAll.addResult (dPSNR, (Double)uibits, MSEyuvframe);
    32863268  TComSlice*  pcSlice = pcPic->getSlice(0);
     
    32973279    m_gcAnalyzeB.addResult (dPSNR, (Double)uibits, MSEyuvframe);
    32983280  }
    3299 #endif
    33003281
    33013282  Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');
  • TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h

    r1291 r1292  
    8686
    8787private:
     88
     89  TEncAnalyze             m_gcAnalyzeAll;
     90  TEncAnalyze             m_gcAnalyzeI;
     91  TEncAnalyze             m_gcAnalyzeP;
     92  TEncAnalyze             m_gcAnalyzeB;
     93
     94  TEncAnalyze             m_gcAnalyzeAll_in;
    8895  //  Data
    8996  Bool                    m_bLongtermTestPictureHasBeenCoded;
     
    193200  TComList<TComPic*>*   getListPic()      { return m_pcListPic; }
    194201 
    195 #if !SVC_EXTENSION
    196202  Void  printOutSummary      ( UInt uiNumAllPicCoded, Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths );
    197 #endif
    198203  Void  preLoopFilterPicAll  ( TComPic* pcPic, UInt64& ruiDist );
    199204
     
    204209#if SVC_EXTENSION
    205210  Void  determinePocResetIdc( Int const pocCurr, TComSlice *const slice);
    206   Int   getIntraRefreshInterval()  { return m_pcCfg->getIntraPeriod(); }
    207   Int   getIntraRefreshType()      { return m_pcCfg->getDecodingRefreshType(); } 
    208   Int   getLastPocPeriodId()      { return m_lastPocPeriodId; }
    209   Void  setLastPocPeriodId(Int x) { m_lastPocPeriodId = x;    }
     211  Int   getIntraRefreshInterval()   { return m_pcCfg->getIntraPeriod(); }
     212  Int   getIntraRefreshType()       { return m_pcCfg->getDecodingRefreshType(); } 
     213  Int   getLastPocPeriodId()        { return m_lastPocPeriodId; }
     214  Void  setLastPocPeriodId(Int x)   { m_lastPocPeriodId = x;    }
    210215  Void  updatePocValuesOfPics( Int const pocCurr, TComSlice *const slice);
     216
     217  TEncAnalyze* getAnalyzeAll()      { return &m_gcAnalyzeAll;  }
     218  TEncAnalyze* getAnalyzeI()        { return &m_gcAnalyzeI;    }
     219  TEncAnalyze* getAnalyzeP()        { return &m_gcAnalyzeP;    }
     220  TEncAnalyze* getAnalyzeB()        { return &m_gcAnalyzeB;    }
     221  TEncAnalyze* getAnalyzeAllin()    { return &m_gcAnalyzeAll_in; }
     222  Double       calculateRVM()       { return xCalculateRVM();    }
    211223#endif
    212224
  • TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h

    r1287 r1292  
    263263  Void      setCurrPocMsb(Int poc)                            { m_currPocMsb = poc;  }
    264264  Int       getCurrPocMsb()                                   { return m_currPocMsb; }
     265
     266  TEncAnalyze* getAnalyzeAll()                                { return m_cGOPEncoder.getAnalyzeAll();   }
     267  TEncAnalyze* getAnalyzeI()                                  { return m_cGOPEncoder.getAnalyzeI();     }
     268  TEncAnalyze* getAnalyzeP()                                  { return m_cGOPEncoder.getAnalyzeP();     }
     269  TEncAnalyze* getAnalyzeB()                                  { return m_cGOPEncoder.getAnalyzeB();     }
     270  TEncAnalyze* getAnalyzeAllin()                              { return m_cGOPEncoder.getAnalyzeAllin(); }
     271  Double       calculateRVM()                                 { return m_cGOPEncoder.calculateRVM();    }
    265272#else //SVC_EXTENSION
    266273  Void encode( Bool bEos,
     
    275282               TComList<TComPicYuv*>& rcListPicYuvRecOut,
    276283               std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded, Bool isTff);
     284#endif //#if SVC_EXTENSION
    277285
    278286  Void printSummary(Bool isField) { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded, isField, m_printMSEBasedSequencePSNR, m_printSequenceMSE, m_cSPS.getBitDepths()); }
    279 #endif //#if SVC_EXTENSION
    280287};
    281288
Note: See TracChangeset for help on using the changeset viewer.