]> granicus.if.org Git - libx264/commitdiff
Correctly signal max_dec_frame_buffering with --keyint 1
authorAnton Mitrofanov <BugMaster@narod.ru>
Wed, 21 Sep 2016 21:17:48 +0000 (00:17 +0300)
committerAnton Mitrofanov <BugMaster@narod.ru>
Wed, 21 Sep 2016 21:18:16 +0000 (00:18 +0300)
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.

encoder/set.c

index a3a550cb26dfd42f795cb99593fe35225d58bc37..55b7e1a7bde07140279f8e9a3692a6fe9ca18d3f 100644 (file)
@@ -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;