Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/multimedia/ffmpeg4 Fix build for powerpc machines that...
details: https://anonhg.NetBSD.org/pkgsrc/rev/cad121e723aa
branches: trunk
changeset: 435401:cad121e723aa
user: rin <rin%pkgsrc.org@localhost>
date: Tue Jul 07 09:23:06 2020 +0000
description:
Fix build for powerpc machines that have AltiVec but no VSX support.
Workaround for upstream commit 3a557c5d88b7b15b5954ba2743febb055549b536:
https://github.com/FFmpeg/FFmpeg/commit/3a557c5d88b7b15b5954ba2743febb055549b53
Bump revision.
diffstat:
multimedia/ffmpeg4/Makefile | 4 +-
multimedia/ffmpeg4/distinfo | 3 +-
multimedia/ffmpeg4/patches/patch-libswscale_ppc_yuv2rgb__altivec.c | 51 ++++++++++
3 files changed, 55 insertions(+), 3 deletions(-)
diffs (82 lines):
diff -r 3e0a8f8095e4 -r cad121e723aa multimedia/ffmpeg4/Makefile
--- a/multimedia/ffmpeg4/Makefile Tue Jul 07 09:05:13 2020 +0000
+++ b/multimedia/ffmpeg4/Makefile Tue Jul 07 09:23:06 2020 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.33 2020/06/26 21:02:27 nia Exp $
+# $NetBSD: Makefile,v 1.34 2020/07/07 09:23:06 rin Exp $
PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg4/}
-PKGREVISION= 1
+PKGREVISION= 2
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= https://ffmpeg.org/
COMMENT= Decoding, encoding and streaming software (v4.x)
diff -r 3e0a8f8095e4 -r cad121e723aa multimedia/ffmpeg4/distinfo
--- a/multimedia/ffmpeg4/distinfo Tue Jul 07 09:05:13 2020 +0000
+++ b/multimedia/ffmpeg4/distinfo Tue Jul 07 09:23:06 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2020/06/29 19:22:34 nia Exp $
+$NetBSD: distinfo,v 1.19 2020/07/07 09:23:06 rin Exp $
SHA1 (ffmpeg-4.3.tar.xz) = dd618212469347feb5deb8934023ef6e1ae5f533
RMD160 (ffmpeg-4.3.tar.xz) = 8e5d102b55e2f8b1c4da585eb9d003ab03e5e30e
@@ -19,3 +19,4 @@
SHA1 (patch-libavutil_common.h) = d0f1093bc82567807b39dde990ee347f90a082c9
SHA1 (patch-libavutil_x86_asm.h) = 8f48f9e8ec08b5176bb40fc0021f3bb913dbef22
SHA1 (patch-libavutil_x86_cpu.c) = 9c97e68fde0fcb19741e034a803d509040ea4487
+SHA1 (patch-libswscale_ppc_yuv2rgb__altivec.c) = 79b439ea89fd5926a20a725d0a2ca1b091366ea5
diff -r 3e0a8f8095e4 -r cad121e723aa multimedia/ffmpeg4/patches/patch-libswscale_ppc_yuv2rgb__altivec.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/ffmpeg4/patches/patch-libswscale_ppc_yuv2rgb__altivec.c Tue Jul 07 09:23:06 2020 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-libswscale_ppc_yuv2rgb__altivec.c,v 1.1 2020/07/07 09:23:06 rin Exp $
+
+Fix build for powerpc machines that have AltiVec but no VSX support.
+
+Workaround for upstream commit 3a557c5d88b7b15b5954ba2743febb055549b536:
+https://github.com/FFmpeg/FFmpeg/commit/3a557c5d88b7b15b5954ba2743febb055549b536
+
+--- libswscale/ppc/yuv2rgb_altivec.c.orig 2020-06-16 03:54:24.000000000 +0900
++++ libswscale/ppc/yuv2rgb_altivec.c 2020-07-07 17:01:02.342931087 +0900
+@@ -283,6 +283,23 @@ static inline void cvtyuvtoRGB(SwsContex
+ * ------------------------------------------------------------------------------
+ */
+
++#if HAVE_VSX
++static inline vector unsigned char ffmpeg_vec_xl(const ubyte *xi)
++{
++ return vec_xl(0, xi)
++}
++#else
++static inline vector unsigned char ffmpeg_vec_xl(const ubyte *xi)
++{
++ const vector unsigned char *xivP;
++ vector unsigned char align_perm;
++
++ xivP = (const vector unsigned char *) xi;
++ align_perm = vec_lvsl(0, xi);
++ return (vector unsigned char) vec_perm(xivP[0], xivP[1], align_perm);
++}
++#endif
++
+ #define DEFCSP420_CVT(name, out_pixels) \
+ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \
+ int *instrides, int srcSliceY, int srcSliceH, \
+@@ -335,13 +352,13 @@ static int altivec_ ## name(SwsContext *
+ vec_dstst(oute, (0x02000002 | (((w * 3 + 32) / 32) << 16)), 1); \
+ \
+ for (j = 0; j < w / 16; j++) { \
+- y0 = vec_xl(0, y1i); \
++ y0 = ffmpeg_vec_xl(y1i); \
+ \
+- y1 = vec_xl(0, y2i); \
++ y1 = ffmpeg_vec_xl(y2i); \
+ \
+- u = (vector signed char) vec_xl(0, ui); \
++ u = (vector signed char) ffmpeg_vec_xl(ui); \
+ \
+- v = (vector signed char) vec_xl(0, vi); \
++ v = (vector signed char) ffmpeg_vec_xl(vi); \
+ \
+ u = (vector signed char) \
+ vec_sub(u, \
Home |
Main Index |
Thread Index |
Old Index