diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 0c5944e0bf16c8c4d0c915625d2c24d31e5cc9c5..cb33d7a0cfe65219ea33a6c2ffeb8ef7f7e0a95b 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -244,7 +244,9 @@ public: virtual ~SEIDecodedPictureHash() {} HashType method; +#if FIX_TICKET_1405 bool singleCompFlag; +#endif PictureHash m_pictureHash; }; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index d740499b86bf0b2196aed21ad6f6e2f59de58017..1de3af06e7432f523f2478e285bdc8b3cb4c51c7 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -65,6 +65,8 @@ #define JVET_R0266_GCI 1 // JVET-R0266 #5: Specify that no_gdr_constraint_flag equal to 1 specifies that sps_gdr_enabled_flag shall be equal to 0 #define JVET_S0084_S0110_RADL 1 // When the current picture is a RADL picture, allow RASL pictures with pps_mixed_nalu_types_in_pic_flag is equal to 1 in active entries in RefPicList[ 0 ] or RefPicList[ 1 ] +#define FIX_TICKET_1405 1 // Add dph_sei_single_component_flag and dph_sei_reserved_zero_7bits syntax to decoded picture hash SEI message + //########### place macros to be be kept below this line ############### #define JVET_S0257_DUMP_360SEI_MESSAGE 1 // Software support of 360 SEI messages diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index b4f80914d17c1a07505672b6b7612bf90354f522..3365df9394b5e3c69c87fe71883c248322fc1b9d 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -440,10 +440,12 @@ void SEIReader::xParseSEIDecodedPictureHash(SEIDecodedPictureHash& sei, uint32_t uint32_t val; sei_read_code( pDecodedMessageOutputStream, 8, val, "dph_sei_hash_type"); sei.method = static_cast<HashType>(val); bytesRead++; +#if FIX_TICKET_1405 sei_read_code( pDecodedMessageOutputStream, 1, val, "dph_sei_single_component_flag"); sei.singleCompFlag = val; sei_read_code( pDecodedMessageOutputStream, 7, val, "dph_sei_reserved_zero_7bits"); bytesRead++; +#endif const char *traceString="\0"; switch (sei.method) diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index f3011b7a817eb477c37e280e90bc0cab809aaa91..2190f454f9f4de1425ffea51fda8a816f156b15f 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -460,7 +460,9 @@ void SEIEncoder::initDecodedPictureHashSEI(SEIDecodedPictureHash *decodedPicture CHECK(!(decodedPictureHashSEI!=NULL), "Unspecified error"); decodedPictureHashSEI->method = m_pcCfg->getDecodedPictureHashSEIType(); +#if FIX_TICKET_1405 decodedPictureHashSEI->singleCompFlag = (m_pcCfg->getChromaFormatIdc() == 0); +#endif switch (m_pcCfg->getDecodedPictureHashSEIType()) { case HASHTYPE_MD5: diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 03dbe98af53c1ecab117a07bf5da7605fa061194..fcd281b9c4e664fb8e205fa9c873204ea407422c 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -228,8 +228,10 @@ void SEIWriter::xWriteSEIDecodedPictureHash(const SEIDecodedPictureHash& sei) if (traceString != 0) //use of this variable is needed to avoid a compiler error with G++ 4.6.1 { WRITE_CODE(sei.method, 8, "dph_sei_hash_type"); +#if FIX_TICKET_1405 WRITE_CODE(sei.singleCompFlag, 1, "dph_sei_single_component_flag"); WRITE_CODE(0, 7, "dph_sei_reserved_zero_7bits"); +#endif for(uint32_t i=0; i<uint32_t(sei.m_pictureHash.hash.size()); i++) { WRITE_CODE(sei.m_pictureHash.hash[i], 8, traceString);