Changeset 1292 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 18 Jul 2015, 04:14:13 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp ¶
r1290 r1292 66 66 #endif 67 67 { 68 memset( m_apcTDecTop, NULL, sizeof(m_apcTDecTop) ); 69 68 70 for(UInt layer=0; layer < MAX_LAYERS; layer++) 69 71 { -
TabularUnified branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h ¶
r1289 r1292 95 95 Void destroy (); ///< destroy internal members 96 96 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 97 115 98 116 protected: -
TabularUnified branches/SHM-dev/source/App/TAppDecoder/decmain.cpp ¶
r1259 r1292 44 44 //! \{ 45 45 46 Bool g_md5_mismatch = false; ///< top level flag that indicates if there has been a decoding mismatch47 48 46 // ==================================================================================================================== 49 47 // Main function … … 52 50 int main(int argc, char* argv[]) 53 51 { 52 Int returnCode = EXIT_SUCCESS; 54 53 TAppDecTop cTAppDecTop; 55 54 … … 73 72 { 74 73 cTAppDecTop.destroy(); 75 return 1; 74 returnCode = EXIT_FAILURE; 75 return returnCode; 76 76 } 77 77 … … 83 83 cTAppDecTop.decode(); 84 84 85 if ( g_md5_mismatch)85 if (cTAppDecTop.getNumberOfChecksumErrorsDetected() != 0) 86 86 { 87 87 printf("\n\n***ERROR*** A decoding mismatch occured: signalled md5sum does not match\n"); 88 returnCode = EXIT_FAILURE; 88 89 } 89 90 … … 95 96 cTAppDecTop.destroy(); 96 97 97 return g_md5_mismatch ? EXIT_FAILURE : EXIT_SUCCESS;98 return returnCode; 98 99 } 99 100 -
TabularUnified branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp ¶
r1290 r1292 1092 1092 { 1093 1093 //2 1094 #if LAYER_CTB1095 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer];1096 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer];1097 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer];1098 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer];1099 #endif1100 1094 // Video I/O 1101 1095 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 … … 1187 1181 //3 1188 1182 #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 1194 1183 memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) ); 1195 1184 memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) ); … … 1789 1778 //7 1790 1779 #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 1796 1780 memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) ); 1797 1781 memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) ); … … 1915 1899 { 1916 1900 UInt layer; 1901 const TComVPS *vps = m_apcTEncTop[0]->getVPS(); 1902 const Int rateMultiplier = isField ? 2 : 1; 1917 1903 1918 1904 // set frame rate 1919 1905 for(layer = 0; layer < m_numLayers; layer++) 1920 1906 { 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 ); 1935 1912 } 1936 1913 … … 1939 1916 for(layer = 0; layer < m_numLayers; layer++) 1940 1917 { 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); 1944 1920 } 1945 1921 … … 1948 1924 { 1949 1925 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); 1952 1927 } 1953 1928 … … 1956 1931 { 1957 1932 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); 1960 1934 } 1961 1935 … … 1964 1938 { 1965 1939 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 1969 1957 1970 1958 if(isField) … … 1973 1961 { 1974 1962 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(); 1975 1964 1976 1965 //-- 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()); 1979 1968 // prior to the above statement, the interlace analyser does not contain the correct total number of bits. 1980 1969 1981 1970 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); 1983 1972 1984 1973 #if _SUMMARY_OUT_ 1985 m_gcAnalyzeAll_in.printSummaryOutInterlaced();1986 #endif 1987 } 1988 } 1974 analyze->printSummary(chFmt, printSequenceMSE); 1975 #endif 1976 } 1977 } 1989 1978 1990 1979 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"); 1992 1985 } 1993 1994 1986 #else 1995 1987 // ==================================================================================================================== -
TabularUnified branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.h ¶
r1259 r1292 100 100 Void xWriteRecon(UInt layer, Int iNumEncoded); 101 101 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); 103 103 #else 104 104 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 95 95 96 96 // 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}; 98 98 99 99 Double probLPS = aStateToProbLPS[ m_contextModel[ n ].getState() ]; -
TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h ¶
r1215 r1292 104 104 105 105 SCuboid *** m_pCuboid; 106 const staticInt m_nVertexIdxOffset[4][3];106 static const Int m_nVertexIdxOffset[4][3]; 107 107 std::vector<UInt> m_vRefLayerId; 108 108 -
TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp ¶
r1290 r1292 3463 3463 } 3464 3464 3465 #if !LAYER_CTB3466 UInt uiMinUnitSize = m_pcPic->getMinCUWidth();3467 #endif3468 3469 3465 Int leftStartL = m_pcSlice->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset(); 3470 3466 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 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 112 static TCoeff* m_pcGlbArlCoeff[MAX_NUM_COMPONENT]; // global ARL buffer // TODO: Remove this static member variable. 113 113 Bool m_ArlCoeffIsAliasedAllocation; ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d 114 114 #endif -
TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp ¶
r1290 r1292 254 254 UInt g_auiRasterToPelY [ MAX_NUM_SPU_W*MAX_NUM_SPU_W ] = { 0, }; 255 255 256 UInt g_auiPUOffset[NUMBER_OF_PART_SIZES] = { 0, 8, 4, 4, 2, 10, 1, 5};256 const UInt g_auiPUOffset[NUMBER_OF_PART_SIZES] = { 0, 8, 4, 4, 2, 10, 1, 5}; 257 257 258 258 Void initZscanToRaster ( Int iMaxDepth, Int iDepth, UInt uiStartVal, UInt*& rpuiCurrIdx ) … … 319 319 } 320 320 321 Int g_quantScales[SCALING_LIST_REM_NUM] =321 const Int g_quantScales[SCALING_LIST_REM_NUM] = 322 322 { 323 323 26214,23302,20560,18396,16384,14564 324 324 }; 325 325 326 Int g_invQuantScales[SCALING_LIST_REM_NUM] =326 const Int g_invQuantScales[SCALING_LIST_REM_NUM] = 327 327 { 328 328 40,45,51,57,64,72 … … 628 628 }; 629 629 630 Int g_quantTSDefault4x4[4*4] =630 const Int g_quantTSDefault4x4[4*4] = 631 631 { 632 632 16,16,16,16, … … 636 636 }; 637 637 638 Int g_quantIntraDefault8x8[8*8] =638 const Int g_quantIntraDefault8x8[8*8] = 639 639 { 640 640 16,16,16,16,17,18,21,24, … … 648 648 }; 649 649 650 Int g_quantInterDefault8x8[8*8] =650 const Int g_quantInterDefault8x8[8*8] = 651 651 { 652 652 16,16,16,16,17,18,20,24, … … 660 660 }; 661 661 662 UInt g_scalingListSize [SCALING_LIST_SIZE_NUM] = {16,64,256,1024};663 UInt g_scalingListSizeX [SCALING_LIST_SIZE_NUM] = { 4, 8, 16, 32};662 const UInt g_scalingListSize [SCALING_LIST_SIZE_NUM] = {16,64,256,1024}; 663 const UInt g_scalingListSizeX [SCALING_LIST_SIZE_NUM] = { 4, 8, 16, 32}; 664 664 665 665 #if SVC_EXTENSION … … 717 717 } 718 718 #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];723 719 UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 724 720 UInt g_auiLayerRasterToZscan[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; -
TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TComRom.h ¶
r1290 r1292 85 85 Void initRasterToPelXY ( UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxDepth ); 86 86 87 extern 87 extern const UInt g_auiPUOffset[NUMBER_OF_PART_SIZES]; 88 88 89 89 #define QUANT_SHIFT 14 // Q(4) = 2^14 … … 100 100 #define SHIFT_INV_2ND 12 // Shift after second inverse transform stage 101 101 102 extern Int g_quantScales[SCALING_LIST_REM_NUM]; // Q(QP%6)103 extern Int g_invQuantScales[SCALING_LIST_REM_NUM]; // IQ(QP%6)102 extern const Int g_quantScales[SCALING_LIST_REM_NUM]; // Q(QP%6) 103 extern const Int g_invQuantScales[SCALING_LIST_REM_NUM]; // IQ(QP%6) 104 104 105 105 #if RExt__HIGH_PRECISION_FORWARD_TRANSFORM … … 207 207 extern const Char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 208 208 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];209 extern const Int g_quantTSDefault4x4[4*4]; 210 extern const Int g_quantIntraDefault8x8[8*8]; 211 extern const Int g_quantInterDefault8x8[8*8]; 212 213 extern const UInt g_scalingListSize [SCALING_LIST_SIZE_NUM]; 214 extern const UInt g_scalingListSizeX[SCALING_LIST_SIZE_NUM]; 215 extern const UInt g_scalingListNum [SCALING_LIST_SIZE_NUM]; 216 216 217 217 #if SVC_EXTENSION … … 224 224 std::string NaluToStr( NalUnitType nalu ); 225 225 #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];230 226 extern UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 231 227 extern UInt g_auiLayerRasterToZscan[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; -
TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp ¶
r1291 r1292 2727 2727 * \returns pointer of quantization matrix 2728 2728 */ 2729 Int* TComScalingList::getScalingListDefaultAddress(UInt sizeId, UInt listId)2730 { 2731 Int *src = 0;2729 const Int* TComScalingList::getScalingListDefaultAddress(UInt sizeId, UInt listId) 2730 { 2731 const Int *src = 0; 2732 2732 switch(sizeId) 2733 2733 { -
TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h ¶
r1291 r1292 165 165 UInt getRefMatrixId(UInt sizeId, UInt listId) const { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID 166 166 167 Int*getScalingListDefaultAddress(UInt sizeId, UInt listId); //!< get default matrix coefficient167 const Int* getScalingListDefaultAddress(UInt sizeId, UInt listId); //!< get default matrix coefficient 168 168 Void processDefaultMatrix(UInt sizeId, UInt listId); 169 169 … … 1909 1909 Int m_iAssociatedIRAP; 1910 1910 NalUnitType m_iAssociatedIRAPType; 1911 static Int m_prevTid0POC; 1911 static Int m_prevTid0POC; // TODO: Remove this static member variable. 1912 1912 TComReferencePictureSet* m_pcRPS; 1913 1913 TComReferencePictureSet m_LocalRPS; -
TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp ¶
r1290 r1292 267 267 } 268 268 269 staticconst Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_FORWARD];269 const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_FORWARD]; 270 270 271 271 const Int shift_1st = (uiLog2TrSize + bitDepth + TRANSFORM_MATRIX_SHIFT) - maxLog2TrDynamicRange; … … 339 339 } 340 340 341 staticconst Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_INVERSE];341 const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_INVERSE]; 342 342 343 343 const Int shift_1st = TRANSFORM_MATRIX_SHIFT + 1; //1 has been added to shift_1st at the expense of shift_2nd … … 864 864 Void xTrMxN(Int bitDepth, TCoeff *block, TCoeff *coeff, Int iWidth, Int iHeight, Bool useDST, const Int maxLog2TrDynamicRange) 865 865 { 866 staticconst Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_FORWARD];866 const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_FORWARD]; 867 867 868 868 const Int shift_1st = ((g_aucConvertToBit[iWidth] + 2) + bitDepth + TRANSFORM_MATRIX_SHIFT) - maxLog2TrDynamicRange; … … 931 931 Void xITrMxN(Int bitDepth, TCoeff *coeff, TCoeff *block, Int iWidth, Int iHeight, Bool useDST, const Int maxLog2TrDynamicRange) 932 932 { 933 staticconst Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_INVERSE];933 const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShift[TRANSFORM_INVERSE]; 934 934 935 935 Int shift_1st = TRANSFORM_MATRIX_SHIFT + 1; //1 has been added to shift_1st at the expense of shift_2nd … … 1847 1847 } 1848 1848 1849 staticconst TCoeff pelMin=(TCoeff) std::numeric_limits<Pel>::min();1850 staticconst 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(); 1851 1851 if (rdpcmMode == RDPCM_VER) 1852 1852 { -
TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp ¶
r1287 r1292 52 52 #include <time.h> 53 53 54 extern Bool g_md5_mismatch; ///< top level flag to signal when there is a decode problem55 56 54 #if CONFORMANCE_BITSTREAM_MODE 57 55 Bool pocCompareFunction( const TComPic &pic1, const TComPic &pic2 ) … … 63 61 //! \ingroup TLibDecoder 64 62 //! \{ 65 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths );63 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths, UInt &numChecksumErrors); 66 64 // ==================================================================================================================== 67 65 // Constructor / destructor / initialization / destroy … … 69 67 70 68 TDecGop::TDecGop() 69 : m_numberOfChecksumErrorsDetected(0) 71 70 { 72 71 m_dDecTime = 0; … … 114 113 m_pcSliceDecoder = pcSliceDecoder; 115 114 m_pcLoopFilter = pcLoopFilter; 116 m_pcSAO = pcSAO; 115 m_pcSAO = pcSAO; 116 m_numberOfChecksumErrorsDetected = 0; 117 117 118 #if SVC_EXTENSION 118 119 m_ppcTDecTop = ppcDecTop; … … 247 248 } 248 249 #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); 252 253 #endif 253 254 } … … 279 280 * unk - no SEI message was available for comparison 280 281 */ 281 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths )282 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths, UInt &numChecksumErrors) 282 283 { 283 284 /* calculate MD5sum for entire reconstructed picture */ … … 334 335 if (mismatch) 335 336 { 336 g_md5_mismatch = true;337 numChecksumErrors++; 337 338 printf("[rx%s:%s] ", hashType, hashToString(pictureHashSEI->m_pictureHash, numChar).c_str()); 338 339 } -
TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h ¶
r1259 r1292 80 80 Double m_dDecTime; 81 81 Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message 82 UInt m_numberOfChecksumErrorsDetected; 82 83 83 84 #if SVC_EXTENSION … … 112 113 113 114 Void setDecodedPictureHashSEIEnabled(Int enabled) { m_decodedPictureHashSEIEnabled = enabled; } 115 UInt getNumberOfChecksumErrorsDetected() const { return m_numberOfChecksumErrorsDetected; } 116 114 117 #if SVC_EXTENSION 115 118 TDecTop* getLayerDec(UInt layerId) { return m_ppcTDecTop[layerId]; } -
TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp ¶
r1290 r1292 63 63 64 64 TDecTop::TDecTop() 65 : m_pDecodedSEIOutputStream(NULL) 65 : m_pDecodedSEIOutputStream(NULL), 66 m_warningMessageSkipPicture(false) 66 67 { 67 68 m_pcPic = 0; … … 2167 2168 else 2168 2169 { 2169 static Bool warningMessage = false; 2170 if(!warningMessage) 2170 if(!m_warningMessageSkipPicture) 2171 2171 { 2172 2172 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; 2174 2174 } 2175 2175 return true; -
TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h ¶
r1282 r1292 121 121 std::ostream *m_pDecodedSEIOutputStream; 122 122 123 Bool m_warningMessageSkipPicture; 124 123 125 #if SVC_EXTENSION 124 126 Bool m_isLastNALWasEos; … … 191 193 Void deletePicBuffer(); 192 194 195 193 196 Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic); 194 197 Void checkNoOutputPriorPics (TComList<TComPic*>* rpcListPic); … … 203 206 #endif 204 207 Void setDecodedSEIMessageOutputStream(std::ostream *pOpStream) { m_pDecodedSEIOutputStream = pOpStream; } 208 UInt getNumberOfChecksumErrorsDetected() const { return m_cGopDecoder.getNumberOfChecksumErrorsDetected(); } 205 209 206 210 #if SVC_EXTENSION … … 259 263 protected: 260 264 #if SVC_EXTENSION 261 Void 265 Void xGetNewPicBuffer ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer); 262 266 #else 263 Void 264 #endif 265 Void 267 Void xGetNewPicBuffer (const TComSPS &sps, const TComPPS &pps, TComPic*& rpcPic, const UInt temporalLayer); 268 #endif 269 Void xCreateLostPicture (Int iLostPOC); 266 270 267 271 Void xActivateParameterSets(); -
TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncAnalyze.cpp ¶
r1259 r1292 45 45 ////////////////////////////////////////////////////////////////////// 46 46 47 #if SVC_EXTENSION48 TEncAnalyze m_gcAnalyzeAll [MAX_LAYERS];49 TEncAnalyze m_gcAnalyzeI [MAX_LAYERS];50 TEncAnalyze m_gcAnalyzeP [MAX_LAYERS];51 TEncAnalyze m_gcAnalyzeB [MAX_LAYERS];52 #else53 TEncAnalyze m_gcAnalyzeAll;54 TEncAnalyze m_gcAnalyzeI;55 TEncAnalyze m_gcAnalyzeP;56 TEncAnalyze m_gcAnalyzeB;57 #endif58 59 TEncAnalyze m_gcAnalyzeAll_in;60 47 61 48 //! \} -
TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncAnalyze.h ¶
r1287 r1292 137 137 138 138 #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 ) 140 140 #else 141 141 Void printOut ( Char cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths ) … … 451 451 }; 452 452 453 #if SVC_EXTENSION454 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 #else459 453 extern TEncAnalyze m_gcAnalyzeAll; 460 454 extern TEncAnalyze m_gcAnalyzeI; 461 455 extern TEncAnalyze m_gcAnalyzeP; 462 456 extern TEncAnalyze m_gcAnalyzeB; 463 #endif464 457 465 458 extern TEncAnalyze m_gcAnalyzeAll_in; -
TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp ¶
r1291 r1292 2918 2918 } 2919 2919 2920 #if !SVC_EXTENSION2921 2920 Void TEncGOP::printOutSummary(UInt uiNumAllPicCoded, Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths) 2922 2921 { … … 2971 2970 printf("\nRVM: %.3lf\n" , xCalculateRVM()); 2972 2971 } 2973 #endif2974 2972 2975 2973 Void TEncGOP::preLoopFilterPicAll( TComPic* pcPic, UInt64& ruiDist ) … … 3267 3265 3268 3266 //===== add PSNR ===== 3269 #if SVC_EXTENSION3270 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 #else3285 3267 m_gcAnalyzeAll.addResult (dPSNR, (Double)uibits, MSEyuvframe); 3286 3268 TComSlice* pcSlice = pcPic->getSlice(0); … … 3297 3279 m_gcAnalyzeB.addResult (dPSNR, (Double)uibits, MSEyuvframe); 3298 3280 } 3299 #endif3300 3281 3301 3282 Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B'); -
TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h ¶
r1291 r1292 86 86 87 87 private: 88 89 TEncAnalyze m_gcAnalyzeAll; 90 TEncAnalyze m_gcAnalyzeI; 91 TEncAnalyze m_gcAnalyzeP; 92 TEncAnalyze m_gcAnalyzeB; 93 94 TEncAnalyze m_gcAnalyzeAll_in; 88 95 // Data 89 96 Bool m_bLongtermTestPictureHasBeenCoded; … … 193 200 TComList<TComPic*>* getListPic() { return m_pcListPic; } 194 201 195 #if !SVC_EXTENSION196 202 Void printOutSummary ( UInt uiNumAllPicCoded, Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths ); 197 #endif198 203 Void preLoopFilterPicAll ( TComPic* pcPic, UInt64& ruiDist ); 199 204 … … 204 209 #if SVC_EXTENSION 205 210 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; } 210 215 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(); } 211 223 #endif 212 224 -
TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h ¶
r1287 r1292 263 263 Void setCurrPocMsb(Int poc) { m_currPocMsb = poc; } 264 264 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(); } 265 272 #else //SVC_EXTENSION 266 273 Void encode( Bool bEos, … … 275 282 TComList<TComPicYuv*>& rcListPicYuvRecOut, 276 283 std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded, Bool isTff); 284 #endif //#if SVC_EXTENSION 277 285 278 286 Void printSummary(Bool isField) { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded, isField, m_printMSEBasedSequencePSNR, m_printSequenceMSE, m_cSPS.getBitDepths()); } 279 #endif //#if SVC_EXTENSION280 287 }; 281 288
Note: See TracChangeset for help on using the changeset viewer.