Changeset 1333 in SHVCSoftware for branches/SHM-dev/source/App


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

port rev 4411

Location:
branches/SHM-dev/source/App/TAppEncoder
Files:
3 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  }   
Note: See TracChangeset for help on using the changeset viewer.