summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-10-07 17:03:52 +0000
committerSam James <sam@gentoo.org>2020-10-07 17:07:01 +0000
commit44b6376a81a1912b0a5337585b694d38521025e9 (patch)
tree3877a10501102e706950e5aea8dfb5f01aaef86c
parentx11-drivers/nvidia-drivers: Version 455.28 (diff)
downloadgentoo-44b6376a81a1912b0a5337585b694d38521025e9.tar.gz
gentoo-44b6376a81a1912b0a5337585b694d38521025e9.tar.bz2
gentoo-44b6376a81a1912b0a5337585b694d38521025e9.zip
media-video/ffmpeg: fix ppc build for 4.3.1
See: https://trac.ffmpeg.org/ticket/8750 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--media-video/ffmpeg/ffmpeg-4.3.1.ebuild1
-rw-r--r--media-video/ffmpeg/files/ffmpeg-4.3-altivec-novsx-yuv2rgb.patch23
2 files changed, 24 insertions, 0 deletions
diff --git a/media-video/ffmpeg/ffmpeg-4.3.1.ebuild b/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
index e1d995bd1cf5..f1f6178b251f 100644
--- a/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
@@ -327,6 +327,7 @@ S=${WORKDIR}/${P/_/-}
PATCHES=(
"${FILESDIR}"/chromium-r1.patch
"${FILESDIR}"/${PN}-4.3-fix-build-without-SSSE3.patch
+ "${FILESDIR}"/${PN}-4.3-altivec-novsx-yuv2rgb.patch
)
MULTILIB_WRAPPED_HEADERS=(
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
new file mode 100644
index 000000000000..40e7f9161726
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-4.3-altivec-novsx-yuv2rgb.patch
@@ -0,0 +1,23 @@
+Fixes build on ppc.
+https://trac.ffmpeg.org/attachment/ticket/8750/ffmpeg_altivec_yuv2rgb_novsx.patch
+diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c
+index 536545293d..930ef6b98f 100644
+--- a/libswscale/ppc/yuv2rgb_altivec.c
++++ b/libswscale/ppc/yuv2rgb_altivec.c
+@@ -283,6 +283,16 @@ static inline void cvtyuvtoRGB(SwsContext *c, vector signed short Y,
+ * ------------------------------------------------------------------------------
+ */
+
++#if !HAVE_VSX
++static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr)
++{
++ const vector unsigned char *v_addr = (const vector unsigned char *) (addr + offset);
++ vector unsigned char align_perm = vec_lvsl(offset, addr);
++
++ return (vector unsigned char) vec_perm(v_addr[0], v_addr[1], align_perm);
++}
++#endif /* !HAVE_VSX */
++
+ #define DEFCSP420_CVT(name, out_pixels) \
+ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \
+ int *instrides, int srcSliceY, int srcSliceH, \