diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 275407600a27aaf06890f7240bb8929421d4a031..17120c27c1526770a2d3c0f8446ecfaab72bbd83 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -1181,7 +1181,6 @@ void EncApp::xInitLibCfg( int layerIdx ) m_cEncLib.setNNPostFilterSEICharacteristicsPropertyPresentFlag( m_nnPostFilterSEICharacteristicsPropertyPresentFlag[i], i); if (m_cEncLib.getNNPostFilterSEICharacteristicsPropertyPresentFlag(i)) { -#if JVET_AC0353_NNPFC_BASE_FLAG m_cEncLib.setNNPostFilterSEICharacteristicsBaseFlag (m_nnPostFilterSEICharacteristicsBaseFlag[i], i); if (!m_nnPostFilterSEICharacteristicsBaseFlag[i]) { @@ -1196,7 +1195,6 @@ void EncApp::xInitLibCfg( int layerIdx ) } CHECK(!baseFilterExist, "No base filter found! Cannot have an update filter without base filter.") } -#endif m_cEncLib.setNNPostFilterSEICharacteristicsPurpose (m_nnPostFilterSEICharacteristicsPurpose[i], i); if ((m_cEncLib.getNNPostFilterSEICharacteristicsPurpose(i) & NNPC_PurposeType::CHROMA_UPSAMPLING) != 0) { diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 327100d9e65aea334ee1a043b09c8a82f294c427..8b41b7a4a6a6b129b3b1c9e277fd9d2fe14d78b8 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1758,11 +1758,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) propertyPresentFlag << "SEINNPFCPropertyPresentFlag" << i; opts.addOptions()(propertyPresentFlag.str(), m_nnPostFilterSEICharacteristicsPropertyPresentFlag[i], false, "Specifies whether the filter purpose, input formatting, output formatting and complexity are present in the Neural Network Post Filter Characteristics SEI message"); -#if JVET_AC0353_NNPFC_BASE_FLAG std::ostringstream nnpfcBaseFlag; nnpfcBaseFlag << "SEINNPFCBaseFlag" << i; opts.addOptions()(nnpfcBaseFlag.str(), m_nnPostFilterSEICharacteristicsBaseFlag[i], false, "Specifies whether the filter is a base filter or not"); -#endif std::ostringstream purpose; purpose << "SEINNPFCPurpose" << i; diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 7c97fc93454f2bb70e66e49635d48f54491c37fc..64029f899451a34311c0add5ad77f075495ba490 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -734,9 +734,7 @@ protected: uint32_t m_nnPostFilterSEICharacteristicsId[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsModeIdc[MAX_NUM_NN_POST_FILTERS]; bool m_nnPostFilterSEICharacteristicsPropertyPresentFlag[MAX_NUM_NN_POST_FILTERS]; -#if JVET_AC0353_NNPFC_BASE_FLAG bool m_nnPostFilterSEICharacteristicsBaseFlag[MAX_NUM_NN_POST_FILTERS]; -#endif uint32_t m_nnPostFilterSEICharacteristicsPurpose[MAX_NUM_NN_POST_FILTERS]; bool m_nnPostFilterSEICharacteristicsOutSubCFlag[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsOutColourFormatIdc[MAX_NUM_NN_POST_FILTERS]; diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 05df7d0685227694b1ddbdfba90781989d2b251b..83bf547914729eaf84bbf8b8f8ef18effa10ae32 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -1207,9 +1207,7 @@ public: , m_modeIdc(0) , m_propertyPresentFlag(false) , m_purpose(0) -#if JVET_AC0353_NNPFC_BASE_FLAG , m_baseFlag(false) -#endif , m_outSubCFlag(0) , m_outSubWidthC(1) , m_outSubHeightC(1) @@ -1265,9 +1263,7 @@ public: uint32_t m_modeIdc; bool m_propertyPresentFlag; uint32_t m_purpose; -#if JVET_AC0353_NNPFC_BASE_FLAG bool m_baseFlag; -#endif bool m_outSubCFlag; uint8_t m_outSubWidthC; uint8_t m_outSubHeightC; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index d3ec26d48b79ff1360aa59f741c35dab14420d19..e547758b1c91699f05c2095ad88bc30c4d639223 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -56,7 +56,6 @@ //########### place macros to be removed in next cycle below this line ############### -#define JVET_AC0353_NNPFC_BASE_FLAG 1 //########### place macros to be be kept below this line ############### diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 912de7caef68ee42225c2defd7df3698b2b0b9d2..c427ede5c2f48e511a4eab908cd4edd750ebd39d 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -222,7 +222,6 @@ void SEIReader::getSEIDecodingUnitInfoDuiIdx(InputBitstream* bs, const NalUnitTy } } -#if JVET_AC0353_NNPFC_BASE_FLAG bool SEIReader::xCheckNnpfcSeiMsg(uint32_t seiId, bool baseFlag, const std::vector<int> nnpfcValueList) { if (baseFlag) @@ -252,7 +251,6 @@ bool SEIReader::xCheckNnpfcSeiMsg(uint32_t seiId, bool baseFlag, const std::vect } return true; } -#endif bool SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, const uint32_t nuh_layer_id, const uint32_t temporalId, const VPS *vps, const SPS *sps, HRD &hrd, std::ostream *pDecodedMessageOutputStream) { @@ -479,14 +477,10 @@ bool SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType xParseSEINNPostFilterCharacteristics((SEINeuralNetworkPostFilterCharacteristics &) *sei, payloadSize, sps, pDecodedMessageOutputStream); -#if JVET_AC0353_NNPFC_BASE_FLAG if (xCheckNnpfcSeiMsg( ((SEINeuralNetworkPostFilterCharacteristics*)sei)->m_id, ((SEINeuralNetworkPostFilterCharacteristics*)sei)->m_baseFlag, nnpfcValues) ) { nnpfcValues.push_back(((SEINeuralNetworkPostFilterCharacteristics*)sei)->m_id); } -#else - nnpfcValues.push_back(((SEINeuralNetworkPostFilterCharacteristics*)sei)->m_id); -#endif break; case SEI::PayloadType::NEURAL_NETWORK_POST_FILTER_ACTIVATION: sei = new SEINeuralNetworkPostFilterActivation; @@ -2798,10 +2792,8 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC if (sei.m_propertyPresentFlag) { -#if JVET_AC0353_NNPFC_BASE_FLAG sei_read_flag(pDecodedMessageOutputStream, val, "nnpfc_base_flag"); sei.m_baseFlag = val; -#endif ChromaFormat chromaFormatIdc = sps->getChromaFormatIdc(); uint8_t subWidthC; diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h index c700b59ef4c79ce200abaef4ea7779ecee19f6f1..e98f96b54bdcdff44bd59770c18669957a0c5248 100644 --- a/source/Lib/DecoderLib/SEIread.h +++ b/source/Lib/DecoderLib/SEIread.h @@ -63,9 +63,7 @@ public: std::vector<int> nnpfcValues; protected: -#if JVET_AC0353_NNPFC_BASE_FLAG bool xCheckNnpfcSeiMsg (uint32_t seiId, bool baseFlag, const std::vector<int> nnpfcValueList); -#endif bool xReadSEImessage (SEIMessages& seis, const NalUnitType nalUnitType, const uint32_t nuh_layer_id, const uint32_t temporalId, const VPS *vps, const SPS *sps, HRD &hrd, std::ostream *pDecodedMessageOutputStream); void xParseSEIFillerPayload (SEIFillerPayload &sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIuserDataUnregistered (SEIuserDataUnregistered &sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 67e38dbfe565faa8073d194bfed1830a225576f4..ece6e4a32adaf845e86c603a995cbfe9d480297b 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -692,9 +692,7 @@ protected: uint32_t m_nnPostFilterSEICharacteristicsId[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsModeIdc[MAX_NUM_NN_POST_FILTERS]; bool m_nnPostFilterSEICharacteristicsPropertyPresentFlag[MAX_NUM_NN_POST_FILTERS]; -#if JVET_AC0353_NNPFC_BASE_FLAG bool m_nnPostFilterSEICharacteristicsBaseFlag[MAX_NUM_NN_POST_FILTERS]; -#endif uint32_t m_nnPostFilterSEICharacteristicsPurpose[MAX_NUM_NN_POST_FILTERS]; bool m_nnPostFilterSEICharacteristicsOutSubCFlag[MAX_NUM_NN_POST_FILTERS]; ChromaFormat m_nnPostFilterSEICharacteristicsOutColourFormatIdc[MAX_NUM_NN_POST_FILTERS]; @@ -1895,10 +1893,8 @@ public: uint32_t getNNPostFilterSEICharacteristicsModeIdc(int filterIdx) const { return m_nnPostFilterSEICharacteristicsModeIdc[filterIdx]; } void setNNPostFilterSEICharacteristicsPropertyPresentFlag(bool propertyPresentFlag, int filterIdx) { m_nnPostFilterSEICharacteristicsPropertyPresentFlag[filterIdx] = propertyPresentFlag; } bool getNNPostFilterSEICharacteristicsPropertyPresentFlag(int filterIdx) const { return m_nnPostFilterSEICharacteristicsPropertyPresentFlag[filterIdx]; } -#if JVET_AC0353_NNPFC_BASE_FLAG void setNNPostFilterSEICharacteristicsBaseFlag(bool baseFlag, int filterIdx) { m_nnPostFilterSEICharacteristicsBaseFlag[filterIdx] = baseFlag; } bool getNNPostFilterSEICharacteristicsBaseFlag(int filterIdx) const { return m_nnPostFilterSEICharacteristicsBaseFlag[filterIdx]; } -#endif void setNNPostFilterSEICharacteristicsPurpose(uint32_t purpose, int filterIdx) { m_nnPostFilterSEICharacteristicsPurpose[filterIdx] = purpose; } uint32_t getNNPostFilterSEICharacteristicsPurpose(int filterIdx) const { return m_nnPostFilterSEICharacteristicsPurpose[filterIdx]; } diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 4522cf887402c57bc07c71539f9d8046e239cc1f..3cf8e4631070d4be066923dd1df9dd20ef9414e7 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -1310,9 +1310,7 @@ void SEIEncoder::initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkP sei->m_propertyPresentFlag = m_pcCfg->getNNPostFilterSEICharacteristicsPropertyPresentFlag(filterIdx); if (sei->m_propertyPresentFlag) { -#if JVET_AC0353_NNPFC_BASE_FLAG sei->m_baseFlag = m_pcCfg->getNNPostFilterSEICharacteristicsBaseFlag(filterIdx); -#endif sei->m_numberInputDecodedPicturesMinus1 = m_pcCfg->getNNPostFilterSEICharacteristicsNumberInputDecodedPicturesMinus1(filterIdx); CHECK(sei->m_numberInputDecodedPicturesMinus1 > 63, "m_numberInputDecodedPicturesMinus1 shall be in the range of 0 to 63"); diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 33e5c4268b33cc3032d4fdf924867d67d7bc813d..f75a68907baa0ee6530ac3b96a2434cfbacea04d 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -1696,9 +1696,7 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN xWriteFlag(sei.m_propertyPresentFlag, "nnpfc_property_present_flag"); if (sei.m_propertyPresentFlag) { -#if JVET_AC0353_NNPFC_BASE_FLAG xWriteFlag(sei.m_baseFlag, "nnpfc_base_flag"); -#endif xWriteUvlc(sei.m_numberInputDecodedPicturesMinus1, "nnpfc_number_of_input_pictures_minus1"); if((sei.m_purpose & NNPC_PurposeType::CHROMA_UPSAMPLING) != 0)