forked from pool/ffmpeg-4
Jan Engelhardt
584933a75b
- avoid ppc64le build error upstream issue https://trac.ffmpeg.org/ticket/7861 Add ffmpeg4_swscale_replace_illegal_vector_keyword.patch Add ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch OBS-URL: https://build.opensuse.org/request/show/723337 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=83
51 lines
2.1 KiB
Diff
51 lines
2.1 KiB
Diff
From daniel at octaforge.org Tue Aug 6 18:55:37 2019
|
|
From: daniel at octaforge.org (Daniel Kolesa)
|
|
Date: Tue, 6 Aug 2019 17:55:37 +0200
|
|
Subject: [FFmpeg-devel] [PATCH 2/2] swscale: Fix AltiVec/VSX build with
|
|
recent GCC
|
|
In-Reply-To: <20190806155537.25535-1-daniel@octaforge.org>
|
|
References: <20190806155537.25535-1-daniel@octaforge.org>
|
|
Message-ID: <20190806155537.25535-3-daniel@octaforge.org>
|
|
|
|
The argument to vec_splat_u16 must be a literal. By making the
|
|
function always inline and marking the arguments const, gcc can
|
|
turn those into literals, and avoid build errors like:
|
|
|
|
swscale_vsx.c:165:53: error: argument 1 must be a 5-bit signed literal
|
|
|
|
Signed-off-by: Daniel Kolesa <daniel at octaforge.org>
|
|
---
|
|
libswscale/ppc/swscale_vsx.c | 12 ++++++++----
|
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
Index: ffmpeg-4.2/libswscale/ppc/swscale_vsx.c
|
|
===================================================================
|
|
--- ffmpeg-4.2.orig/libswscale/ppc/swscale_vsx.c
|
|
+++ ffmpeg-4.2/libswscale/ppc/swscale_vsx.c
|
|
@@ -154,8 +154,10 @@ static void yuv2plane1_nbps_u(const int1
|
|
}
|
|
}
|
|
|
|
-static void yuv2plane1_nbps_vsx(const int16_t *src, uint16_t *dest, int dstW,
|
|
- int big_endian, int output_bits)
|
|
+static av_always_inline void yuv2plane1_nbps_vsx(const int16_t *src,
|
|
+ uint16_t *dest, int dstW,
|
|
+ const int big_endian,
|
|
+ const int output_bits)
|
|
{
|
|
const int dst_u = -(uintptr_t)dest & 7;
|
|
const int shift = 15 - output_bits;
|
|
@@ -273,8 +275,10 @@ static void yuv2plane1_16_u(const int32_
|
|
}
|
|
}
|
|
|
|
-static void yuv2plane1_16_vsx(const int32_t *src, uint16_t *dest, int dstW,
|
|
- int big_endian, int output_bits)
|
|
+static av_always_inline void yuv2plane1_16_vsx(const int32_t *src,
|
|
+ uint16_t *dest, int dstW,
|
|
+ const int big_endian,
|
|
+ int output_bits)
|
|
{
|
|
const int dst_u = -(uintptr_t)dest & 7;
|
|
const int shift = 3;
|