[vlc-devel] commit: x264.c: add option to adjust lookahead (Ilkka Ollakka )
git version control
git at videolan.org
Sun Dec 6 21:59:35 CET 2009
vlc | branch: 1.0-bugfix | Ilkka Ollakka <ileoo at iki.fi> | Sun Nov 15 14:48:33 2009 +0200| [0b4ee0c016a54aa98f5ce02ea760de883c322bbd] | committer: Ilkka Ollakka
x264.c: add option to adjust lookahead
Limit range to 0..60 currently, as x264 tunes doesn't seem to use larger
values than that
cherry-picked from df6af2ed88a5eef071ab92a6d5fba2df461252c0
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0b4ee0c016a54aa98f5ce02ea760de883c322bbd
---
modules/codec/x264.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index dd73922..3b91a51 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -412,6 +412,11 @@ static const char *const enc_me_list_text[] =
{ N_("dia"), N_("hex"), N_("umh"), N_("esa") };
#endif
+#define LOOKAHEAD_TEXT N_("Framecount to use on frametype lookahead")
+#define LOOKAHEAD_LONGTEXT N_("Framecount to use on frametype lookahead. " \
+ "Currently default is lower than x264 default because unmuxable output" \
+ "doesn't handle larger values that well yet" )
+
#if X264_BUILD >= 58 /* r728 */
static const char *const enc_me_list[] =
{ "dia", "hex", "umh", "esa", "tesa" };
@@ -700,6 +705,13 @@ vlc_module_begin ()
FAST_PSKIP_LONGTEXT, false )
#endif
+#if X264_BUILD >= 69
+ add_integer( SOUT_CFG_PREFIX "lookahead", 5, NULL, LOOKAHEAD_TEXT,
+ LOOKAHEAD_LONGTEXT, false )
+ change_integer_range( 0, 60 )
+#endif
+
+
#if X264_BUILD >= 46 /* r503 */
add_bool( SOUT_CFG_PREFIX "dct-decimate", 1, NULL, DCT_DECIMATE_TEXT,
DCT_DECIMATE_LONGTEXT, false )
@@ -1420,7 +1432,7 @@ static int Open ( vlc_object_t *p_this )
/* Set lookahead value to lower than default,
* as rtp-output without mux doesn't handle
* difference that well yet*/
- p_sys->param.rc.i_lookahead=5;
+ p_sys->param.rc.i_lookahead= var_GetInteger( p_enc, SOUT_CFG_PREFIX "lookahead" );
#endif
/* Open the encoder */
More information about the vlc-devel
mailing list