From 9f5f7e02823dddceff0bbd9f657a557989c98347 Mon Sep 17 00:00:00 2001 From: Karsten Suehring <karsten.suehring@hhi.fraunhofer.de> Date: Wed, 27 Jul 2022 01:11:26 +0200 Subject: [PATCH] remove macro JVET_Z0244 --- source/App/EncoderApp/EncApp.cpp | 2 -- source/App/EncoderApp/EncAppCfg.cpp | 4 --- source/App/EncoderApp/EncAppCfg.h | 2 -- source/Lib/CommonLib/CommonDef.h | 2 -- source/Lib/CommonLib/SEI.cpp | 2 -- source/Lib/CommonLib/SEI.h | 4 --- source/Lib/CommonLib/TypeDef.h | 1 - source/Lib/DecoderLib/SEIread.cpp | 4 --- source/Lib/DecoderLib/SEIread.h | 4 --- source/Lib/EncoderLib/Analyze.h | 2 -- source/Lib/EncoderLib/EncCfg.h | 4 --- source/Lib/EncoderLib/EncGOP.cpp | 42 ---------------------------- source/Lib/EncoderLib/EncGOP.h | 12 -------- source/Lib/EncoderLib/SEIEncoder.cpp | 2 -- source/Lib/EncoderLib/SEIEncoder.h | 2 -- source/Lib/EncoderLib/SEIwrite.cpp | 16 ----------- source/Lib/EncoderLib/SEIwrite.h | 8 ------ 17 files changed, 113 deletions(-) diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 73b4e9caf0..6e2b2eeaf7 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -1121,7 +1121,6 @@ void EncApp::xInitLibCfg() m_cEncLib.setShutterFilterFlag(m_ShutterFilterEnable); m_cEncLib.setBlendingRatioSII(m_SII_BlendingRatio); #endif -#if JVET_Z0244 m_cEncLib.setNNPostFilterSEICharacteristicsEnabled (m_nnPostFilterSEICharacteristicsEnabled); m_cEncLib.setNNPostFilterSEICharacteristicsNumFilters (m_nnPostFilterSEICharacteristicsNumFilters); for (int i = 0; i < m_nnPostFilterSEICharacteristicsNumFilters; i++) @@ -1154,7 +1153,6 @@ void EncApp::xInitLibCfg() } m_cEncLib.setNnPostFilterSEIActivationEnabled (m_nnPostFilterSEIActivationEnabled); m_cEncLib.setNnPostFilterSEIActivationId (m_nnPostFilterSEIActivationId); -#endif m_cEncLib.setEntropyCodingSyncEnabledFlag ( m_entropyCodingSyncEnabledFlag ); m_cEncLib.setEntryPointPresentFlag ( m_entryPointPresentFlag ); m_cEncLib.setTMVPModeId ( m_TMVPModeId ); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 75fe63c7a7..f3d967b224 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1662,7 +1662,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) opts.addOptions()(cOSS2.str(), m_olsPtlIdx[i], 0); } -#if JVET_Z0244 opts.addOptions()("SEINNPostFilterCharacteristicsEnabled", m_nnPostFilterSEICharacteristicsEnabled, false, "Control generation of the Neural Network Post Filter Characteristics SEI messages"); opts.addOptions()( "SEINNPostFilterCharacteristicsNumFilters", m_nnPostFilterSEICharacteristicsNumFilters, 0, "Specifies the number of Neural Network Post Filter Characteristics SEI messages" ); for (int i = 0; i < MAX_NUM_NN_POST_FILTERS; i++) @@ -1770,7 +1769,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) opts.addOptions()("SEINNPostFilterActivationEnabled", m_nnPostFilterSEIActivationEnabled, false, "Control use of the Neural Network Post Filter SEI on current picture"); opts.addOptions()("SEINNPostFilterActivationId", m_nnPostFilterSEIActivationId , 0u, "Id of the Neural Network Post Filter on current picture"); } -#endif po::setDefaults(opts); po::ErrorReporter err; @@ -4607,7 +4605,6 @@ bool EncAppCfg::xCheckParameter() } #endif -#if JVET_Z0244 if (m_nnPostFilterSEICharacteristicsEnabled) { for (int i = 0; i < m_nnPostFilterSEICharacteristicsNumFilters; i++) @@ -4635,7 +4632,6 @@ bool EncAppCfg::xCheckParameter() { xConfirmPara(m_nnPostFilterSEIActivationId > (1 << 20) - 1, "SEINNPostFilterActivationId must be in the range of 0 to 2^20-1"); } -#endif xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2"); xConfirmPara(m_log2ParallelMergeLevel > m_uiCTUSize, "Log2ParallelMergeLevel should be less than or equal to CTU size"); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index b190207321..6dcfa61134 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -732,7 +732,6 @@ protected: CfgSEISubpictureLevel m_cfgSubpictureLevelInfoSEI; -#if JVET_Z0244 bool m_nnPostFilterSEICharacteristicsEnabled; int m_nnPostFilterSEICharacteristicsNumFilters; uint32_t m_nnPostFilterSEICharacteristicsId[MAX_NUM_NN_POST_FILTERS]; @@ -762,7 +761,6 @@ protected: uint32_t m_nnPostFilterSEICharacteristicsNumKmacOperationsIdc[MAX_NUM_NN_POST_FILTERS]; bool m_nnPostFilterSEIActivationEnabled; uint32_t m_nnPostFilterSEIActivationId; -#endif bool m_constrainedRaslEncoding; diff --git a/source/Lib/CommonLib/CommonDef.h b/source/Lib/CommonLib/CommonDef.h index 10e2d56e9f..ef1a94048d 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -168,9 +168,7 @@ static constexpr int MAX_VPS_SUBLAYERS = 7; static constexpr int MAX_NUM_OLSS = 256; static constexpr int MAX_VPS_OLS_MODE_IDC = 2; -#if JVET_Z0244 static constexpr int MAX_NUM_NN_POST_FILTERS = 8; -#endif static constexpr int MIP_MAX_WIDTH = MAX_TB_SIZEY; static constexpr int MIP_MAX_HEIGHT = MAX_TB_SIZEY; diff --git a/source/Lib/CommonLib/SEI.cpp b/source/Lib/CommonLib/SEI.cpp index 28d6900bfe..f7e38c829a 100644 --- a/source/Lib/CommonLib/SEI.cpp +++ b/source/Lib/CommonLib/SEI.cpp @@ -478,10 +478,8 @@ const char *SEI::getSEIMessageString(SEI::PayloadType payloadType) case SEI::CONSTRAINED_RASL_ENCODING: return "Constrained RASL encoding"; case SEI::VDI_SEI_ENVELOPE: return "Video decoding interface SEI envelope"; case SEI::SHUTTER_INTERVAL_INFO: return "Shutter interval information"; -#if JVET_Z0244 case SEI::NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS: return "Neural network post-filter characteristics"; case SEI::NEURAL_NETWORK_POST_FILTER_ACTIVATION: return "Neural network post-filter activation"; -#endif default: return "Unknown"; } } diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 37caed90a3..2bb366284c 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -92,10 +92,8 @@ public: CONSTRAINED_RASL_ENCODING = 207, VDI_SEI_ENVELOPE = 208, SHUTTER_INTERVAL_INFO = 209, -#if JVET_Z0244 NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS = 210, NEURAL_NETWORK_POST_FILTER_ACTIVATION = 211, -#endif }; SEI() {} @@ -1063,7 +1061,6 @@ public: virtual ~SEIVDISeiEnvelope() {} }; -#if JVET_Z0244 class SEINeuralNetworkPostFilterCharacteristics : public SEI { public: @@ -1144,7 +1141,6 @@ public: uint32_t m_id; }; -#endif //! \} diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 506593623d..c8e0073f9e 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -54,7 +54,6 @@ //########### place macros to be removed in next cycle below this line ############### -#define JVET_Z0244 1 // JVET-Z0244 #define JVET_Z0047_FG_IMPROVEMENT 1 // Improvements to the film grain analysis code //########### place macros to be be kept below this line ############### diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index fb1df28c9b..ada0cd0575 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -406,7 +406,6 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType sei = new SEIShutterIntervalInfo; xParseSEIShutterInterval((SEIShutterIntervalInfo&)*sei, payloadSize, pDecodedMessageOutputStream); break; -#if JVET_Z0244 case SEI::NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS: sei = new SEINeuralNetworkPostFilterCharacteristics; xParseSEINNPostFilterCharacteristics((SEINeuralNetworkPostFilterCharacteristics&)*sei, payloadSize, pDecodedMessageOutputStream); @@ -415,7 +414,6 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType sei = new SEINeuralNetworkPostFilterActivation; xParseSEINNPostFilterActivation((SEINeuralNetworkPostFilterActivation&)*sei, payloadSize, pDecodedMessageOutputStream); break; -#endif default: for (uint32_t i = 0; i < payloadSize; i++) { @@ -2469,7 +2467,6 @@ void SEIReader::xParseSEIConstrainedRaslIndication( SEIConstrainedRaslIndication output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); } -#if JVET_Z0244 void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterCharacteristics& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream) { output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); @@ -2596,7 +2593,6 @@ void SEIReader::xParseSEINNPostFilterActivation(SEINeuralNetworkPostFilterActiva sei_read_uvlc( pDecodedMessageOutputStream, val, "nnpfa_id" ); sei.m_id =val; } -#endif #if JVET_S0257_DUMP_360SEI_MESSAGE void SeiCfgFileDump::write360SeiDump (std::string decoded360MessageFileName, SEIMessages& seis, const SPS* sps) diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h index 4df302ac31..3eb2df80a3 100644 --- a/source/Lib/DecoderLib/SEIread.h +++ b/source/Lib/DecoderLib/SEIread.h @@ -43,9 +43,7 @@ #pragma once #endif // _MSC_VER > 1000 -#if JVET_Z0244 #include <fstream> -#endif //! \ingroup DecoderLib //! \{ @@ -105,10 +103,8 @@ protected: void xParseSEIColourTransformInfo (SEIColourTransformInfo& sei, uint32_t payloadSize, std::ostream* pDecodedMessageOutputStream); void xParseSEIConstrainedRaslIndication (SEIConstrainedRaslIndication& sei, uint32_t payLoadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIShutterInterval(SEIShutterIntervalInfo& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); -#if JVET_Z0244 void xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterCharacteristics& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEINNPostFilterActivation(SEINeuralNetworkPostFilterActivation& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); -#endif void sei_read_scode(std::ostream *pOS, uint32_t length, int& code, const char *pSymbolName); void sei_read_code(std::ostream *pOS, uint32_t length, uint32_t &ruiCode, const char *pSymbolName); diff --git a/source/Lib/EncoderLib/Analyze.h b/source/Lib/EncoderLib/Analyze.h index 1ad6b6d604..126730528a 100644 --- a/source/Lib/EncoderLib/Analyze.h +++ b/source/Lib/EncoderLib/Analyze.h @@ -83,12 +83,10 @@ public: virtual ~Analyze() {} Analyze() { clear(); } -#if JVET_Z0244 void addBits(double bits) { m_dAddBits += bits; } -#endif void addResult( double psnr[MAX_NUM_COMPONENT], double bits, const double MSEyuvframe[MAX_NUM_COMPONENT], const double upscaledPSNR[MAX_NUM_COMPONENT], const double msssim[MAX_NUM_COMPONENT], bool isEncodeLtRef ) diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 7f4dfc04ed..2b879b484f 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -662,7 +662,6 @@ protected: uint32_t m_siiSEITimeScale; std::vector<uint32_t> m_siiSEISubLayerNumUnitsInSI; -#if JVET_Z0244 bool m_nnPostFilterSEICharacteristicsEnabled; int m_nnPostFilterSEICharacteristicsNumFilters; uint32_t m_nnPostFilterSEICharacteristicsId[MAX_NUM_NN_POST_FILTERS]; @@ -693,7 +692,6 @@ protected: bool m_nnPostFilterSEIActivationEnabled; uint32_t m_nnPostFilterSEIActivationId; -#endif // film grain characterstics sei bool m_fgcSEIEnabled; @@ -1770,7 +1768,6 @@ public: void setSiiSEISubLayerNumUnitsInSI(const std::vector<uint32_t>& b) { m_siiSEISubLayerNumUnitsInSI = b; } uint32_t getSiiSEISubLayerNumUnitsInSI(uint32_t idx) const { return m_siiSEISubLayerNumUnitsInSI[idx]; } -#if JVET_Z0244 void setNNPostFilterSEICharacteristicsEnabled(bool enabledFlag) { m_nnPostFilterSEICharacteristicsEnabled = enabledFlag; } bool getNNPostFilterSEICharacteristicsEnabled() const { return m_nnPostFilterSEICharacteristicsEnabled; } void setNNPostFilterSEICharacteristicsNumFilters(int numFilters) { m_nnPostFilterSEICharacteristicsNumFilters = numFilters; } @@ -1833,7 +1830,6 @@ public: bool getNnPostFilterSEIActivationEnabled() const { return m_nnPostFilterSEIActivationEnabled; } void setNnPostFilterSEIActivationId(uint32_t id) { m_nnPostFilterSEIActivationId = id; } uint32_t getNnPostFilterSEIActivationId() const { return m_nnPostFilterSEIActivationId; } -#endif void setBufferingPeriodSEIEnabled(bool b) { m_bufferingPeriodSEIEnabled = b; } bool getBufferingPeriodSEIEnabled() const { return m_bufferingPeriodSEIEnabled; } diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 2b21e10242..6cbfcb7ff4 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -514,43 +514,27 @@ void EncGOP::xWriteSEI (NalUnitType naluType, SEIMessages& seiMessages, AccessUn auPos++; } -#if JVET_Z0244 uint32_t EncGOP::xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId) -#else -void EncGOP::xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId) -#endif { // don't do anything, if we get an empty list if (seiMessages.empty()) { -#if JVET_Z0244 return 0; -#else - return; -#endif } -#if JVET_Z0244 uint32_t numBits = 0; -#endif for (SEIMessages::const_iterator sei = seiMessages.begin(); sei!=seiMessages.end(); sei++ ) { SEIMessages tmpMessages; tmpMessages.push_back(*sei); OutputNALUnit nalu( naluType, m_pcEncLib->getLayerId(), temporalId ); -#if JVET_Z0244 numBits += m_seiWriter.writeSEImessages(nalu.m_Bitstream, tmpMessages, *m_HRD, false, temporalId); -#else - m_seiWriter.writeSEImessages(nalu.m_Bitstream, tmpMessages, *m_HRD, false, temporalId); -#endif auPos = accessUnit.insert(auPos, new NALUnitEBSP(nalu)); auPos++; } -#if JVET_Z0244 return numBits; -#endif } void EncGOP::xClearSEIs(SEIMessages& seiMessages, bool deleteMessages) @@ -566,11 +550,7 @@ void EncGOP::xClearSEIs(SEIMessages& seiMessages, bool deleteMessages) } // write SEI messages as separate NAL units ordered -#if JVET_Z0244 uint32_t EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, bool testWrite) -#else -void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, bool testWrite) -#endif { AccessUnit::iterator itNalu = accessUnit.begin(); @@ -632,11 +612,7 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI // And finally everything else one by one -#if JVET_Z0244 uint32_t numBits = xWriteSEISeparately(NAL_UNIT_PREFIX_SEI, localMessages, accessUnit, itNalu, temporalId); -#else - xWriteSEISeparately(NAL_UNIT_PREFIX_SEI, localMessages, accessUnit, itNalu, temporalId); -#endif xClearSEIs(localMessages, !testWrite); if (!testWrite) @@ -644,16 +620,10 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI seiMessages.clear(); } -#if JVET_Z0244 return numBits; -#endif } -#if JVET_Z0244 uint32_t EncGOP::xWriteLeadingSEIMessages (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, std::deque<DUData> &duData) -#else -void EncGOP::xWriteLeadingSEIMessages (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, std::deque<DUData> &duData) -#endif { AccessUnit testAU; SEIMessages picTimingSEIs = getSeisByType(seiMessages, SEI::PICTURE_TIMING); @@ -667,11 +637,7 @@ void EncGOP::xWriteLeadingSEIMessages (SEIMessages& seiMessages, SEIMessages& du xUpdateTimingSEI(picTiming, duData, sps); xUpdateDuInfoSEI(duInfoSeiMessages, picTiming, sps->getMaxTLayers()); // actual writing -#if JVET_Z0244 return xWriteLeadingSEIOrdered(seiMessages, duInfoSeiMessages, accessUnit, temporalId, false); -#else - xWriteLeadingSEIOrdered(seiMessages, duInfoSeiMessages, accessUnit, temporalId, false); -#endif // testAU will automatically be cleaned up when losing scope } @@ -899,7 +865,6 @@ void EncGOP::xCreateIRAPLeadingSEIMessages (SEIMessages& seiMessages, const SPS m_seiEncoder.initSEIShutterIntervalInfo(seiShutterInterval); seiMessages.push_back(seiShutterInterval); } -#if JVET_Z0244 if (m_pcCfg->getNNPostFilterSEICharacteristicsEnabled()) { for (int i = 0; i < m_pcCfg->getNNPostFilterSEICharacteristicsNumFilters(); i++) @@ -909,7 +874,6 @@ void EncGOP::xCreateIRAPLeadingSEIMessages (SEIMessages& seiMessages, const SPS seiMessages.push_back(seiNNPostFilterCharacteristics); } } -#endif } void EncGOP::xCreatePerPictureSEIMessages (int picInGOP, SEIMessages& seiMessages, SEIMessages& nestedSeiMessages, Slice *slice) @@ -990,14 +954,12 @@ void EncGOP::xCreatePerPictureSEIMessages (int picInGOP, SEIMessages& seiMessage seiMessages.push_back(fgcSEI); } -#if JVET_Z0244 if (m_pcCfg->getNnPostFilterSEIActivationEnabled()) { SEINeuralNetworkPostFilterActivation *nnpfActivationSEI = new SEINeuralNetworkPostFilterActivation; m_seiEncoder.initSEINeuralNetworkPostFilterActivation(nnpfActivationSEI); seiMessages.push_back(nnpfActivationSEI); } -#endif } void EncGOP::xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages, const std::vector<int> &targetOLSs, const std::vector<int> &targetLayers, const std::vector<uint16_t>& subpicIDs, uint16_t maxSubpicIdInPic) @@ -4244,12 +4206,8 @@ void EncGOP::compressGOP(int pocLast, int numPicRcvd, PicList &rcListPic, std::l xCreateScalableNestingSEI(leadingSeiMessages, nestedSeiMessages, targetOLS, targetLayers, subpicIDs, maxSubpicIdInPic); } -#if JVET_Z0244 double seiBits = (double)xWriteLeadingSEIMessages( leadingSeiMessages, duInfoSeiMessages, accessUnit, pcSlice->getTLayer(), pcSlice->getSPS(), duData ); m_gcAnalyzeAll.addBits(seiBits); -#else - xWriteLeadingSEIMessages( leadingSeiMessages, duInfoSeiMessages, accessUnit, pcSlice->getTLayer(), pcSlice->getSPS(), duData ); -#endif xWriteDuSEIMessages( duInfoSeiMessages, accessUnit, pcSlice->getTLayer(), duData ); m_AUWriterIf->outputAU( accessUnit ); diff --git a/source/Lib/EncoderLib/EncGOP.h b/source/Lib/EncoderLib/EncGOP.h index d77ea23e93..c16f5a0f87 100644 --- a/source/Lib/EncoderLib/EncGOP.h +++ b/source/Lib/EncoderLib/EncGOP.h @@ -332,22 +332,10 @@ protected: void xUpdateDuInfoSEI(SEIMessages &duInfoSeiMessages, SEIPictureTiming *pictureTimingSEI, int maxSubLayers); void xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages, const std::vector<int> &targetOLSs, const std::vector<int> &targetLayers, const std::vector<uint16_t>& subpicIDs, uint16_t maxSubpicIdInPic); void xWriteSEI (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId); -#if JVET_Z0244 uint32_t xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId); -#else - void xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId); -#endif void xClearSEIs(SEIMessages& seiMessages, bool deleteMessages); -#if JVET_Z0244 uint32_t xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, bool testWrite); -#else - void xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, bool testWrite); -#endif -#if JVET_Z0244 uint32_t xWriteLeadingSEIMessages (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, std::deque<DUData> &duData); -#else - void xWriteLeadingSEIMessages (SEIMessages& seiMessages, SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, std::deque<DUData> &duData); -#endif void xWriteTrailingSEIMessages (SEIMessages& seiMessages, AccessUnit &accessUnit, int temporalId); void xWriteDuSEIMessages (SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, std::deque<DUData> &duData); diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index c9dd135631..cbfa018d74 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -1152,7 +1152,6 @@ void SEIEncoder::initSEISubpictureLevelInfo(SEISubpicureLevelInfo *sei, const SP } } -#if JVET_Z0244 void SEIEncoder::initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkPostFilterCharacteristics *sei, int filterIdx) { CHECK(!(m_isInitialized), "Unspecified error"); @@ -1234,7 +1233,6 @@ void SEIEncoder::initSEINeuralNetworkPostFilterActivation(SEINeuralNetworkPostFi CHECK(!(sei != nullptr), "Unspecified error"); sei->m_id = m_pcCfg->getNnPostFilterSEIActivationId(); } -#endif //! \} diff --git a/source/Lib/EncoderLib/SEIEncoder.h b/source/Lib/EncoderLib/SEIEncoder.h index c0e59e1f59..0c1d0809c0 100644 --- a/source/Lib/EncoderLib/SEIEncoder.h +++ b/source/Lib/EncoderLib/SEIEncoder.h @@ -91,10 +91,8 @@ public: void readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, bool &failed); void initSEIMultiviewViewPosition(SEIMultiviewViewPosition *sei); void initSEIShutterIntervalInfo(SEIShutterIntervalInfo *sei); -#if JVET_Z0244 void initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkPostFilterCharacteristics *sei, int filterIdx); void initSEINeuralNetworkPostFilterActivation(SEINeuralNetworkPostFilterActivation *sei); -#endif private: EncCfg* m_pcCfg; EncLib* m_pcEncLib; diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 909e068f7c..0d3e33c501 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -160,14 +160,12 @@ void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &h case SEI::SHUTTER_INTERVAL_INFO: xWriteSEIShutterInterval(*static_cast<const SEIShutterIntervalInfo*>(&sei)); break; -#if JVET_Z0244 case SEI::NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS: xWriteSEINeuralNetworkPostFilterCharacteristics(*static_cast<const SEINeuralNetworkPostFilterCharacteristics*>(&sei)); break; case SEI::NEURAL_NETWORK_POST_FILTER_ACTIVATION: xWriteSEINeuralNetworkPostFilterActivation(*static_cast<const SEINeuralNetworkPostFilterActivation*>(&sei)); break; -#endif default: THROW("Trying to write unhandled SEI message"); break; @@ -178,20 +176,14 @@ void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &h /** * marshal all SEI messages in provided list into one bitstream bs */ -#if JVET_Z0244 uint32_t SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, HRD &hrd, bool isNested, const uint32_t temporalId) -#else -void SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, HRD &hrd, bool isNested, const uint32_t temporalId) -#endif { #if ENABLE_TRACING if (g_HLSTraceEnable) xTraceSEIHeader(); #endif -#if JVET_Z0244 uint32_t numBits = 0; -#endif OutputBitstream bs_count; @@ -213,9 +205,7 @@ void SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList uint32_t payload_data_num_bits = bs_count.getNumberOfWrittenBits(); CHECK(0 != payload_data_num_bits % 8, "Invalid number of payload data bits"); -#if JVET_Z0244 numBits += payload_data_num_bits; -#endif setBitstream(&bs); uint32_t payloadType = (*sei)->payloadType(); @@ -225,9 +215,7 @@ void SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList } WRITE_CODE(payloadType, 8, "payload_type"); -#if JVET_Z0244 numBits += 8; -#endif uint32_t payloadSize = payload_data_num_bits/8; for (; payloadSize >= 0xff; payloadSize -= 0xff) @@ -249,9 +237,7 @@ void SEIWriter::writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList xWriteRbspTrailingBits(); } -#if JVET_Z0244 return numBits; -#endif } /** @@ -1407,7 +1393,6 @@ void SEIWriter::xWriteSEIConstrainedRaslIndication(const SEIConstrainedRaslIndic // intentionally empty } -#if JVET_Z0244 void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralNetworkPostFilterCharacteristics &sei) { WRITE_UVLC(sei.m_id, "nnpfc_id"); @@ -1484,5 +1469,4 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterActivation(const SEINeuralNetwor { WRITE_UVLC(sei.m_id, "nnpfa_id"); } -#endif //! \} diff --git a/source/Lib/EncoderLib/SEIwrite.h b/source/Lib/EncoderLib/SEIwrite.h index eabda01fd0..519a679a47 100644 --- a/source/Lib/EncoderLib/SEIwrite.h +++ b/source/Lib/EncoderLib/SEIwrite.h @@ -36,9 +36,7 @@ #ifndef __SEIWRITE__ #define __SEIWRITE__ -#if JVET_Z0244 #include <fstream> -#endif #include "VLCWriter.h" #include "CommonLib/SEI.h" @@ -53,11 +51,7 @@ public: SEIWriter() {}; virtual ~SEIWriter() {}; -#if JVET_Z0244 uint32_t writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, HRD &hrd, bool isNested, const uint32_t temporalId); -#else - void writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, HRD &hrd, bool isNested, const uint32_t temporalId); -#endif protected: void xWriteSEIuserDataUnregistered(const SEIuserDataUnregistered &sei); @@ -100,11 +94,9 @@ protected: void xWriteSEIShutterInterval(const SEIShutterIntervalInfo& sei); void xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &hrd, const uint32_t temporalId); void xWriteByteAlign(); -#if JVET_Z0244 void xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralNetworkPostFilterCharacteristics& sei); void xWriteNNPFCComplexityElement(const SEINeuralNetworkPostFilterCharacteristics& sei); void xWriteSEINeuralNetworkPostFilterActivation(const SEINeuralNetworkPostFilterActivation &sei); -#endif protected: HRD m_nestingHrd; }; -- GitLab