diff --git a/source/App/DecoderApp/DecApp.cpp b/source/App/DecoderApp/DecApp.cpp index 4f30f36797f7163518e6d4e56dfb46f81b808d22..b3d35f1a3ec65d4400939cc9df274587b30dbd62 100644 --- a/source/App/DecoderApp/DecApp.cpp +++ b/source/App/DecoderApp/DecApp.cpp @@ -150,11 +150,9 @@ uint32_t DecApp::decode() bool bPicSkipped = false; -#if JVET_Z0120_SII_SEI_PROCESSING bool openedPostFile = false; setShutterFilterFlag(!m_shutterIntervalPostFileName.empty()); // not apply shutter interval SEI processing if filename is not specified. m_cDecLib.setShutterFilterFlag(getShutterFilterFlag()); -#endif bool isEosPresentInPu = false; bool isEosPresentInLastPu = false; @@ -578,7 +576,6 @@ uint32_t DecApp::decode() xOutputAnnotatedRegions(pcListPic); } -#if JVET_Z0120_SII_SEI_PROCESSING PicList::iterator iterPic = pcListPic->begin(); Picture* pcPic = *(iterPic); SEIMessages shutterIntervalInfo = getSeisByType(pcPic->SEIs, SEI::PayloadType::SHUTTER_INTERVAL_INFO); @@ -744,7 +741,6 @@ uint32_t DecApp::decode() openedPostFile = true; } } -#endif // write reconstruction to file if( bNewPicture ) @@ -844,12 +840,10 @@ uint32_t DecApp::decode() xFlushOutput( pcListPic ); -#if JVET_Z0120_SII_SEI_PROCESSING if (!m_shutterIntervalPostFileName.empty() && getShutterFilterFlag()) { m_cTVideoIOYuvSIIPostFile.close(); } -#endif // get the number of checksum errors uint32_t nRet = m_cDecLib.getNumberOfChecksumErrorsDetected(); @@ -1157,7 +1151,6 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId ) } -#if JVET_Z0120_SII_SEI_PROCESSING if (!m_shutterIntervalPostFileName.empty() && getShutterFilterFlag()) { int blendingRatio = getBlendingRatio(); @@ -1176,7 +1169,6 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId ) conf.getWindowBottomOffset() * SPS::getWinUnitY(chromaFormatIdc), ChromaFormat::UNDEFINED, m_clipOutputVideoToRec709Range); } -#endif // Perform CTI on decoded frame and write to output CTI file if (!m_SEICTIFileName.empty()) @@ -1373,7 +1365,6 @@ void DecApp::xFlushOutput( PicList* pcListPic, const int layerId ) } } -#if JVET_Z0120_SII_SEI_PROCESSING if (!m_shutterIntervalPostFileName.empty() && getShutterFilterFlag()) { int blendingRatio = getBlendingRatio(); @@ -1392,7 +1383,6 @@ void DecApp::xFlushOutput( PicList* pcListPic, const int layerId ) conf.getWindowBottomOffset() * SPS::getWinUnitY(chromaFormatIdc), ChromaFormat::UNDEFINED, m_clipOutputVideoToRec709Range); } -#endif // Perform CTI on decoded frame and write to output CTI file if (!m_SEICTIFileName.empty()) @@ -1429,11 +1419,7 @@ void DecApp::xFlushOutput( PicList* pcListPic, const int layerId ) } pcPic->neededForOutput = false; } -#if JVET_Z0120_SII_SEI_PROCESSING if (pcPic != nullptr && (m_shutterIntervalPostFileName.empty() || !getShutterFilterFlag())) -#else - if(pcPic != nullptr) -#endif { pcPic->destroy(); delete pcPic; diff --git a/source/App/DecoderApp/DecApp.h b/source/App/DecoderApp/DecApp.h index 887ee7ced8ae2174c60e40c7306a60fdd5e79fe2..6636fab5c8cd2056c99a928450121ce7d12bddaa 100644 --- a/source/App/DecoderApp/DecApp.h +++ b/source/App/DecoderApp/DecApp.h @@ -64,7 +64,6 @@ private: std::unordered_map<int, VideoIOYuv> m_videoIOYuvSEIFGSFile; ///< reconstruction YUV with FGS class std::unordered_map<int, VideoIOYuv> m_cVideoIOYuvSEICTIFile; ///< reconstruction YUV with CTI class -#if JVET_Z0120_SII_SEI_PROCESSING bool m_ShutterFilterEnable; ///< enable Post-processing with Shutter Interval SEI VideoIOYuv m_cTVideoIOYuvSIIPostFile; ///< post-filtered YUV class int m_SII_BlendingRatio; @@ -78,7 +77,6 @@ private: std::map<uint32_t, IdrSiiInfo> m_activeSiiInfo; -#endif // for output control int m_iPOCLastDisplay; ///< last POC in display order @@ -101,12 +99,10 @@ public: virtual ~DecApp () {} uint32_t decode (); ///< main decoding function -#if JVET_Z0120_SII_SEI_PROCESSING bool getShutterFilterFlag() const { return m_ShutterFilterEnable; } void setShutterFilterFlag(bool value) { m_ShutterFilterEnable = value; } int getBlendingRatio() const { return m_SII_BlendingRatio; } void setBlendingRatio(int value) { m_SII_BlendingRatio = value; } -#endif private: void xCreateDecLib (); ///< create internal classes diff --git a/source/App/DecoderApp/DecAppCfg.cpp b/source/App/DecoderApp/DecAppCfg.cpp index b24476cd80709ab3db6023ee7e66b0f36bbd368d..f388a0cb49031d899b7952697a8cf9785de8c75a 100644 --- a/source/App/DecoderApp/DecAppCfg.cpp +++ b/source/App/DecoderApp/DecAppCfg.cpp @@ -89,9 +89,7 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) ("OutputColourSpaceConvert", outputColourSpaceConvert, std::string(""), "Colour space conversion to apply to input 444 video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(false)) ("MaxTemporalLayer,t", m_maxTemporalLayer, TL_UNDEFINED, "Maximum Temporal Layer to be decoded. -1 to decode all layers") ("TargetOutputLayerSet,p", m_targetOlsIdx, 500, "Target output layer set index") -#if JVET_Z0120_SII_SEI_PROCESSING ("SEIShutterIntervalPostFilename,-sii", m_shutterIntervalPostFileName, std::string(""), "Post Filtering with Shutter Interval SEI. If empty, no filtering is applied (ignore SEI message)\n") -#endif ("SEIDecodedPictureHash,-dph", m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n" "\t1: check hash in SEI messages if available in the bitstream\n" "\t0: ignore SEI message") diff --git a/source/App/DecoderApp/DecAppCfg.h b/source/App/DecoderApp/DecAppCfg.h index cbacfa747d8f2a19da98e388176f1e404812954b..e57f63ceb519df1ff5ad790d568c15afdacbb602 100644 --- a/source/App/DecoderApp/DecAppCfg.h +++ b/source/App/DecoderApp/DecAppCfg.h @@ -84,9 +84,7 @@ protected: std::string m_outputDecoded360SEIMessagesFilename; ///< filename to output decoded 360 SEI messages to. #endif -#if JVET_Z0120_SII_SEI_PROCESSING std::string m_shutterIntervalPostFileName; ///< output Post Filtering file name -#endif bool m_clipOutputVideoToRec709Range; ///< If true, clip the output video to the Rec 709 range on saving. bool m_packedYUVMode; ///< If true, output 10-bit and 12-bit YUV data as 5-byte and 3-byte (respectively) packed YUV data diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 1eed7c14de50a19d4227aac305753f299cf5dae6..5f66613053a670f05c2eeb2a4d84594d2de2ced6 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -1179,10 +1179,8 @@ void EncApp::xInitLibCfg( int layerIdx ) m_cEncLib.setDriSEIDisparityRefViewId (m_driSEIDisparityRefViewId); m_cEncLib.setDriSEINonlinearNumMinus1 (m_driSEINonlinearNumMinus1); m_cEncLib.setDriSEINonlinearModel (m_driSEINonlinearModel); -#if JVET_Z0120_SII_SEI_PROCESSING m_cEncLib.setShutterFilterFlag(m_ShutterFilterEnable); m_cEncLib.setBlendingRatioSII(m_SII_BlendingRatio); -#endif m_cEncLib.setNNPostFilterSEICharacteristicsEnabled (m_nnPostFilterSEICharacteristicsEnabled); m_cEncLib.setNNPostFilterSEICharacteristicsUseSuffixSEI (m_nnPostFilterSEICharacteristicsUseSuffixSEI); m_cEncLib.setNNPostFilterSEICharacteristicsNumFilters (m_nnPostFilterSEICharacteristicsNumFilters); @@ -1532,12 +1530,10 @@ void EncApp::xCreateLib( std::list<PelUnitBuf*>& recBufList, const int layerId ) m_cVideoIOYuvReconFile.open( reconFileName, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth ); // write mode } -#if JVET_Z0120_SII_SEI_PROCESSING if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty()) { m_cTVideoIOYuvSIIPreFile.open(m_shutterIntervalPreFileName, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode } -#endif // create the encoder m_cEncLib.create( layerId ); @@ -1553,12 +1549,10 @@ void EncApp::xDestroyLib() // Video I/O m_cVideoIOYuvInputFile.close(); m_cVideoIOYuvReconFile.close(); -#if JVET_Z0120_SII_SEI_PROCESSING if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty()) { m_cTVideoIOYuvSIIPreFile.close(); } -#endif // Neo Decoder m_cEncLib.destroy(); @@ -1818,7 +1812,6 @@ bool EncApp::encodePrep( bool& eos ) ); } -#if JVET_Z0120_SII_SEI_PROCESSING if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty()) { m_cTVideoIOYuvSIIPreFile.write(m_orgPic->get(COMPONENT_Y).width, m_orgPic->get(COMPONENT_Y).height, *m_orgPic, @@ -1826,7 +1819,6 @@ bool EncApp::encodePrep( bool& eos ) m_confWinTop, m_confWinBottom, ChromaFormat::UNDEFINED, m_clipOutputVideoToRec709Range); } -#endif return keepDoing; } diff --git a/source/App/EncoderApp/EncApp.h b/source/App/EncoderApp/EncApp.h index d9b35e91b927b327f3ba77b86eaf21f0990b42a3..a2adc7904ff7365c6f967bb1e7eb1e9f84385c86 100644 --- a/source/App/EncoderApp/EncApp.h +++ b/source/App/EncoderApp/EncApp.h @@ -71,9 +71,7 @@ private: EncLib m_cEncLib; ///< encoder class VideoIOYuv m_cVideoIOYuvInputFile; ///< input YUV file VideoIOYuv m_cVideoIOYuvReconFile; ///< output reconstruction file -#if JVET_Z0120_SII_SEI_PROCESSING VideoIOYuv m_cTVideoIOYuvSIIPreFile; ///< output pre-filtered file -#endif int m_frameRcvd; ///< number of received frames uint32_t m_essentialBytes; uint32_t m_totalBytes; diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 614f79c7a292b3ac6f5556d698d6cbf45cf76947..c17b69a2dbc781cdc313eadd43a6c906dc28531e 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -777,9 +777,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("InputPathPrefix,-ipp", inputPathPrefix, std::string(""), "pathname to prepend to input filename") ("BitstreamFile,b", m_bitstreamFileName, std::string(""), "Bitstream output file name") ("ReconFile,o", m_reconFileName, std::string(""), "Reconstructed YUV output file name") -#if JVET_Z0120_SII_SEI_PROCESSING ("SEIShutterIntervalPreFilename,-sii", m_shutterIntervalPreFileName, std::string(""), "File name of Pre-Filtering video. If empty, not output video\n") -#endif ("SourceWidth,-wdt", m_sourceWidth, 0, "Source picture width") ("SourceHeight,-hgt", m_sourceHeight, 0, "Source picture height") ("SourceScalingRatioHor", m_sourceScalingRatioHor, 1.0, "Source picture horizontal scaling ratio") @@ -3485,9 +3483,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #endif // ENABLE_QPA -#if JVET_Z0120_SII_SEI_PROCESSING m_ShutterFilterEnable = false; -#endif if (m_siiSEIEnabled) { assert(m_siiSEITimeScale >= 0 && m_siiSEITimeScale <= MAX_UINT); @@ -3507,7 +3503,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) m_siiSEINumUnitsInShutterInterval = cfg_siiSEIInputNumUnitsInSI.values[0]; assert(m_siiSEINumUnitsInShutterInterval >= 0 && m_siiSEINumUnitsInShutterInterval <= MAX_UINT); } -#if JVET_Z0120_SII_SEI_PROCESSING uint32_t siiMaxSubLayersMinus1 = sii_max_sub_layers - 1; int blending_ratio = (m_siiSEISubLayerNumUnitsInSI[0] / m_siiSEISubLayerNumUnitsInSI[siiMaxSubLayersMinus1]); @@ -3561,7 +3556,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) { printf("Warning: SII-processing is applied for multiple shutter intervals and number of LFR units should be 2 times of number of HFR units\n"); } -#endif } @@ -5074,12 +5068,10 @@ bool EncAppCfg::xCheckParameter() } } -#if JVET_Z0120_SII_SEI_PROCESSING if (m_siiSEIEnabled && m_ShutterFilterEnable) { xConfirmPara(m_maxTempLayer == 1 || m_maxDecPicBuffering[0] == 1,"Shutter Interval SEI message processing is disabled for single TempLayer and single frame in DPB\n"); } -#endif if (m_nnPostFilterSEICharacteristicsEnabled) { @@ -5216,12 +5208,10 @@ void EncAppCfg::xPrintParameter() msg( DETAILS, "Input File : %s\n", m_inputFileName.c_str() ); msg( DETAILS, "Bitstream File : %s\n", m_bitstreamFileName.c_str() ); msg( DETAILS, "Reconstruction File : %s\n", m_reconFileName.c_str() ); -#if JVET_Z0120_SII_SEI_PROCESSING if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty()) { msg(DETAILS,"SII Pre-processed File : %s\n", m_shutterIntervalPreFileName.c_str()); } -#endif msg(DETAILS, "Real Format : %dx%d %gHz\n", m_sourceWidth - m_confWinLeft - m_confWinRight, m_sourceHeight - m_confWinTop - m_confWinBottom, m_frameRate.getFloatVal() / m_temporalSubsampleRatio); msg(DETAILS, "Internal Format : %dx%d %gHz\n", m_sourceWidth, m_sourceHeight, diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index de57b93262551bd29080f3abb8f28094df77bbe5..f394845beec27faaffae7820aa2e3888755c38ac 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -907,12 +907,10 @@ protected: uint32_t m_siiSEINumUnitsInShutterInterval; uint32_t m_siiSEITimeScale; std::vector<uint32_t> m_siiSEISubLayerNumUnitsInSI; -#if JVET_Z0120_SII_SEI_PROCESSING bool m_ShutterFilterEnable; ///< enable Pre-Filtering with Shutter Interval SEI std::string m_shutterIntervalPreFileName; ///< output Pre-Filtering video int m_SII_BlendingRatio; void setBlendingRatioSII(int value) { m_SII_BlendingRatio = value; } -#endif #if GREEN_METADATA_SEI_ENABLED public: std::string getGMFAFile (); diff --git a/source/Lib/CommonLib/CodingStructure.h b/source/Lib/CommonLib/CodingStructure.h index 351e55d512145a0d7f132772fd00304e15dd40eb..63b98841773a0bc574ef4b7bc0b01c01d3b34e3e 100644 --- a/source/Lib/CommonLib/CodingStructure.h +++ b/source/Lib/CommonLib/CodingStructure.h @@ -63,9 +63,7 @@ enum PictureType PIC_ORIGINAL_INPUT, PIC_TRUE_ORIGINAL_INPUT, PIC_FILTERED_ORIGINAL_INPUT, -#if JVET_Z0120_SII_SEI_PROCESSING PIC_YUV_POST_REC, -#endif NUM_PIC_TYPES }; extern XuPool g_xuPool; diff --git a/source/Lib/CommonLib/CommonDef.h b/source/Lib/CommonLib/CommonDef.h index 7d01ee5c274ead6ae99d4aa92882269d157e0bf7..52698cd9c704b9c8704768fb5794ff653f58c16d 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -574,10 +574,8 @@ static constexpr int CBF_MASK_CBCR = CBF_MASK_CB | CBF_MASK_CR; static const uint32_t MAX_NNPFA_ID = 0xfffffffe; // Maximum supported nnpfa_id static const uint32_t MAX_NNPFC_ID = 0xfffffffe; // Maximum supported nnpfc_id -#if JVET_Z0120_SII_SEI_PROCESSING static constexpr double SII_PF_W2 = 0.6; // weight for current picture static constexpr double SII_PF_W1 = 0.4; // weight for previous picture , it must be equal to 1.0 - SII_PF_W2 -#endif // ==================================================================================================================== // Macro functions // ==================================================================================================================== diff --git a/source/Lib/CommonLib/Picture.cpp b/source/Lib/CommonLib/Picture.cpp index b6dfb695ba7d2cbf6cce554287a3cf514ec2180f..d4a51a7abf0b118cb31855245132833a5fdaec0f 100644 --- a/source/Lib/CommonLib/Picture.cpp +++ b/source/Lib/CommonLib/Picture.cpp @@ -77,11 +77,7 @@ Picture::Picture() m_grainBuf = nullptr; } -#if JVET_Z0120_SII_SEI_PROCESSING void Picture::create( const ChromaFormat &_chromaFormat, const Size &size, const unsigned _maxCUSize, const unsigned _margin, const bool _decoder, const int _layerId, const bool enablePostFilteringForHFR, const bool gopBasedTemporalFilterEnabled, const bool fgcSEIAnalysisEnabled) -#else -void Picture::create( const ChromaFormat &_chromaFormat, const Size &size, const unsigned _maxCUSize, const unsigned _margin, const bool _decoder, const int _layerId, const bool gopBasedTemporalFilterEnabled, const bool fgcSEIAnalysisEnabled ) -#endif { layerId = _layerId; UnitArea::operator=( UnitArea( _chromaFormat, Area( Position{ 0, 0 }, size ) ) ); @@ -90,12 +86,10 @@ void Picture::create( const ChromaFormat &_chromaFormat, const Size &size, const M_BUFS( 0, PIC_RECONSTRUCTION ).create( _chromaFormat, a, _maxCUSize, margin, MEMORY_ALIGN_DEF_SIZE ); M_BUFS( 0, PIC_RECON_WRAP ).create( _chromaFormat, a, _maxCUSize, margin, MEMORY_ALIGN_DEF_SIZE ); -#if JVET_Z0120_SII_SEI_PROCESSING if (enablePostFilteringForHFR) { M_BUFS(0, PIC_YUV_POST_REC).create(_chromaFormat, a, _maxCUSize, margin, MEMORY_ALIGN_DEF_SIZE); } -#endif if( !_decoder ) { @@ -230,10 +224,8 @@ const CPelUnitBuf Picture::getRecoBuf(const UnitArea &unit, bool wrap) const PelUnitBuf Picture::getRecoBuf(bool wrap) { return M_BUFS(scheduler.getSplitPicId(), wrap ? PIC_RECON_WRAP : PIC_RECONSTRUCTION); } const CPelUnitBuf Picture::getRecoBuf(bool wrap) const { return M_BUFS(scheduler.getSplitPicId(), wrap ? PIC_RECON_WRAP : PIC_RECONSTRUCTION); } -#if JVET_Z0120_SII_SEI_PROCESSING PelUnitBuf Picture::getPostRecBuf() { return M_BUFS(scheduler.getSplitPicId(), PIC_YUV_POST_REC); } const CPelUnitBuf Picture::getPostRecBuf() const { return M_BUFS(scheduler.getSplitPicId(), PIC_YUV_POST_REC); } -#endif void Picture::finalInit( const VPS* vps, const SPS& sps, const PPS& pps, PicHeader *picHeader, APS** alfApss, APS* lmcsAps, APS* scalingListAps ) { @@ -1487,7 +1479,6 @@ PelUnitBuf Picture::getDisplayBuf() } -#if JVET_Z0120_SII_SEI_PROCESSING void Picture::copyToPic(const SPS *sps, PelStorage *pcPicYuvSrc, PelStorage *pcPicYuvDst) { const ChromaFormat chromaFormatIdc = sps->getChromaFormatIdc(); @@ -1735,7 +1726,6 @@ void Picture::xOutputPreFilteredPic(Picture* pcPic, PicList* pcListPic, int blen } } } -#endif void Picture::copyAlfData(const Picture &p) { diff --git a/source/Lib/CommonLib/Picture.h b/source/Lib/CommonLib/Picture.h index 278bbd8eb817a5723ca52d671d6632fe1e74e5b7..c6f8936570d7c5136cb357613904d9dba14cc6fb 100644 --- a/source/Lib/CommonLib/Picture.h +++ b/source/Lib/CommonLib/Picture.h @@ -72,11 +72,7 @@ struct Picture : public UnitArea uint32_t margin; Picture(); -#if JVET_Z0120_SII_SEI_PROCESSING void create(const ChromaFormat &_chromaFormat, const Size &size, const unsigned _maxCUSize, const unsigned margin, const bool bDecoder, const int layerId, const bool enablePostFilteringForHFR, const bool gopBasedTemporalFilterEnabled = false, const bool fgcSEIAnalysisEnabled = false); -#else - void create(const ChromaFormat &_chromaFormat, const Size &size, const unsigned _maxCUSize, const unsigned margin, const bool bDecoder, const int layerId, const bool gopBasedTemporalFilterEnabled = false, const bool fgcSEIAnalysisEnabled = false); -#endif void destroy(); void createTempBuffers( const unsigned _maxCUSize ); @@ -96,13 +92,11 @@ struct Picture : public UnitArea SEIMessages m_nnpfcActivated; -#if JVET_Z0120_SII_SEI_PROCESSING void copyToPic(const SPS *sps, PelStorage *pcPicYuvSrc, PelStorage *pcPicYuvDst); Picture* findPrevPicPOC(Picture* pcPic, PicList* pcListPic); Picture* findNextPicPOC(Picture* pcPic, PicList* pcListPic); void xOutputPostFilteredPic(Picture* pcPic, PicList* pcListPic, int blendingRatio); void xOutputPreFilteredPic(Picture* pcPic, PicList* pcListPic, int blendingRatio, int intraPeriod); -#endif PelBuf getOrigBuf(const CompArea &blk); const CPelBuf getOrigBuf(const CompArea &blk) const; @@ -150,10 +144,8 @@ struct Picture : public UnitArea PelUnitBuf getBuf(const UnitArea &unit, const PictureType &type); const CPelUnitBuf getBuf(const UnitArea &unit, const PictureType &type) const; -#if JVET_Z0120_SII_SEI_PROCESSING PelUnitBuf getPostRecBuf(); const CPelUnitBuf getPostRecBuf() const; -#endif void extendPicBorder( const PPS *pps ); void extendWrapBorder( const PPS *pps ); diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index f6e90156752a15badd165e4f895aa36b190aa676..fdcde15c309eb323521baa805d4919bfa2cbc859 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -3024,11 +3024,7 @@ void Slice::scaleRefPicList( Picture *scaledRefPic[ ], PicHeader *picHeader, APS scaledRefPic[j]->poc = NOT_VALID; -#if JVET_Z0120_SII_SEI_PROCESSING scaledRefPic[j]->create( sps->getChromaFormatIdc(), Size( pps->getPicWidthInLumaSamples(), pps->getPicHeightInLumaSamples() ), sps->getMaxCUWidth(), sps->getMaxCUWidth() + 16, isDecoder, layerId, false); -#else - scaledRefPic[j]->create( sps->getChromaFormatIdc(), Size( pps->getPicWidthInLumaSamples(), pps->getPicHeightInLumaSamples() ), sps->getMaxCUWidth(), sps->getMaxCUWidth() + 16, isDecoder, layerId ); -#endif } scaledRefPic[j]->poc = poc; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index b38ac8018ef6d3a6da71c22540539bb2f14627d5..bfb0f40bfc28577366bf39f39a5d56d34e8029df 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -101,11 +101,8 @@ #define JVET_O0756_CALCULATE_HDRMETRICS 1 #endif -#define JVET_Z0120_SII_SEI_PROCESSING 1 // This is an example illustration of using SII SEI messages for backwards-compatible HFR video -#if JVET_Z0120_SII_SEI_PROCESSING #define DISABLE_PRE_POST_FILTER_FOR_IDR_CRA 1 #define ENABLE_USER_DEFINED_WEIGHTS 0 // User can specify weights for both current and previous picture, such that their sum = 1 -#endif // clang-format on diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 9f9dfc50d4a3054ea5f58d073e11e4552e5b5579..d7a0ddc0ad4ecaa45c76716e0d2faf020bc162ad 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -587,12 +587,8 @@ Picture* DecLib::xGetNewPicBuffer( const SPS &sps, const PPS &pps, const uint32_ { pcPic = new Picture(); -#if JVET_Z0120_SII_SEI_PROCESSING pcPic->create(sps.getChromaFormatIdc(), Size(pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples()), sps.getMaxCUWidth(), sps.getMaxCUWidth() + PIC_MARGIN, true, layerId, getShutterFilterFlag() ); -#else - pcPic->create( sps.getChromaFormatIdc(), Size( pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples() ), sps.getMaxCUWidth(), sps.getMaxCUWidth() + PIC_MARGIN, true, layerId ); -#endif m_cListPic.push_back( pcPic ); @@ -628,11 +624,7 @@ Picture* DecLib::xGetNewPicBuffer( const SPS &sps, const PPS &pps, const uint32_ m_cListPic.push_back( pcPic ); -#if JVET_Z0120_SII_SEI_PROCESSING pcPic->create(sps.getChromaFormatIdc(), Size(pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples()), sps.getMaxCUWidth(), sps.getMaxCUWidth() + PIC_MARGIN, true, layerId, getShutterFilterFlag()); -#else - pcPic->create( sps.getChromaFormatIdc(), Size( pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples() ), sps.getMaxCUWidth(), sps.getMaxCUWidth() + PIC_MARGIN, true, layerId ); -#endif } else { @@ -640,11 +632,7 @@ Picture* DecLib::xGetNewPicBuffer( const SPS &sps, const PPS &pps, const uint32_ { pcPic->destroy(); -#if JVET_Z0120_SII_SEI_PROCESSING pcPic->create( sps.getChromaFormatIdc(), Size( pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples() ), sps.getMaxCUWidth(), sps.getMaxCUWidth() + PIC_MARGIN, true, layerId, getShutterFilterFlag()); -#else - pcPic->create( sps.getChromaFormatIdc(), Size( pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples() ), sps.getMaxCUWidth(), sps.getMaxCUWidth() + PIC_MARGIN, true, layerId ); -#endif } } diff --git a/source/Lib/DecoderLib/DecLib.h b/source/Lib/DecoderLib/DecLib.h index 44d0c43a14e4613c005555dcf88847759088faee..5da3fa671ed1db9b717cb4ce12cb2300d16de1e0 100644 --- a/source/Lib/DecoderLib/DecLib.h +++ b/source/Lib/DecoderLib/DecLib.h @@ -165,9 +165,7 @@ private: bool m_warningMessageSkipPicture; std::list<InputNALUnit*> m_prefixSEINALUs; /// Buffered up prefix SEI NAL Units. -#if JVET_Z0120_SII_SEI_PROCESSING bool m_ShutterFilterEnable; ///< enable Post-processing with Shutter Interval SEI -#endif int m_debugPOC; int m_debugCTU; @@ -357,10 +355,8 @@ public: void setFeatureAnalysisFramewise(bool b){m_GMFAFramewise = b;} #endif -#if JVET_Z0120_SII_SEI_PROCESSING bool getShutterFilterFlag() const { return m_ShutterFilterEnable; } void setShutterFilterFlag(bool value) { m_ShutterFilterEnable = value; } -#endif void applyNnPostFilter(); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 06f99adee60fd297c508024883b8d4179370a2ba..0d12353d8ed7c69f122e6d190a318f5209eb5673 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -178,10 +178,8 @@ protected: bool m_printWPSNR; bool m_printHighPrecEncTime = false; bool m_cabacZeroWordPaddingEnabled; -#if JVET_Z0120_SII_SEI_PROCESSING bool m_ShutterFilterEnable; ///< enable Pre-Filtering with Shutter Interval SEI int m_SII_BlendingRatio; -#endif bool m_gciPresentFlag; bool m_onePictureOnlyConstraintFlag; @@ -1243,13 +1241,11 @@ public: bool getCabacZeroWordPaddingEnabled() const { return m_cabacZeroWordPaddingEnabled; } void setCabacZeroWordPaddingEnabled(bool value) { m_cabacZeroWordPaddingEnabled = value; } -#if JVET_Z0120_SII_SEI_PROCESSING bool getShutterFilterFlag() const { return m_ShutterFilterEnable; } void setShutterFilterFlag(bool value) { m_ShutterFilterEnable = value; } int getBlendingRatioSII() const { return m_SII_BlendingRatio; } void setBlendingRatioSII(int value) { m_SII_BlendingRatio = value; } -#endif //====== Coding Structure ======== void setIntraPeriod (int i) { m_intraPeriod = i; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 22f1b477cfa65e5866972df4e12163b53d57680f..3f7e28d40383750e29b19aa6bbfe00abeebc26ab 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -630,14 +630,12 @@ bool EncLib::encodePrep(bool flush, PelStorage *pcPicYuvOrg, PelStorage *cPicYuv picCurr->poc = m_pocLast - 1; m_pocLast -= 2; -#if JVET_Z0120_SII_SEI_PROCESSING if (getShutterFilterFlag()) { int blendingRatio = getBlendingRatioSII(); picCurr->xOutputPreFilteredPic(picCurr, &m_cListPic, blendingRatio, m_intraPeriod); picCurr->copyToPic(sps, &picCurr->m_bufs[PIC_ORIGINAL], pcPicYuvOrg); } -#endif if( getUseAdaptiveQP() ) { @@ -872,14 +870,12 @@ bool EncLib::encodePrep(bool flush, PelStorage *pcPicYuvOrg, PelStorage *cPicYuv pcPicCurr->poc = m_pocLast; -#if JVET_Z0120_SII_SEI_PROCESSING if (getShutterFilterFlag()) { int blendingRatio = getBlendingRatioSII(); pcPicCurr->xOutputPreFilteredPic(pcPicCurr, &m_cListPic, blendingRatio, m_intraPeriod); pcPicCurr->copyToPic(pSPS, &pcPicCurr->m_bufs[PIC_ORIGINAL], pcPicYuvOrg); } -#endif // compute image characteristics if( getUseAdaptiveQP() ) @@ -1032,14 +1028,12 @@ bool EncLib::encodePrep(bool flush, PelStorage *pcPicYuvOrg, PelStorage *pcPicYu pcField->topField = isTopField; // interlaced requirement -#if JVET_Z0120_SII_SEI_PROCESSING if (getShutterFilterFlag()) { int blendingRatio = getBlendingRatioSII(); pcField->xOutputPreFilteredPic(pcField, &m_cListPic, blendingRatio, m_intraPeriod); pcField->copyToPic(pSPS, &pcField->m_bufs[PIC_ORIGINAL], pcPicYuvOrg); } -#endif // compute image characteristics if( getUseAdaptiveQP() ) @@ -1166,14 +1160,9 @@ void EncLib::xGetNewPicBuffer ( std::list<PelUnitBuf*>& rcListPicYuvRecOut, Pict { rpcPic = new Picture; bool fgAnalysisEnabled = m_fgcSEIAnalysisEnabled && m_fgcSEIExternalDenoised.empty(); -#if JVET_Z0120_SII_SEI_PROCESSING rpcPic->create(sps.getChromaFormatIdc(), Size(pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples()), sps.getMaxCUWidth(), sps.getMaxCUWidth() + PIC_MARGIN, false, m_layerId, getShutterFilterFlag(), getGopBasedTemporalFilterEnabled(), fgAnalysisEnabled); -#else - rpcPic->create( sps.getChromaFormatIdc(), Size( pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples() ), sps.getMaxCUWidth(), sps.getMaxCUWidth() + PIC_MARGIN, false, m_layerId, getGopBasedTemporalFilterEnabled() - , fgAnalysisEnabled); -#endif if (m_resChangeInClvsEnabled) {