Commit f88ff9a9 authored by Jean-Paul Saman's avatar Jean-Paul Saman

modules/codec/x264.c: relax requirement to X264_BUILD >= 0.86

X264 requires X264_BUILD version >= 83 now and fix a few place
where X264_BUILD >= 86 are required.
parent 6a4df192
......@@ -3007,7 +3007,7 @@ if test "${enable_x264}" != "no"; then
AC_MSG_ERROR([the specified tree doesn't have x264.h])
fi
else
PKG_CHECK_MODULES(X264,x264 >= 0.86, [
PKG_CHECK_MODULES(X264,x264 >= 0.27, [
VLC_ADD_PLUGIN([x264])
VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
......@@ -3021,7 +3021,7 @@ if test "${enable_x264}" != "no"; then
fi
],[
if test "${enable_x264}" = "yes"; then
AC_MSG_ERROR([Could not find libx264 >= 0.86 on your system: you may get it from http://www.videolan.org/x264.html])
AC_MSG_ERROR([Could not find libx264 >= 0.27 on your system: you may get it from http://www.videolan.org/x264.html])
fi
])
LDFLAGS="${LDFLAGS_save}"
......
......@@ -477,9 +477,11 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "level", "0", NULL, LEVEL_TEXT,
LEVEL_LONGTEXT, false )
#if X264_BUILD >= 86
add_string( SOUT_CFG_PREFIX "profile", "high", NULL, PROFILE_TEXT,
PROFILE_LONGTEXT, false )
change_string_list( x264_profile_names, x264_profile_names, 0 );
#endif
add_bool( SOUT_CFG_PREFIX "interlaced", false, NULL, INTERLACED_TEXT, INTERLACED_LONGTEXT,
false )
......@@ -675,10 +677,12 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "stats", "x264_2pass.log", NULL, STATS_TEXT,
STATS_LONGTEXT, false )
#if X264_BUILD >= 86
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 ()
......@@ -755,6 +759,7 @@ static int Open ( vlc_object_t *p_this )
p_sys->psz_stat_name = NULL;
x264_param_default( &p_sys->param );
#if X264_BUILD >= 86
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' )
......@@ -765,6 +770,8 @@ 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;
......@@ -1153,6 +1160,7 @@ static int Open ( vlc_object_t *p_this )
p_sys->param.rc.i_vbv_buffer_size /= p_sys->param.i_fps_num;
}
#if X264_BUILD >= 86
/* Check if user has given some profile (baseline,main,high) to limit
* settings, and apply those*/
psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" );
......@@ -1175,7 +1183,7 @@ static int Open ( vlc_object_t *p_this )
/* high profile don't restrict stuff*/
}
free( psz_val );
#endif
unsigned i_cpu = vlc_CPU();
if( !(i_cpu & CPU_CAPABILITY_MMX) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment