Changeset 1333 in SHVCSoftware for branches/SHM-dev


Ignore:
Timestamp:
22 Jul 2015, 01:50:55 (9 years ago)
Author:
seregin
Message:

port rev 4411

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1332 r1333  
    11991199  ("ClipInputVideoToRec709Range",                     m_bClipInputVideoToRec709Range,                   false, "If true then clip input video to the Rec. 709 Range on loading when InternalBitDepth is less than MSBExtendedBitDepth")
    12001200  ("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.")
    12011203
    12021204  //Field coding parameters
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1332 r1333  
    441441  Int       m_log2MaxMvLengthVertical;                        ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
    442442
     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
    443446#if LAYERS_NOT_PRESENT_SEI
    444447  Int       m_layersNotPresentSEIEnabled;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1332 r1333  
    726726    m_acTEncTop[layer].setHarmonizeGopFirstFieldCoupleEnabled   ( m_bHarmonizeGopFirstFieldCoupleEnabled );
    727727
     728    m_acTEncTop[layer].setSummaryOutFilename                    ( m_summaryOutFilename );
     729    m_acTEncTop[layer].setSummaryPicFilenameBase                ( m_summaryPicFilenameBase );
     730
    728731    if( layer > 0 )
    729732    {
     
    11051108  m_cTEncTop.setEfficientFieldIRAPEnabled                         ( m_bEfficientFieldIRAPEnabled );
    11061109  m_cTEncTop.setHarmonizeGopFirstFieldCoupleEnabled               ( m_bHarmonizeGopFirstFieldCoupleEnabled );
     1110
     1111  m_cTEncTop.setSummaryOutFilename                                ( m_summaryOutFilename );
     1112  m_cTEncTop.setSummaryPicFilenameBase                            ( m_summaryPicFilenameBase );
    11071113}
    11081114#endif //SVC_EXTENSION
     
    19671973  }
    19681974
    1969 #if _SUMMARY_OUT_
    19701975  for( layer = 0; layer < m_numLayers; layer++ )
    19711976  {
    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
    19761987  for( layer = 0; layer < m_numLayers; layer++ )
    19771988  {
    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  }
    19832000
    19842001  if(isField)
     
    19862003    for(layer = 0; layer < m_numLayers; layer++)
    19872004    {
     2005      const UInt layerId = vps->getLayerIdInNuh(layer);
     2006
    19882007      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();
    19902009
    19912010      //-- interlaced summary
    19922011      analyze->setFrmRate( m_acLayerCfg[layer].getFrameRate());
    1993       analyze->setBits(m_apcTEncTop[vps->getLayerIdInNuh(layer)]->getAnalyzeB()->getBits());
     2012      analyze->setBits(m_apcTEncTop[layerId]->getAnalyzeB()->getBits());
    19942013      // prior to the above statement, the interlace analyser does not contain the correct total number of bits.
    19952014
     
    19972016      analyze->printOut('a', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, bitDepths, layer);
    19982017
    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      }
    20022022    }
    20032023  }   
  • branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h

    r1330 r1333  
    116116// ====================================================================================================================
    117117
    118 #define _SUMMARY_OUT_               0           ///< print-out PSNR results of all slices to summary.txt
    119 #define _SUMMARY_PIC_               0           ///< print-out PSNR results for each slice type to summary.txt
    120 
    121118#define MAX_GOP                     64          ///< max. value of hierarchical GOP size
    122119
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncAnalyze.h

    r1292 r1333  
    376376
    377377
    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)
    379379  {
    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");
    401381
    402382    Double dFps     =   m_dFrmRate; //--CFG_KDY
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1332 r1333  
    379379  Bool      m_bEfficientFieldIRAPEnabled;                     ///< enable to code fields in a specific, potentially more efficient, order.
    380380  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.
    381384
    382385#if SVC_EXTENSION
     
    10211024  Void      setChromaSamplingVerFilterIdc(Int i)                     { m_chromaSamplingVerFilterIdc = i;}
    10221025
     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
    10231031#if Q0189_TMVP_CONSTRAINTS
    10241032  Void  setTMVPConstraintsSEIEnabled(Int b)                  { m_TMVPConstraintsSEIEnabled = b; }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1332 r1333  
    29332933  m_gcAnalyzeB.printOut('b', chFmt, printMSEBasedSNR, printSequenceMSE, bitDepths);
    29342934
    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  }
    29432946
    29442947  if(isField)
     
    29522955    m_gcAnalyzeAll_in.printOut('a', chFmt, printMSEBasedSNR, printSequenceMSE, bitDepths);
    29532956
    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    }
    29572961  }
    29582962
Note: See TracChangeset for help on using the changeset viewer.