diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 20694b00f804e59a602f35d6ad52ffa2463a1589..aee6521ac073bafaafce96f7c9cef5294c15a929 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -4857,17 +4857,9 @@ bool EncAppCfg::xCheckParameter() { for (int i = 0; i < m_nnPostFilterSEICharacteristicsNumFilters; i++) { -#if JVET_AB0049 xConfirmPara(m_nnPostFilterSEICharacteristicsId[i] > MAX_NNPFC_ID, "SEINNPostFilterCharacteristicsId must be in the range of 0 to 2^32-2"); -#else - xConfirmPara(m_nnPostFilterSEICharacteristicsId[i] > (uint32_t)(((uint64_t)1 << 32) - 2), "SEINNPostFilterCharacteristicsId must be in the range of 0 to 2^32-2"); -#endif xConfirmPara(m_nnPostFilterSEICharacteristicsModeIdc[i] > 255, "SEINNPostFilterCharacteristicsModeIdc must be in the range of 0 to 255"); -#if JVET_AB0049 xConfirmPara(m_nnPostFilterSEICharacteristicsPurpose[i] > 1023, "SEINNPostFilterCharacteristicsPurpose must be in the range of 0 to 1023"); -#else - xConfirmPara(m_nnPostFilterSEICharacteristicsPurpose[i] > (uint32_t)(((uint64_t)1 << 32) - 2), "SEINNPostFilterCharacteristicsPurpose must be in the range of 0 to 2^32-2"); -#endif xConfirmPara(m_nnPostFilterSEICharacteristicsInpTensorBitDepthMinus8[i] > 24, "SEINNPostFilterCharacteristicsInpTensorBitDepthMinus8 must be in the range of 0 to 24"); xConfirmPara(m_nnPostFilterSEICharacteristicsOutTensorBitDepthMinus8[i] > 24, "SEINNPostFilterCharacteristicsOutTensorBitDepthMinus8 must be in the range of 0 to 24"); #if M60678_BALLOT_COMMENTS_OF_FI_03 @@ -4902,11 +4894,7 @@ bool EncAppCfg::xCheckParameter() if (m_nnPostFilterSEIActivationEnabled) { - #if JVET_AB0049 xConfirmPara(m_nnPostFilterSEIActivationId > MAX_NNPFA_ID, "SEINNPostFilterActivationId must be in the range of 0 to 2^32-2"); - #else - xConfirmPara(m_nnPostFilterSEIActivationId > (1 << 20) - 1, "SEINNPostFilterActivationId must be in the range of 0 to 2^20-1"); - #endif } if (m_phaseIndicationSEIEnabledFullResolution) diff --git a/source/Lib/CommonLib/CommonDef.h b/source/Lib/CommonLib/CommonDef.h index f1cde48e4e6b71de686fafe4790606d2df569c2f..74a4397c24155e5405204b76f7edb80015f198d9 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -581,10 +581,8 @@ static constexpr int CBF_MASK_CBCR = CBF_MASK_CB | CBF_MASK_CR; // SEI and related constants // ==================================================================================================================== -#if JVET_AB0049 static const uint32_t MAX_NNPFA_ID = 0xfffffffe; // Maximum supported nnpfa_id static const uint32_t MAX_NNPFC_ID = 0xfffffffe; // Maximum supported nnpfc_id -#endif #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 diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 047b710e773619bfac00f082b61770e916095bfe..d4ade422230c0272e52f3d9df56fcfc677e9d428 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -55,7 +55,6 @@ // clang-format off //########### place macros to be removed in next cycle below this line ############### -#define JVET_AB0049 1 // JVET-AB0049: Modification of NNPFC #define JVET_AB0050 1 // JVET-AB0050: Add two flags for NNPFA #define JVET_T0056_SEI_MANIFEST 1 // JVET-T0056: SEI manifest SEI message #define JVET_T0056_SEI_PREFIX_INDICATION 1 // JVET-T0056: SEI prefix indication SEI message diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index f87d3c8ee84f85669232310d8f9de33cffa575cd..8fcfc9c3300a2b34d5e2d30db718c226139eca4a 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -441,15 +441,12 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType pDecodedMessageOutputStream); -#if JVET_AB0049 nnpfcValues.push_back(((SEINeuralNetworkPostFilterCharacteristics*)sei)->m_id); -#endif break; case SEI::PayloadType::NEURAL_NETWORK_POST_FILTER_ACTIVATION: sei = new SEINeuralNetworkPostFilterActivation; xParseSEINNPostFilterActivation((SEINeuralNetworkPostFilterActivation &) *sei, payloadSize, pDecodedMessageOutputStream); -#if JVET_AB0049 nnpfcProcessed = false; CHECK(nnpfcValues.size() == 0, "At leaset one NNPFC SEI message should precede NNPFA") for(int i=0; i<nnpfcValues.size(); ++i) @@ -461,7 +458,6 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType } CHECK(!nnpfcProcessed, "No NNPFC, no NNPFA") nnpfcProcessed = false; -#endif break; case SEI::PayloadType::PHASE_INDICATION: sei = new SEIPhaseIndication; @@ -2653,9 +2649,7 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC sei_read_uvlc( pDecodedMessageOutputStream, val, "nnpfc_id" ); sei.m_id = val; -#if JVET_AB0049 CHECK((sei.m_id >= 256 && sei.m_id <= 511) || (sei.m_id >= (1<<31) && sei.m_id <= MAX_NNPFC_ID), "Reserved nnpfc_id value, shall ignore the SEI message"); -#endif sei_read_uvlc( pDecodedMessageOutputStream, val, "nnpfc_mode_idc" ); sei.m_modeIdc = val; @@ -2929,9 +2923,7 @@ void SEIReader::xParseSEINNPostFilterActivation(SEINeuralNetworkPostFilterActiva sei_read_uvlc( pDecodedMessageOutputStream, val, "nnpfa_id" ); sei.m_id =val; -#if JVET_AB0049 CHECK((sei.m_id >= 256 && sei.m_id <= 511) || (sei.m_id >= (1<<31) && sei.m_id <= MAX_NNPFA_ID), "Reserved nnpfa_id value, shall ignore the SEI message"); -#endif #if JVET_AB0050 sei_read_flag( pDecodedMessageOutputStream, val, "nnpfa_cancel_flag" ); sei.m_cancelFlag = val; diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h index d8fa6b6679a4e0880882340fd7627438966bf3ea..6435ba264a75ca3c5954d664bc00bbd00d5d3a75 100644 --- a/source/Lib/DecoderLib/SEIread.h +++ b/source/Lib/DecoderLib/SEIread.h @@ -61,10 +61,8 @@ public: const VPS *vps, const SPS *sps, HRD &hrd, uint32_t payloadSize, std::vector<SeiPayload> *seiList); void getSEIDecodingUnitInfoDuiIdx(InputBitstream* bs, const NalUnitType nalUnitType, const uint32_t nuh_layer_id, HRD &hrd, uint32_t payloadSize, int& duiIdx); -#if JVET_AB0049 bool nnpfcProcessed; std::vector<int> nnpfcValues; -#endif protected: void 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); diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index d7139a4d7991719dd05e413a8392deb0378461e4..454edbfbb1e54f29052e6191f52c060c1417e5ef 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -1318,7 +1318,6 @@ void SEIEncoder::initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkP { sei->m_picWidthInLumaSamples = m_pcCfg->getNNPostFilterSEICharacteristicsPicWidthInLumaSamples(filterIdx); sei->m_picHeightInLumaSamples = m_pcCfg->getNNPostFilterSEICharacteristicsPicHeightInLumaSamples(filterIdx); -#if JVET_AB0049 int confWinLeftOffset = m_pcEncLib->getPPS(0)->getConformanceWindow().getWindowLeftOffset(); int confWinTopOffset = m_pcEncLib->getPPS(0)->getConformanceWindow().getWindowTopOffset(); int confWinRightOffset = m_pcEncLib->getPPS(0)->getConformanceWindow().getWindowRightOffset(); @@ -1348,7 +1347,6 @@ void SEIEncoder::initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkP int croppedHeight = ppsPicHeightInLumaSample - subHeightC * (confWinBottomOffset + confWinTopOffset); CHECK(!(sei->m_picWidthInLumaSamples >= croppedWidth && sei->m_picWidthInLumaSamples <= croppedWidth * 16 - 1), "m_picWidthInLumaSamples shall be in the range of croppedWidth to croppedWidth * 16 - 1"); CHECK(!(sei->m_picHeightInLumaSamples >= croppedHeight && sei->m_picHeightInLumaSamples <= croppedHeight * 16 - 1), "m_picHeightInLumaSamples shall be in the range of croppedHeight to croppedHeight * 16 - 1"); -#endif } #if JVET_AB0058_NN_FRAME_RATE_UPSAMPLING if (sei->m_purpose == NNPC_PurposeType::FRANE_RATE_UPSAMPLING)