summaryrefslogtreecommitdiff
path: root/packages/ffmpeg/ffmpeg-0.4.9-pre1/gcc4.patch
blob: e04fdab3e5ea934710f33dcdcdbce571ab1759b3 (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
--- ffmpeg-0.4.9-pre1/libavcodec/common.h.orig	2008-02-23 19:42:48.000000000 -0500
+++ ffmpeg-0.4.9-pre1/libavcodec/common.h	2008-02-23 19:08:09.000000000 -0500
@@ -64,11 +64,11 @@
 
 struct AVOption;
 #ifdef HAVE_MMX
-extern const struct AVOption avoptions_common[3 + 5];
+extern const struct AVOption *avoptions_common[2 + 5];
 #else
-extern const struct AVOption avoptions_common[3];
+extern const struct AVOption *avoptions_common[2];
 #endif
-extern const struct AVOption avoptions_workaround_bug[11];
+extern const struct AVOption *avoptions_workaround_bug[10];
 
 #endif /* HAVE_AV_CONFIG_H */
 
@@ -1292,10 +1292,6 @@ tend= rdtsc();\
 #define time time_is_forbidden_due_to_security_issues
 #define rand rand_is_forbidden_due_to_state_trashing
 #define srand srand_is_forbidden_due_to_state_trashing
-#if !(defined(LIBAVFORMAT_BUILD) || defined(_FRAMEHOOK_H))
-#define printf please_use_av_log
-#define fprintf please_use_av_log
-#endif
 
 #define CHECKED_ALLOCZ(p, size)\
 {\
--- ffmpeg-0.4.9-pre1/libavcodec/ac3tab.h.orig	2008-02-23 19:46:06.000000000 -0500
+++ ffmpeg-0.4.9-pre1/libavcodec/ac3tab.h	2008-02-23 19:08:09.000000000 -0500
@@ -4,10 +4,10 @@
  */
 
 /* possible frequencies */
-static const uint16_t ac3_freqs[3] = { 48000, 44100, 32000 };
+const uint16_t ac3_freqs[3] = { 48000, 44100, 32000 };
 
 /* possible bitrates */
-static const uint16_t ac3_bitratetab[19] = {
+const uint16_t ac3_bitratetab[19] = {
     32, 40, 48, 56, 64, 80, 96, 112, 128, 
     160, 192, 224, 256, 320, 384, 448, 512, 576, 640 
 };
@@ -15,7 +15,7 @@ static const uint16_t ac3_bitratetab[19]
 /* AC3 MDCT window */
 
 /* MDCT window */
-static const int16_t ac3_window[256] = {
+const int16_t ac3_window[256] = {
     4,    7,   12,   16,   21,   28,   34,   42,
    51,   61,   72,   84,   97,  111,  127,  145,
   164,  184,  207,  231,  257,  285,  315,  347,
@@ -144,27 +144,27 @@ static const uint8_t baptab[64]= {
     15, 15, 15, 15,
 };
 
-static const uint8_t sdecaytab[4]={ 
+const uint8_t sdecaytab[4]={ 
     0x0f, 0x11, 0x13, 0x15,
 };
 
-static const uint8_t fdecaytab[4]={ 
+const uint8_t fdecaytab[4]={ 
     0x3f, 0x53, 0x67, 0x7b, 
 };
 
-static const uint16_t sgaintab[4]= { 
+const uint16_t sgaintab[4]= { 
     0x540, 0x4d8, 0x478, 0x410,
 };
 
-static const uint16_t dbkneetab[4]= { 
+const uint16_t dbkneetab[4]= { 
     0x000, 0x700, 0x900, 0xb00,
 };
 
-static const uint16_t floortab[8]= { 
+const uint16_t floortab[8]= { 
     0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800,
 };
 
-static const uint16_t fgaintab[8]= {
+const uint16_t fgaintab[8]= {
     0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400,
 };
 
--- ffmpeg-0.4.9-pre1/libavcodec/dsputil.h.orig	2008-02-23 19:47:34.000000000 -0500
+++ ffmpeg-0.4.9-pre1/libavcodec/dsputil.h	2008-02-23 19:08:09.000000000 -0500
@@ -558,15 +558,15 @@ static int name16(void /*MpegEncContext*
 /* XXX: add ISOC specific test to avoid specific BSD testing. */
 /* better than nothing implementation. */
 /* btw, rintf() is existing on fbsd too -- alex */
-static inline long int lrintf(float x)
-{
-#ifdef CONFIG_WIN32
-    /* XXX: incorrect, but make it compile */
-    return (int)(x);
-#else
-    return (int)(rint(x));
-#endif
-}
+//static inline long int lrintf(float x)
+//{
+//#ifdef CONFIG_WIN32
+//    /* XXX: incorrect, but make it compile */
+//    return (int)(x);
+//#else
+//    return (int)(rint(x));
+//#endif
+//}
 #else
 #ifndef _ISOC9X_SOURCE
 #define _ISOC9X_SOURCE
--- ffmpeg-0.4.9-pre1/libavcodec/opts.c.orig	2008-02-23 19:49:11.000000000 -0500
+++ ffmpeg-0.4.9-pre1/libavcodec/opts.c	2008-02-23 19:08:09.000000000 -0500
@@ -12,7 +12,7 @@
 
 #include "avcodec.h"
 
-const AVOption avoptions_common[] = {
+const AVOption *avoptions_common[] = {
     AVOPTION_CODEC_FLAG("bit_exact", "use only bit-exact stuff", flags, CODEC_FLAG_BITEXACT, 0),
     AVOPTION_CODEC_FLAG("mm_force", "force mm flags", dsp_mask, FF_MM_FORCE, 0),
 #ifdef HAVE_MMX
@@ -22,10 +22,10 @@ const AVOption avoptions_common[] = {
     AVOPTION_CODEC_FLAG("mm_sse", "mask SSE feature", dsp_mask, FF_MM_SSE, 0),
     AVOPTION_CODEC_FLAG("mm_sse2", "mask SSE2 feature", dsp_mask, FF_MM_SSE2, 0),
 #endif
-    AVOPTION_END()
+//    AVOPTION_END()
 };
 
-const AVOption avoptions_workaround_bug[] = {
+const AVOption *avoptions_workaround_bug[] = {
     AVOPTION_CODEC_FLAG("bug_autodetect", "workaround bug autodetection", workaround_bugs, FF_BUG_AUTODETECT, 1),
     AVOPTION_CODEC_FLAG("bug_old_msmpeg4", "workaround old msmpeg4 bug", workaround_bugs, FF_BUG_OLD_MSMPEG4, 0),
     AVOPTION_CODEC_FLAG("bug_xvid_ilace", "workaround XviD interlace bug", workaround_bugs, FF_BUG_XVID_ILACE, 0),
@@ -36,7 +36,7 @@ const AVOption avoptions_workaround_bug[
     AVOPTION_CODEC_FLAG("bug_std_qpel", "workaround std qpel bug", workaround_bugs, FF_BUG_STD_QPEL, 0),
     AVOPTION_CODEC_FLAG("bug_qpel_chroma2", "workaround qpel chroma2 bug", workaround_bugs, FF_BUG_QPEL_CHROMA2, 0),
     AVOPTION_CODEC_FLAG("bug_direct_blocksize", "workaround direct blocksize bug", workaround_bugs, FF_BUG_DIRECT_BLOCKSIZE, 0),
-    AVOPTION_END()
+//    AVOPTION_END()
 };
 
 /* avoid compatibility problems by redefining it */