diff options
author | bouyer <bouyer> | 2014-12-03 15:06:11 +0000 |
---|---|---|
committer | bouyer <bouyer> | 2014-12-03 15:06:11 +0000 |
commit | acc07ae16a57b65fedf92e9ed575e6d4eaff71e3 (patch) | |
tree | 2a21afd36a4f6ff6d38e1d7c18d17a110e6d15e1 /multimedia | |
parent | 841ea0f0d3bc66ade2d3e53b2e727fbe931de67d (diff) | |
download | pkgsrc-acc07ae16a57b65fedf92e9ed575e6d4eaff71e3.tar.gz |
Add patch from PR pkg/48680, fixing build on netbsd-7/i386 and newer.
Add -mstackrealign -mpreferred-stack-boundary=4 to CFLAGS on i386 for all
gcc 4.x versions, this appears to still be needed with gcc 4.8.4.
Bump PKGREVISION for ffmpeg2 and ffplay2 (which uses ffmpeg2 patches)
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/ffmpeg2/Makefile | 8 | ||||
-rw-r--r-- | multimedia/ffmpeg2/distinfo | 3 | ||||
-rw-r--r-- | multimedia/ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c | 87 | ||||
-rw-r--r-- | multimedia/ffplay2/Makefile | 3 |
4 files changed, 95 insertions, 6 deletions
diff --git a/multimedia/ffmpeg2/Makefile b/multimedia/ffmpeg2/Makefile index c9246f70149..becfc9857af 100644 --- a/multimedia/ffmpeg2/Makefile +++ b/multimedia/ffmpeg2/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.12 2014/10/01 16:09:16 wiz Exp $ +# $NetBSD: Makefile,v 1.13 2014/12/03 15:06:11 bouyer Exp $ PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg2/} +PKGREVISION= 1 MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://ffmpeg.mplayerhq.hu/ COMMENT= Decoding, encoding and streaming software (v2.x) @@ -38,15 +39,14 @@ post-install: .include "../../mk/compiler.mk" # disable asm on i386 for non-gcc and gcc < 4.2 -# no alignment options needed for gcc >= 4.6 on i386 .if ${MACHINE_ARCH} == "i386" . if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \ || !empty(MACHINE_PLATFORM:MSunOS-*-i386) \ || !empty(CC_VERSION:Mgcc-[123]*) \ - || !empty(CC_VERSION:Mgcc-4.[01]*) \ + || !empty(CC_VERSION:Mgcc-4.[01].*) \ || empty(CC_VERSION:Mgcc*) CONFIGURE_ARGS+= --disable-asm -. elif !empty(CC_VERSION:Mgcc-4.[2345]*) +. elif !empty(CC_VERSION:Mgcc-4.*) CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4 . endif .endif diff --git a/multimedia/ffmpeg2/distinfo b/multimedia/ffmpeg2/distinfo index d6a03f8d4d9..431094ce663 100644 --- a/multimedia/ffmpeg2/distinfo +++ b/multimedia/ffmpeg2/distinfo @@ -1,10 +1,11 @@ -$NetBSD: distinfo,v 1.23 2014/12/01 11:26:49 adam Exp $ +$NetBSD: distinfo,v 1.24 2014/12/03 15:06:11 bouyer Exp $ SHA1 (ffmpeg-2.4.4.tar.bz2) = c0a0829fbb4cf423eed77f39d3661d1a34ac7c35 RMD160 (ffmpeg-2.4.4.tar.bz2) = e38bae3bf539404dc8afdb2805fb717f3cacc6db Size (ffmpeg-2.4.4.tar.bz2) = 7369780 bytes SHA1 (patch-Makefile) = ff8a7a5fdfd4987ef2835bd7360a78efd4310253 SHA1 (patch-configure) = 42be64b0456c4d09d24db2535e22e948034ebd3c +SHA1 (patch-libavcodec_x86_ac3dsp_init.c) = 8634661d76bc3bce43437caa4244b4f52237709f SHA1 (patch-libavutil_common.h) = ebbd0c169f228af37ae2dd54b27d5dba11a34c5e SHA1 (patch-libavutil_x86_asm.h) = 3fe732ec6da9f0920d3c6e3a5db9bed65b0a3e40 SHA1 (patch-libavutil_x86_cpu.c) = ece66a5b22130754c11c643dae48171d04d3246f diff --git a/multimedia/ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c b/multimedia/ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c new file mode 100644 index 00000000000..150aac42daa --- /dev/null +++ b/multimedia/ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c @@ -0,0 +1,87 @@ +$NetBSD: patch-libavcodec_x86_ac3dsp_init.c,v 1.1 2014/12/03 15:06:11 bouyer Exp $ + +Fix from PR pkg/48680 + +--- libavcodec/x86/ac3dsp_init.c.orig 2014-06-02 23:18:54.000000000 +0200 ++++ libavcodec/x86/ac3dsp_init.c 2014-06-14 21:27:55.000000000 +0200 +@@ -84,11 +84,11 @@ + "shufps $0, %%xmm6, %%xmm6 \n" \ + "shufps $0, %%xmm7, %%xmm7 \n" \ + "1: \n" \ +- "movaps (%0, %2), %%xmm0 \n" \ +- "movaps (%0, %3), %%xmm1 \n" \ +- "movaps (%0, %4), %%xmm2 \n" \ +- "movaps (%0, %5), %%xmm3 \n" \ +- "movaps (%0, %6), %%xmm4 \n" \ ++ "movups (%0, %2), %%xmm0 \n" \ ++ "movups (%0, %3), %%xmm1 \n" \ ++ "movups (%0, %4), %%xmm2 \n" \ ++ "movups (%0, %5), %%xmm3 \n" \ ++ "movups (%0, %6), %%xmm4 \n" \ + "mulps %%xmm5, %%xmm0 \n" \ + "mulps %%xmm6, %%xmm1 \n" \ + "mulps %%xmm5, %%xmm2 \n" \ +@@ -99,8 +99,8 @@ + "addps %%xmm3, %%xmm0 \n" \ + "addps %%xmm4, %%xmm2 \n" \ + mono("addps %%xmm2, %%xmm0 \n") \ +- "movaps %%xmm0, (%0, %2) \n" \ +- stereo("movaps %%xmm2, (%0, %3) \n") \ ++ "movups %%xmm0, (%0, %2) \n" \ ++ stereo("movups %%xmm2, (%0, %3) \n") \ + "add $16, %0 \n" \ + "jl 1b \n" \ + : "+&r"(i) \ +@@ -120,24 +120,26 @@ + "mov %5, %2 \n" \ + "1: \n" \ + "mov -%c7(%6, %2, %c8), %3 \n" \ +- "movaps (%3, %0), %%xmm0 \n" \ ++ "movups (%3, %0), %%xmm0 \n" \ + stereo("movaps %%xmm0, %%xmm1 \n") \ + "mulps %%xmm4, %%xmm0 \n" \ + stereo("mulps %%xmm5, %%xmm1 \n") \ + "2: \n" \ + "mov (%6, %2, %c8), %1 \n" \ +- "movaps (%1, %0), %%xmm2 \n" \ ++ "movups (%1, %0), %%xmm2 \n" \ + stereo("movaps %%xmm2, %%xmm3 \n") \ +- "mulps (%4, %2, 8), %%xmm2 \n" \ +- stereo("mulps 16(%4, %2, 8), %%xmm3 \n") \ ++ "movups (%4, %2, 8), %%xmm4 \n" \ ++ "mulps %%xmm4, %%xmm2 \n" \ ++ stereo("movups 16(%4, %2, 8), %%xmm4 \n") \ ++ stereo("mulps %%xmm4, %%xmm3 \n") \ + "addps %%xmm2, %%xmm0 \n" \ + stereo("addps %%xmm3, %%xmm1 \n") \ + "add $4, %2 \n" \ + "jl 2b \n" \ + "mov %5, %2 \n" \ + stereo("mov (%6, %2, %c8), %1 \n") \ +- "movaps %%xmm0, (%3, %0) \n" \ +- stereo("movaps %%xmm1, (%1, %0) \n") \ ++ "movups %%xmm0, (%3, %0) \n" \ ++ stereo("movups %%xmm1, (%1, %0) \n") \ + "add $16, %0 \n" \ + "jl 1b \n" \ + : "+&r"(i), "=&r"(j), "=&r"(k), "=&r"(m) \ +@@ -166,7 +168,7 @@ + matrix_cmp[3][0] == matrix_cmp[4][0]) { + MIX5(IF1, IF0); + } else { +- DECLARE_ALIGNED(16, float, matrix_simd)[AC3_MAX_CHANNELS][2][4]; ++ float matrix_simd[AC3_MAX_CHANNELS][2][4]; + float *samp[AC3_MAX_CHANNELS]; + + for (j = 0; j < in_ch; j++) +@@ -180,8 +182,8 @@ + "movss 4(%2, %0), %%xmm5 \n" + "shufps $0, %%xmm4, %%xmm4 \n" + "shufps $0, %%xmm5, %%xmm5 \n" +- "movaps %%xmm4, (%1, %0, 4) \n" +- "movaps %%xmm5, 16(%1, %0, 4) \n" ++ "movups %%xmm4, (%1, %0, 4) \n" ++ "movups %%xmm5, 16(%1, %0, 4) \n" + "jg 1b \n" + : "+&r"(j) + : "r"(matrix_simd), "r"(matrix) diff --git a/multimedia/ffplay2/Makefile b/multimedia/ffplay2/Makefile index fe06429fae2..872cbd71be1 100644 --- a/multimedia/ffplay2/Makefile +++ b/multimedia/ffplay2/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.4 2014/05/07 19:43:03 adam Exp $ +# $NetBSD: Makefile,v 1.5 2014/12/03 15:06:11 bouyer Exp $ PKGNAME= ${DISTNAME:S/ffmpeg/ffplay2/} +PKGREVISION= 1 MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://ffmpeg.mplayerhq.hu/ COMMENT= Simple SDL frontend for FFmpeg |