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 ffmpeg1 and ffplay1 (which uses ffmpeg1 patches)diff -r1.2 -r1.3 pkgsrc/multimedia/ffmpeg1/Makefile
(bouyer)
@@ -1,16 +1,17 @@ | @@ -1,16 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.2 2014/10/10 12:30:34 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.3 2014/12/03 16:44:14 bouyer Exp $ | |
2 | 2 | |||
3 | PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg1/} | 3 | PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg1/} | |
4 | PKGREVISION= 1 | |||
4 | MAINTAINER= pkgsrc-users@NetBSD.org | 5 | MAINTAINER= pkgsrc-users@NetBSD.org | |
5 | HOMEPAGE= http://ffmpeg.mplayerhq.hu/ | 6 | HOMEPAGE= http://ffmpeg.mplayerhq.hu/ | |
6 | COMMENT= Decoding, encoding and streaming software (v1.x) | 7 | COMMENT= Decoding, encoding and streaming software (v1.x) | |
7 | 8 | |||
8 | CONFIGURE_ARGS+= --enable-avfilter | 9 | CONFIGURE_ARGS+= --enable-avfilter | |
9 | #CONFIGURE_ARGS+= --enable-avfilter-lavf | 10 | #CONFIGURE_ARGS+= --enable-avfilter-lavf | |
10 | CONFIGURE_ARGS+= --enable-postproc | 11 | CONFIGURE_ARGS+= --enable-postproc | |
11 | 12 | |||
12 | INSTALLATION_DIRS= lib share/examples/ffmpeg1 share/doc/ffmpeg1 | 13 | INSTALLATION_DIRS= lib share/examples/ffmpeg1 share/doc/ffmpeg1 | |
13 | 14 | |||
14 | CONF_FILES+= ${PREFIX}/share/examples/ffmpeg1/ffserver.conf \ | 15 | CONF_FILES+= ${PREFIX}/share/examples/ffmpeg1/ffserver.conf \ | |
15 | ${PKG_SYSCONFDIR}/ffserver.conf | 16 | ${PKG_SYSCONFDIR}/ffserver.conf | |
16 | 17 | |||
@@ -30,27 +31,26 @@ CONFIGURE_ARGS+= --host-ld=${NATIVE_CC:Q | @@ -30,27 +31,26 @@ CONFIGURE_ARGS+= --host-ld=${NATIVE_CC:Q | |||
30 | TEST_TARGET= check | 31 | TEST_TARGET= check | |
31 | 32 | |||
32 | post-install: | 33 | post-install: | |
33 | ${INSTALL_DATA} ${WRKSRC}/doc/*.txt \ | 34 | ${INSTALL_DATA} ${WRKSRC}/doc/*.txt \ | |
34 | ${DESTDIR}${PREFIX}/share/doc/ffmpeg1 | 35 | ${DESTDIR}${PREFIX}/share/doc/ffmpeg1 | |
35 | ${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \ | 36 | ${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \ | |
36 | ${DESTDIR}${PREFIX}/share/examples/ffmpeg1 | 37 | ${DESTDIR}${PREFIX}/share/examples/ffmpeg1 | |
37 | 38 | |||
38 | .include "options.mk" | 39 | .include "options.mk" | |
39 | 40 | |||
40 | .include "../../mk/compiler.mk" | 41 | .include "../../mk/compiler.mk" | |
41 | 42 | |||
42 | # disable asm on i386 for non-gcc and gcc < 4.2 | 43 | # disable asm on i386 for non-gcc and gcc < 4.2 | |
43 | # no alignment options needed for gcc >= 4.6 on i386 | |||
44 | .if ${MACHINE_ARCH} == "i386" | 44 | .if ${MACHINE_ARCH} == "i386" | |
45 | . if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \ | 45 | . if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \ | |
46 | || !empty(MACHINE_PLATFORM:MSunOS-*-i386) \ | 46 | || !empty(MACHINE_PLATFORM:MSunOS-*-i386) \ | |
47 | || !empty(CC_VERSION:Mgcc-[123]*) \ | 47 | || !empty(CC_VERSION:Mgcc-[123]*) \ | |
48 | || !empty(CC_VERSION:Mgcc-4.[01]*) \ | 48 | || !empty(CC_VERSION:Mgcc-4.[01].*) \ | |
49 | || empty(CC_VERSION:Mgcc*) | 49 | || empty(CC_VERSION:Mgcc*) | |
50 | CONFIGURE_ARGS+= --disable-asm | 50 | CONFIGURE_ARGS+= --disable-asm | |
51 | . elif !empty(CC_VERSION:Mgcc-4.[2345]*) | 51 | . elif !empty(CC_VERSION:Mgcc-4.*) | |
52 | CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4 | 52 | CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4 | |
53 | . endif | 53 | . endif | |
54 | .endif | 54 | .endif | |
55 | 55 | |||
56 | .include "../../multimedia/ffmpeg1/Makefile.common" | 56 | .include "../../multimedia/ffmpeg1/Makefile.common" |
@@ -1,9 +1,10 @@ | @@ -1,9 +1,10 @@ | |||
1 | $NetBSD: distinfo,v 1.4 2014/11/10 15:38:22 adam Exp $ | 1 | $NetBSD: distinfo,v 1.5 2014/12/03 16:44:14 bouyer Exp $ | |
2 | 2 | |||
3 | SHA1 (ffmpeg-1.2.10.tar.bz2) = 8e6d59b87b3390facef624ba3e531726de3ef11b | 3 | SHA1 (ffmpeg-1.2.10.tar.bz2) = 8e6d59b87b3390facef624ba3e531726de3ef11b | |
4 | RMD160 (ffmpeg-1.2.10.tar.bz2) = 56b8f285748c52da8ef9c27cad1ace1aa55ef19e | 4 | RMD160 (ffmpeg-1.2.10.tar.bz2) = 56b8f285748c52da8ef9c27cad1ace1aa55ef19e | |
5 | Size (ffmpeg-1.2.10.tar.bz2) = 5972429 bytes | 5 | Size (ffmpeg-1.2.10.tar.bz2) = 5972429 bytes | |
6 | SHA1 (patch-aa) = 14006874aee07e7e41803269040f0ae0157d931d | 6 | SHA1 (patch-aa) = 14006874aee07e7e41803269040f0ae0157d931d | |
7 | SHA1 (patch-ac) = ff8a7a5fdfd4987ef2835bd7360a78efd4310253 | 7 | SHA1 (patch-ac) = ff8a7a5fdfd4987ef2835bd7360a78efd4310253 | |
8 | SHA1 (patch-ap) = ebbd0c169f228af37ae2dd54b27d5dba11a34c5e | 8 | SHA1 (patch-ap) = ebbd0c169f228af37ae2dd54b27d5dba11a34c5e | |
9 | SHA1 (patch-configure) = a04493172f7600cc9ebbda6c140915b1169f5f14 | 9 | SHA1 (patch-configure) = a04493172f7600cc9ebbda6c140915b1169f5f14 | |
10 | SHA1 (patch-libavcodec_x86_ac3dsp_init.c) = 603eb10a316edf48e50f64f048772ad4b97cac5a |
$NetBSD: patch-libavcodec_x86_ac3dsp_init.c,v 1.1 2014/12/03 16:44:14 bouyer Exp $
Fix from PR pkg/48680
--- libavcodec/x86/ac3dsp_init.c.orig 2013-08-11 01:23:26.000000000 +0200
+++ libavcodec/x86/ac3dsp_init.c 2013-10-06 17:43:36.000000000 +0200
@@ -70,11 +70,11 @@ void ff_ac3_extract_exponents_ssse3(uint
"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" \
@@ -85,8 +85,8 @@ void ff_ac3_extract_exponents_ssse3(uint
"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) \
@@ -106,24 +106,26 @@ void ff_ac3_extract_exponents_ssse3(uint
"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) \
@@ -152,7 +154,7 @@ static void ac3_downmix_sse(float **samp
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++)
@@ -166,8 +168,8 @@ static void ac3_downmix_sse(float **samp
"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)
@@ -1,16 +1,17 @@ | @@ -1,16 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.1 2014/08/11 23:02:10 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.2 2014/12/03 16:44:14 bouyer Exp $ | |
2 | 2 | |||
3 | PKGNAME= ${DISTNAME:S/ffmpeg/ffplay1/} | 3 | PKGNAME= ${DISTNAME:S/ffmpeg/ffplay1/} | |
4 | PKGREVISION= 1 | |||
4 | MAINTAINER= pkgsrc-users@NetBSD.org | 5 | MAINTAINER= pkgsrc-users@NetBSD.org | |
5 | HOMEPAGE= http://ffmpeg.mplayerhq.hu/ | 6 | HOMEPAGE= http://ffmpeg.mplayerhq.hu/ | |
6 | COMMENT= Simple SDL frontend for FFmpeg | 7 | COMMENT= Simple SDL frontend for FFmpeg | |
7 | 8 | |||
8 | DISTINFO_FILE= ${.CURDIR}/../../multimedia/ffmpeg1/distinfo | 9 | DISTINFO_FILE= ${.CURDIR}/../../multimedia/ffmpeg1/distinfo | |
9 | 10 | |||
10 | CONFIGURE_ARGS+= --disable-ffmpeg | 11 | CONFIGURE_ARGS+= --disable-ffmpeg | |
11 | CONFIGURE_ARGS+= --disable-ffserver | 12 | CONFIGURE_ARGS+= --disable-ffserver | |
12 | CONFIGURE_ARGS+= --disable-encoders | 13 | CONFIGURE_ARGS+= --disable-encoders | |
13 | CONFIGURE_ARGS+= --disable-decoders | 14 | CONFIGURE_ARGS+= --disable-decoders | |
14 | CONFIGURE_ARGS+= --disable-hwaccels | 15 | CONFIGURE_ARGS+= --disable-hwaccels | |
15 | CONFIGURE_ARGS+= --disable-muxers | 16 | CONFIGURE_ARGS+= --disable-muxers | |
16 | CONFIGURE_ARGS+= --disable-demuxers | 17 | CONFIGURE_ARGS+= --disable-demuxers |