diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 66a81394487345fae7cc624ea68eab7377eaee71..447f545111c4ca8c0b513de7831c5dcfab4473c8 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -75,6 +75,8 @@ #define JVET_S0160_ASPECT1_ASPECT9 1 // JVET-S0160: Aspect 1 Infer the value of pps_loop_filter_across_tiles_enabled_flag to be equal to 0 (instead of 1) when not present // Aspect 9 The value of ph_poc_msb_cycle_present_flag is required to be equal to 0 when vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]] is equal to 0 and there is an ILRP entry in RefPicList[0] or RefPicList[1] of a slice of the current picture +#define JVET_S0181_PROPOSAL1 1 // JVET-0181_Proposal1: Conditionally signal bp_sublayer_initial_cpb_removal_delay_present_flag + #define JVET_S0177_SCALABLE_NESTING_SEI 1 // JVET-S0177: Constraints on the scalable nesting SEI message #define JVET_R0068_ASPECT6_ENC_RESTRICTION 1 // encoder restriction for JVET-R0068 apsect 6 diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index e3f1b15c8320e4d8f7369994ed3079d42bcf0b58..e919059449230a49962fbdd2cfc20a87c63a01d3 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -713,7 +713,19 @@ void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, uint32_t paylo } sei_read_code( pDecodedMessageOutputStream, 3, code, "bp_max_sub_layers_minus1" ); sei.m_bpMaxSubLayers = code + 1; sei_read_uvlc( pDecodedMessageOutputStream, code, "bp_cpb_cnt_minus1" ); sei.m_bpCpbCnt = code + 1; +#if JVET_S0181_PROPOSAL1 + if (sei.m_bpMaxSubLayers - 1 > 0) + { + sei_read_flag(pDecodedMessageOutputStream, code, "bp_sublayer_initial_cpb_removal_delay_present_flag"); + sei.m_sublayerInitialCpbRemovalDelayPresentFlag = code; + } + else + { + sei.m_sublayerInitialCpbRemovalDelayPresentFlag = false; + } +#else sei_read_flag(pDecodedMessageOutputStream, code, "sublayer_initial_cpb_removal_delay_present_flag"); +#endif sei.m_sublayerInitialCpbRemovalDelayPresentFlag = code; for (i = (sei.m_sublayerInitialCpbRemovalDelayPresentFlag ? 0 : sei.m_bpMaxSubLayers - 1); i < sei.m_bpMaxSubLayers; i++) { diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index ee3e52607391e9d21b255ba56c0ef5e1d055f6d5..0253c3d14f4ee1c9f1a91ad51ec96dff43c5762d 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -308,7 +308,14 @@ void SEIWriter::xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei) } CHECK (sei.m_bpCpbCnt < 1, "sei.m_bpCpbCnt must be > 0"); WRITE_UVLC( sei.m_bpCpbCnt - 1, "bp_cpb_cnt_minus1"); +#if JVET_S0181_PROPOSAL1 + if (sei.m_bpMaxSubLayers - 1 > 0) + { + WRITE_FLAG(sei.m_sublayerInitialCpbRemovalDelayPresentFlag, "bp_sublayer_initial_cpb_removal_delay_present_flag"); + } +#else WRITE_FLAG(sei.m_sublayerInitialCpbRemovalDelayPresentFlag, "sublayer_initial_cpb_removal_delay_present_flag"); +#endif for (int i = (sei.m_sublayerInitialCpbRemovalDelayPresentFlag ? 0 : sei.m_bpMaxSubLayers - 1); i < sei.m_bpMaxSubLayers; i++) { for( int nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )