From 54b48438d12fbf8d68e7188dbd93eba85e73859c Mon Sep 17 00:00:00 2001 From: Karsten Suehring <karsten.suehring@hhi.fraunhofer.de> Date: Mon, 6 Jul 2020 15:15:20 +0200 Subject: [PATCH] remove macro JVET_Q0397_SCAL_NESTING --- source/Lib/CommonLib/SEI.h | 8 -------- source/Lib/CommonLib/TypeDef.h | 1 - source/Lib/DecoderLib/SEIread.cpp | 4 ---- source/Lib/EncoderLib/EncGOP.cpp | 12 ------------ source/Lib/EncoderLib/EncGOP.h | 4 ---- source/Lib/EncoderLib/SEIEncoder.cpp | 6 ------ source/Lib/EncoderLib/SEIEncoder.h | 4 ---- source/Lib/EncoderLib/SEIwrite.cpp | 4 ---- 8 files changed, 43 deletions(-) diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index d268b9934..4da90b0a1 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -498,16 +498,12 @@ public: SEIScalableNesting() : m_snOlsFlag (false) -#if JVET_Q0397_SCAL_NESTING , m_snSubpicFlag (false) -#endif , m_snNumOlssMinus1 (0) , m_snAllLayersFlag (false) , m_snNumLayersMinus1 (0) -#if JVET_Q0397_SCAL_NESTING , m_snNumSubpics (1) , m_snSubpicIdLen (0) -#endif , m_snNumSEIs(0) {} @@ -517,20 +513,16 @@ public: } bool m_snOlsFlag; -#if JVET_Q0397_SCAL_NESTING bool m_snSubpicFlag; -#endif uint32_t m_snNumOlssMinus1; uint32_t m_snOlsIdxDeltaMinus1[MAX_NESTING_NUM_LAYER]; uint32_t m_snOlsIdx[MAX_NESTING_NUM_LAYER]; bool m_snAllLayersFlag; //value valid if m_nestingOlsFlag == 0 uint32_t m_snNumLayersMinus1; //value valid if m_nestingOlsFlag == 0 and m_nestingAllLayersFlag == 0 uint8_t m_snLayerId[MAX_NESTING_NUM_LAYER]; //value valid if m_nestingOlsFlag == 0 and m_nestingAllLayersFlag == 0. This can e.g. be a static array of 64 uint8_t values -#if JVET_Q0397_SCAL_NESTING uint32_t m_snNumSubpics; uint8_t m_snSubpicIdLen; std::vector<uint16_t> m_snSubpicId; -#endif uint32_t m_snNumSEIs; SEIMessages m_nestedSEIs; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index c5066fbc4..4698b2120 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -141,7 +141,6 @@ -#define JVET_Q0397_SCAL_NESTING 1 // JVET-Q0397: Scalable Nesting SEI related aspects #define JVET_R0413_HRD_TIMING_INFORMATION 1 // JVET-R0413: HRD timing parameters signalling diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index e4c838d26..006cf89c1 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -468,9 +468,7 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT output_sei_message_header(sei, decodedMessageOutputStream, payloadSize); sei_read_flag(decodedMessageOutputStream, symbol, "sn_ols_flag"); sei.m_snOlsFlag = symbol; -#if JVET_Q0397_SCAL_NESTING sei_read_flag(decodedMessageOutputStream, symbol, "sn_subpic_flag"); sei.m_snSubpicFlag = symbol; -#endif if (sei.m_snOlsFlag) { sei_read_uvlc(decodedMessageOutputStream, symbol, "sn_num_olss_minus1"); sei.m_snNumOlssMinus1 = symbol; @@ -518,7 +516,6 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT } } } -#if JVET_Q0397_SCAL_NESTING if (sei.m_snSubpicFlag) { sei_read_uvlc(decodedMessageOutputStream, symbol, "sn_num_subpics_minus1"); sei.m_snNumSubpics = symbol + 1; @@ -529,7 +526,6 @@ void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitT sei_read_code(decodedMessageOutputStream, sei.m_snSubpicIdLen, symbol, "sn_subpic_id[i]"); sei.m_snSubpicId[i] = symbol; } } -#endif sei_read_uvlc(decodedMessageOutputStream, symbol, "sn_num_seis_minus1"); sei.m_snNumSEIs = symbol + 1; CHECK (sei.m_snNumSEIs > 64, "The value of sn_num_seis_minus1 shall be in the range of 0 to 63"); diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 23b07411d..94cdc383f 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -752,11 +752,7 @@ void EncGOP::xCreatePerPictureSEIMessages (int picInGOP, SEIMessages& seiMessage } -#if JVET_Q0397_SCAL_NESTING void EncGOP::xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages, const std::vector<uint16_t>& subpicIDs) -#else -void EncGOP::xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages) -#endif { SEIMessages tmpMessages; while (!nestedSeiMessages.empty()) @@ -765,11 +761,7 @@ void EncGOP::xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& ne nestedSeiMessages.pop_front(); tmpMessages.push_back(sei); SEIScalableNesting *nestingSEI = new SEIScalableNesting(); -#if JVET_Q0397_SCAL_NESTING m_seiEncoder.initSEIScalableNesting(nestingSEI, tmpMessages, subpicIDs); -#else - m_seiEncoder.initSEIScalableNesting(nestingSEI, tmpMessages); -#endif seiMessages.push_back(nestingSEI); tmpMessages.clear(); } @@ -3452,7 +3444,6 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, if (m_pcCfg->getScalableNestingSEIEnabled()) { -#if JVET_Q0397_SCAL_NESTING const SPS* sps = pcSlice->getSPS(); const PPS* pps = pcSlice->getPPS(); @@ -3481,9 +3472,6 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, } } xCreateScalableNestingSEI(leadingSeiMessages, nestedSeiMessages, subpicIDs); -#else - xCreateScalableNestingSEI(leadingSeiMessages, nestedSeiMessages); -#endif } xWriteLeadingSEIMessages( leadingSeiMessages, duInfoSeiMessages, accessUnit, pcSlice->getTLayer(), pcSlice->getSPS(), duData ); diff --git a/source/Lib/EncoderLib/EncGOP.h b/source/Lib/EncoderLib/EncGOP.h index ca5eea215..c737f7b53 100644 --- a/source/Lib/EncoderLib/EncGOP.h +++ b/source/Lib/EncoderLib/EncGOP.h @@ -307,11 +307,7 @@ protected: void xUpdateDuData(AccessUnit &testAU, std::deque<DUData> &duData); void xUpdateTimingSEI(SEIPictureTiming *pictureTimingSEI, std::deque<DUData> &duData, const SPS *sps); void xUpdateDuInfoSEI(SEIMessages &duInfoSeiMessages, SEIPictureTiming *pictureTimingSEI, int maxSubLayers); -#if JVET_Q0397_SCAL_NESTING void xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages, const std::vector<uint16_t>& subpicIDs); -#else - void xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages); -#endif void xWriteSEI (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId, const SPS *sps); void xWriteSEISeparately (NalUnitType naluType, SEIMessages& seiMessages, AccessUnit &accessUnit, AccessUnit::iterator &auPos, int temporalId, const SPS *sps); void xClearSEIs(SEIMessages& seiMessages, bool deleteMessages); diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 5a3188fe0..631021b17 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -396,11 +396,7 @@ void SEIEncoder::initSEISampleAspectRatioInfo(SEISampleAspectRatioInfo* seiSampl //! initialize scalable nesting SEI message. //! Note: The SEI message structures input into this function will become part of the scalable nesting SEI and will be //! automatically freed, when the nesting SEI is disposed. -#if JVET_Q0397_SCAL_NESTING void SEIEncoder::initSEIScalableNesting(SEIScalableNesting *scalableNestingSEI, SEIMessages &nestedSEIs, const std::vector<uint16_t> &subpictureIDs) -#else -void SEIEncoder::initSEIScalableNesting(SEIScalableNesting *scalableNestingSEI, SEIMessages &nestedSEIs) -#endif { CHECK(!(m_isInitialized), "Scalable Nesting SEI already initialized "); CHECK(!(scalableNestingSEI != NULL), "No Scalable Nesting SEI object passed"); @@ -427,7 +423,6 @@ void SEIEncoder::initSEIScalableNesting(SEIScalableNesting *scalableNestingSEI, scalableNestingSEI->m_snAllLayersFlag = 1; // nesting is not applied to all layers scalableNestingSEI->m_snNumLayersMinus1 = 2 - 1; //nesting_num_layers_minus1 scalableNestingSEI->m_snLayerId[0] = 0; -#if JVET_Q0397_SCAL_NESTING if (!subpictureIDs.empty()) { scalableNestingSEI->m_snSubpicFlag = 1; @@ -436,7 +431,6 @@ void SEIEncoder::initSEIScalableNesting(SEIScalableNesting *scalableNestingSEI, scalableNestingSEI->m_snSubpicIdLen = max(1, ceilLog2((*std::max_element(subpictureIDs.begin(), subpictureIDs.end())) + 1)); CHECK ( scalableNestingSEI->m_snSubpicIdLen > 15, "Subpicture ID too large. Length must be <= 15 bits"); } -#endif scalableNestingSEI->m_nestedSEIs.clear(); for (SEIMessages::iterator it = nestedSEIs.begin(); it != nestedSEIs.end(); it++) { diff --git a/source/Lib/EncoderLib/SEIEncoder.h b/source/Lib/EncoderLib/SEIEncoder.h index 0fe7bca8e..2af62bb11 100644 --- a/source/Lib/EncoderLib/SEIEncoder.h +++ b/source/Lib/EncoderLib/SEIEncoder.h @@ -72,11 +72,7 @@ public: #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *sei); #endif -#if JVET_Q0397_SCAL_NESTING void initSEIScalableNesting(SEIScalableNesting *scalableNestingSEI, SEIMessages &nestedSEIs, const std::vector<uint16_t> &subpictureIDs); -#else - void initSEIScalableNesting(SEIScalableNesting *sei, SEIMessages &nestedSEIs); -#endif // trailing SEIs void initDecodedPictureHashSEI(SEIDecodedPictureHash *sei, PelUnitBuf& pic, std::string &rHashString, const BitDepths &bitDepths); void initSEIErp(SEIEquirectangularProjection *sei); diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 73ea00b1b..824943650 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -506,9 +506,7 @@ void SEIWriter::xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableN CHECK (sei.m_nestedSEIs.size()<1, "There must be at lease one SEI message nested in the scalable nesting SEI.") WRITE_FLAG(sei.m_snOlsFlag, "sn_ols_flag"); -#if JVET_Q0397_SCAL_NESTING WRITE_FLAG(sei.m_snSubpicFlag, "sn_subpic_flag"); -#endif if (sei.m_snOlsFlag) { WRITE_UVLC(sei.m_snNumOlssMinus1, "sn_num_olss_minus1"); @@ -529,7 +527,6 @@ void SEIWriter::xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableN } } } -#if JVET_Q0397_SCAL_NESTING if (sei.m_snSubpicFlag) { WRITE_UVLC( sei.m_snNumSubpics - 1, "sn_num_subpics_minus1"); @@ -540,7 +537,6 @@ void SEIWriter::xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableN WRITE_CODE(sei.m_snSubpicId[i], sei.m_snSubpicIdLen, "sn_subpic_id[i]"); } } -#endif WRITE_UVLC( (uint32_t)sei.m_nestedSEIs.size() - 1, "sn_num_seis_minus1"); -- GitLab