# HG changeset patch # User diego # Date 1262633778 0 # Node ID 347d152a5cfa80ca92fb8ed1b5b6ed8a9bed2c8a # Parent 1d39794263eb6fce5b5c3c64d53ad6637b966840 Refactor real --> float #define to a typedef in a common header. diff -r 1d39794263eb -r 347d152a5cfa mp3lib/dct36_3dnow.c --- a/mp3lib/dct36_3dnow.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/dct36_3dnow.c Mon Jan 04 19:36:18 2010 +0000 @@ -27,10 +27,9 @@ * 2003/06/21: Moved to GCC inline assembly - Alex Beregszaszi */ -#define real float /* ugly - but only way */ - #include "config.h" #include "mangle.h" +#include "mpg123.h" #ifdef DCT36_OPTIMIZE_FOR_K7 void dct36_3dnowex(real *inbuf, real *o1, diff -r 1d39794263eb -r 347d152a5cfa mp3lib/dct64_3dnow.c --- a/mp3lib/dct64_3dnow.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/dct64_3dnow.c Mon Jan 04 19:36:18 2010 +0000 @@ -7,10 +7,10 @@ * TODO: optimize scalar 3dnow! code * Warning: Phases 7 & 8 are not tested */ -#define real float /* ugly - but only way */ #include "config.h" #include "mangle.h" +#include "mpg123.h" static unsigned long long int attribute_used __attribute__((aligned(8))) x_plus_minus_3dnow = 0x8000000000000000ULL; static float attribute_used plus_1f = 1.0; diff -r 1d39794263eb -r 347d152a5cfa mp3lib/dct64_altivec.c --- a/mp3lib/dct64_altivec.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/dct64_altivec.c Mon Jan 04 19:36:18 2010 +0000 @@ -7,8 +7,6 @@ * modify it under the terms of the GNU Lesser General Public License */ -#define real float - #include #include "mpg123.h" diff -r 1d39794263eb -r 347d152a5cfa mp3lib/dct64_k7.c --- a/mp3lib/dct64_k7.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/dct64_k7.c Mon Jan 04 19:36:18 2010 +0000 @@ -7,10 +7,10 @@ * TODO: optimize scalar 3dnow! code * Warning: Phases 7 & 8 are not tested */ -#define real float /* ugly - but only way */ #include "config.h" #include "mangle.h" +#include "mpg123.h" static unsigned long long int attribute_used __attribute__((aligned(8))) x_plus_minus_3dnow = 0x8000000000000000ULL; static float attribute_used plus_1f = 1.0; diff -r 1d39794263eb -r 347d152a5cfa mp3lib/dct64_mmx.c --- a/mp3lib/dct64_mmx.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/dct64_mmx.c Mon Jan 04 19:36:18 2010 +0000 @@ -5,7 +5,7 @@ */ #include "config.h" #include "mangle.h" -#define real float /* ugly - but only way */ +#include "mpg123.h" void dct64_MMX(short *a,short *b,real *c) { diff -r 1d39794263eb -r 347d152a5cfa mp3lib/dct64_sse.c --- a/mp3lib/dct64_sse.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/dct64_sse.c Mon Jan 04 19:36:18 2010 +0000 @@ -6,8 +6,7 @@ */ #include "libavutil/internal.h" - -typedef float real; +#include "mpg123.h" extern float __attribute__((aligned(16))) costab_mmx[]; diff -r 1d39794263eb -r 347d152a5cfa mp3lib/decode_i586.c --- a/mp3lib/decode_i586.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/decode_i586.c Mon Jan 04 19:36:18 2010 +0000 @@ -31,7 +31,7 @@ */ #include "config.h" #include "mangle.h" -#define real float /* ugly - but only way */ +#include "mpg123.h" static int attribute_used buffs[1088]={0}; static int attribute_used bo=1; diff -r 1d39794263eb -r 347d152a5cfa mp3lib/decode_mmx.c --- a/mp3lib/decode_mmx.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/decode_mmx.c Mon Jan 04 19:36:18 2010 +0000 @@ -9,7 +9,7 @@ */ #include "config.h" #include "mangle.h" -#define real float /* ugly - but only way */ +#include "mpg123.h" extern void (*dct64_MMX_func)(short*, short*, real*); static const unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL; diff -r 1d39794263eb -r 347d152a5cfa mp3lib/l2tables.h --- a/mp3lib/l2tables.h Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/l2tables.h Mon Jan 04 19:36:18 2010 +0000 @@ -7,6 +7,8 @@ #ifndef MPLAYER_MP3LIB_L2TABLES_H #define MPLAYER_MP3LIB_L2TABLES_H +#include "mpg123.h" + /* * Layer 2 Alloc tables .. * most other tables are calculated on program start (which is (of course) diff -r 1d39794263eb -r 347d152a5cfa mp3lib/layer1.c --- a/mp3lib/layer1.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/layer1.c Mon Jan 04 19:36:18 2010 +0000 @@ -18,7 +18,7 @@ * COPYING: you may use this source under LGPL terms! */ -//#include "mpg123.h" +#include "mpg123.h" static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],struct frame *fr) { diff -r 1d39794263eb -r 347d152a5cfa mp3lib/layer2.c --- a/mp3lib/layer2.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/layer2.c Mon Jan 04 19:36:18 2010 +0000 @@ -11,7 +11,7 @@ * */ -//#include "mpg123.h" +#include "mpg123.h" #include "l2tables.h" static int grp_3tab[32 * 3] = { 0, }; /* used: 27 */ diff -r 1d39794263eb -r 347d152a5cfa mp3lib/layer3.c --- a/mp3lib/layer3.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/layer3.c Mon Jan 04 19:36:18 2010 +0000 @@ -15,6 +15,8 @@ * Length-optimze: unify long and short band code where it is possible */ +#include "mpg123.h" + #if 0 #define L3_DEBUG 1 #endif diff -r 1d39794263eb -r 347d152a5cfa mp3lib/mpg123.h --- a/mp3lib/mpg123.h Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/mpg123.h Mon Jan 04 19:36:18 2010 +0000 @@ -25,6 +25,8 @@ #undef MPG123_REMOTE /* Get rid of this stuff for Win32 */ +typedef float real; + /* # define real float # define real long double diff -r 1d39794263eb -r 347d152a5cfa mp3lib/sr1.c --- a/mp3lib/sr1.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/sr1.c Mon Jan 04 19:36:18 2010 +0000 @@ -13,9 +13,6 @@ #include #include -#define real float -// #define int long - #include "mpg123.h" #include "huffman.h" #include "mp3.h" diff -r 1d39794263eb -r 347d152a5cfa mp3lib/tabinit.c --- a/mp3lib/tabinit.c Mon Jan 04 19:04:33 2010 +0000 +++ b/mp3lib/tabinit.c Mon Jan 04 19:36:18 2010 +0000 @@ -4,6 +4,8 @@ * $Id$ */ +#include "mpg123.h" + real mp3lib_decwin[(512+32)]; static real cos64[32], cos32[16], cos16[8], cos8[4], cos4[2]; real *mp3lib_pnts[]={ cos64,cos32,cos16,cos8,cos4 };