kumquat-buildroot/package/vlc/0009-x264-drop-148-build-support-and-fix-10bit-support.patch
Bernd Kuhls 7dd64181d0 package/vlc: bump version to 3.0.3
vlc depends on gcc-4.9+:
https://mailman.videolan.org/pipermail/vlc-devel/2016-September/109452.html

Added fix for stack-protector detection.

Disabled all new optional dependencies for now, subsequent patches will
enable dependencies with buildroot packages present.

Removed gles1 configure option after
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=6c4bb081844c51a9a1b1cdb44fc5f42e5a879327

Renamed mmal configure options after
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=bdb1d86acfb0d0068e57281b6fbfc52345960d29
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=1d2b56c68bbc3287e17f6140bdf8c8c3efe08fdc

Renamed avahi configure option after
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=55280fa62cb68b71767778c56250352b4840b69a

Removed directfb support after being dropped upstream:
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=8e1a0e876615da31321203090daa7c8699b6406d

Renamed matroska configure option after
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=156ceb73e2f46618a6cffb081e71e368a315ec3e

Replaced qt4 support with qt5:
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=1c221a77d92935866e897254c07e1d12a4b95ae0

Removed sdl support:
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=4b8a2755fe8c0e3e1e9c52483b22c26e24fd5527

Removed --enable-xcb in BR2_PACKAGE_XCB_UTIL_KEYSYMS block, it is
already present in the BR2_PACKAGE_LIBXCB block.

Rebased patches
- 0001-Disable-building-of-statically-linked-vlc-binary.patch
- 0007-Don-t-assume-strerror_l-is-available.patch
- 0009-x264-drop-148-build-support-and-fix-10bit-support.patch
  also renamed from 0013

Removed patches
- 0002-configure.ac-add-check-for-libgcrypt-config-program.patch
  not needed anymore after upstream commit
  http://git.videolan.org/?p=vlc.git;a=commitdiff;h=f94ac7241f33b6896a8e12ae4e3e43d9fd7fb6cc
- 0004-Drop-error-implicit-function-declaration-compile-fla.patch
- 0006-Don-t-assume-X11-is-available-when-Qt5-is-used.patch
  removed, qt4 is not supported anymore
- 0008-fix-fallback-code-and-add-required-realtime-library-.patch
- 0009-Changes-for-ffmpeg-3.0.patch
- 0010-Fix-build-when-using-C99-and-C-11.patch
- 0011-compat-fix-static_assert.patch
- 0012-Fix-build-with-libupnp-above-1.6.23.patch

New patches
- 0002-lua-Define-LUA_COMPAT_APIINTCASTS-for-Lua-5.3.0-comp.patch to fix lua-5.3 support
- 0004-qt-fix-build-against-Qt-5.11.patch
- 0006-Fix-build-error-using-uClibc-by-adding-sys-types.h.patch
- 0008-posix-remove-ancient-run-time-fallback-to-real-time-.patch
- 0010-Add-support-for-freerdp2.patch
  fixes support for freerdp >= 2.0

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Thomas: use Git formatted patches.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-16 12:34:10 +02:00

214 lines
7.9 KiB
Diff

From dd37405dc527c5653f512966263284e7e18b7f9f Mon Sep 17 00:00:00 2001
From: Ilkka Ollakka <ileoo@videolan.org>
Date: Sat, 24 Mar 2018 11:23:33 +0200
Subject: [PATCH] x264: drop <148 build support and fix 10bit support
x264: drop <148 build support and fix 10bit support
Drop old #if as 148 is not that recent anymore.
fixes #19581
Downloaded from upstream commit
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=a8953ba707cca1f2de372ca24513296bcfcdaaa8
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
modules/codec/x264.c | 65 ++++++++--------------------------------------------
1 file changed, 10 insertions(+), 55 deletions(-)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index e02048f075..bcf3c89a10 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -84,13 +84,7 @@ static void x264_log( void *, int i_level, const char *psz, va_list );
"I-frames, but do not start a new GOP." )
#define OPENGOP_TEXT N_("Use recovery points to close GOPs")
-#if X264_BUILD < 115
-#define OPENGOP_LONGTEXT N_("none: use closed GOPs only\n"\
- "normal: use standard open GOPs\n" \
- "bluray: use Blu-ray compatible open GOPs" )
-#else
#define OPENGOP_LONGTEXT N_("use open GOP, for bluray compatibility use also bluray-compat option")
-#endif
#define BLURAY_TEXT N_("Enable compatibility hacks for Blu-ray support")
#define BLURAY_LONGTEXT N_("Enable hacks for Blu-ray support, this doesn't enforce every aspect of Blu-ray compatibility\n" \
@@ -469,16 +463,10 @@ vlc_module_begin ()
add_integer( SOUT_CFG_PREFIX "min-keyint", 25, MIN_KEYINT_TEXT,
MIN_KEYINT_LONGTEXT, true )
-#if X264_BUILD >= 102 && X264_BUILD <= 114
- add_string( SOUT_CFG_PREFIX "opengop", "none", OPENGOP_TEXT,
- OPENGOP_LONGTEXT, true )
- change_string_list( x264_open_gop_names, x264_open_gop_names )
-#elif X264_BUILD > 114
add_bool( SOUT_CFG_PREFIX "opengop", false, OPENGOP_TEXT,
OPENGOP_LONGTEXT, true )
add_bool( SOUT_CFG_PREFIX "bluray-compat", false, BLURAY_TEXT,
BLURAY_LONGTEXT, true )
-#endif
add_integer( SOUT_CFG_PREFIX "scenecut", 40, SCENE_TEXT,
SCENE_LONGTEXT, true )
@@ -498,13 +486,8 @@ vlc_module_begin ()
B_BIAS_LONGTEXT, true )
change_integer_range( -100, 100 )
-#if X264_BUILD >= 87
add_string( SOUT_CFG_PREFIX "bpyramid", "normal", BPYRAMID_TEXT,
BPYRAMID_LONGTEXT, true )
-#else
- add_string( SOUT_CFG_PREFIX "bpyramid", "none", BPYRAMID_TEXT,
- BPYRAMID_LONGTEXT, true )
-#endif
change_string_list( bpyramid_list, bpyramid_list )
add_bool( SOUT_CFG_PREFIX "cabac", true, CABAC_TEXT, CABAC_LONGTEXT,
@@ -541,22 +524,18 @@ vlc_module_begin ()
add_bool( SOUT_CFG_PREFIX "interlaced", false, INTERLACED_TEXT, INTERLACED_LONGTEXT,
true )
-#if X264_BUILD >= 111
add_integer( SOUT_CFG_PREFIX "frame-packing", -1, FRAMEPACKING_TEXT, FRAMEPACKING_LONGTEXT, true )
change_integer_list( framepacking_list, framepacking_list_text )
change_integer_range( -1, 6)
-#endif
add_integer( SOUT_CFG_PREFIX "slices", 0, SLICE_COUNT, SLICE_COUNT_LONGTEXT, true )
add_integer( SOUT_CFG_PREFIX "slice-max-size", 0, SLICE_MAX_SIZE, SLICE_MAX_SIZE_LONGTEXT, true )
add_integer( SOUT_CFG_PREFIX "slice-max-mbs", 0, SLICE_MAX_MBS, SLICE_MAX_MBS_LONGTEXT, true )
-#if X264_BUILD >= 89
add_string( SOUT_CFG_PREFIX "hrd", "none", HRD_TEXT, HRD_TEXT, true )
vlc_config_set (VLC_CONFIG_LIST,
(sizeof(x264_nal_hrd_names) / sizeof (char*)) - 1,
x264_nal_hrd_names, x264_nal_hrd_names);
-#endif
/* Ratecontrol */
@@ -842,20 +821,14 @@ static int Open ( vlc_object_t *p_this )
fullrange |= p_enc->fmt_in.video.b_color_range_full;
p_enc->fmt_in.i_codec = fullrange ? VLC_CODEC_J420 : VLC_CODEC_I420;
p_sys->i_colorspace = X264_CSP_I420;
-#if X264_BUILD >= 118
char *psz_profile = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" );
- if( psz_profile )
- {
- const int mask = x264_bit_depth > 8 ? X264_CSP_HIGH_DEPTH : 0;
-
-
# ifdef MODULE_NAME_IS_x26410b
- if( mask == 0)
- {
- msg_Err( p_enc, "Only high bit depth encoding supported, bit depth:%d", x264_bit_depth);
- return VLC_EGENERIC;
- }
+ const int mask = X264_CSP_HIGH_DEPTH;
+# else
+ const int mask = 0;
# endif
+ if( psz_profile )
+ {
if( !strcmp( psz_profile, "high10" ) )
{
@@ -878,7 +851,6 @@ static int Open ( vlc_object_t *p_this )
msg_Err( p_enc, "Only high-profiles and 10-bit are supported");
return VLC_EGENERIC;
}
-
# endif
}
# ifdef MODULE_NAME_IS_x26410b
@@ -889,7 +861,6 @@ static int Open ( vlc_object_t *p_this )
}
# endif
free( psz_profile );
-#endif //X264_BUILD
p_enc->pf_encode_video = Encode;
p_enc->pf_encode_audio = NULL;
@@ -912,6 +883,10 @@ static int Open ( vlc_object_t *p_this )
#else
x264_param_default( &p_sys->param );
x264_param_default_preset( &p_sys->param, psz_preset, psz_tune );
+# if X264_BUILD > 152
+ if( mask )
+ p_sys->param.i_bitdepth = 10;
+# endif
#endif
free( psz_preset );
free( psz_tune );
@@ -1089,10 +1064,8 @@ static int Open ( vlc_object_t *p_this )
if( fabs( var_GetFloat( p_enc, SOUT_CFG_PREFIX "aq-strength" ) - 1.0) > 0.005 )
p_sys->param.rc.f_aq_strength = var_GetFloat( p_enc, SOUT_CFG_PREFIX "aq-strength" );
-#if X264_BUILD >= 111
if( var_GetInteger( p_enc, SOUT_CFG_PREFIX "frame-packing" ) > -1 )
p_sys->param.i_frame_packing = var_GetInteger( p_enc, SOUT_CFG_PREFIX "frame-packing" );
-#endif
if( var_GetBool( p_enc, SOUT_CFG_PREFIX "verbose" ) )
p_sys->param.i_log_level = X264_LOG_DEBUG;
@@ -1108,26 +1081,14 @@ static int Open ( vlc_object_t *p_this )
i_val = var_GetInteger( p_enc, SOUT_CFG_PREFIX "keyint" );
if( i_val > 0 && i_val != 250 ) p_sys->param.i_keyint_max = i_val;
-#if X264_BUILD >= 102
if( i_val == -1 ) p_sys->param.i_keyint_max = X264_KEYINT_MAX_INFINITE;
-#endif
i_val = var_GetInteger( p_enc, SOUT_CFG_PREFIX "min-keyint" );
if( i_val > 0 && i_val != 25 ) p_sys->param.i_keyint_min = i_val;
-#if X264_BUILD >= 102 && X264_BUILD <= 114
- psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "opengop" );
- if( !strcmp( psz_val, "none" ) )
- p_sys->param.i_open_gop = X264_OPEN_GOP_NONE;
- else if( !strcmp( psz_val, "normal" ) )
- p_sys->param.i_open_gop = X264_OPEN_GOP_NORMAL;
- else if( !strcmp( psz_val, "bluray" ) )
- p_sys->param.i_open_gop = X264_OPEN_GOP_BLURAY;
- free( psz_val );
-#elif X264_BUILD >= 115
p_sys->param.b_open_gop = var_GetBool( p_enc, SOUT_CFG_PREFIX "opengop" );
p_sys->param.b_bluray_compat = var_GetBool( p_enc, SOUT_CFG_PREFIX "bluray-compat" );
-#endif
+
i_val = var_GetInteger( p_enc, SOUT_CFG_PREFIX "bframes" );
if( i_val >= 0 && i_val <= 16 && i_val != 3 )
p_sys->param.i_bframe = i_val;
@@ -1165,14 +1126,12 @@ static int Open ( vlc_object_t *p_this )
if( i_val >= 1 && i_val != 7 )
p_sys->param.analyse.i_subpel_refine = i_val;
-#if X264_BUILD >= 89
psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "hrd");
if( !strcmp( psz_val, "vbr" ) )
p_sys->param.i_nal_hrd = X264_NAL_HRD_VBR;
else if( !strcmp( psz_val, "cbr" ) )
p_sys->param.i_nal_hrd = X264_NAL_HRD_CBR;
free( psz_val );
-#endif
//TODO: psz_val == NULL ?
psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "me" );
@@ -1531,11 +1490,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
int i_nal=0, i_out=0, i=0;
/* init pic */
-#if X264_BUILD >= 98
x264_picture_init( &pic );
-#else
- memset( &pic, 0, sizeof( x264_picture_t ) );
-#endif
if( likely(p_pict) ) {
pic.i_pts = p_pict->date;
pic.img.i_csp = p_sys->i_colorspace;
--
2.14.4