Diffstat (limited to 'core/multimedia/opieplayer/libmad/mad.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libmad/mad.h | 376 |
1 files changed, 255 insertions, 121 deletions
diff --git a/core/multimedia/opieplayer/libmad/mad.h b/core/multimedia/opieplayer/libmad/mad.h index 9db9da3..9ef6cc8 100644 --- a/core/multimedia/opieplayer/libmad/mad.h +++ b/core/multimedia/opieplayer/libmad/mad.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * mad - MPEG audio decoder | 2 | * libmad - MPEG audio decoder library |
3 | * Copyright (C) 2000-2001 Robert Leslie | 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -17,21 +17,30 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | * | 18 | * |
19 | * If you would like to negotiate alternate licensing terms, you may do | 19 | * If you would like to negotiate alternate licensing terms, you may do |
20 | * so by contacting the author: Robert Leslie <rob@mars.org> | 20 | * so by contacting: Underbit Technologies, Inc. <info@underbit.com> |
21 | */ | 21 | */ |
22 | 22 | ||
23 | # ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | # endif | ||
26 | |||
27 | # define FPM_INTEL | ||
28 | |||
29 | |||
30 | |||
23 | # define SIZEOF_INT 4 | 31 | # define SIZEOF_INT 4 |
24 | # define SIZEOF_LONG 4 | 32 | # define SIZEOF_LONG 4 |
25 | # define SIZEOF_LONG_LONG 8 | 33 | # define SIZEOF_LONG_LONG 8 |
26 | 34 | ||
27 | /* Id: version.h,v 1.16 2001/04/05 04:57:11 rob Exp */ | 35 | |
36 | /* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */ | ||
28 | 37 | ||
29 | # ifndef LIBMAD_VERSION_H | 38 | # ifndef LIBMAD_VERSION_H |
30 | # define LIBMAD_VERSION_H | 39 | # define LIBMAD_VERSION_H |
31 | 40 | ||
32 | # define MAD_VERSION_MAJOR0 | 41 | # define MAD_VERSION_MAJOR0 |
33 | # define MAD_VERSION_MINOR13 | 42 | # define MAD_VERSION_MINOR15 |
34 | # define MAD_VERSION_PATCH0 | 43 | # define MAD_VERSION_PATCH1 |
35 | # define MAD_VERSION_EXTRA" (beta)" | 44 | # define MAD_VERSION_EXTRA" (beta)" |
36 | 45 | ||
37 | # define MAD_VERSION_STRINGIZE(str)#str | 46 | # define MAD_VERSION_STRINGIZE(str)#str |
@@ -42,9 +51,9 @@ | |||
42 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ | 51 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ |
43 | MAD_VERSION_EXTRA | 52 | MAD_VERSION_EXTRA |
44 | 53 | ||
45 | # define MAD_PUBLISHYEAR"2000-2001" | 54 | # define MAD_PUBLISHYEAR"2000-2004" |
46 | # define MAD_AUTHOR "Robert Leslie" | 55 | # define MAD_AUTHOR "Underbit Technologies, Inc." |
47 | # define MAD_EMAIL "rob@mars.org" | 56 | # define MAD_EMAIL "info@underbit.com" |
48 | 57 | ||
49 | extern char const mad_version[]; | 58 | extern char const mad_version[]; |
50 | extern char const mad_copyright[]; | 59 | extern char const mad_copyright[]; |
@@ -53,7 +62,7 @@ extern char const mad_build[]; | |||
53 | 62 | ||
54 | # endif | 63 | # endif |
55 | 64 | ||
56 | /* Id: fixed.h,v 1.23 2001/04/05 04:57:11 rob Exp */ | 65 | /* Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp */ |
57 | 66 | ||
58 | # ifndef LIBMAD_FIXED_H | 67 | # ifndef LIBMAD_FIXED_H |
59 | # define LIBMAD_FIXED_H | 68 | # define LIBMAD_FIXED_H |
@@ -70,6 +79,18 @@ typedef signed long mad_fixed64hi_t; | |||
70 | typedef unsigned long mad_fixed64lo_t; | 79 | typedef unsigned long mad_fixed64lo_t; |
71 | # endif | 80 | # endif |
72 | 81 | ||
82 | # if defined(_MSC_VER) | ||
83 | # define mad_fixed64_t signed __int64 | ||
84 | # elif 1 || defined(__GNUC__) | ||
85 | # define mad_fixed64_t signed long long | ||
86 | # endif | ||
87 | |||
88 | # if defined(FPM_FLOAT) | ||
89 | typedef double mad_sample_t; | ||
90 | # else | ||
91 | typedef mad_fixed_t mad_sample_t; | ||
92 | # endif | ||
93 | |||
73 | /* | 94 | /* |
74 | * Fixed-point format: 0xABBBBBBB | 95 | * Fixed-point format: 0xABBBBBBB |
75 | * A == whole part (sign + 3 bits) | 96 | * A == whole part (sign + 3 bits) |
@@ -130,20 +151,31 @@ typedef unsigned long mad_fixed64lo_t; | |||
130 | # define mad_f_add(x, y)((x) + (y)) | 151 | # define mad_f_add(x, y)((x) + (y)) |
131 | # define mad_f_sub(x, y)((x) - (y)) | 152 | # define mad_f_sub(x, y)((x) - (y)) |
132 | 153 | ||
133 | # if defined(FPM_64BIT) | 154 | # if defined(FPM_FLOAT) |
155 | # error "FPM_FLOAT not yet supported" | ||
156 | |||
157 | # undef MAD_F | ||
158 | # define MAD_F(x) mad_f_todouble(x) | ||
159 | |||
160 | # define mad_f_mul(x, y)((x) * (y)) | ||
161 | # define mad_f_scale64 | ||
162 | |||
163 | # undef ASO_ZEROCHECK | ||
164 | |||
165 | # elif defined(FPM_64BIT) | ||
134 | 166 | ||
135 | /* | 167 | /* |
136 | * This version should be the most accurate if 64-bit (long long) types are | 168 | * This version should be the most accurate if 64-bit types are supported by |
137 | * supported by the compiler, although it may not be the most efficient. | 169 | * the compiler, although it may not be the most efficient. |
138 | */ | 170 | */ |
139 | # if defined(OPT_ACCURACY) | 171 | # if defined(OPT_ACCURACY) |
140 | # define mad_f_mul(x, y) \ | 172 | # define mad_f_mul(x, y) \ |
141 | ((mad_fixed_t) \ | 173 | ((mad_fixed_t) \ |
142 | ((((signed long long) (x) * (y)) + \ | 174 | ((((mad_fixed64_t) (x) * (y)) + \ |
143 | (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS)) | 175 | (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS)) |
144 | # else | 176 | # else |
145 | # define mad_f_mul(x, y) \ | 177 | # define mad_f_mul(x, y) \ |
146 | ((mad_fixed_t) (((signed long long) (x) * (y)) >> MAD_F_SCALEBITS)) | 178 | ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS)) |
147 | # endif | 179 | # endif |
148 | 180 | ||
149 | # define MAD_F_SCALEBITS MAD_F_FRACBITS | 181 | # define MAD_F_SCALEBITS MAD_F_FRACBITS |
@@ -152,21 +184,44 @@ typedef unsigned long mad_fixed64lo_t; | |||
152 | 184 | ||
153 | # elif defined(FPM_INTEL) | 185 | # elif defined(FPM_INTEL) |
154 | 186 | ||
187 | # if defined(_MSC_VER) | ||
188 | # pragma warning(push) | ||
189 | # pragma warning(disable: 4035) /* no return value */ | ||
190 | static __forceinline | ||
191 | mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | ||
192 | { | ||
193 | enum { | ||
194 | fracbits = MAD_F_FRACBITS | ||
195 | }; | ||
196 | |||
197 | __asm { | ||
198 | mov eax, x | ||
199 | imul y | ||
200 | shrd eax, edx, fracbits | ||
201 | } | ||
202 | |||
203 | /* implicit return of eax */ | ||
204 | } | ||
205 | # pragma warning(pop) | ||
206 | |||
207 | # define mad_f_mul mad_f_mul_inline | ||
208 | # define mad_f_scale64 | ||
209 | # else | ||
155 | /* | 210 | /* |
156 | * This Intel version is fast and accurate; the disposition of the least | 211 | * This Intel version is fast and accurate; the disposition of the least |
157 | * significant bit depends on OPT_ACCURACY via mad_f_scale64(). | 212 | * significant bit depends on OPT_ACCURACY via mad_f_scale64(). |
158 | */ | 213 | */ |
159 | # define MAD_F_MLX(hi, lo, x, y) \ | 214 | # define MAD_F_MLX(hi, lo, x, y) \ |
160 | asm ("imull %3" \ | 215 | asm ("imull %3" \ |
161 | : "=a" (lo), "=d" (hi) \ | 216 | : "=a" (lo), "=d" (hi) \ |
162 | : "%a" (x), "rm" (y) \ | 217 | : "%a" (x), "rm" (y) \ |
163 | : "cc") | 218 | : "cc") |
164 | 219 | ||
165 | # if defined(OPT_ACCURACY) | 220 | # if defined(OPT_ACCURACY) |
166 | /* | 221 | /* |
167 | * This gives best accuracy but is not very fast. | 222 | * This gives best accuracy but is not very fast. |
168 | */ | 223 | */ |
169 | # define MAD_F_MLA(hi, lo, x, y) \ | 224 | # define MAD_F_MLA(hi, lo, x, y) \ |
170 | ({ mad_fixed64hi_t __hi; \ | 225 | ({ mad_fixed64hi_t __hi; \ |
171 | mad_fixed64lo_t __lo; \ | 226 | mad_fixed64lo_t __lo; \ |
172 | MAD_F_MLX(__hi, __lo, (x), (y)); \ | 227 | MAD_F_MLX(__hi, __lo, (x), (y)); \ |
@@ -176,13 +231,13 @@ typedef unsigned long mad_fixed64lo_t; | |||
176 | : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ | 231 | : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ |
177 | : "cc"); \ | 232 | : "cc"); \ |
178 | }) | 233 | }) |
179 | # endif /* OPT_ACCURACY */ | 234 | # endif /* OPT_ACCURACY */ |
180 | 235 | ||
181 | # if defined(OPT_ACCURACY) | 236 | # if defined(OPT_ACCURACY) |
182 | /* | 237 | /* |
183 | * Surprisingly, this is faster than SHRD followed by ADC. | 238 | * Surprisingly, this is faster than SHRD followed by ADC. |
184 | */ | 239 | */ |
185 | # define mad_f_scale64(hi, lo) \ | 240 | # define mad_f_scale64(hi, lo) \ |
186 | ({ mad_fixed64hi_t __hi_; \ | 241 | ({ mad_fixed64hi_t __hi_; \ |
187 | mad_fixed64lo_t __lo_; \ | 242 | mad_fixed64lo_t __lo_; \ |
188 | mad_fixed_t __result; \ | 243 | mad_fixed_t __result; \ |
@@ -198,8 +253,23 @@ typedef unsigned long mad_fixed64lo_t; | |||
198 | : "cc"); \ | 253 | : "cc"); \ |
199 | __result; \ | 254 | __result; \ |
200 | }) | 255 | }) |
201 | # else | 256 | # elif defined(OPT_INTEL) |
202 | # define mad_f_scale64(hi, lo) \ | 257 | /* |
258 | * Alternate Intel scaling that may or may not perform better. | ||
259 | */ | ||
260 | # define mad_f_scale64(hi, lo) \ | ||
261 | ({ mad_fixed_t __result; \ | ||
262 | asm ("shrl %3,%1\n\t" \ | ||
263 | "shll %4,%2\n\t" \ | ||
264 | "orl %2,%1" \ | ||
265 | : "=rm" (__result) \ | ||
266 | : "0" (lo), "r" (hi), \ | ||
267 | "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ | ||
268 | : "cc"); \ | ||
269 | __result; \ | ||
270 | }) | ||
271 | # else | ||
272 | # define mad_f_scale64(hi, lo) \ | ||
203 | ({ mad_fixed_t __result; \ | 273 | ({ mad_fixed_t __result; \ |
204 | asm ("shrdl %3,%2,%1" \ | 274 | asm ("shrdl %3,%2,%1" \ |
205 | : "=rm" (__result) \ | 275 | : "=rm" (__result) \ |
@@ -207,9 +277,10 @@ typedef unsigned long mad_fixed64lo_t; | |||
207 | : "cc"); \ | 277 | : "cc"); \ |
208 | __result; \ | 278 | __result; \ |
209 | }) | 279 | }) |
210 | # endif /* OPT_ACCURACY */ | 280 | # endif /* OPT_ACCURACY */ |
211 | 281 | ||
212 | # define MAD_F_SCALEBITS MAD_F_FRACBITS | 282 | # define MAD_F_SCALEBITS MAD_F_FRACBITS |
283 | # endif | ||
213 | 284 | ||
214 | /* --- ARM ----------------------------------------------------------------- */ | 285 | /* --- ARM ----------------------------------------------------------------- */ |
215 | 286 | ||
@@ -221,12 +292,8 @@ typedef unsigned long mad_fixed64lo_t; | |||
221 | */ | 292 | */ |
222 | # if 1 | 293 | # if 1 |
223 | /* | 294 | /* |
224 | * There's a bug somewhere, possibly in the compiler, that sometimes makes | 295 | * This is faster than the default implementation via MAD_F_MLX() and |
225 | * this necessary instead of the default implementation via MAD_F_MLX and | 296 | * mad_f_scale64(). |
226 | * mad_f_scale64. It may be related to the use (or lack) of | ||
227 | * -finline-functions and/or -fstrength-reduce. | ||
228 | * | ||
229 | * This is also apparently faster than MAD_F_MLX/mad_f_scale64. | ||
230 | */ | 297 | */ |
231 | # define mad_f_mul(x, y) \ | 298 | # define mad_f_mul(x, y) \ |
232 | ({ mad_fixed64hi_t __hi; \ | 299 | ({ mad_fixed64hi_t __hi; \ |
@@ -253,11 +320,18 @@ typedef unsigned long mad_fixed64lo_t; | |||
253 | : "+r" (lo), "+r" (hi) \ | 320 | : "+r" (lo), "+r" (hi) \ |
254 | : "%r" (x), "r" (y)) | 321 | : "%r" (x), "r" (y)) |
255 | 322 | ||
323 | # define MAD_F_MLN(hi, lo) \ | ||
324 | asm ("rsbs%0, %2, #0\n\t" \ | ||
325 | "rsc%1, %3, #0" \ | ||
326 | : "=r" (lo), "=r" (hi) \ | ||
327 | : "0" (lo), "1" (hi) \ | ||
328 | : "cc") | ||
329 | |||
256 | # define mad_f_scale64(hi, lo) \ | 330 | # define mad_f_scale64(hi, lo) \ |
257 | ({ mad_fixed_t __result; \ | 331 | ({ mad_fixed_t __result; \ |
258 | asm ("movs%0, %1, lsr %3\n\t" \ | 332 | asm ("movs%0, %1, lsr %3\n\t" \ |
259 | "adc%0, %0, %2, lsl %4" \ | 333 | "adc%0, %0, %2, lsl %4" \ |
260 | : "=r" (__result) \ | 334 | : "=&r" (__result) \ |
261 | : "r" (lo), "r" (hi), \ | 335 | : "r" (lo), "r" (hi), \ |
262 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ | 336 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ |
263 | : "cc"); \ | 337 | : "cc"); \ |
@@ -325,58 +399,69 @@ typedef unsigned long mad_fixed64lo_t; | |||
325 | # elif defined(FPM_PPC) | 399 | # elif defined(FPM_PPC) |
326 | 400 | ||
327 | /* | 401 | /* |
328 | * This PowerPC version is tuned for the 4xx embedded processors. It is | 402 | * This PowerPC version is fast and accurate; the disposition of the least |
329 | * effectively a tuned version of FPM_64BIT. It is a little faster and just | 403 | * significant bit depends on OPT_ACCURACY via mad_f_scale64(). |
330 | * as accurate. The disposition of the least significant bit depends on | ||
331 | * OPT_ACCURACY via mad_f_scale64(). | ||
332 | */ | 404 | */ |
333 | # define MAD_F_MLX(hi, lo, x, y) \ | 405 | # define MAD_F_MLX(hi, lo, x, y) \ |
334 | asm ("mulhw %1, %2, %3\n\t" \ | 406 | do { \ |
335 | "mullw %0, %2, %3" \ | 407 | asm ("mullw %0,%1,%2" \ |
336 | : "=&r" (lo), "=&r" (hi) \ | 408 | : "=r" (lo) \ |
337 | : "%r" (x), "r" (y)) | 409 | : "%r" (x), "r" (y)); \ |
410 | asm ("mulhw %0,%1,%2" \ | ||
411 | : "=r" (hi) \ | ||
412 | : "%r" (x), "r" (y)); \ | ||
413 | } \ | ||
414 | while (0) | ||
338 | 415 | ||
339 | # define MAD_F_MLA(hi, lo, x, y) \ | 416 | # if defined(OPT_ACCURACY) |
417 | /* | ||
418 | * This gives best accuracy but is not very fast. | ||
419 | */ | ||
420 | # define MAD_F_MLA(hi, lo, x, y) \ | ||
340 | ({ mad_fixed64hi_t __hi; \ | 421 | ({ mad_fixed64hi_t __hi; \ |
341 | mad_fixed64lo_t __lo; \ | 422 | mad_fixed64lo_t __lo; \ |
342 | MAD_F_MLX(__hi, __lo, (x), (y)); \ | 423 | MAD_F_MLX(__hi, __lo, (x), (y)); \ |
343 | asm ("addc %0, %2, %3\n\t" \ | 424 | asm ("addc %0,%2,%3\n\t" \ |
344 | "adde %1, %4, %5" \ | 425 | "adde %1,%4,%5" \ |
345 | : "=r" (lo), "=r" (hi) \ | 426 | : "=r" (lo), "=r" (hi) \ |
346 | : "%r" (__lo), "0" (lo), "%r" (__hi), "1" (hi)); \ | 427 | : "%r" (lo), "r" (__lo), \ |
428 | "%r" (hi), "r" (__hi) \ | ||
429 | : "xer"); \ | ||
347 | }) | 430 | }) |
431 | # endif | ||
348 | 432 | ||
349 | # if defined(OPT_ACCURACY) | 433 | # if defined(OPT_ACCURACY) |
350 | /* | 434 | /* |
351 | * This is accurate and ~2 - 2.5 times slower than the unrounded version. | 435 | * This is slower than the truncating version below it. |
352 | * | ||
353 | * The __volatile__ improves the generated code by another 5% (fewer spills | ||
354 | * to memory); eventually they should be removed. | ||
355 | */ | 436 | */ |
356 | # define mad_f_scale64(hi, lo) \ | 437 | # define mad_f_scale64(hi, lo) \ |
357 | ({ mad_fixed_t __result; \ | 438 | ({ mad_fixed_t __result, __round; \ |
358 | mad_fixed64hi_t __hi_; \ | 439 | asm ("rotrwi %0,%1,%2" \ |
359 | mad_fixed64lo_t __lo_; \ | 440 | : "=r" (__result) \ |
360 | asm __volatile__ ("addc %0, %2, %4\n\t" \ | 441 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ |
361 | "addze %1, %3" \ | 442 | asm ("extrwi %0,%1,1,0" \ |
362 | : "=r" (__lo_), "=r" (__hi_) \ | 443 | : "=r" (__round) \ |
363 | : "r" (lo), "r" (hi), "r" (1 << (MAD_F_SCALEBITS - 1))); \ | 444 | : "r" (__result)); \ |
364 | asm __volatile__ ("rlwinm %0, %2,32-%3,0,%3-1\n\t" \ | 445 | asm ("insrwi %0,%1,%2,0" \ |
365 | "rlwimi %0, %1,32-%3,%3,31" \ | 446 | : "+r" (__result) \ |
366 | : "=&r" (__result) \ | 447 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ |
367 | : "r" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS)); \ | 448 | asm ("add %0,%1,%2" \ |
368 | __result; \ | 449 | : "=r" (__result) \ |
450 | : "%r" (__result), "r" (__round)); \ | ||
451 | __result; \ | ||
369 | }) | 452 | }) |
370 | # else | 453 | # else |
371 | # define mad_f_scale64(hi, lo) \ | 454 | # define mad_f_scale64(hi, lo) \ |
372 | ({ mad_fixed_t __result; \ | 455 | ({ mad_fixed_t __result; \ |
373 | asm ("rlwinm %0, %2,32-%3,0,%3-1\n\t" \ | 456 | asm ("rotrwi %0,%1,%2" \ |
374 | "rlwimi %0, %1,32-%3,%3,31" \ | ||
375 | : "=r" (__result) \ | 457 | : "=r" (__result) \ |
376 | : "r" (lo), "r" (hi), "I" (MAD_F_SCALEBITS)); \ | 458 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ |
377 | __result; \ | 459 | asm ("insrwi %0,%1,%2,0" \ |
460 | : "+r" (__result) \ | ||
461 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ | ||
462 | __result; \ | ||
378 | }) | 463 | }) |
379 | # endif /* OPT_ACCURACY */ | 464 | # endif |
380 | 465 | ||
381 | # define MAD_F_SCALEBITS MAD_F_FRACBITS | 466 | # define MAD_F_SCALEBITS MAD_F_FRACBITS |
382 | 467 | ||
@@ -393,8 +478,12 @@ typedef unsigned long mad_fixed64lo_t; | |||
393 | * | 478 | * |
394 | * Pre-rounding is required to stay within the limits of compliance. | 479 | * Pre-rounding is required to stay within the limits of compliance. |
395 | */ | 480 | */ |
396 | # define mad_f_mul(x, y)((((x) + (1L << 11)) >> 12) * \ | 481 | # if defined(OPT_SPEED) |
482 | # define mad_f_mul(x, y)(((x) >> 12) * ((y) >> 16)) | ||
483 | # else | ||
484 | # define mad_f_mul(x, y)((((x) + (1L << 11)) >> 12) * \ | ||
397 | (((y) + (1L << 15)) >> 16)) | 485 | (((y) + (1L << 15)) >> 16)) |
486 | # endif | ||
398 | 487 | ||
399 | /* ------------------------------------------------------------------------- */ | 488 | /* ------------------------------------------------------------------------- */ |
400 | 489 | ||
@@ -406,8 +495,8 @@ typedef unsigned long mad_fixed64lo_t; | |||
406 | 495 | ||
407 | # if !defined(mad_f_mul) | 496 | # if !defined(mad_f_mul) |
408 | # define mad_f_mul(x, y) \ | 497 | # define mad_f_mul(x, y) \ |
409 | ({ mad_fixed64hi_t __hi; \ | 498 | ({ register mad_fixed64hi_t __hi; \ |
410 | mad_fixed64lo_t __lo; \ | 499 | register mad_fixed64lo_t __lo; \ |
411 | MAD_F_MLX(__hi, __lo, (x), (y)); \ | 500 | MAD_F_MLX(__hi, __lo, (x), (y)); \ |
412 | mad_f_scale64(__hi, __lo); \ | 501 | mad_f_scale64(__hi, __lo); \ |
413 | }) | 502 | }) |
@@ -416,6 +505,7 @@ typedef unsigned long mad_fixed64lo_t; | |||
416 | # if !defined(MAD_F_MLA) | 505 | # if !defined(MAD_F_MLA) |
417 | # define MAD_F_ML0(hi, lo, x, y)((lo) = mad_f_mul((x), (y))) | 506 | # define MAD_F_ML0(hi, lo, x, y)((lo) = mad_f_mul((x), (y))) |
418 | # define MAD_F_MLA(hi, lo, x, y)((lo) += mad_f_mul((x), (y))) | 507 | # define MAD_F_MLA(hi, lo, x, y)((lo) += mad_f_mul((x), (y))) |
508 | # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) | ||
419 | # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) | 509 | # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) |
420 | # endif | 510 | # endif |
421 | 511 | ||
@@ -423,6 +513,10 @@ typedef unsigned long mad_fixed64lo_t; | |||
423 | # define MAD_F_ML0(hi, lo, x, y)MAD_F_MLX((hi), (lo), (x), (y)) | 513 | # define MAD_F_ML0(hi, lo, x, y)MAD_F_MLX((hi), (lo), (x), (y)) |
424 | # endif | 514 | # endif |
425 | 515 | ||
516 | # if !defined(MAD_F_MLN) | ||
517 | # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) | ||
518 | # endif | ||
519 | |||
426 | # if !defined(MAD_F_MLZ) | 520 | # if !defined(MAD_F_MLZ) |
427 | # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) | 521 | # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) |
428 | # endif | 522 | # endif |
@@ -442,13 +536,14 @@ typedef unsigned long mad_fixed64lo_t; | |||
442 | # define MAD_F_SCALEBITS MAD_F_FRACBITS | 536 | # define MAD_F_SCALEBITS MAD_F_FRACBITS |
443 | # endif | 537 | # endif |
444 | 538 | ||
445 | /* miscellaneous C routines */ | 539 | /* C routines */ |
446 | 540 | ||
447 | mad_fixed_t mad_f_abs(mad_fixed_t); | 541 | mad_fixed_t mad_f_abs(mad_fixed_t); |
542 | mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t); | ||
448 | 543 | ||
449 | # endif | 544 | # endif |
450 | 545 | ||
451 | /* Id: bit.h,v 1.7 2001/04/05 04:57:11 rob Exp */ | 546 | /* Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp */ |
452 | 547 | ||
453 | # ifndef LIBMAD_BIT_H | 548 | # ifndef LIBMAD_BIT_H |
454 | # define LIBMAD_BIT_H | 549 | # define LIBMAD_BIT_H |
@@ -477,7 +572,7 @@ unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); | |||
477 | 572 | ||
478 | # endif | 573 | # endif |
479 | 574 | ||
480 | /* Id: timer.h,v 1.10 2001/04/05 04:57:11 rob Exp */ | 575 | /* Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp */ |
481 | 576 | ||
482 | # ifndef LIBMAD_TIMER_H | 577 | # ifndef LIBMAD_TIMER_H |
483 | # define LIBMAD_TIMER_H | 578 | # define LIBMAD_TIMER_H |
@@ -539,7 +634,7 @@ enum mad_units { | |||
539 | MAD_UNITS_59_94_FPS = -60 | 634 | MAD_UNITS_59_94_FPS = -60 |
540 | }; | 635 | }; |
541 | 636 | ||
542 | # define mad_timer_reset(timer)(*(timer) = mad_timer_zero) | 637 | # define mad_timer_reset(timer)((void) (*(timer) = mad_timer_zero)) |
543 | 638 | ||
544 | int mad_timer_compare(mad_timer_t, mad_timer_t); | 639 | int mad_timer_compare(mad_timer_t, mad_timer_t); |
545 | 640 | ||
@@ -559,15 +654,18 @@ void mad_timer_string(mad_timer_t, char *, char const *, | |||
559 | 654 | ||
560 | # endif | 655 | # endif |
561 | 656 | ||
562 | /* Id: stream.h,v 1.12 2001/04/10 05:18:21 rob Exp */ | 657 | /* Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp */ |
563 | 658 | ||
564 | # ifndef LIBMAD_STREAM_H | 659 | # ifndef LIBMAD_STREAM_H |
565 | # define LIBMAD_STREAM_H | 660 | # define LIBMAD_STREAM_H |
566 | 661 | ||
662 | |||
567 | # define MAD_BUFFER_GUARD8 | 663 | # define MAD_BUFFER_GUARD8 |
568 | # define MAD_BUFFER_MDLEN(511 + 2048 + MAD_BUFFER_GUARD) | 664 | # define MAD_BUFFER_MDLEN(511 + 2048 + MAD_BUFFER_GUARD) |
569 | 665 | ||
570 | enum mad_error { | 666 | enum mad_error { |
667 | MAD_ERROR_NONE = 0x0000,/* no error */ | ||
668 | |||
571 | MAD_ERROR_BUFLEN = 0x0001,/* input buffer too small (or EOF) */ | 669 | MAD_ERROR_BUFLEN = 0x0001,/* input buffer too small (or EOF) */ |
572 | MAD_ERROR_BUFPTR = 0x0002,/* invalid (null) buffer pointer */ | 670 | MAD_ERROR_BUFPTR = 0x0002,/* invalid (null) buffer pointer */ |
573 | 671 | ||
@@ -582,6 +680,7 @@ enum mad_error { | |||
582 | MAD_ERROR_BADCRC = 0x0201,/* CRC check failed */ | 680 | MAD_ERROR_BADCRC = 0x0201,/* CRC check failed */ |
583 | MAD_ERROR_BADBITALLOC = 0x0211,/* forbidden bit allocation value */ | 681 | MAD_ERROR_BADBITALLOC = 0x0211,/* forbidden bit allocation value */ |
584 | MAD_ERROR_BADSCALEFACTOR = 0x0221,/* bad scalefactor index */ | 682 | MAD_ERROR_BADSCALEFACTOR = 0x0221,/* bad scalefactor index */ |
683 | MAD_ERROR_BADMODE = 0x0222,/* bad bitrate/mode combination */ | ||
585 | MAD_ERROR_BADFRAMELEN = 0x0231,/* bad frame length */ | 684 | MAD_ERROR_BADFRAMELEN = 0x0231,/* bad frame length */ |
586 | MAD_ERROR_BADBIGVALUES = 0x0232,/* bad big_values count */ | 685 | MAD_ERROR_BADBIGVALUES = 0x0232,/* bad big_values count */ |
587 | MAD_ERROR_BADBLOCKTYPE = 0x0233,/* reserved block_type */ | 686 | MAD_ERROR_BADBLOCKTYPE = 0x0233,/* reserved block_type */ |
@@ -620,18 +719,19 @@ struct mad_stream { | |||
620 | 719 | ||
621 | enum { | 720 | enum { |
622 | MAD_OPTION_IGNORECRC = 0x0001,/* ignore CRC errors */ | 721 | MAD_OPTION_IGNORECRC = 0x0001,/* ignore CRC errors */ |
623 | MAD_OPTION_HALFSAMPLERATE = 0x0002,/* generate PCM at 1/2 sample rate */ | 722 | MAD_OPTION_HALFSAMPLERATE = 0x0002/* generate PCM at 1/2 sample rate */ |
624 | # if 0 /* not yet implemented */ | 723 | # if 0 /* not yet implemented */ |
625 | MAD_OPTION_LEFTCHANNEL = 0x0010,/* decode left channel only */ | 724 | MAD_OPTION_LEFTCHANNEL = 0x0010,/* decode left channel only */ |
626 | MAD_OPTION_RIGHTCHANNEL = 0x0020,/* decode right channel only */ | 725 | MAD_OPTION_RIGHTCHANNEL = 0x0020,/* decode right channel only */ |
627 | MAD_OPTION_SINGLECHANNEL = 0x0030,/* combine channels */ | 726 | MAD_OPTION_SINGLECHANNEL = 0x0030/* combine channels */ |
628 | # endif | 727 | # endif |
629 | }; | 728 | }; |
630 | 729 | ||
631 | void mad_stream_init(struct mad_stream *); | 730 | void mad_stream_init(struct mad_stream *); |
632 | void mad_stream_finish(struct mad_stream *); | 731 | void mad_stream_finish(struct mad_stream *); |
633 | 732 | ||
634 | # define mad_stream_options(stream, opts) ((stream)->options = (opts)) | 733 | # define mad_stream_options(stream, opts) \ |
734 | ((void) ((stream)->options = (opts))) | ||
635 | 735 | ||
636 | void mad_stream_buffer(struct mad_stream *, | 736 | void mad_stream_buffer(struct mad_stream *, |
637 | unsigned char const *, unsigned long); | 737 | unsigned char const *, unsigned long); |
@@ -639,13 +739,16 @@ void mad_stream_skip(struct mad_stream *, unsigned long); | |||
639 | 739 | ||
640 | int mad_stream_sync(struct mad_stream *); | 740 | int mad_stream_sync(struct mad_stream *); |
641 | 741 | ||
742 | char const *mad_stream_errorstr(struct mad_stream const *); | ||
743 | |||
642 | # endif | 744 | # endif |
643 | 745 | ||
644 | /* Id: frame.h,v 1.13 2001/04/05 04:57:11 rob Exp */ | 746 | /* Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp */ |
645 | 747 | ||
646 | # ifndef LIBMAD_FRAME_H | 748 | # ifndef LIBMAD_FRAME_H |
647 | # define LIBMAD_FRAME_H | 749 | # define LIBMAD_FRAME_H |
648 | 750 | ||
751 | |||
649 | enum mad_layer { | 752 | enum mad_layer { |
650 | MAD_LAYER_I = 1, /* Layer I */ | 753 | MAD_LAYER_I = 1, /* Layer I */ |
651 | MAD_LAYER_II = 2, /* Layer II */ | 754 | MAD_LAYER_II = 2, /* Layer II */ |
@@ -662,27 +765,30 @@ enum mad_mode { | |||
662 | enum mad_emphasis { | 765 | enum mad_emphasis { |
663 | MAD_EMPHASIS_NONE = 0, /* no emphasis */ | 766 | MAD_EMPHASIS_NONE = 0, /* no emphasis */ |
664 | MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ | 767 | MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ |
665 | MAD_EMPHASIS_CCITT_J_17 = 3 /* CCITT J.17 emphasis */ | 768 | MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ |
769 | MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ | ||
666 | }; | 770 | }; |
667 | 771 | ||
668 | struct mad_frame { | 772 | struct mad_header { |
669 | struct mad_header { | 773 | enum mad_layer layer; /* audio layer (1, 2, or 3) */ |
670 | enum mad_layer layer; /* audio layer (1, 2, or 3) */ | 774 | enum mad_mode mode; /* channel mode (see above) */ |
671 | enum mad_mode mode; /* channel mode (see above) */ | 775 | int mode_extension; /* additional mode info */ |
672 | int mode_extension; /* additional mode info */ | 776 | enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ |
673 | enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ | 777 | |
778 | unsigned long bitrate; /* stream bitrate (bps) */ | ||
779 | unsigned int samplerate; /* sampling frequency (Hz) */ | ||
674 | 780 | ||
675 | unsigned long bitrate; /* stream bitrate (bps) */ | 781 | unsigned short crc_check; /* frame CRC accumulator */ |
676 | unsigned int samplerate; /* sampling frequency (Hz) */ | 782 | unsigned short crc_target; /* final target CRC checksum */ |
677 | 783 | ||
678 | unsigned short crc_check; /* frame CRC accumulator */ | 784 | int flags; /* flags (see below) */ |
679 | unsigned short crc_target; /* final target CRC checksum */ | 785 | int private_bits; /* private bits (see below) */ |
680 | 786 | ||
681 | int flags; /* flags (see below) */ | 787 | mad_timer_t duration; /* audio playing time of frame */ |
682 | int private_bits; /* private bits (see below) */ | 788 | }; |
683 | 789 | ||
684 | mad_timer_t duration; /* audio playing time of frame */ | 790 | struct mad_frame { |
685 | } header; | 791 | struct mad_header header; /* MPEG audio header */ |
686 | 792 | ||
687 | int options; /* decoding options (from stream) */ | 793 | int options; /* decoding options (from stream) */ |
688 | 794 | ||
@@ -697,26 +803,26 @@ struct mad_frame { | |||
697 | ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) | 803 | ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) |
698 | 804 | ||
699 | enum { | 805 | enum { |
700 | MAD_FLAG_NPRIVATE_III = 0x0007,/* number of Layer III private bits */ | 806 | MAD_FLAG_NPRIVATE_III = 0x0007,/* number of Layer III private bits */ |
701 | MAD_FLAG_INCOMPLETE = 0x0008,/* header but not data is decoded */ | 807 | MAD_FLAG_INCOMPLETE = 0x0008,/* header but not data is decoded */ |
702 | 808 | ||
703 | MAD_FLAG_PROTECTION = 0x0010,/* frame has CRC protection */ | 809 | MAD_FLAG_PROTECTION = 0x0010,/* frame has CRC protection */ |
704 | MAD_FLAG_COPYRIGHT = 0x0020,/* frame is copyright */ | 810 | MAD_FLAG_COPYRIGHT = 0x0020,/* frame is copyright */ |
705 | MAD_FLAG_ORIGINAL = 0x0040,/* frame is original (else copy) */ | 811 | MAD_FLAG_ORIGINAL = 0x0040,/* frame is original (else copy) */ |
706 | MAD_FLAG_PADDING = 0x0080,/* frame has additional slot */ | 812 | MAD_FLAG_PADDING = 0x0080,/* frame has additional slot */ |
707 | 813 | ||
708 | MAD_FLAG_I_STEREO = 0x0100,/* uses intensity joint stereo */ | 814 | MAD_FLAG_I_STEREO = 0x0100,/* uses intensity joint stereo */ |
709 | MAD_FLAG_MS_STEREO = 0x0200,/* uses middle/side joint stereo */ | 815 | MAD_FLAG_MS_STEREO = 0x0200,/* uses middle/side joint stereo */ |
710 | MAD_FLAG_FREEFORMAT = 0x0400,/* uses free format bitrate */ | 816 | MAD_FLAG_FREEFORMAT = 0x0400,/* uses free format bitrate */ |
711 | 817 | ||
712 | MAD_FLAG_LSF_EXT = 0x1000,/* lower sampling freq. extension */ | 818 | MAD_FLAG_LSF_EXT = 0x1000,/* lower sampling freq. extension */ |
713 | MAD_FLAG_MC_EXT = 0x2000,/* multichannel audio extension */ | 819 | MAD_FLAG_MC_EXT = 0x2000,/* multichannel audio extension */ |
714 | MAD_FLAG_MPEG_2_5_EXT = 0x4000/* MPEG 2.5 (unofficial) extension */ | 820 | MAD_FLAG_MPEG_2_5_EXT = 0x4000/* MPEG 2.5 (unofficial) extension */ |
715 | }; | 821 | }; |
716 | 822 | ||
717 | enum { | 823 | enum { |
718 | MAD_PRIVATE_HEADER = 0x0100,/* header private bit */ | 824 | MAD_PRIVATE_HEADER = 0x0100,/* header private bit */ |
719 | MAD_PRIVATE_III = 0x001f/* Layer III private bits (up to 5) */ | 825 | MAD_PRIVATE_III = 0x001f/* Layer III private bits (up to 5) */ |
720 | }; | 826 | }; |
721 | 827 | ||
722 | void mad_header_init(struct mad_header *); | 828 | void mad_header_init(struct mad_header *); |
@@ -734,23 +840,43 @@ void mad_frame_mute(struct mad_frame *); | |||
734 | 840 | ||
735 | # endif | 841 | # endif |
736 | 842 | ||
737 | /* Id: synth.h,v 1.8 2001/04/05 04:57:11 rob Exp */ | 843 | /* Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp */ |
738 | 844 | ||
739 | # ifndef LIBMAD_SYNTH_H | 845 | # ifndef LIBMAD_SYNTH_H |
740 | # define LIBMAD_SYNTH_H | 846 | # define LIBMAD_SYNTH_H |
741 | 847 | ||
848 | |||
849 | struct mad_pcm { | ||
850 | unsigned int samplerate; /* sampling frequency (Hz) */ | ||
851 | unsigned short channels; /* number of channels */ | ||
852 | unsigned short length; /* number of samples per channel */ | ||
853 | mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ | ||
854 | }; | ||
855 | |||
742 | struct mad_synth { | 856 | struct mad_synth { |
743 | mad_fixed_t filter[2][2][2][16][8];/* polyphase filterbank outputs */ | 857 | mad_fixed_t filter[2][2][2][16][8];/* polyphase filterbank outputs */ |
744 | /* [ch][eo][peo][s][v] */ | 858 | /* [ch][eo][peo][s][v] */ |
745 | 859 | ||
746 | unsigned int phase; /* current processing phase */ | 860 | unsigned int phase; /* current processing phase */ |
747 | 861 | ||
748 | struct mad_pcm { | 862 | struct mad_pcm pcm; /* PCM output */ |
749 | unsigned int samplerate; /* sampling frequency (Hz) */ | 863 | }; |
750 | unsigned short channels; /* number of channels */ | 864 | |
751 | unsigned short length; /* number of samples per channel */ | 865 | /* single channel PCM selector */ |
752 | mad_fixed_t samples[2][1152];/* PCM output samples */ | 866 | enum { |
753 | } pcm; | 867 | MAD_PCM_CHANNEL_SINGLE = 0 |
868 | }; | ||
869 | |||
870 | /* dual channel PCM selector */ | ||
871 | enum { | ||
872 | MAD_PCM_CHANNEL_DUAL_1 = 0, | ||
873 | MAD_PCM_CHANNEL_DUAL_2 = 1 | ||
874 | }; | ||
875 | |||
876 | /* stereo PCM selector */ | ||
877 | enum { | ||
878 | MAD_PCM_CHANNEL_STEREO_LEFT = 0, | ||
879 | MAD_PCM_CHANNEL_STEREO_RIGHT = 1 | ||
754 | }; | 880 | }; |
755 | 881 | ||
756 | void mad_synth_init(struct mad_synth *); | 882 | void mad_synth_init(struct mad_synth *); |
@@ -763,21 +889,22 @@ void mad_synth_frame(struct mad_synth *, struct mad_frame const *); | |||
763 | 889 | ||
764 | # endif | 890 | # endif |
765 | 891 | ||
766 | /* Id: decoder.h,v 1.9 2001/04/05 04:57:11 rob Exp */ | 892 | /* Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp */ |
767 | 893 | ||
768 | # ifndef LIBMAD_DECODER_H | 894 | # ifndef LIBMAD_DECODER_H |
769 | # define LIBMAD_DECODER_H | 895 | # define LIBMAD_DECODER_H |
770 | 896 | ||
897 | |||
771 | enum mad_decoder_mode { | 898 | enum mad_decoder_mode { |
772 | MAD_DECODER_MODE_SYNC = 0, | 899 | MAD_DECODER_MODE_SYNC = 0, |
773 | MAD_DECODER_MODE_ASYNC | 900 | MAD_DECODER_MODE_ASYNC |
774 | }; | 901 | }; |
775 | 902 | ||
776 | enum mad_flow { | 903 | enum mad_flow { |
777 | MAD_FLOW_CONTINUE = 0x0000, | 904 | MAD_FLOW_CONTINUE = 0x0000,/* continue normally */ |
778 | MAD_FLOW_STOP = 0x0010, | 905 | MAD_FLOW_STOP = 0x0010,/* stop decoding normally */ |
779 | MAD_FLOW_BREAK = 0x0011, | 906 | MAD_FLOW_BREAK = 0x0011,/* stop decoding and signal an error */ |
780 | MAD_FLOW_IGNORE = 0x0020 | 907 | MAD_FLOW_IGNORE = 0x0020/* ignore the current frame */ |
781 | }; | 908 | }; |
782 | 909 | ||
783 | struct mad_decoder { | 910 | struct mad_decoder { |
@@ -801,7 +928,8 @@ struct mad_decoder { | |||
801 | 928 | ||
802 | enum mad_flow (*input_func)(void *, struct mad_stream *); | 929 | enum mad_flow (*input_func)(void *, struct mad_stream *); |
803 | enum mad_flow (*header_func)(void *, struct mad_header const *); | 930 | enum mad_flow (*header_func)(void *, struct mad_header const *); |
804 | enum mad_flow (*filter_func)(void *, struct mad_frame *); | 931 | enum mad_flow (*filter_func)(void *, |
932 | struct mad_stream const *, struct mad_frame *); | ||
805 | enum mad_flow (*output_func)(void *, | 933 | enum mad_flow (*output_func)(void *, |
806 | struct mad_header const *, struct mad_pcm *); | 934 | struct mad_header const *, struct mad_pcm *); |
807 | enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); | 935 | enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); |
@@ -811,7 +939,9 @@ struct mad_decoder { | |||
811 | void mad_decoder_init(struct mad_decoder *, void *, | 939 | void mad_decoder_init(struct mad_decoder *, void *, |
812 | enum mad_flow (*)(void *, struct mad_stream *), | 940 | enum mad_flow (*)(void *, struct mad_stream *), |
813 | enum mad_flow (*)(void *, struct mad_header const *), | 941 | enum mad_flow (*)(void *, struct mad_header const *), |
814 | enum mad_flow (*)(void *, struct mad_frame *), | 942 | enum mad_flow (*)(void *, |
943 | struct mad_stream const *, | ||
944 | struct mad_frame *), | ||
815 | enum mad_flow (*)(void *, | 945 | enum mad_flow (*)(void *, |
816 | struct mad_header const *, | 946 | struct mad_header const *, |
817 | struct mad_pcm *), | 947 | struct mad_pcm *), |
@@ -821,10 +951,14 @@ void mad_decoder_init(struct mad_decoder *, void *, | |||
821 | enum mad_flow (*)(void *, void *, unsigned int *)); | 951 | enum mad_flow (*)(void *, void *, unsigned int *)); |
822 | int mad_decoder_finish(struct mad_decoder *); | 952 | int mad_decoder_finish(struct mad_decoder *); |
823 | 953 | ||
824 | # define mad_decoder_options(decoder, opts) ((decoder)->options = (opts)) | 954 | # define mad_decoder_options(decoder, opts) \ |
955 | ((void) ((decoder)->options = (opts))) | ||
825 | 956 | ||
826 | int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode); | 957 | int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode); |
827 | int mad_decoder_message(struct mad_decoder *, void *, unsigned int *); | 958 | int mad_decoder_message(struct mad_decoder *, void *, unsigned int *); |
828 | 959 | ||
829 | # endif | 960 | # endif |
830 | 961 | ||
962 | # ifdef __cplusplus | ||
963 | } | ||
964 | # endif | ||