summaryrefslogtreecommitdiffstats
path: root/vlc/build/ffmpeg-0.4.9-pre1-gcc4-1.patch
blob: 07e3a87a52d456c93bf9f49e6f32f17377f3dad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
Date:                    2005-09-07
Initial Package Version: 0.4.9-pre1
Upstream Status:         Some fixes unknown, the MMX fix is from upstream CVS
Origin:                  Frugalware Linux (frugalware.org)
                         http://frugalware.org/pipermail/frugalware-darcs/2005-August/003296.html
                         Also the MMX fix is from upstream CVS
                         http://www1.mplayerhq.hu/cgi-bin/cvsweb.cgi/ffmpeg/libavcodec/i386/dsputil_mmx.c.diff?r1=1.88&r2=1.89&cvsroot=FFMpeg
Description:             Fixes GCC-4.0.1 build problems


diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/ac3.h ffmpeg-0.4.9-pre1/libavcodec/ac3.h
--- ffmpeg-0.4.9-pre1-orig/libavcodec/ac3.h	2003-03-06 11:32:04.000000000 +0000
+++ ffmpeg-0.4.9-pre1/libavcodec/ac3.h	2005-09-07 18:50:35.000000000 +0000
@@ -43,6 +43,7 @@
     int cplfleak, cplsleak;
 } AC3BitAllocParameters;
 
+#if 0
 extern const uint16_t ac3_freqs[3];
 extern const uint16_t ac3_bitratetab[19];
 extern const int16_t ac3_window[256];
@@ -52,6 +53,7 @@
 extern const uint16_t dbkneetab[4];
 extern const uint16_t floortab[8];
 extern const uint16_t fgaintab[8];
+#endif
 
 void ac3_common_init(void);
 void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,

diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/avcodec.h ffmpeg-0.4.9-pre1/libavcodec/avcodec.h
--- ffmpeg-0.4.9-pre1-orig/libavcodec/avcodec.h	2004-07-09 12:49:55.000000000 +0000
+++ ffmpeg-0.4.9-pre1/libavcodec/avcodec.h	2005-09-07 18:49:40.000000000 +0000
@@ -1657,6 +1657,14 @@
 #define FF_OPT_MAX_DEPTH 10
 } AVOption;
 
+struct AVOption;
+#ifdef HAVE_MMX
+extern const struct AVOption avoptions_common[3 + 5];
+#else
+extern const struct AVOption avoptions_common[3];
+#endif
+extern const struct AVOption avoptions_workaround_bug[11];
+
 /**
  * Parse option(s) and sets fields in passed structure
  * @param strct	structure where the parsed results will be written

diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/common.h ffmpeg-0.4.9-pre1/libavcodec/common.h
--- ffmpeg-0.4.9-pre1-orig/libavcodec/common.h	2004-07-01 12:33:07.000000000 +0000
+++ ffmpeg-0.4.9-pre1/libavcodec/common.h	2005-09-07 18:49:40.000000000 +0000
@@ -62,14 +62,6 @@
 #define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
 #define AVOPTION_END() AVOPTION_SUB(NULL)
 
-struct AVOption;
-#ifdef HAVE_MMX
-extern const struct AVOption avoptions_common[3 + 5];
-#else
-extern const struct AVOption avoptions_common[3];
-#endif
-extern const struct AVOption avoptions_workaround_bug[11];
-
 #endif /* HAVE_AV_CONFIG_H */
 
 /* Suppress restrict if it was not defined in config.h.  */

diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/i386/dsputil_mmx.c ffmpeg-0.4.9-pre1/libavcodec/i386/dsputil_mmx.c
--- ffmpeg-0.4.9-pre1-orig/libavcodec/i386/dsputil_mmx.c	2004-06-08 02:13:44.000000000 +0000
+++ ffmpeg-0.4.9-pre1/libavcodec/i386/dsputil_mmx.c	2005-09-07 18:54:04.000000000 +0000
@@ -644,26 +644,22 @@
         "punpcklwd %%mm0, %%mm1		\n\t"
         "punpckhwd %%mm4, %%mm3		\n\t"
         "punpckhwd %%mm0, %%mm6		\n\t"
-        "movd %%mm5, %0			\n\t"
-        "punpckhdq %%mm5, %%mm5		\n\t"
-        "movd %%mm5, %1			\n\t"
-        "movd %%mm3, %2			\n\t"
-        "punpckhdq %%mm3, %%mm3		\n\t"
-        "movd %%mm3, %3			\n\t"
-        "movd %%mm1, %4			\n\t"
-        "punpckhdq %%mm1, %%mm1		\n\t"
-        "movd %%mm1, %5			\n\t"
-        "movd %%mm6, %6			\n\t"
-        "punpckhdq %%mm6, %%mm6		\n\t"
-        "movd %%mm6, %7			\n\t"
-        : "=m" (*(uint32_t*)(src + 0*stride)),
-          "=m" (*(uint32_t*)(src + 1*stride)),
-          "=m" (*(uint32_t*)(src + 2*stride)),
-          "=m" (*(uint32_t*)(src + 3*stride)),
-          "=m" (*(uint32_t*)(src + 4*stride)),
-          "=m" (*(uint32_t*)(src + 5*stride)),
-          "=m" (*(uint32_t*)(src + 6*stride)),
-          "=m" (*(uint32_t*)(src + 7*stride))
+        "movd %%mm5, (%0)               \n\t" 
+        "punpckhdq %%mm5, %%mm5         \n\t" 
+        "movd %%mm5, (%0,%2)            \n\t" 
+        "movd %%mm3, (%0,%2,2)          \n\t" 
+        "punpckhdq %%mm3, %%mm3         \n\t" 
+        "movd %%mm3, (%0,%3)            \n\t" 
+        "movd %%mm1, (%1)               \n\t" 
+        "punpckhdq %%mm1, %%mm1         \n\t" 
+        "movd %%mm1, (%1,%2)            \n\t" 
+        "movd %%mm6, (%1,%2,2)          \n\t" 
+        "punpckhdq %%mm6, %%mm6         \n\t" 
+        "movd %%mm6, (%1,%3)            \n\t" 
+        :: "r" (src), 
+        "r" (src + 4*stride), 
+        "r" ((long)   stride ), 
+        "r" ((long)(3*stride)) 
     );
 }