diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 4f4ebd36cc508af2184bc35896c416cc0e2f6415..298aab8b4739006c9466d37964862e54906b63a1 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -94,6 +94,8 @@ #define JVET_S0234_ACT_CRS_FIX 1 // JVET-S0234: perform chroma residual scaling in RGB domain when ACT is on +#define JVET_S0102_ASPECT3_PT_SEI 1 // JVET-S0102 Aspect 3: Place PT SEI messages in individual SEI NAL units when general_same_pic_timing_in_all_ols_flag is equal to 1 + #define JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT 1 // JVET-S0094: 0 for constraint flags for chroma format and bit depth mean unconstrained, by coding these constraints as subtractive #define JVET_S0132_HLS_REORDER 1 // Rearrange syntax elements in SPS and PPS diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index b82a556554411566b5031034e4d1c03cc3715e9c..69cf0ae0b5006aac803f8f159101db88a2ef7ca8 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -136,9 +136,15 @@ void SEIReader::parseSEImessage(InputBitstream* bs, SEIMessages& seis, const Nal while (m_pcBitstream->getNumBitsLeft() > 8); #if JVET_S0178_GENERAL_SEI_CHECK - SEIMessages fillerData = getSeisByType(seiListInCurNalu, SEI::FILLER_PAYLOAD); + const SEIMessages fillerData = getSeisByType(seiListInCurNalu, SEI::FILLER_PAYLOAD); CHECK(fillerData.size() > 0 && fillerData.size() != seiListInCurNalu.size(), "When an SEI NAL unit contains an SEI message with payloadType equal to filler payload, the SEI NAL unit shall not contain any other SEI message with payloadType not equal to filler payload"); #endif +#if JVET_S0102_ASPECT3_PT_SEI + const SEIMessages pictureTiming = getSeisByType(seiListInCurNalu, SEI::PICTURE_TIMING); + CHECK(hrd.getGeneralHrdParameters().getGeneralSamePicTimingInAllOlsFlag() && pictureTiming.size() > 0 && pictureTiming.size() != pictureTiming.size(), + "When general_same_pic_timing_in_all_ols_flag is equal to 1 [...], and when an SEI NAL unit contains a non-scalable-nested SEI message with " + "payloadType equal to 1 (PT), the SEI NAL unit shall not contain any other SEI message with payloadType not equal 1."); +#endif xReadRbspTrailingBits(); } diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index c00ad3505af8d8dc2c2cf056642c259fa34492eb..6cde24b4f3066cc79ff5084aa3eb8add4a1b1c1b 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -504,6 +504,11 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI xClearSEIs(currentMessages, !testWrite); // Picture timing SEI must always be following buffering period +#if JVET_S0102_ASPECT3_PT_SEI + // Note: When general_same_pic_timing_in_all_ols_flag is equal to 1, PT SEI messages are required + // to be placed into separate NAL units. The code below conforms to the constraint even if + // general_same_pic_timing_in_all_ols_flag is equal to 0 +#endif currentMessages = extractSeisByType(localMessages, SEI::PICTURE_TIMING); CHECK(!(currentMessages.size() <= 1), "Unspecified error"); xWriteSEI(NAL_UNIT_PREFIX_SEI, currentMessages, accessUnit, itNalu, temporalId);