summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2006-08-14 13:29:29 +0000
committerLuca Barbato <lu_zero@gentoo.org>2006-08-14 13:29:29 +0000
commit11682e371d06be33f09342d44f68ead658669b32 (patch)
tree66392b177e27a1f046ec20a8adb5c9bef5122522 /media-video/ffmpeg
parentAdd proper aclocal directories when running autoreconf. (diff)
downloadgentoo-2-11682e371d06be33f09342d44f68ead658669b32.tar.gz
gentoo-2-11682e371d06be33f09342d44f68ead658669b32.tar.bz2
gentoo-2-11682e371d06be33f09342d44f68ead658669b32.zip
fix mmx+pic on x86
(Portage version: 2.1.1_pre5)
Diffstat (limited to 'media-video/ffmpeg')
-rw-r--r--media-video/ffmpeg/ChangeLog9
-rw-r--r--media-video/ffmpeg/ffmpeg-0.4.9_p20060530.ebuild3
-rw-r--r--media-video/ffmpeg/files/ffmpeg-0.4.9_p20060530-snow-mmx.patch202
3 files changed, 212 insertions, 2 deletions
diff --git a/media-video/ffmpeg/ChangeLog b/media-video/ffmpeg/ChangeLog
index e255edf2efcb..f7a2a05625f7 100644
--- a/media-video/ffmpeg/ChangeLog
+++ b/media-video/ffmpeg/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-video/ffmpeg
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.150 2006/08/12 13:10:03 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.151 2006/08/14 13:29:29 lu_zero Exp $
+
+ 14 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
+ +files/ffmpeg-0.4.9_p20060530-snow-mmx.patch,
+ ffmpeg-0.4.9_p20060530.ebuild:
+ Make snow compile on x86 with pic and mmx enabled at the same time, many
+ thanks to Martin von Gagern <Martin.vGagern@gmx.net> for the patch and the
+ overall help
12 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
ffmpeg-0.4.9_p20060530.ebuild:
diff --git a/media-video/ffmpeg/ffmpeg-0.4.9_p20060530.ebuild b/media-video/ffmpeg/ffmpeg-0.4.9_p20060530.ebuild
index d38e7d5f35d6..e785eb97617f 100644
--- a/media-video/ffmpeg/ffmpeg-0.4.9_p20060530.ebuild
+++ b/media-video/ffmpeg/ffmpeg-0.4.9_p20060530.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-0.4.9_p20060530.ebuild,v 1.10 2006/08/12 13:10:03 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-0.4.9_p20060530.ebuild,v 1.11 2006/08/14 13:29:29 lu_zero Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -75,6 +75,7 @@ src_unpack() {
sed -i s:\#define\ HAVE_X11:\#define\ HAVE_LINUX: ffplay.c
epatch ${FILESDIR}/ffmpeg-unknown-options.patch
+ epatch ${FILESDIR}/${P}-snow-mmx.patch
# .pc files contain wrong libdir path
epatch ${FILESDIR}/${PN}-libdir.patch
diff --git a/media-video/ffmpeg/files/ffmpeg-0.4.9_p20060530-snow-mmx.patch b/media-video/ffmpeg/files/ffmpeg-0.4.9_p20060530-snow-mmx.patch
new file mode 100644
index 000000000000..92926865bbb4
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-0.4.9_p20060530-snow-mmx.patch
@@ -0,0 +1,202 @@
+Index: libavcodec/i386/snowdsp_mmx.c
+===================================================================
+--- libavcodec/i386/snowdsp_mmx.c (revision 5971)
++++ libavcodec/i386/snowdsp_mmx.c (working copy)
+@@ -463,9 +463,9 @@
+ "1: \n\t"
+
+ "mov %6, %%"REG_a" \n\t"
+- "mov %4, %%"REG_b" \n\t"
++ "mov %4, %%"REG_S" \n\t"
+
+- snow_vertical_compose_sse2_load(REG_b,"xmm0","xmm2","xmm4","xmm6")
++ snow_vertical_compose_sse2_load(REG_S,"xmm0","xmm2","xmm4","xmm6")
+ snow_vertical_compose_sse2_add(REG_a,"xmm0","xmm2","xmm4","xmm6")
+ snow_vertical_compose_sse2_move("xmm0","xmm2","xmm4","xmm6","xmm1","xmm3","xmm5","xmm7")
+ snow_vertical_compose_sse2_sll("1","xmm0","xmm2","xmm4","xmm6")\
+@@ -482,10 +482,10 @@
+ snow_vertical_compose_sse2_sub("xmm0","xmm2","xmm4","xmm6","xmm1","xmm3","xmm5","xmm7")
+ snow_vertical_compose_sse2_store(REG_a,"xmm1","xmm3","xmm5","xmm7")
+ "mov %3, %%"REG_c" \n\t"
+- snow_vertical_compose_sse2_load(REG_b,"xmm0","xmm2","xmm4","xmm6")
++ snow_vertical_compose_sse2_load(REG_S,"xmm0","xmm2","xmm4","xmm6")
+ snow_vertical_compose_sse2_add(REG_c,"xmm1","xmm3","xmm5","xmm7")
+ snow_vertical_compose_sse2_sub("xmm1","xmm3","xmm5","xmm7","xmm0","xmm2","xmm4","xmm6")
+- snow_vertical_compose_sse2_store(REG_b,"xmm0","xmm2","xmm4","xmm6")
++ snow_vertical_compose_sse2_store(REG_S,"xmm0","xmm2","xmm4","xmm6")
+ "mov %2, %%"REG_a" \n\t"
+ snow_vertical_compose_sse2_load(REG_c,"xmm1","xmm3","xmm5","xmm7")
+ snow_vertical_compose_sse2_add(REG_a,"xmm0","xmm2","xmm4","xmm6")
+@@ -495,13 +495,13 @@
+ "pcmpeqd %%xmm1, %%xmm1 \n\t"
+ "pslld $31, %%xmm1 \n\t"
+ "psrld $28, %%xmm1 \n\t"
+- "mov %1, %%"REG_b" \n\t"
++ "mov %1, %%"REG_S" \n\t"
+
+ snow_vertical_compose_sse2_r2r_add("xmm1","xmm1","xmm1","xmm1","xmm0","xmm2","xmm4","xmm6")
+ snow_vertical_compose_sse2_sra("4","xmm0","xmm2","xmm4","xmm6")
+ snow_vertical_compose_sse2_add(REG_c,"xmm0","xmm2","xmm4","xmm6")
+ snow_vertical_compose_sse2_store(REG_c,"xmm0","xmm2","xmm4","xmm6")
+- snow_vertical_compose_sse2_add(REG_b,"xmm0","xmm2","xmm4","xmm6")
++ snow_vertical_compose_sse2_add(REG_S,"xmm0","xmm2","xmm4","xmm6")
+ snow_vertical_compose_sse2_move("xmm0","xmm2","xmm4","xmm6","xmm1","xmm3","xmm5","xmm7")
+ snow_vertical_compose_sse2_sll("1","xmm0","xmm2","xmm4","xmm6")\
+ snow_vertical_compose_sse2_r2r_add("xmm1","xmm3","xmm5","xmm7","xmm0","xmm2","xmm4","xmm6")
+@@ -515,7 +515,7 @@
+ :"+d"(i)
+ :
+ "m"(b0),"m"(b1),"m"(b2),"m"(b3),"m"(b4),"m"(b5):
+- "%"REG_a"","%"REG_b"","%"REG_c"");
++ "%"REG_a"","%"REG_S"","%"REG_c"");
+ }
+
+ #define snow_vertical_compose_mmx_load_add(op,r,t0,t1,t2,t3)\
+@@ -570,9 +570,9 @@
+ "1: \n\t"
+
+ "mov %6, %%"REG_a" \n\t"
+- "mov %4, %%"REG_b" \n\t"
++ "mov %4, %%"REG_S" \n\t"
+
+- snow_vertical_compose_mmx_load(REG_b,"mm0","mm2","mm4","mm6")
++ snow_vertical_compose_mmx_load(REG_S,"mm0","mm2","mm4","mm6")
+ snow_vertical_compose_mmx_add(REG_a,"mm0","mm2","mm4","mm6")
+ snow_vertical_compose_mmx_move("mm0","mm2","mm4","mm6","mm1","mm3","mm5","mm7")
+ snow_vertical_compose_mmx_sll("1","mm0","mm2","mm4","mm6")
+@@ -589,10 +589,10 @@
+ snow_vertical_compose_mmx_sub("mm0","mm2","mm4","mm6","mm1","mm3","mm5","mm7")
+ snow_vertical_compose_mmx_store(REG_a,"mm1","mm3","mm5","mm7")
+ "mov %3, %%"REG_c" \n\t"
+- snow_vertical_compose_mmx_load(REG_b,"mm0","mm2","mm4","mm6")
++ snow_vertical_compose_mmx_load(REG_S,"mm0","mm2","mm4","mm6")
+ snow_vertical_compose_mmx_add(REG_c,"mm1","mm3","mm5","mm7")
+ snow_vertical_compose_mmx_sub("mm1","mm3","mm5","mm7","mm0","mm2","mm4","mm6")
+- snow_vertical_compose_mmx_store(REG_b,"mm0","mm2","mm4","mm6")
++ snow_vertical_compose_mmx_store(REG_S,"mm0","mm2","mm4","mm6")
+ "mov %2, %%"REG_a" \n\t"
+ snow_vertical_compose_mmx_load(REG_c,"mm1","mm3","mm5","mm7")
+ snow_vertical_compose_mmx_add(REG_a,"mm0","mm2","mm4","mm6")
+@@ -602,13 +602,13 @@
+ "pcmpeqd %%mm1, %%mm1 \n\t"
+ "pslld $31, %%mm1 \n\t"
+ "psrld $28, %%mm1 \n\t"
+- "mov %1, %%"REG_b" \n\t"
++ "mov %1, %%"REG_S" \n\t"
+
+ snow_vertical_compose_mmx_r2r_add("mm1","mm1","mm1","mm1","mm0","mm2","mm4","mm6")
+ snow_vertical_compose_mmx_sra("4","mm0","mm2","mm4","mm6")
+ snow_vertical_compose_mmx_add(REG_c,"mm0","mm2","mm4","mm6")
+ snow_vertical_compose_mmx_store(REG_c,"mm0","mm2","mm4","mm6")
+- snow_vertical_compose_mmx_add(REG_b,"mm0","mm2","mm4","mm6")
++ snow_vertical_compose_mmx_add(REG_S,"mm0","mm2","mm4","mm6")
+ snow_vertical_compose_mmx_move("mm0","mm2","mm4","mm6","mm1","mm3","mm5","mm7")
+ snow_vertical_compose_mmx_sll("1","mm0","mm2","mm4","mm6")
+ snow_vertical_compose_mmx_r2r_add("mm1","mm3","mm5","mm7","mm0","mm2","mm4","mm6")
+@@ -622,15 +622,16 @@
+ :"+d"(i)
+ :
+ "m"(b0),"m"(b1),"m"(b2),"m"(b3),"m"(b4),"m"(b5):
+- "%"REG_a"","%"REG_b"","%"REG_c"");
++ "%"REG_a"","%"REG_S"","%"REG_c"");
+ }
+
+ #define snow_inner_add_yblock_sse2_header \
+ DWTELEM * * dst_array = sb->line + src_y;\
++ long tmp;\
+ asm volatile(\
+- "mov %6, %%"REG_c" \n\t"\
+- "mov %5, %%"REG_b" \n\t"\
+- "mov %3, %%"REG_S" \n\t"\
++ "mov %7, %%"REG_c" \n\t"\
++ "mov %6, %2 \n\t"\
++ "mov %4, %%"REG_S" \n\t"\
+ "pxor %%xmm7, %%xmm7 \n\t" /* 0 */\
+ "pcmpeqd %%xmm3, %%xmm3 \n\t"\
+ "pslld $31, %%xmm3 \n\t"\
+@@ -638,7 +639,7 @@
+ "1: \n\t"\
+ "mov %1, %%"REG_D" \n\t"\
+ "mov (%%"REG_D"), %%"REG_D" \n\t"\
+- "add %2, %%"REG_D" \n\t"
++ "add %3, %%"REG_D" \n\t"
+
+ #define snow_inner_add_yblock_sse2_start_8(out_reg1, out_reg2, ptr_offset, s_offset)\
+ "mov "PTR_SIZE"*"ptr_offset"(%%"REG_a"), %%"REG_d"; \n\t"\
+@@ -686,23 +687,23 @@
+
+ #define snow_inner_add_yblock_sse2_end_common2\
+ "jnz 1b \n\t"\
+- :"+m"(dst8),"+m"(dst_array)\
++ :"+m"(dst8),"+m"(dst_array),"=&r"(tmp)\
+ :\
+ "rm"((long)(src_x<<2)),"m"(obmc),"a"(block),"m"((long)b_h),"m"((long)src_stride):\
+- "%"REG_b"","%"REG_c"","%"REG_S"","%"REG_D"","%"REG_d"");
++ "%"REG_c"","%"REG_S"","%"REG_D"","%"REG_d"");
+
+ #define snow_inner_add_yblock_sse2_end_8\
+ "sal $1, %%"REG_c" \n\t"\
+ "add $"PTR_SIZE"*2, %1 \n\t"\
+ snow_inner_add_yblock_sse2_end_common1\
+ "sar $1, %%"REG_c" \n\t"\
+- "sub $2, %%"REG_b" \n\t"\
++ "sub $2, %2 \n\t"\
+ snow_inner_add_yblock_sse2_end_common2
+
+ #define snow_inner_add_yblock_sse2_end_16\
+ "add $"PTR_SIZE"*1, %1 \n\t"\
+ snow_inner_add_yblock_sse2_end_common1\
+- "dec %%"REG_b" \n\t"\
++ "dec %2 \n\t"\
+ snow_inner_add_yblock_sse2_end_common2
+
+ static void inner_add_yblock_bw_8_obmc_16_bh_even_sse2(uint8_t *obmc, const long obmc_stride, uint8_t * * block, int b_w, long b_h,
+@@ -727,7 +728,7 @@
+
+ "mov %1, %%"REG_D" \n\t"
+ "mov "PTR_SIZE"(%%"REG_D"), %%"REG_D";\n\t"
+- "add %2, %%"REG_D" \n\t"
++ "add %3, %%"REG_D" \n\t"
+
+ "movdqa (%%"REG_D"), %%xmm4 \n\t"
+ "movdqa %%xmm5, %%xmm6 \n\t"
+@@ -792,10 +793,11 @@
+
+ #define snow_inner_add_yblock_mmx_header \
+ DWTELEM * * dst_array = sb->line + src_y;\
++ long tmp;\
+ asm volatile(\
+- "mov %6, %%"REG_c" \n\t"\
+- "mov %5, %%"REG_b" \n\t"\
+- "mov %3, %%"REG_S" \n\t"\
++ "mov %7, %%"REG_c" \n\t"\
++ "mov %6, %2 \n\t"\
++ "mov %4, %%"REG_S" \n\t"\
+ "pxor %%mm7, %%mm7 \n\t" /* 0 */\
+ "pcmpeqd %%mm3, %%mm3 \n\t"\
+ "pslld $31, %%mm3 \n\t"\
+@@ -803,7 +805,7 @@
+ "1: \n\t"\
+ "mov %1, %%"REG_D" \n\t"\
+ "mov (%%"REG_D"), %%"REG_D" \n\t"\
+- "add %2, %%"REG_D" \n\t"
++ "add %3, %%"REG_D" \n\t"
+
+ #define snow_inner_add_yblock_mmx_start(out_reg1, out_reg2, ptr_offset, s_offset, d_offset)\
+ "mov "PTR_SIZE"*"ptr_offset"(%%"REG_a"), %%"REG_d"; \n\t"\
+@@ -857,12 +859,12 @@
+ "add %%"REG_c", (%%"REG_a") \n\t"\
+ "add $"PTR_SIZE"*1, %1 \n\t"\
+ "add %%"REG_c", %0 \n\t"\
+- "dec %%"REG_b" \n\t"\
++ "dec %2 \n\t"\
+ "jnz 1b \n\t"\
+- :"+m"(dst8),"+m"(dst_array)\
++ :"+m"(dst8),"+m"(dst_array),"=&r"(tmp)\
+ :\
+ "rm"((long)(src_x<<2)),"m"(obmc),"a"(block),"m"((long)b_h),"m"((long)src_stride):\
+- "%"REG_b"","%"REG_c"","%"REG_S"","%"REG_D"","%"REG_d"");
++ "%"REG_c"","%"REG_S"","%"REG_D"","%"REG_d"");
+
+ static void inner_add_yblock_bw_8_obmc_16_mmx(uint8_t *obmc, const long obmc_stride, uint8_t * * block, int b_w, long b_h,
+ int src_x, int src_y, long src_stride, slice_buffer * sb, int add, uint8_t * dst8){