From c25a8d9e39d96b0d9727cdf47e9ff875f34b0a13 Mon Sep 17 00:00:00 2001 From: Karsten Suehring <karsten.suehring@hhi.fraunhofer.de> Date: Mon, 8 May 2023 20:34:43 +0200 Subject: [PATCH] remove macro JVET_AC0058_SEI --- source/App/EncoderApp/EncApp.cpp | 4 ---- source/App/EncoderApp/EncAppCfg.cpp | 23 ----------------------- source/App/EncoderApp/EncAppCfg.h | 4 ---- source/Lib/CommonLib/SEI.cpp | 4 ---- source/Lib/CommonLib/SEI.h | 4 ---- source/Lib/CommonLib/TypeDef.h | 1 - source/Lib/DecoderLib/SEIread.cpp | 19 ------------------- source/Lib/EncoderLib/EncCfg.h | 9 --------- source/Lib/EncoderLib/SEIEncoder.cpp | 13 ------------- source/Lib/EncoderLib/SEIwrite.cpp | 9 --------- 10 files changed, 90 deletions(-) diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 2a5d13b771..d8c465b3ba 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -1355,11 +1355,7 @@ void EncApp::xInitLibCfg( int layerIdx ) m_cEncLib.setPoSEIEnabled (m_poSEIEnabled); m_cEncLib.setPoSEIPayloadType (m_poSEIPayloadType); m_cEncLib.setPoSEIProcessingOrder (m_poSEIProcessingOrder); -#if JVET_AC0058_SEI m_cEncLib.setPoSEIPrefixByte (m_poSEIPrefixByte); -#else - m_cEncLib.setPoSEINumofSeiMessages (m_numofSEIMessages); -#endif diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 78e186d417..1b262dd02f 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -747,10 +747,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) SMultiValueInput<uint16_t> cfg_poSEIPayloadType (0, 65535, 0, 256*2); SMultiValueInput<uint16_t> cfg_poSEIProcessingOrder(0, 65535, 0, 65536); -#if JVET_AC0058_SEI SMultiValueInput<uint16_t> cfg_poSEINumofPrefixByte(0, 255, 0, 256); SMultiValueInput<uint16_t> cfg_poSEIPrefixByte (0, 255, 0, 256); -#endif SMultiValueInput<int32_t> cfg_postFilterHintSEIValues(INT32_MIN + 1, INT32_MAX, 1 * 1 * 1, 15 * 15 * 3); @@ -1620,10 +1618,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("SEIPOEnabled", m_poSEIEnabled, false, "Specifies whether SEI processing order is applied or not") ("SEIPOPayLoadType", cfg_poSEIPayloadType, cfg_poSEIPayloadType, "List of payloadType for processing") ("SEIPOProcessingOrder", cfg_poSEIProcessingOrder, cfg_poSEIProcessingOrder, "List of payloadType processing order") -#if JVET_AC0058_SEI ("SEIPONumofPrefixByte", cfg_poSEINumofPrefixByte, cfg_poSEINumofPrefixByte, "List of number of prefix bytes") ("SEIPOPrefixByte", cfg_poSEIPrefixByte, cfg_poSEIPrefixByte, "List of prefix bytes") -#endif ("SEIPostFilterHintEnabled", m_postFilterHintSEIEnabled, false, "Control generation of post-filter Hint SEI message") ("SEIPostFilterHintCancelFlag", m_postFilterHintSEICancelFlag, false, "Specifies the persistence of any previous post-filter Hint SEI message in output order") ("SEIPostFilterHintPersistenceFlag", m_postFilterHintSEIPersistenceFlag, false, "Specifies the persistence of the post-filter Hint SEI message for the current layer") @@ -3494,7 +3490,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) { assert(cfg_poSEIPayloadType.values.size() > 1); assert(cfg_poSEIProcessingOrder.values.size() == cfg_poSEIPayloadType.values.size()); -#if JVET_AC0058_SEI m_poSEIPayloadType.resize((uint32_t) cfg_poSEIPayloadType.values.size()); m_poSEIProcessingOrder.resize((uint32_t) cfg_poSEIPayloadType.values.size()); m_poSEIPrefixByte.resize((uint32_t) cfg_poSEIPayloadType.values.size()); @@ -3535,24 +3530,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) // Error check, to avoid all SEI messages share the same PayloadOrder assert(!std::equal(cfg_poSEIProcessingOrder.values.begin() + 1, cfg_poSEIProcessingOrder.values.end(), cfg_poSEIProcessingOrder.values.begin())); -#else - m_numofSEIMessages = (uint32_t)cfg_poSEIPayloadType.values.size(); - m_poSEIPayloadType.resize(m_numofSEIMessages); - m_poSEIProcessingOrder.resize(m_numofSEIMessages); - for (uint32_t i = 0; i < m_numofSEIMessages; i++) - { - m_poSEIPayloadType[i] = cfg_poSEIPayloadType.values[i]; - m_poSEIProcessingOrder[i] = (uint16_t)cfg_poSEIProcessingOrder.values[i]; - //Error check, to avoid same PayloadType with different PayloadOrder - for (uint32_t j = 0; j < i; j++) - { - if (m_poSEIPayloadType[j] == m_poSEIPayloadType[i]) - { - assert(m_poSEIProcessingOrder[j]== m_poSEIProcessingOrder[i]); - } - } - } -#endif assert(m_poSEIPayloadType.size() > 0); assert(m_poSEIProcessingOrder.size() == m_poSEIPayloadType.size()); } diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 32b4c06ba3..44e3f903d2 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -806,11 +806,7 @@ protected: bool m_poSEIEnabled; std::vector<uint16_t> m_poSEIPayloadType; std::vector<uint16_t> m_poSEIProcessingOrder; -#if JVET_AC0058_SEI std::vector<std::vector<uint8_t>> m_poSEIPrefixByte; -#else - uint32_t m_numofSEIMessages; -#endif bool m_postFilterHintSEIEnabled; diff --git a/source/Lib/CommonLib/SEI.cpp b/source/Lib/CommonLib/SEI.cpp index e693ae86f4..79c4145396 100644 --- a/source/Lib/CommonLib/SEI.cpp +++ b/source/Lib/CommonLib/SEI.cpp @@ -566,11 +566,7 @@ SEIProcessingOrderInfo::SEIProcessingOrderInfo(const SEIProcessingOrderInfo& sei m_posEnabled = sei.m_posEnabled; m_posPayloadType = sei.m_posPayloadType; m_posProcessingOrder = sei.m_posProcessingOrder; -#if JVET_AC0058_SEI m_posPrefixByte = sei.m_posPrefixByte; -#else - m_posNumofSeiMessages = sei.m_posNumofSeiMessages; -#endif } SEIEquirectangularProjection::SEIEquirectangularProjection(const SEIEquirectangularProjection& sei) diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 58f48aca03..dc7c933d78 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -164,11 +164,7 @@ public: bool m_posEnabled; std::vector<uint16_t> m_posPayloadType; std::vector<uint16_t> m_posProcessingOrder; -#if JVET_AC0058_SEI std::vector<std::vector<uint8_t>> m_posPrefixByte; -#else - uint32_t m_posNumofSeiMessages; -#endif }; class SEIEquirectangularProjection : public SEI diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 7b8bd1afe5..a003a9f9c4 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_AC0058_SEI 1 #define JVET_AC0154 1 #define JVET_AC0127_BIT_MASKING_NNPFC_PURPOSE 1 #define JVET_AC0061_TENSOR_BITDEPTH 1 diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 88a7417aad..510becf6b0 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -693,14 +693,9 @@ void SEIReader::xParseSEIShutterInterval(SEIShutterIntervalInfo& sei, uint32_t p void SEIReader::xParseSEIProcessingOrder(SEIProcessingOrderInfo& sei, uint32_t payloadSize, std::ostream *decodedMessageOutputStream) { uint32_t i,b; -#if JVET_AC0058_SEI uint32_t numMaxSeiMessages, val; -#else - uint32_t NumSEIMessages, val; -#endif output_sei_message_header(sei, decodedMessageOutputStream, payloadSize); -#if JVET_AC0058_SEI //Since each entry is at least 4 bytes (2 byte "sei_payloadType" + 2 byte "sei_payloadOrder"), //the maximum number of entry is payloadSize/4 numMaxSeiMessages = payloadSize / 4; @@ -730,20 +725,6 @@ void SEIReader::xParseSEIProcessingOrder(SEIProcessingOrderInfo& sei, uint32_t p sei.m_posPayloadType.resize(i); sei.m_posProcessingOrder.resize(i); sei.m_posPrefixByte.resize(i); -#else - // Here payload is in Bytes, Since "sei_payloadType" is 2 Bytes + "sei_payloadOrder" is 1 Byte so total = 3 Bytes - // To get Number of SEI messages, just do payloadSize/3 - NumSEIMessages = payloadSize / 3; - sei.m_posPayloadType.resize(NumSEIMessages); - sei.m_posProcessingOrder.resize(NumSEIMessages); - for(i=0,b=0; b < payloadSize; i++,b+=3) - { - sei_read_code(decodedMessageOutputStream, 16, val, "sei_payloadType[i]"); - sei.m_posPayloadType[i] = val; - sei_read_code(decodedMessageOutputStream, 16, val, "sei_processingOrder[i]"); - sei.m_posProcessingOrder[i] = val; - } -#endif CHECK(i<2, "An SEI processing order SEI message shall contain at least two pairs sei_payloadType[i] and sei_processingOrder[i]"); } diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 9bd4cf08a6..c82f63cd30 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -889,12 +889,8 @@ protected: bool m_poSEIEnabled; std::vector<uint16_t> m_poSEIPayloadType; std::vector<uint16_t> m_poSEIProcessingOrder; -#if JVET_AC0058_SEI //std::vector<uint16_t> m_poSEINumofPrefixByte; std::vector<std::vector<uint8_t>> m_poSEIPrefixByte; -#else - uint32_t m_numofSEIMessages; -#endif bool m_postFilterHintSEIEnabled; bool m_postFilterHintSEICancelFlag; bool m_postFilterHintSEIPersistenceFlag; @@ -2546,14 +2542,9 @@ public: uint16_t getPoSEIPayloadType(uint16_t idx) const { return m_poSEIPayloadType[idx]; } void setPoSEIProcessingOrder(const std::vector<uint16_t>& b) { m_poSEIProcessingOrder = b; } uint16_t getPoSEIProcessingOrder(uint16_t idx) const { return m_poSEIProcessingOrder[idx]; } -#if JVET_AC0058_SEI uint32_t getPoSEIPayloadTypeSize() const { return (uint32_t)m_poSEIPayloadType.size(); } void setPoSEIPrefixByte(const std::vector<std::vector<uint8_t>>& b) { m_poSEIPrefixByte = b; } std::vector<uint8_t> getPoSEIPrefixByte(uint16_t idx) const { return m_poSEIPrefixByte[idx]; } -#else - uint32_t getPoSEINumofSeiMessages() const { return m_numofSEIMessages; } - void setPoSEINumofSeiMessages(uint32_t i) { m_numofSEIMessages = i; } -#endif void setPostFilterHintSEIEnabled(bool b) { m_postFilterHintSEIEnabled = b; } bool getPostFilterHintSEIEnabled() { return m_postFilterHintSEIEnabled; } void setPostFilterHintSEICancelFlag(bool b) { m_postFilterHintSEICancelFlag = b; } diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 0fbd9ef7f6..6a0ab49784 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -612,7 +612,6 @@ void SEIEncoder::initSEIProcessingOrderInfo(SEIProcessingOrderInfo *seiProcessin assert(seiProcessingOrderInfo != nullptr); -#if JVET_AC0058_SEI seiProcessingOrderInfo->m_posEnabled = m_pcCfg->getPoSEIEnabled(); seiProcessingOrderInfo->m_posPayloadType.resize(m_pcCfg->getPoSEIPayloadTypeSize()); seiProcessingOrderInfo->m_posProcessingOrder.resize(m_pcCfg->getPoSEIPayloadTypeSize()); @@ -626,18 +625,6 @@ void SEIEncoder::initSEIProcessingOrderInfo(SEIProcessingOrderInfo *seiProcessin seiProcessingOrderInfo->m_posPrefixByte[i] = m_pcCfg->getPoSEIPrefixByte(i); } } -#else - uint32_t numSEIMessages = m_pcCfg->getPoSEINumofSeiMessages(); - seiProcessingOrderInfo->m_posNumofSeiMessages = numSEIMessages; - seiProcessingOrderInfo->m_posEnabled = m_pcCfg->getPoSEIEnabled(); - seiProcessingOrderInfo->m_posPayloadType.resize(numSEIMessages); - seiProcessingOrderInfo->m_posProcessingOrder.resize(numSEIMessages); - for (uint32_t i = 0; i < numSEIMessages; i++) - { - seiProcessingOrderInfo->m_posPayloadType[i] = m_pcCfg->getPoSEIPayloadType(i); - seiProcessingOrderInfo->m_posProcessingOrder[i] = m_pcCfg->getPoSEIProcessingOrder(i); - } -#endif } void SEIEncoder::initSEIPostFilterHint(SEIPostFilterHint *seiPostFilterHint) diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 636cec9ef0..cddbf39005 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -1545,7 +1545,6 @@ void SEIWriter::xWriteSEIShutterInterval(const SEIShutterIntervalInfo &sei) void SEIWriter::xWriteSEIProcessingOrder(const SEIProcessingOrderInfo &sei) { -#if JVET_AC0058_SEI CHECK(sei.m_posPayloadType.size() < 2, "An SEI processing order SEI message shall contain at least two pairs sei_payloadType[i] and sei_processingOrder[i]"); for (uint32_t i = 0; i < sei.m_posPayloadType.size(); i++) { @@ -1561,14 +1560,6 @@ void SEIWriter::xWriteSEIProcessingOrder(const SEIProcessingOrderInfo &sei) xWriteCode(sei.m_posProcessingOrder[i], 16, "po_sei_processing_order[i]"); } } -#else - CHECK(sei.m_posNumofSeiMessages < 2, "An SEI processing order SEI message shall contain at least two pairs sei_payloadType[i] and sei_processingOrder[i]"); - for (uint32_t i=0; i < sei.m_posNumofSeiMessages; i++) - { - xWriteCode(sei.m_posPayloadType[i], 16, "po_sei_payload_type[i]"); - xWriteCode(sei.m_posProcessingOrder[i], 16, "po_sei_processing_order[i]"); - } -#endif } void SEIWriter::xWriteSEIConstrainedRaslIndication(const SEIConstrainedRaslIndication& /*sei*/) -- GitLab