[vlc-devel] commit: x264.c: set vbv max bitrate to bitrate if doing cbr (Ilkka Ollakka )

git version control git at videolan.org
Thu Sep 17 16:15:47 CEST 2009


vlc | branch: 1.0-bugfix | Ilkka Ollakka <ileoo at videolan.org> | Tue Jul 21 14:03:58 2009 +0300| [bb134f02f9b4d10282d314aa826665131150dfa2] | committer: Ilkka Ollakka 

x264.c: set vbv max bitrate to bitrate if doing cbr
(cherry picked from commit cce5f9e2b898d31065a9821607efc6873c98db90)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb134f02f9b4d10282d314aa826665131150dfa2
---

 modules/codec/x264.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 053c4a0..dd533cd 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -874,7 +874,12 @@ static int  Open ( vlc_object_t *p_this )
 
     /* max bitrate = average bitrate -> CBR */
     var_Get( p_enc, SOUT_CFG_PREFIX "vbv-maxrate", &val );
-    p_sys->param.rc.i_vbv_max_bitrate = val.i_int;
+#if X264_BUILD >= 48
+    if( !val.i_int && p_sys->param.rc.i_rc_method == X264_RC_ABR )
+        p_sys->param.rc.i_vbv_max_bitrate = p_sys->param.rc.i_bitrate;
+    else
+#endif
+        p_sys->param.rc.i_vbv_max_bitrate = val.i_int;
 
 #else
     p_sys->param.rc.i_rc_buffer_size = p_sys->param.rc.i_bitrate;




More information about the vlc-devel mailing list