]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/ffmpeg-0.4.9-pre1-gcc4-1.patch
prepared build of dm9601 module
[people/pmueller/ipfire-2.x.git] / src / patches / ffmpeg-0.4.9-pre1-gcc4-1.patch
CommitLineData
24fd09e4
MT
1Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
2Date: 2005-09-07
3Initial Package Version: 0.4.9-pre1
4Upstream Status: Some fixes unknown, the MMX fix is from upstream CVS
5Origin: Frugalware Linux (frugalware.org)
6 http://frugalware.org/pipermail/frugalware-darcs/2005-August/003296.html
7 Also the MMX fix is from upstream CVS
8 http://www1.mplayerhq.hu/cgi-bin/cvsweb.cgi/ffmpeg/libavcodec/i386/dsputil_mmx.c.diff?r1=1.88&r2=1.89&cvsroot=FFMpeg
9Description: Fixes GCC-4.0.1 build problems
10
11
12diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/ac3.h ffmpeg-0.4.9-pre1/libavcodec/ac3.h
13--- ffmpeg-0.4.9-pre1-orig/libavcodec/ac3.h 2003-03-06 11:32:04.000000000 +0000
14+++ ffmpeg-0.4.9-pre1/libavcodec/ac3.h 2005-09-07 18:50:35.000000000 +0000
15@@ -43,6 +43,7 @@
16 int cplfleak, cplsleak;
17 } AC3BitAllocParameters;
18
19+#if 0
20 extern const uint16_t ac3_freqs[3];
21 extern const uint16_t ac3_bitratetab[19];
22 extern const int16_t ac3_window[256];
23@@ -52,6 +53,7 @@
24 extern const uint16_t dbkneetab[4];
25 extern const uint16_t floortab[8];
26 extern const uint16_t fgaintab[8];
27+#endif
28
29 void ac3_common_init(void);
30 void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,
31
32diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/avcodec.h ffmpeg-0.4.9-pre1/libavcodec/avcodec.h
33--- ffmpeg-0.4.9-pre1-orig/libavcodec/avcodec.h 2004-07-09 12:49:55.000000000 +0000
34+++ ffmpeg-0.4.9-pre1/libavcodec/avcodec.h 2005-09-07 18:49:40.000000000 +0000
35@@ -1657,6 +1657,14 @@
36 #define FF_OPT_MAX_DEPTH 10
37 } AVOption;
38
39+struct AVOption;
40+#ifdef HAVE_MMX
41+extern const struct AVOption avoptions_common[3 + 5];
42+#else
43+extern const struct AVOption avoptions_common[3];
44+#endif
45+extern const struct AVOption avoptions_workaround_bug[11];
46+
47 /**
48 * Parse option(s) and sets fields in passed structure
49 * @param strct structure where the parsed results will be written
50
51diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/common.h ffmpeg-0.4.9-pre1/libavcodec/common.h
52--- ffmpeg-0.4.9-pre1-orig/libavcodec/common.h 2004-07-01 12:33:07.000000000 +0000
53+++ ffmpeg-0.4.9-pre1/libavcodec/common.h 2005-09-07 18:49:40.000000000 +0000
54@@ -62,14 +62,6 @@
55 #define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
56 #define AVOPTION_END() AVOPTION_SUB(NULL)
57
58-struct AVOption;
59-#ifdef HAVE_MMX
60-extern const struct AVOption avoptions_common[3 + 5];
61-#else
62-extern const struct AVOption avoptions_common[3];
63-#endif
64-extern const struct AVOption avoptions_workaround_bug[11];
65-
66 #endif /* HAVE_AV_CONFIG_H */
67
68 /* Suppress restrict if it was not defined in config.h. */
69
70diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/i386/dsputil_mmx.c ffmpeg-0.4.9-pre1/libavcodec/i386/dsputil_mmx.c
71--- ffmpeg-0.4.9-pre1-orig/libavcodec/i386/dsputil_mmx.c 2004-06-08 02:13:44.000000000 +0000
72+++ ffmpeg-0.4.9-pre1/libavcodec/i386/dsputil_mmx.c 2005-09-07 18:54:04.000000000 +0000
73@@ -644,26 +644,22 @@
74 "punpcklwd %%mm0, %%mm1 \n\t"
75 "punpckhwd %%mm4, %%mm3 \n\t"
76 "punpckhwd %%mm0, %%mm6 \n\t"
77- "movd %%mm5, %0 \n\t"
78- "punpckhdq %%mm5, %%mm5 \n\t"
79- "movd %%mm5, %1 \n\t"
80- "movd %%mm3, %2 \n\t"
81- "punpckhdq %%mm3, %%mm3 \n\t"
82- "movd %%mm3, %3 \n\t"
83- "movd %%mm1, %4 \n\t"
84- "punpckhdq %%mm1, %%mm1 \n\t"
85- "movd %%mm1, %5 \n\t"
86- "movd %%mm6, %6 \n\t"
87- "punpckhdq %%mm6, %%mm6 \n\t"
88- "movd %%mm6, %7 \n\t"
89- : "=m" (*(uint32_t*)(src + 0*stride)),
90- "=m" (*(uint32_t*)(src + 1*stride)),
91- "=m" (*(uint32_t*)(src + 2*stride)),
92- "=m" (*(uint32_t*)(src + 3*stride)),
93- "=m" (*(uint32_t*)(src + 4*stride)),
94- "=m" (*(uint32_t*)(src + 5*stride)),
95- "=m" (*(uint32_t*)(src + 6*stride)),
96- "=m" (*(uint32_t*)(src + 7*stride))
97+ "movd %%mm5, (%0) \n\t"
98+ "punpckhdq %%mm5, %%mm5 \n\t"
99+ "movd %%mm5, (%0,%2) \n\t"
100+ "movd %%mm3, (%0,%2,2) \n\t"
101+ "punpckhdq %%mm3, %%mm3 \n\t"
102+ "movd %%mm3, (%0,%3) \n\t"
103+ "movd %%mm1, (%1) \n\t"
104+ "punpckhdq %%mm1, %%mm1 \n\t"
105+ "movd %%mm1, (%1,%2) \n\t"
106+ "movd %%mm6, (%1,%2,2) \n\t"
107+ "punpckhdq %%mm6, %%mm6 \n\t"
108+ "movd %%mm6, (%1,%3) \n\t"
109+ :: "r" (src),
110+ "r" (src + 4*stride),
111+ "r" ((long) stride ),
112+ "r" ((long)(3*stride))
113 );
114 }
115