tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ffmpeg2 fails to build on netbsd-7
On Tue, Dec 02, 2014 at 11:13:11AM +0000, Dave Tyson wrote:
> Its reported in pkg/48680 from John D. Baker.
>
> The patches seem to fix the compile on i386/amd64 (may need updating), but I
> haven't tested the resultant binary yet.
thanks for the pointer. The attached patch fixes ffmpeg2 for me, and xine
runs on netbsd-7/i386. It also bumps PKGREVISION for ffmpeg2 and ffplay2,
because of the optimisation change.
Should I commit it ?
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Index: ffmpeg2/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/ffmpeg2/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- ffmpeg2/Makefile 1 Oct 2014 16:09:16 -0000 1.12
+++ ffmpeg2/Makefile 2 Dec 2014 16:20:57 -0000
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.12 2014/10/01 16:09:16 wiz Exp $
PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg2/}
+PKGREVISION= 1
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://ffmpeg.mplayerhq.hu/
COMMENT= Decoding, encoding and streaming software (v2.x)
@@ -38,15 +39,14 @@
.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
Index: ffmpeg2/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/ffmpeg2/distinfo,v
retrieving revision 1.23
diff -u -r1.23 distinfo
--- ffmpeg2/distinfo 1 Dec 2014 11:26:49 -0000 1.23
+++ ffmpeg2/distinfo 2 Dec 2014 16:20:58 -0000
@@ -5,6 +5,7 @@
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
Index: ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c
===================================================================
RCS file: ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c
diff -N ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ffmpeg2/patches/patch-libavcodec_x86_ac3dsp_init.c 2 Dec 2014 16:20:58 -0000
@@ -0,0 +1,87 @@
+$NetBSD: $
+
+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)
Index: ffplay2/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/ffplay2/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- ffplay2/Makefile 7 May 2014 19:43:03 -0000 1.4
+++ ffplay2/Makefile 2 Dec 2014 16:20:58 -0000
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.4 2014/05/07 19:43:03 adam Exp $
PKGNAME= ${DISTNAME:S/ffmpeg/ffplay2/}
+PKGREVISION= 1
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://ffmpeg.mplayerhq.hu/
COMMENT= Simple SDL frontend for FFmpeg
Home |
Main Index |
Thread Index |
Old Index