Changeset 1333 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 22 Jul 2015, 01:50:55 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1332 r1333 1199 1199 ("ClipInputVideoToRec709Range", m_bClipInputVideoToRec709Range, false, "If true then clip input video to the Rec. 709 Range on loading when InternalBitDepth is less than MSBExtendedBitDepth") 1200 1200 ("ClipOutputVideoToRec709Range", m_bClipOutputVideoToRec709Range, false, "If true then clip output video to the Rec. 709 Range on saving when OutputBitDepth is less than InternalBitDepth") 1201 ("SummaryOutFilename", m_summaryOutFilename, string(), "Filename to use for producing summary output file. If empty, do not produce a file.") 1202 ("SummaryPicFilenameBase", m_summaryPicFilenameBase, string(), "Base filename to use for producing summary picture output files. The actual filenames used will have I.txt, P.txt and B.txt appended. If empty, do not produce a file.") 1201 1203 1202 1204 //Field coding parameters -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1332 r1333 441 441 Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units 442 442 443 std::string m_summaryOutFilename; ///< filename to use for producing summary output file. 444 std::string m_summaryPicFilenameBase; ///< Base filename to use for producing summary picture output files. The actual filenames used will have I.txt, P.txt and B.txt appended. 445 443 446 #if LAYERS_NOT_PRESENT_SEI 444 447 Int m_layersNotPresentSEIEnabled; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1332 r1333 726 726 m_acTEncTop[layer].setHarmonizeGopFirstFieldCoupleEnabled ( m_bHarmonizeGopFirstFieldCoupleEnabled ); 727 727 728 m_acTEncTop[layer].setSummaryOutFilename ( m_summaryOutFilename ); 729 m_acTEncTop[layer].setSummaryPicFilenameBase ( m_summaryPicFilenameBase ); 730 728 731 if( layer > 0 ) 729 732 { … … 1105 1108 m_cTEncTop.setEfficientFieldIRAPEnabled ( m_bEfficientFieldIRAPEnabled ); 1106 1109 m_cTEncTop.setHarmonizeGopFirstFieldCoupleEnabled ( m_bHarmonizeGopFirstFieldCoupleEnabled ); 1110 1111 m_cTEncTop.setSummaryOutFilename ( m_summaryOutFilename ); 1112 m_cTEncTop.setSummaryPicFilenameBase ( m_summaryPicFilenameBase ); 1107 1113 } 1108 1114 #endif //SVC_EXTENSION … … 1967 1973 } 1968 1974 1969 #if _SUMMARY_OUT_1970 1975 for( layer = 0; layer < m_numLayers; layer++ ) 1971 1976 { 1972 m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeAll()->printSummary(chFmt, printSequenceMSE, bitDepths); 1973 } 1974 #endif 1975 #if _SUMMARY_PIC_ 1977 const UInt layerId = vps->getLayerIdInNuh(layer); 1978 1979 if (!m_apcTEncTop[layerId]->getSummaryOutFilename().empty()) 1980 { 1981 const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1982 1983 m_apcTEncTop[layerId]->getAnalyzeAll()->printSummary(m_acLayerCfg[layer].getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layerId]->getSummaryOutFilename()); 1984 } 1985 } 1986 1976 1987 for( layer = 0; layer < m_numLayers; layer++ ) 1977 1988 { 1978 m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeI()->printSummary(chFmt, printSequenceMSE, bitDepths, 'I'); 1979 m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeP()->printSummary(chFmt, printSequenceMSE, bitDepths, 'P'); 1980 m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeB()->printSummary(chFmt, printSequenceMSE, bitDepths, 'B'); 1981 } 1982 #endif 1989 const UInt layerId = vps->getLayerIdInNuh(layer); 1990 1991 if (!m_apcTEncTop[layerId]->getSummaryPicFilenameBase().empty()) 1992 { 1993 const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1994 1995 m_apcTEncTop[layerId]->getAnalyzeI()->printSummary(m_acLayerCfg[layer].getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layerId]->getSummaryPicFilenameBase()+"I.txt"); 1996 m_apcTEncTop[layerId]->getAnalyzeP()->printSummary(m_acLayerCfg[layer].getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layerId]->getSummaryPicFilenameBase()+"P.txt"); 1997 m_apcTEncTop[layerId]->getAnalyzeB()->printSummary(m_acLayerCfg[layer].getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layerId]->getSummaryPicFilenameBase()+"B.txt"); 1998 } 1999 } 1983 2000 1984 2001 if(isField) … … 1986 2003 for(layer = 0; layer < m_numLayers; layer++) 1987 2004 { 2005 const UInt layerId = vps->getLayerIdInNuh(layer); 2006 1988 2007 const BitDepths bitDepths(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 1989 TEncAnalyze *analyze = m_apcTEncTop[ vps->getLayerIdInNuh(layer)]->getAnalyzeAllin();2008 TEncAnalyze *analyze = m_apcTEncTop[layerId]->getAnalyzeAllin(); 1990 2009 1991 2010 //-- interlaced summary 1992 2011 analyze->setFrmRate( m_acLayerCfg[layer].getFrameRate()); 1993 analyze->setBits(m_apcTEncTop[ vps->getLayerIdInNuh(layer)]->getAnalyzeB()->getBits());2012 analyze->setBits(m_apcTEncTop[layerId]->getAnalyzeB()->getBits()); 1994 2013 // prior to the above statement, the interlace analyser does not contain the correct total number of bits. 1995 2014 … … 1997 2016 analyze->printOut('a', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer); 1998 2017 1999 #if _SUMMARY_OUT_ 2000 analyze->printSummary(chFmt, printSequenceMSE, bitDepths); 2001 #endif 2018 if (!m_apcTEncTop[layerId]->getSummaryOutFilename().empty()) 2019 { 2020 analyze->printSummary(m_acLayerCfg[layer].getChromaFormatIDC(), printSequenceMSE, bitDepths, m_apcTEncTop[layerId]->getSummaryOutFilename()); 2021 } 2002 2022 } 2003 2023 } -
branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h
r1330 r1333 116 116 // ==================================================================================================================== 117 117 118 #define _SUMMARY_OUT_ 0 ///< print-out PSNR results of all slices to summary.txt119 #define _SUMMARY_PIC_ 0 ///< print-out PSNR results for each slice type to summary.txt120 121 118 #define MAX_GOP 64 ///< max. value of hierarchical GOP size 122 119 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncAnalyze.h
r1292 r1333 376 376 377 377 378 Void printSummary(const ChromaFormat chFmt, const Bool printSequenceMSE, const BitDepths &bitDepths, Char ch='T')378 Void printSummary(const ChromaFormat chFmt, const Bool printSequenceMSE, const BitDepths &bitDepths, const std::string &sFilename) 379 379 { 380 FILE* pFile = NULL; 381 382 switch( ch ) 383 { 384 case 'T': 385 pFile = fopen ("summaryTotal.txt", "at"); 386 break; 387 case 'I': 388 pFile = fopen ("summary_I.txt", "at"); 389 break; 390 case 'P': 391 pFile = fopen ("summary_P.txt", "at"); 392 break; 393 case 'B': 394 pFile = fopen ("summary_B.txt", "at"); 395 break; 396 default: 397 assert(0); 398 return; 399 break; 400 } 380 FILE* pFile = fopen (sFilename.c_str(), "at"); 401 381 402 382 Double dFps = m_dFrmRate; //--CFG_KDY -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1332 r1333 379 379 Bool m_bEfficientFieldIRAPEnabled; ///< enable to code fields in a specific, potentially more efficient, order. 380 380 Bool m_bHarmonizeGopFirstFieldCoupleEnabled; 381 382 std::string m_summaryOutFilename; ///< filename to use for producing summary output file. 383 std::string m_summaryPicFilenameBase; ///< Base filename to use for producing summary picture output files. The actual filenames used will have I.txt, P.txt and B.txt appended. 381 384 382 385 #if SVC_EXTENSION … … 1021 1024 Void setChromaSamplingVerFilterIdc(Int i) { m_chromaSamplingVerFilterIdc = i;} 1022 1025 1026 Void setSummaryOutFilename(const std::string &s) { m_summaryOutFilename = s; } 1027 const std::string& getSummaryOutFilename() const { return m_summaryOutFilename; } 1028 Void setSummaryPicFilenameBase(const std::string &s) { m_summaryPicFilenameBase = s; } 1029 const std::string& getSummaryPicFilenameBase() const { return m_summaryPicFilenameBase; } 1030 1023 1031 #if Q0189_TMVP_CONSTRAINTS 1024 1032 Void setTMVPConstraintsSEIEnabled(Int b) { m_TMVPConstraintsSEIEnabled = b; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1332 r1333 2933 2933 m_gcAnalyzeB.printOut('b', chFmt, printMSEBasedSNR, printSequenceMSE, bitDepths); 2934 2934 2935 #if _SUMMARY_OUT_ 2936 m_gcAnalyzeAll.printSummary(chFmt, printSequenceMSE, bitDepths); 2937 #endif 2938 #if _SUMMARY_PIC_ 2939 m_gcAnalyzeI.printSummary(chFmt, printSequenceMSE, bitDepths, 'I'); 2940 m_gcAnalyzeP.printSummary(chFmt, printSequenceMSE, bitDepths, 'P'); 2941 m_gcAnalyzeB.printSummary(chFmt, printSequenceMSE, bitDepths, 'B'); 2942 #endif 2935 if (!m_pcCfg->getSummaryOutFilename().empty()) 2936 { 2937 m_gcAnalyzeAll.printSummary(chFmt, printSequenceMSE, bitDepths, m_pcCfg->getSummaryOutFilename()); 2938 } 2939 2940 if (!m_pcCfg->getSummaryPicFilenameBase().empty()) 2941 { 2942 m_gcAnalyzeI.printSummary(chFmt, printSequenceMSE, bitDepths, m_pcCfg->getSummaryPicFilenameBase()+"I.txt"); 2943 m_gcAnalyzeP.printSummary(chFmt, printSequenceMSE, bitDepths, m_pcCfg->getSummaryPicFilenameBase()+"P.txt"); 2944 m_gcAnalyzeB.printSummary(chFmt, printSequenceMSE, bitDepths, m_pcCfg->getSummaryPicFilenameBase()+"B.txt"); 2945 } 2943 2946 2944 2947 if(isField) … … 2952 2955 m_gcAnalyzeAll_in.printOut('a', chFmt, printMSEBasedSNR, printSequenceMSE, bitDepths); 2953 2956 2954 #if _SUMMARY_OUT_ 2955 m_gcAnalyzeAll_in.printSummary(chFmt, printSequenceMSE, bitDepths); 2956 #endif 2957 if (!m_pcCfg->getSummaryOutFilename().empty()) 2958 { 2959 m_gcAnalyzeAll_in.printSummary(chFmt, printSequenceMSE, bitDepths, m_pcCfg->getSummaryOutFilename()); 2960 } 2957 2961 } 2958 2962
Note: See TracChangeset for help on using the changeset viewer.