Commit 8eaa2cac authored by FANGJUN PU's avatar FANGJUN PU
Browse files

rename variables and functions to be related to SII SEI.

parent 532fb75f
......@@ -3434,10 +3434,10 @@ The value plus 1 specifies the maximum number of temporal sub-layers that may be
\Default{true} &
Specifies if shutter interval info is the same for all temporal sub-layers in the CVS.
\\
\Option{SEIPreFilteringFilename (-sii)} &
\Option{SEIShutterIntervalPreFilename (-sii)} &
%\ShortOption{-sii} &
\Default{\NotSet} &
Specifies the file name of pre-filtered video. If empty, not output video.
Specifies the file name of pre-processed video with shutter interval info SEI message. If empty, not output video.
\\
\end{OptionTableNoShorthand}
......
......@@ -87,7 +87,7 @@ Bool TAppDecCfg::parseCfg( Int argc, TChar* argv[] )
("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n")
("SEIColourRemappingInfoFilename", m_colourRemapSEIFileName, string(""), "Colour Remapping YUV output file name. If empty, no remapping is applied (ignore SEI message)\n")
#if SHUTTER_INTERVAL_SEI_PROCESSING
("SEIPostFilteringFilename,-sii", m_postFilterVideoFileName, string(""), "Post Filtering with Shutter Interval SEI. If empty, no filtering is applied (ignore SEI message)\n")
("SEIShutterIntervalPostFilename,-sii", m_shutterIntervalPostFileName, string(""), "Post Filtering with Shutter Interval SEI. If empty, no filtering is applied (ignore SEI message)\n")
#endif
("SEIAnnotatedRegionsInfoFilename", m_annotatedRegionsSEIFileName, string(""), "Annotated regions output file name. If empty, no object information will be saved (ignore SEI message)\n")
#if O0043_BEST_EFFORT_DECODING
......
......@@ -67,7 +67,7 @@ protected:
Bool m_decodedNoDisplaySEIEnabled; ///< Enable(true)/disable(false) writing only pictures that get displayed based on the no display SEI message
std::string m_colourRemapSEIFileName; ///< output Colour Remapping file name
#if SHUTTER_INTERVAL_SEI_PROCESSING
std::string m_postFilterVideoFileName; ///< output Post Filtering file name
std::string m_shutterIntervalPostFileName; ///< output Post Filtering file name
#endif
std::string m_annotatedRegionsSEIFileName; ///< annotated regions file name
std::vector<Int> m_targetDecLayerIdSet; ///< set of LayerIds to be included in the sub-bitstream extraction process.
......@@ -93,7 +93,7 @@ public:
, m_decodedNoDisplaySEIEnabled(false)
, m_colourRemapSEIFileName()
#if SHUTTER_INTERVAL_SEI_PROCESSING
, m_postFilterVideoFileName()
, m_shutterIntervalPostFileName()
#endif
, m_annotatedRegionsSEIFileName()
, m_targetDecLayerIdSet()
......
......@@ -70,7 +70,7 @@ Void TAppDecTop::destroy()
m_bitstreamFileName.clear();
m_reconFileName.clear();
#if SHUTTER_INTERVAL_SEI_PROCESSING
m_postFilterVideoFileName.clear();
m_shutterIntervalPostFileName.clear();
#endif
}
......@@ -252,7 +252,7 @@ Void TAppDecTop::decode()
setShutterFilterFlag(numUnitsLFR == 2 * numUnitsHFR);
}
}
if ((!m_postFilterVideoFileName.empty()) && (!openedPostFile) && getShutterFilterFlag())
if ((!m_shutterIntervalPostFileName.empty()) && (!openedPostFile) && getShutterFilterFlag())
{
const BitDepths &bitDepths = pcListPic->front()->getPicSym()->getSPS().getBitDepths(); // use bit depths of first reconstructed picture.
for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++)
......@@ -263,14 +263,14 @@ Void TAppDecTop::decode()
}
}
std::ofstream ofile(m_postFilterVideoFileName.c_str());
std::ofstream ofile(m_shutterIntervalPostFileName.c_str());
if (!ofile.good() || !ofile.is_open())
{
fprintf(stderr, "\nUnable to open file '%s' for writing shutter-interval-SEI video\n", m_postFilterVideoFileName.c_str());
fprintf(stderr, "\nUnable to open file '%s' for writing shutter-interval-SEI video\n", m_shutterIntervalPostFileName.c_str());
exit(EXIT_FAILURE);
}
m_cTVideoIOYuvPostFile.open(m_postFilterVideoFileName, true, m_outputBitDepth, m_outputBitDepth, bitDepths.recon); // write mode
m_cTVideoIOYuvSIIPostFile.open(m_shutterIntervalPostFileName, true, m_outputBitDepth, m_outputBitDepth, bitDepths.recon); // write mode
openedPostFile = true;
}
#endif
......@@ -331,9 +331,9 @@ Void TAppDecTop::xDestroyDecLib()
m_cTVideoIOYuvReconFile.close();
}
#if SHUTTER_INTERVAL_SEI_PROCESSING
if (!m_postFilterVideoFileName.empty() && getShutterFilterFlag())
if (!m_shutterIntervalPostFileName.empty() && getShutterFilterFlag())
{
m_cTVideoIOYuvPostFile.close();
m_cTVideoIOYuvSIIPostFile.close();
}
#endif
......@@ -538,14 +538,14 @@ Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, UInt tId )
}
#if SHUTTER_INTERVAL_SEI_PROCESSING
if (!m_postFilterVideoFileName.empty() && getShutterFilterFlag())
if (!m_shutterIntervalPostFileName.empty() && getShutterFilterFlag())
{
pcPic->xOutputPostFilteredPic(pcPic, pcListPic);
const Window &conf = pcPic->getConformanceWindow();
const Window defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
m_cTVideoIOYuvPostFile.write( pcPic->getPicYuvPostRec(),
m_cTVideoIOYuvSIIPostFile.write( pcPic->getPicYuvPostRec(),
m_outputColourSpaceConvert,
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
......@@ -674,14 +674,14 @@ Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic )
}
#if SHUTTER_INTERVAL_SEI_PROCESSING
if (!m_postFilterVideoFileName.empty() && getShutterFilterFlag())
if (!m_shutterIntervalPostFileName.empty() && getShutterFilterFlag())
{
pcPic->xOutputPostFilteredPic(pcPic, pcListPic);
const Window &conf = pcPic->getConformanceWindow();
const Window defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
m_cTVideoIOYuvPostFile.write( pcPic->getPicYuvPostRec(),
m_cTVideoIOYuvSIIPostFile.write( pcPic->getPicYuvPostRec(),
m_outputColourSpaceConvert,
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
......
......@@ -63,8 +63,8 @@ private:
TDecTop m_cTDecTop; ///< decoder class
TVideoIOYuv m_cTVideoIOYuvReconFile; ///< reconstruction YUV class
#if SHUTTER_INTERVAL_SEI_PROCESSING
bool m_ShutterFilterEnable; ///< enable Post-processing with Shutter Interval SEI
TVideoIOYuv m_cTVideoIOYuvPostFile; ///< post-filtered YUV class
Bool m_ShutterFilterEnable; ///< enable Post-processing with Shutter Interval SEI
TVideoIOYuv m_cTVideoIOYuvSIIPostFile; ///< post-filtered YUV class
#endif
// for output control
......
......@@ -782,7 +782,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
("BitstreamFile,b", m_bitstreamFileName, string(""), "Bitstream output file name")
("ReconFile,o", m_reconFileName, string(""), "Reconstructed YUV output file name")
#if SHUTTER_INTERVAL_SEI_PROCESSING
("SEIPreFilteringFilename,-sii", m_preFilterVideoFileName, string(""), "File name of Pre-Filtering video. If empty, not output video\n")
("SEIShutterIntervalPreFilename,-sii", m_shutterIntervalPreFileName, string(""), "File name of Pre-Filtering video. If empty, not output video\n")
#endif
("SourceWidth,-wdt", m_iSourceWidth, 0, "Source picture width")
("SourceHeight,-hgt", m_iSourceHeight, 0, "Source picture height")
......@@ -3103,9 +3103,9 @@ Void TAppEncCfg::xPrintParameter()
printf("Bitstream File : %s\n", m_bitstreamFileName.c_str() );
printf("Reconstruction File : %s\n", m_reconFileName.c_str() );
#if SHUTTER_INTERVAL_SEI_PROCESSING
if (m_ShutterFilterEnable && !m_preFilterVideoFileName.empty())
if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty())
{
printf("Pre-Filtering File : %s\n", m_preFilterVideoFileName.c_str());
printf("SII Pre-processed File : %s\n", m_shutterIntervalPreFileName.c_str());
}
#endif
printf("Real Format : %dx%d %gHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, (Double)m_iFrameRate/m_temporalSubsampleRatio );
......
......@@ -75,8 +75,8 @@ protected:
std::string m_bitstreamFileName; ///< output bitstream file
std::string m_reconFileName; ///< output reconstruction file
#if SHUTTER_INTERVAL_SEI_PROCESSING
bool m_ShutterFilterEnable; ///< enable Pre-Filtering with Shutter Interval SEI
std::string m_preFilterVideoFileName; ///< output Pre-Filtering video
Bool m_ShutterFilterEnable; ///< enable Pre-Filtering with Shutter Interval SEI
std::string m_shutterIntervalPreFileName; ///< output Pre-Filtering video
#endif
// Lambda modifiers
......
......@@ -550,9 +550,9 @@ Void TAppEncTop::xCreateLib()
m_cTVideoIOYuvReconFile.open(m_reconFileName, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode
}
#if SHUTTER_INTERVAL_SEI_PROCESSING
if (m_ShutterFilterEnable && !m_preFilterVideoFileName.empty())
if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty())
{
m_cTVideoIOYuvPreFile.open(m_preFilterVideoFileName, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode
m_cTVideoIOYuvSIIPreFile.open(m_shutterIntervalPreFileName, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode
}
#endif
......@@ -566,9 +566,9 @@ Void TAppEncTop::xDestroyLib()
m_cTVideoIOYuvInputFile.close();
m_cTVideoIOYuvReconFile.close();
#if SHUTTER_INTERVAL_SEI_PROCESSING
if (m_ShutterFilterEnable && !m_preFilterVideoFileName.empty())
if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty())
{
m_cTVideoIOYuvPreFile.close();
m_cTVideoIOYuvSIIPreFile.close();
}
#endif
......@@ -696,9 +696,9 @@ Void TAppEncTop::encode()
}
#if SHUTTER_INTERVAL_SEI_PROCESSING
if (m_ShutterFilterEnable && !m_preFilterVideoFileName.empty())
if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty())
{
m_cTVideoIOYuvPreFile.write(pcPicYuvOrg, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom,
m_cTVideoIOYuvSIIPreFile.write(pcPicYuvOrg, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom,
NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range);
}
#endif
......
......@@ -62,7 +62,7 @@ private:
TVideoIOYuv m_cTVideoIOYuvInputFile; ///< input YUV file
TVideoIOYuv m_cTVideoIOYuvReconFile; ///< output reconstruction file
#if SHUTTER_INTERVAL_SEI_PROCESSING
TVideoIOYuv m_cTVideoIOYuvPreFile; ///< output pre-filtered file
TVideoIOYuv m_cTVideoIOYuvSIIPreFile; ///< output pre-filtered file
#endif
TComList<TComPicYuv*> m_cListPicYuvRec; ///< list of reconstruction YUV files
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment