From: Anton Mitrofanov Date: Wed, 21 Sep 2016 21:17:48 +0000 (+0300) Subject: Correctly signal max_dec_frame_buffering with --keyint 1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75918e1849e1286885bfcfb0c348de885a702fb3;p=libx264 Correctly signal max_dec_frame_buffering with --keyint 1 According to E.2.1 it is inferred to be equal to 0 only if profile_idc is equal to 44, 86, 100, 110, 122, or 244 and constraint_set3_flag is equal to 1. --- diff --git a/encoder/set.c b/encoder/set.c index a3a550cb..55b7e1a7 100644 --- a/encoder/set.c +++ b/encoder/set.c @@ -137,7 +137,7 @@ void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param ) sps->i_level_idc = 11; } /* Intra profiles */ - if( param->i_keyint_max == 1 && sps->i_profile_idc > PROFILE_HIGH ) + if( param->i_keyint_max == 1 && sps->i_profile_idc >= PROFILE_HIGH ) sps->b_constraint_set3 = 1; sps->vui.i_num_reorder_frames = param->i_bframe_pyramid ? 2 : param->i_bframe ? 1 : 0; @@ -238,7 +238,7 @@ void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param ) // NOTE: HRD related parts of the SPS are initialised in x264_ratecontrol_init_reconfigurable - sps->vui.b_bitstream_restriction = param->i_keyint_max > 1; + sps->vui.b_bitstream_restriction = !(sps->b_constraint_set3 && sps->i_profile_idc >= PROFILE_HIGH); if( sps->vui.b_bitstream_restriction ) { sps->vui.b_motion_vectors_over_pic_boundaries = 1;