[x264-devel] Correctly signal max_dec_frame_buffering with --keyint 1

Anton Mitrofanov git at videolan.org
Thu Dec 1 21:01:43 CET 2016


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Thu Sep 22 00:17:48 2016 +0300| [75918e1849e1286885bfcfb0c348de885a702fb3] | committer: Anton Mitrofanov

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.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=75918e1849e1286885bfcfb0c348de885a702fb3
---

 encoder/set.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/encoder/set.c b/encoder/set.c
index a3a550c..55b7e1a 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;



More information about the x264-devel mailing list