[vlc-commits] commit: x264: activate preset only on recent versions of x264 ( Jean-Baptiste Kempf )
git at videolan.org
git at videolan.org
Mon May 10 16:08:24 CEST 2010
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Apr 24 17:10:10 2010 +0200| [a39392646417eb08345886a63cb5daea80ebbf63] | committer: Ilkka Ollakka
x264: activate preset only on recent versions of x264
(cherry picked from commit d53121f71e0ec6d22e89da02b136020e8f502adc)
Signed-off-by: Ilkka Ollakka <ileoo at iki.fi>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=a39392646417eb08345886a63cb5daea80ebbf63
---
modules/codec/x264.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index e7c4264..303e008 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -1,7 +1,7 @@
/*****************************************************************************
* x264.c: h264 video encoder
*****************************************************************************
- * Copyright (C) 2004-2006 the VideoLAN team
+ * Copyright (C) 2004-2010 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir at via.ecp.fr>
@@ -672,11 +672,13 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "stats", "x264_2pass.log", NULL, STATS_TEXT,
STATS_LONGTEXT, false )
-
+
+#if X264_BUILD >= 93
add_string( SOUT_CFG_PREFIX "preset", NULL , NULL, PRESET_TEXT , PRESET_TEXT, false )
change_string_list( x264_preset_names, x264_preset_names, 0 );
add_string( SOUT_CFG_PREFIX "tune", NULL , NULL, TUNE_TEXT, TUNE_TEXT, false )
change_string_list( x264_tune_names, x264_tune_names, 0 );
+#endif
vlc_module_end ()
@@ -697,7 +699,7 @@ static const char *const ppsz_sout_options[] = {
"verbose", "vbv-bufsize", "vbv-init", "vbv-maxrate", "weightb", "weightp",
"aq-mode", "aq-strength", "psy-rd", "psy", "profile", "lookahead", "slices",
"slice-max-size", "slice-max-mbs", "intra-refresh", "mbtree", "hrd",
- "tune","preset",NULL
+ "tune","preset", NULL
};
static block_t *Encode( encoder_t *, picture_t * );
@@ -761,6 +763,7 @@ static int Open ( vlc_object_t *p_this )
p_sys->psz_stat_name = NULL;
x264_param_default( &p_sys->param );
+#if X264_BUILD >= 93
char *psz_preset = var_GetString( p_enc, SOUT_CFG_PREFIX "preset" );
char *psz_tune = var_GetString( p_enc, SOUT_CFG_PREFIX "tune" );
if( *psz_preset == '\0' )
@@ -771,6 +774,7 @@ static int Open ( vlc_object_t *p_this )
x264_param_default_preset( &p_sys->param, psz_preset, psz_tune );
free( psz_preset );
free( psz_tune );
+#endif
p_sys->param.i_width = p_enc->fmt_in.video.i_width;
p_sys->param.i_height = p_enc->fmt_in.video.i_height;
More information about the vlc-commits
mailing list