Fix SPS ref pic counts for lowdelay GOP

This commit is contained in:
Ari Koivula 2015-11-12 19:05:06 +02:00
parent a6a713ac02
commit b10866cb1e

View file

@ -329,8 +329,13 @@ static void encoder_state_write_bitstream_seq_parameter_set(bitstream_t* stream,
WRITE_U(stream, 0, 1, "sps_sub_layer_ordering_info_present_flag"); WRITE_U(stream, 0, 1, "sps_sub_layer_ordering_info_present_flag");
//for each layer //for each layer
WRITE_UE(stream, encoder->cfg->ref_frames + encoder->cfg->gop_len, "sps_max_dec_pic_buffering"); if (encoder->cfg->gop_lowdelay) {
WRITE_UE(stream, encoder->cfg->gop_len, "sps_num_reorder_pics"); WRITE_UE(stream, encoder->cfg->ref_frames, "sps_max_dec_pic_buffering");
WRITE_UE(stream, 0, "sps_num_reorder_pics");
} else {
WRITE_UE(stream, encoder->cfg->ref_frames + encoder->cfg->gop_len, "sps_max_dec_pic_buffering");
WRITE_UE(stream, encoder->cfg->gop_len, "sps_num_reorder_pics");
}
WRITE_UE(stream, 0, "sps_max_latency_increase"); WRITE_UE(stream, 0, "sps_max_latency_increase");
//end for //end for