From ca77f2008474531a40c999902e4ae89b818f3a87 Mon Sep 17 00:00:00 2001 From: Karsten Suehring <karsten.suehring@hhi.fraunhofer.de> Date: Fri, 21 Jul 2023 18:10:05 +0200 Subject: [PATCH] remove macro JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG --- source/App/EncoderApp/EncApp.cpp | 2 -- source/App/EncoderApp/EncAppCfg.cpp | 2 -- source/App/EncoderApp/EncAppCfg.h | 2 -- source/Lib/CommonLib/SEI.h | 2 -- source/Lib/CommonLib/TypeDef.h | 1 - source/Lib/DecoderLib/SEIread.cpp | 2 -- source/Lib/EncoderLib/EncCfg.h | 4 ---- source/Lib/EncoderLib/SEIEncoder.cpp | 2 -- source/Lib/EncoderLib/SEIwrite.cpp | 2 -- 9 files changed, 19 deletions(-) diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 02d581709..8e31baf6a 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -1234,9 +1234,7 @@ void EncApp::xInitLibCfg( int layerIdx ) { m_cEncLib.setNNPostFilterSEICharacteristicsNumberInterpolatedPictures( m_nnPostFilterSEICharacteristicsNumberInterpolatedPictures[i], i); } -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG m_cEncLib.setNNPostFilterSEICharacteristicsAbsentInputPicZeroFlag (m_nnPostFilterSEICharacteristicsAbsentInputPicZeroFlag[i], i); -#endif m_cEncLib.setNNPostFilterSEICharacteristicsComponentLastFlag (m_nnPostFilterSEICharacteristicsComponentLastFlag[i], i); m_cEncLib.setNNPostFilterSEICharacteristicsInpFormatIdc (m_nnPostFilterSEICharacteristicsInpFormatIdc[i], i); if (m_cEncLib.getNNPostFilterSEICharacteristicsInpFormatIdc(i) == 1) diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 11cc27beb..85b33a53a 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1962,11 +1962,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) std::ostringstream InputPicOutputFlag; InputPicOutputFlag << "SEINNPFCInputPicOutputFlag" << i; opts.addOptions()(InputPicOutputFlag.str(), cfg_nnPostFilterSEICharacteristicsInputPicOutputFlagList[i], cfg_nnPostFilterSEICharacteristicsInputPicOutputFlagList[i], "Indicates whether NNPF will generate a corresponding output picture for the input picture"); -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG std::ostringstream absentInputPicZeroFlag; absentInputPicZeroFlag << "SEINNPFCAbsentInputPicZeroFlag" << i; opts.addOptions()(absentInputPicZeroFlag.str(), m_nnPostFilterSEICharacteristicsAbsentInputPicZeroFlag[i], false, "Specifies the value of nnpfc_absent_input_pic_zero_flag in the Neural Network Post Filter Characteristics SEI message"); -#endif opts.addOptions()("SEINNPostFilterActivationEnabled", m_nnPostFilterSEIActivationEnabled, false, "Control use of the Neural Network Post Filter SEI on current picture"); #if JVET_AD0057_NNPF_SUFFIX_SEI diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 71c2302fd..b0b0864c5 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -793,9 +793,7 @@ protected: uint32_t m_nnPostFilterSEICharacteristicsNumberInputDecodedPicturesMinus1[MAX_NUM_NN_POST_FILTERS]; std::vector<uint32_t> m_nnPostFilterSEICharacteristicsNumberInterpolatedPictures[MAX_NUM_NN_POST_FILTERS]; std::vector<bool> m_nnPostFilterSEICharacteristicsInputPicOutputFlag[MAX_NUM_NN_POST_FILTERS]; -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG bool m_nnPostFilterSEICharacteristicsAbsentInputPicZeroFlag[MAX_NUM_NN_POST_FILTERS]; -#endif bool m_nnPostFilterSEIActivationCancelFlag; #if JVET_AD0056_NNPFA_TARGET_BASE_FLAG bool m_nnPostFilterSEIActivationTargetBaseFlag; diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 6d5822516..dde74fcf8 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -1327,9 +1327,7 @@ public: uint32_t m_numberInputDecodedPicturesMinus1; std::vector<uint32_t> m_numberInterpolatedPictures; std::vector<bool> m_inputPicOutputFlag; -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG bool m_absentInputPicZeroFlag; -#endif uint32_t m_numInpPicsInOutputTensor; }; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 3385481ff..609a21ce9 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -67,7 +67,6 @@ -#define JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG 1 #define JVET_AD0054_NNPFC_INTERPOLATED_PICS_CONSTRAINT 1 diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 4c186f2ed..e3abbdaee 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -2869,10 +2869,8 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC { CHECK(!atLeastOne, "When picRateUpsamplingFlag is equal to 0 and nnpfc_num_input_pics_minus1 is greater than 0, at least one value of nnpfc_input_pic_output_flag[i] shall be greater than 0"); } -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG sei_read_flag(pDecodedMessageOutputStream, val, "nnpfc_absent_input_pic_zero_flag"); sei.m_absentInputPicZeroFlag = val; -#endif } else { diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 21046f7ca..de7421435 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -752,9 +752,7 @@ protected: uint32_t m_nnPostFilterSEICharacteristicsNumberInputDecodedPicturesMinus1[MAX_NUM_NN_POST_FILTERS]; std::vector<uint32_t> m_nnPostFilterSEICharacteristicsNumberInterpolatedPictures[MAX_NUM_NN_POST_FILTERS]; std::vector<bool> m_nnPostFilterSEICharacteristicsInputPicOutputFlag[MAX_NUM_NN_POST_FILTERS]; -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG bool m_nnPostFilterSEICharacteristicsAbsentInputPicZeroFlag[MAX_NUM_NN_POST_FILTERS]; -#endif bool m_nnPostFilterSEIActivationEnabled; #if JVET_AD0057_NNPF_SUFFIX_SEI @@ -2065,10 +2063,8 @@ public: const std::vector<uint32_t>& getNNPostFilterSEICharacteristicsNumberInterpolatedPictures(int filterIdx) { return m_nnPostFilterSEICharacteristicsNumberInterpolatedPictures[filterIdx]; } void setNNPostFilterSEICharacteristicsInputPicOutputFlag(std::vector<bool> value, int filterIdx) { m_nnPostFilterSEICharacteristicsInputPicOutputFlag[filterIdx] = value; } const std::vector<bool>& getNNPostFilterSEICharacteristicsInputPicOutputFlag(int filterIdx) { return m_nnPostFilterSEICharacteristicsInputPicOutputFlag[filterIdx]; } -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG void setNNPostFilterSEICharacteristicsAbsentInputPicZeroFlag(bool absentInputPicZeroFlag, int filterIdx) { m_nnPostFilterSEICharacteristicsAbsentInputPicZeroFlag[filterIdx] = absentInputPicZeroFlag; } bool getNNPostFilterSEICharacteristicsAbsentInputPicZeroFlag(int filterIdx) const { return m_nnPostFilterSEICharacteristicsAbsentInputPicZeroFlag[filterIdx]; } -#endif void setNnPostFilterSEIActivationEnabled(bool enabledFlag) { m_nnPostFilterSEIActivationEnabled = enabledFlag; } bool getNnPostFilterSEIActivationEnabled() const { return m_nnPostFilterSEIActivationEnabled; } #if JVET_AD0057_NNPF_SUFFIX_SEI diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 4a8c7d655..70f670c19 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -1318,9 +1318,7 @@ void SEIEncoder::initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkP sei->m_inputPicOutputFlag = m_pcCfg->getNNPostFilterSEICharacteristicsInputPicOutputFlag(filterIdx); -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG sei->m_absentInputPicZeroFlag = m_pcCfg->getNNPostFilterSEICharacteristicsAbsentInputPicZeroFlag(filterIdx); -#endif sei->m_numInpPicsInOutputTensor = 0; if (sei->m_numberInputDecodedPicturesMinus1 > 0) diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 83ec8e2cb..5892cdfd2 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -1705,9 +1705,7 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN { xWriteFlag(sei.m_inputPicOutputFlag[i], "nnpfc_input_pic_output_flag"); } -#if JVET_AD0054_NNPFC_ABSENT_INPUT_PIC_ZERO_FLAG xWriteFlag(sei.m_absentInputPicZeroFlag, "nnpfc_absent_input_pic_zero_flag"); -#endif } if((sei.m_purpose & NNPC_PurposeType::CHROMA_UPSAMPLING) != 0) -- GitLab