Changeset 1292 in SHVCSoftware for branches/SHM-dev/source/App
- Timestamp:
- 18 Jul 2015, 04:14:13 (10 years ago)
- Location:
- branches/SHM-dev/source/App
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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 { -
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: -
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 -
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 // ==================================================================================================================== -
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
Note: See TracChangeset for help on using the changeset viewer.