Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/, media-video/ffmpeg/files/
Date: Wed, 07 Oct 2020 17:07:08
Message-Id: 1602090421.44b6376a81a1912b0a5337585b694d38521025e9.sam@gentoo
1 commit: 44b6376a81a1912b0a5337585b694d38521025e9
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 7 17:03:52 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 7 17:07:01 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44b6376a
7
8 media-video/ffmpeg: fix ppc build for 4.3.1
9
10 See: https://trac.ffmpeg.org/ticket/8750
11 Package-Manager: Portage-3.0.4, Repoman-3.0.1
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 media-video/ffmpeg/ffmpeg-4.3.1.ebuild | 1 +
15 .../files/ffmpeg-4.3-altivec-novsx-yuv2rgb.patch | 23 ++++++++++++++++++++++
16 2 files changed, 24 insertions(+)
17
18 diff --git a/media-video/ffmpeg/ffmpeg-4.3.1.ebuild b/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
19 index e1d995bd1cf..f1f6178b251 100644
20 --- a/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
21 +++ b/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
22 @@ -327,6 +327,7 @@ S=${WORKDIR}/${P/_/-}
23 PATCHES=(
24 "${FILESDIR}"/chromium-r1.patch
25 "${FILESDIR}"/${PN}-4.3-fix-build-without-SSSE3.patch
26 + "${FILESDIR}"/${PN}-4.3-altivec-novsx-yuv2rgb.patch
27 )
28
29 MULTILIB_WRAPPED_HEADERS=(
30
31 diff --git a/media-video/ffmpeg/files/ffmpeg-4.3-altivec-novsx-yuv2rgb.patch b/media-video/ffmpeg/files/ffmpeg-4.3-altivec-novsx-yuv2rgb.patch
32 new file mode 100644
33 index 00000000000..40e7f916172
34 --- /dev/null
35 +++ b/media-video/ffmpeg/files/ffmpeg-4.3-altivec-novsx-yuv2rgb.patch
36 @@ -0,0 +1,23 @@
37 +Fixes build on ppc.
38 +https://trac.ffmpeg.org/attachment/ticket/8750/ffmpeg_altivec_yuv2rgb_novsx.patch
39 +diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c
40 +index 536545293d..930ef6b98f 100644
41 +--- a/libswscale/ppc/yuv2rgb_altivec.c
42 ++++ b/libswscale/ppc/yuv2rgb_altivec.c
43 +@@ -283,6 +283,16 @@ static inline void cvtyuvtoRGB(SwsContext *c, vector signed short Y,
44 + * ------------------------------------------------------------------------------
45 + */
46 +
47 ++#if !HAVE_VSX
48 ++static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr)
49 ++{
50 ++ const vector unsigned char *v_addr = (const vector unsigned char *) (addr + offset);
51 ++ vector unsigned char align_perm = vec_lvsl(offset, addr);
52 ++
53 ++ return (vector unsigned char) vec_perm(v_addr[0], v_addr[1], align_perm);
54 ++}
55 ++#endif /* !HAVE_VSX */
56 ++
57 + #define DEFCSP420_CVT(name, out_pixels) \
58 + static int altivec_ ## name(SwsContext *c, const unsigned char **in, \
59 + int *instrides, int srcSliceY, int srcSliceH, \