Commit 56ffb578 authored by Philip Cowan's avatar Philip Cowan

JVET-S0181 Proposal 2: Move signalling of syntax element pb_max_sublayers_minus1

parent 450b6093
Pipeline #5376 passed with stage
in 10 minutes and 13 seconds
......@@ -97,6 +97,8 @@
#define JVET_S0186_SPS_CLEANUP 1 // JVET-S0186: Proposal 1, move sps_chroma_format_idc and sps_log2_ctu_size_minus5 to take place sps_reserved_zero_4bits
#define JVET_S0181_PROPOSAL2_BUFFERING_PERIOD_CLEANUP 1 // JVET-S0181 Proposal2: Move signalling of bp_max_sublayers_minus1 and conditionally signal bp_cpb_removal_delay_deltas_present_flag, bp_num_cpb_removal_delay_deltas_minus1, and bp_cpb_removal_delay
//########### place macros to be be kept below this line ###############
#define JVET_S0257_DUMP_360SEI_MESSAGE 1 // Software support of 360 SEI messages
......
......@@ -707,7 +707,21 @@ void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, uint32_t paylo
sei_read_code( pDecodedMessageOutputStream, ( sei.m_cpbRemovalDelayLength ), code, "au_cpb_removal_delay_delta_minus1" );
sei.m_auCpbRemovalDelayDelta = code + 1;
#if JVET_S0181_PROPOSAL2_BUFFERING_PERIOD_CLEANUP
sei_read_code(pDecodedMessageOutputStream, 3, code, "bp_max_sub_layers_minus1");
sei.m_bpMaxSubLayers = code + 1;
if (sei.m_bpMaxSubLayers - 1 > 0)
{
sei_read_flag(pDecodedMessageOutputStream, code, "cpb_removal_delay_deltas_present_flag");
sei.m_cpbRemovalDelayDeltasPresentFlag = code;
}
else
{
sei.m_cpbRemovalDelayDeltasPresentFlag = false;
}
#else
sei_read_flag( pDecodedMessageOutputStream, code, "cpb_removal_delay_deltas_present_flag" ); sei.m_cpbRemovalDelayDeltasPresentFlag = code;
#endif
if (sei.m_cpbRemovalDelayDeltasPresentFlag)
{
sei_read_uvlc( pDecodedMessageOutputStream, code, "num_cpb_removal_delay_deltas_minus1" ); sei.m_numCpbRemovalDelayDeltas = code + 1;
......@@ -717,8 +731,10 @@ void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, uint32_t paylo
sei.m_cpbRemovalDelayDelta[ i ] = code;
}
}
#if !JVET_S0181_PROPOSAL2_BUFFERING_PERIOD_CLEANUP
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;
#endif
#if JVET_S0181_PROPOSAL1
if (sei.m_bpMaxSubLayers - 1 > 0)
{
......
......@@ -296,7 +296,17 @@ void SEIWriter::xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei)
CHECK (sei.m_auCpbRemovalDelayDelta < 1, "sei.m_auCpbRemovalDelayDelta must be > 0");
WRITE_CODE( sei.m_auCpbRemovalDelayDelta - 1, sei.m_cpbRemovalDelayLength, "au_cpb_removal_delay_delta_minus1" );
WRITE_FLAG( sei.m_cpbRemovalDelayDeltasPresentFlag, "cpb_removal_delay_deltas_present_flag");
#if JVET_S0181_PROPOSAL2_BUFFERING_PERIOD_CLEANUP
CHECK(sei.m_bpMaxSubLayers < 1, "bp_max_sub_layers_minus1 must be > 0");
WRITE_CODE(sei.m_bpMaxSubLayers - 1, 3, "bp_max_sub_layers_minus1");
if (sei.m_bpMaxSubLayers - 1 > 0)
{
WRITE_FLAG(sei.m_cpbRemovalDelayDeltasPresentFlag, "cpb_removal_delay_deltas_present_flag");
}
#else
WRITE_FLAG(sei.m_cpbRemovalDelayDeltasPresentFlag, "cpb_removal_delay_deltas_present_flag");
#endif
if (sei.m_cpbRemovalDelayDeltasPresentFlag)
{
CHECK (sei.m_numCpbRemovalDelayDeltas < 1, "m_numCpbRemovalDelayDeltas must be > 0");
......@@ -305,8 +315,10 @@ void SEIWriter::xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei)
{
WRITE_CODE( sei.m_cpbRemovalDelayDelta[i], sei.m_cpbRemovalDelayLength, "cpb_removal_delay_delta[i]" );
}
#if !JVET_S0181_PROPOSAL2_BUFFERING_PERIOD_CLEANUP
CHECK (sei.m_bpMaxSubLayers < 1, "bp_max_sub_layers_minus1 must be > 0");
WRITE_CODE( sei.m_bpMaxSubLayers - 1, 3, "bp_max_sub_layers_minus1" );
#endif
}
CHECK (sei.m_bpCpbCnt < 1, "sei.m_bpCpbCnt must be > 0");
WRITE_UVLC( sei.m_bpCpbCnt - 1, "bp_cpb_cnt_minus1");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment