Mercurial > mplayer.hg
annotate libfaad2/local_changes.diff @ 17583:f4dacb3d428a
tff wasn't correctly unset in soft_telecine()
author | nicodvb |
---|---|
date | Fri, 10 Feb 2006 22:28:32 +0000 |
parents | 53c3eaaf8b49 |
children | 59b6fa5b4201 |
rev | line source |
---|---|
14712 | 1 --- libfaad/bits.h 2004-03-11 14:32:39.000000000 +0100 |
2 +++ libfaad2/bits.h 2004-06-24 10:47:02.000000000 +0200 | |
14858 | 3 @@ -58,7 +61,7 @@ |
14712 | 4 |
5 #if defined (_WIN32) && !defined(_WIN32_WCE) && !defined(__MINGW32__) | |
6 #define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax | |
7 -#elif defined(LINUX) || defined(DJGPP) || defined(__MINGW32__) | |
8 +#elif defined(LINUX) || defined(DJGPP) | |
9 #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) | |
10 #else | |
11 #define BSWAP(a) \ | |
12 --- libfaad/common.h 2004-06-30 14:45:56.000000000 +0200 | |
13 +++ libfaad2/common.h 2004-10-19 03:16:03.000000000 +0200 | |
14858 | 14 @@ -32,10 +35,13 @@ |
14712 | 15 extern "C" { |
16 #endif | |
17 | |
18 -#ifdef HAVE_CONFIG_H | |
19 -# include "../config.h" | |
20 +/* Allow build on Cygwin*/ | |
21 +#if defined(__CYGWIN__) | |
22 +#define __STRICT_ANSI__ | |
23 #endif | |
24 | |
25 +#include "../config.h" | |
26 + | |
27 #define INLINE __inline | |
28 #if 0 //defined(_WIN32) && !defined(_WIN32_WCE) | |
29 #define ALIGN __declspec(align(16)) | |
16249 | 30 @@ -67,6 +67,6 @@ |
31 /* Use if target platform has address generators with autoincrement */ | |
32 //#define PREFER_POINTERS | |
33 | |
34 -#ifdef _WIN32_WCE | |
35 +#if defined(_WIN32_WCE) || defined(__arm__) | |
36 #define FIXED_POINT | |
37 #endif | |
14858 | 38 @@ -117,6 +123,9 @@ |
14712 | 39 # ifdef MAIN_DEC |
40 # undef MAIN_DEC | |
41 # endif | |
42 +# ifdef SBR_DEC | |
43 +# undef SBR_DEC | |
44 +# endif | |
45 #endif // FIXED_POINT | |
46 | |
47 #ifdef DRM | |
14858 | 48 @@ -157,6 +166,7 @@ |
14712 | 49 |
50 #include <stdlib.h> | |
51 | |
52 +#if 0 | |
53 typedef unsigned __int64 uint64_t; | |
54 typedef unsigned __int32 uint32_t; | |
55 typedef unsigned __int16 uint16_t; | |
14858 | 56 @@ -165,11 +175,31 @@ |
14712 | 57 typedef __int32 int32_t; |
58 typedef __int16 int16_t; | |
59 typedef __int8 int8_t; | |
60 +#else | |
61 +#include <inttypes.h> | |
62 +#endif | |
63 + | |
64 typedef float float32_t; | |
65 | |
66 | |
67 #else | |
68 | |
69 +/* #undef HAVE_FLOAT32_T */ | |
70 +/* Define if you have the <inttypes.h> header file. */ | |
71 +#define HAVE_INTTYPES_H 1 | |
72 + | |
73 +/* Define if you have the `memcpy' function. */ | |
74 +#define HAVE_MEMCPY 1 | |
75 + | |
76 +/* Define if you have the <stdint.h> header file. */ | |
77 +#define HAVE_STDINT_H 1 | |
78 + | |
79 +/* Define if you have the `strchr' function. */ | |
80 +#define HAVE_STRCHR 1 | |
81 + | |
82 +/* Define if you have the ANSI C header files. */ | |
83 +#define STDC_HEADERS 1 | |
84 + | |
85 #include <stdio.h> | |
86 #if HAVE_SYS_TYPES_H | |
87 # include <sys/types.h> | |
16249 | 88 @@ -329,7 +329,7 @@ |
89 } | |
90 | |
91 | |
92 - #if defined(_WIN32) && !defined(__MINGW32__) | |
93 + #if defined(_WIN32) && !defined(__MINGW32__) && !defined(HAVE_LRINTF) | |
94 #define HAS_LRINTF | |
95 static INLINE int lrintf(float f) | |
96 { | |
97 @@ -341,7 +341,7 @@ | |
14712 | 98 } |
99 return i; | |
100 } | |
16249 | 101 - #elif (defined(__i386__) && defined(__GNUC__)) && !defined(__MINGW32__) |
102 + #elif (defined(__i386__) && defined(__GNUC__)) && !defined(__MINGW32__) && !defined(HAVE_LRINTF) | |
14712 | 103 #define HAS_LRINTF |
104 // from http://www.stereopsis.com/FPU.html | |
105 static INLINE int lrintf(float f) | |
14858 | 106 @@ -340,6 +370,8 @@ |
14712 | 107 |
108 #else | |
109 | |
110 +#include <math.h> | |
111 + | |
112 #ifdef HAVE_LRINTF | |
113 # define HAS_LRINTF | |
114 # define _ISOC9X_SOURCE 1 | |
14858 | 115 @@ -348,8 +380,6 @@ |
14712 | 116 # define __USE_ISOC99 1 |
117 #endif | |
118 | |
119 - #include <math.h> | |
120 - | |
121 #ifdef HAVE_SINF | |
122 # define sin sinf | |
123 #error | |
17181
53c3eaaf8b49
Unify paths in patch and fix recent breakage, no -ko keyword expansion
diego
parents:
17137
diff
changeset
|
124 --- libfaad2/output.c 2005/02/19 01:21:19 1.7 |
53c3eaaf8b49
Unify paths in patch and fix recent breakage, no -ko keyword expansion
diego
parents:
17137
diff
changeset
|
125 +++ libfaad2/output.c 2005/03/29 18:14:24 1.8 |
16249 | 126 @@ -19,10 +19,9 @@ |
127 ** Any non-GPL usage of this software or parts of this software is strictly | |
128 ** forbidden. | |
129 ** | |
130 -** Commercial non-GPL licensing of this software is possible. | |
131 -** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. | |
132 -** | |
17181
53c3eaaf8b49
Unify paths in patch and fix recent breakage, no -ko keyword expansion
diego
parents:
17137
diff
changeset
|
133 -** $Id: output.c,v 1.42 2004/09/04 14:56:28 menno Exp $ |
16249 | 134 +** Initially modified for use with MPlayer by Rich Felker on 2005/03/29 |
17181
53c3eaaf8b49
Unify paths in patch and fix recent breakage, no -ko keyword expansion
diego
parents:
17137
diff
changeset
|
135 +** $Id: output.c,v 1.11 2005/04/05 05:43:41 rfelker Exp $ |
16249 | 136 +** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/ |
137 **/ | |
138 | |
139 #include "common.h" | |
140 @@ -462,7 +462,7 @@ | |
141 } | |
142 } | |
143 | |
144 -void* output_to_PCM(NeAACDecHandle hDecoder, | |
145 +void* output_to_PCM_sux(NeAACDecHandle hDecoder, | |
146 real_t **input, void *sample_buffer, uint8_t channels, | |
147 uint16_t frame_len, uint8_t format) | |
148 { | |
149 @@ -553,4 +553,51 @@ | |
150 return sample_buffer; | |
151 } | |
152 | |
153 +void* output_to_PCM(NeAACDecHandle hDecoder, | |
154 + real_t **input, void *sample_buffer, uint8_t channels, | |
155 + uint16_t frame_len, uint8_t format) | |
156 +{ | |
157 + int ch; | |
158 + int i; | |
159 + int16_t *short_sample_buffer = (int16_t*)sample_buffer; | |
160 + real_t *ch0 = input[hDecoder->internal_channel[0]]; | |
161 + real_t *ch1 = input[hDecoder->internal_channel[1]]; | |
162 + real_t *ch2 = input[hDecoder->internal_channel[2]]; | |
163 + real_t *ch3 = input[hDecoder->internal_channel[3]]; | |
164 + real_t *ch4 = input[hDecoder->internal_channel[4]]; | |
165 + | |
166 + if (format != FAAD_FMT_16BIT) | |
167 + return output_to_PCM_sux(hDecoder, input, sample_buffer, channels, frame_len, format); | |
168 + | |
169 + if (hDecoder->downMatrix) { | |
170 + for(i = 0; i < frame_len; i++) | |
171 + { | |
172 + int32_t tmp; | |
173 + tmp = (ch1[i] + ((ch0[i]+ch3[i])>>1) + ((ch0[i]+ch3[i])>>2) + (1<<(REAL_BITS))) >> (REAL_BITS+1); | |
174 + if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000; | |
175 + short_sample_buffer[0] = tmp; | |
176 + tmp = (ch2[i] + ((ch0[i]+ch4[i])>>1) + ((ch0[i]+ch4[i])>>2) + (1<<(REAL_BITS))) >> (REAL_BITS+1); | |
177 + if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000; | |
178 + short_sample_buffer[1] = tmp; | |
179 + short_sample_buffer += channels; | |
180 + } | |
181 + return sample_buffer; | |
182 + } | |
183 + | |
184 + /* Copy output to a standard PCM buffer */ | |
185 + for(i = 0; i < frame_len; i++) | |
186 + { | |
187 + for (ch = 0; ch < channels; ch++) | |
188 + { | |
189 + int32_t tmp = input[ch][i]; | |
190 + tmp += (1 << (REAL_BITS-1)); | |
191 + tmp >>= REAL_BITS; | |
192 + if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000; | |
193 + *(short_sample_buffer++) = tmp; | |
194 + } | |
195 + } | |
196 + | |
197 + return sample_buffer; | |
198 +} | |
199 + | |
200 #endif | |
17136 | 201 --- libfaad/ps_dec.c 2005-02-01 14:15:58.000000000 +0100 |
202 +++ libfaad2/ps_dec.c 2005-12-07 22:52:31.000000000 +0100 | |
203 @@ -1960,8 +1935,8 @@ | |
204 /* main Parametric Stereo decoding function */ | |
205 uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64]) | |
206 { | |
207 - qmf_t X_hybrid_left[32][32] = {{0}}; | |
208 - qmf_t X_hybrid_right[32][32] = {{0}}; | |
209 + qmf_t X_hybrid_left[32][32] = {{{0}}}; | |
210 + qmf_t X_hybrid_right[32][32] = {{{0}}}; | |
211 | |
212 /* delta decoding of the bitstream data */ | |
213 ps_data_decode(ps); | |
17137 | 214 --- libfaad/sbr_dec.c 2005-12-07 22:52:03.000000000 +0100 |
215 +++ libfaad2/sbr_dec.c 2005-12-07 22:52:31.000000000 +0100 | |
216 @@ -604,8 +527,8 @@ | |
217 uint8_t l, k; | |
218 uint8_t dont_process = 0; | |
219 uint8_t ret = 0; | |
220 - ALIGN qmf_t X_left[38][64] = {{0}}; | |
221 - ALIGN qmf_t X_right[38][64] = {{0}}; /* must set this to 0 */ | |
222 + ALIGN qmf_t X_left[38][64] = {{{0}}}; | |
223 + ALIGN qmf_t X_right[38][64] = {{{0}}}; /* must set this to 0 */ | |
224 | |
225 if (sbr == NULL) | |
226 return 20; |