diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 2af1c94e65ce994b9325e157df0c491d185d6553..9dc79c8c64040f1198c2a4cac88f83de08966da3 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -732,7 +732,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) SMultiValueInput<unsigned> cfg_siiSEIInputNumUnitsInSI(0, std::numeric_limits<uint32_t>::max(), 0, 7); SMultiValueInput<uint16_t> cfg_poSEIPayloadType (0, 65535, 0, 256*2); +#if JVET_AB0069_SEI_PROCESSING_ORDER + SMultiValueInput<uint16_t> cfg_poSEIProcessingOrder(0, 65535, 0, 65536); +#else SMultiValueInput<uint16_t> cfg_poSEIProcessingOrder (0, 255, 0, 256); +#endif #if ENABLE_TRACING string sTracingRule; @@ -3309,7 +3313,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) for (uint32_t i = 0; i < m_numofSEIMessages; i++) { m_poSEIPayloadType[i] = cfg_poSEIPayloadType.values[i]; +#if JVET_AB0069_SEI_PROCESSING_ORDER + m_poSEIProcessingOrder[i] = (uint16_t)cfg_poSEIProcessingOrder.values[i]; +#else m_poSEIProcessingOrder[i] = (uint8_t)cfg_poSEIProcessingOrder.values[i]; +#endif //Error check, to avoid same PayloadType with different PayloadOrder for (uint32_t j = 0; j < i; j++) { diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 067a2c4f48800807790d7f38c3380b5bd2a113ac..1612e801313927c4ac62423ee4ba4fea45daeace 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -758,7 +758,11 @@ protected: bool m_poSEIEnabled; std::vector<uint16_t> m_poSEIPayloadType; +#if JVET_AB0069_SEI_PROCESSING_ORDER + std::vector<uint16_t> m_poSEIProcessingOrder; +#else std::vector<uint8_t> m_poSEIProcessingOrder; +#endif uint32_t m_numofSEIMessages; bool m_constrainedRaslEncoding; diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index d46f46bf12dfc44b1e9d20b01dc0379860a49fce..9f99ef2ea5d9161dac923ed4a79eb31dfebde8e5 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -632,7 +632,11 @@ void SEIReader::xParseSEIProcessingOrder(SEIProcessingOrderInfo& sei, uint32_t p { sei_read_code(decodedMessageOutputStream, 16, val, "sei_payloadType[i]"); sei.m_posPayloadType[i] = val; +#if JVET_AB0069_SEI_PROCESSING_ORDER + sei_read_code(decodedMessageOutputStream, 16, val, "sei_processingOrder[i]"); +#else sei_read_code(decodedMessageOutputStream, 8, val, "sei_processingOrder[i]"); +#endif sei.m_posProcessingOrder[i] = val; } } diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 7f06b40630f5d96fe8393bcb116bdae98431a3ac..e8ebfe039e26e2342d960f6c1a8961e409cb0796 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -849,7 +849,11 @@ protected: //SEI message processing order bool m_poSEIEnabled; std::vector<uint16_t> m_poSEIPayloadType; +#if JVET_AB0069_SEI_PROCESSING_ORDER + std::vector<uint16_t> m_poSEIProcessingOrder; +#else std::vector<uint8_t> m_poSEIProcessingOrder; +#endif uint32_t m_numofSEIMessages; bool m_constrainedRaslEncoding; @@ -2425,8 +2429,13 @@ public: bool getPoSEIEnabled() { return m_poSEIEnabled; } void setPoSEIPayloadType(const std::vector<uint16_t>& b) { m_poSEIPayloadType = b; } uint16_t getPoSEIPayloadType(uint16_t idx) const { return m_poSEIPayloadType[idx]; } +#if JVET_AB0069_SEI_PROCESSING_ORDER + void setPoSEIProcessingOrder(const std::vector<uint16_t>& b) { m_poSEIProcessingOrder = b; } + uint16_t getPoSEIProcessingOrder(uint16_t idx) const { return m_poSEIProcessingOrder[idx]; } +#else void setPoSEIProcessingOrder(const std::vector<uint8_t>& b) { m_poSEIProcessingOrder = b; } uint8_t getPoSEIProcessingOrder(uint8_t idx) const { return m_poSEIProcessingOrder[idx]; } +#endif void setPoSEINumofSeiMessages(uint32_t i) { m_numofSEIMessages = i; } uint32_t getPoSEINumofSeiMessages() const { return m_numofSEIMessages; } diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index e120db28722fb9cbc56bd7aa246cbb883e2e9e56..84c3385570bac586ab69c202497711d1f3916af9 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -1619,7 +1619,11 @@ void SEIWriter::xWriteSEIProcessingOrder(const SEIProcessingOrderInfo &sei) for (uint32_t i=0; i < sei.m_posNumofSeiMessages; i++) { WRITE_CODE(sei.m_posPayloadType[i], 16, "sei_payloadType[i]"); +#if JVET_AB0069_SEI_PROCESSING_ORDER + WRITE_CODE(sei.m_posProcessingOrder[i], 16, "sei_processingOrder[i]"); +#else WRITE_CODE(sei.m_posProcessingOrder[i], 8, "sei_processingOrder[i]"); +#endif } }