mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-12-18 03:04:06 +00:00
Make sure the dpb is more than max_num_reorder_pics
This commit is contained in:
parent
d4880be6f2
commit
899c672ed1
|
@ -146,6 +146,7 @@ static void encoder_state_write_bitstream_vid_parameter_set(bitstream_t* stream,
|
||||||
|
|
||||||
int max_buffer = max_required_dpb_size(encoder);
|
int max_buffer = max_required_dpb_size(encoder);
|
||||||
int max_reorder = max_num_reorder_pics(encoder);
|
int max_reorder = max_num_reorder_pics(encoder);
|
||||||
|
if (max_buffer - 1 < max_reorder) max_buffer = max_reorder + 1;
|
||||||
WRITE_UE(stream, max_buffer - 1, "vps_max_dec_pic_buffering_minus1");
|
WRITE_UE(stream, max_buffer - 1, "vps_max_dec_pic_buffering_minus1");
|
||||||
WRITE_UE(stream, max_reorder, "vps_max_num_reorder_pics");
|
WRITE_UE(stream, max_reorder, "vps_max_num_reorder_pics");
|
||||||
|
|
||||||
|
@ -417,6 +418,7 @@ static void encoder_state_write_bitstream_seq_parameter_set(bitstream_t* stream,
|
||||||
//for each layer
|
//for each layer
|
||||||
int max_buffer = max_required_dpb_size(encoder);
|
int max_buffer = max_required_dpb_size(encoder);
|
||||||
int max_reorder = max_num_reorder_pics(encoder);
|
int max_reorder = max_num_reorder_pics(encoder);
|
||||||
|
if (max_buffer - 1 < max_reorder) max_buffer = max_reorder + 1;
|
||||||
WRITE_UE(stream, max_buffer - 1, "sps_max_dec_pic_buffering_minus1");
|
WRITE_UE(stream, max_buffer - 1, "sps_max_dec_pic_buffering_minus1");
|
||||||
WRITE_UE(stream, max_reorder, "sps_max_num_reorder_pics");
|
WRITE_UE(stream, max_reorder, "sps_max_num_reorder_pics");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue