From 64ff3434c09ea189ebc90df6eb59ac07a8f90e68 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 19:36:18 +0000 Subject: Refactor real --> float #define to a typedef in a common header. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30209 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mp3lib/dct36_3dnow.c | 3 +-- mp3lib/dct64_3dnow.c | 2 +- mp3lib/dct64_altivec.c | 2 -- mp3lib/dct64_k7.c | 2 +- mp3lib/dct64_mmx.c | 2 +- mp3lib/dct64_sse.c | 3 +-- mp3lib/decode_i586.c | 2 +- mp3lib/decode_mmx.c | 2 +- mp3lib/l2tables.h | 2 ++ mp3lib/layer1.c | 2 +- mp3lib/layer2.c | 2 +- mp3lib/layer3.c | 2 ++ mp3lib/mpg123.h | 2 ++ mp3lib/sr1.c | 3 --- mp3lib/tabinit.c | 2 ++ 15 files changed, 17 insertions(+), 16 deletions(-) diff --git a/mp3lib/dct36_3dnow.c b/mp3lib/dct36_3dnow.c index 7f39caacea..8263639149 100644 --- a/mp3lib/dct36_3dnow.c +++ b/mp3lib/dct36_3dnow.c @@ -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 --git a/mp3lib/dct64_3dnow.c b/mp3lib/dct64_3dnow.c index 919771a91d..55340b0512 100644 --- a/mp3lib/dct64_3dnow.c +++ b/mp3lib/dct64_3dnow.c @@ -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 --git a/mp3lib/dct64_altivec.c b/mp3lib/dct64_altivec.c index 21a7b88699..c29e1c4ab0 100644 --- a/mp3lib/dct64_altivec.c +++ b/mp3lib/dct64_altivec.c @@ -7,8 +7,6 @@ * modify it under the terms of the GNU Lesser General Public License */ -#define real float - #include #include "mpg123.h" diff --git a/mp3lib/dct64_k7.c b/mp3lib/dct64_k7.c index 2d79d7a621..edd41bd7a2 100644 --- a/mp3lib/dct64_k7.c +++ b/mp3lib/dct64_k7.c @@ -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 --git a/mp3lib/dct64_mmx.c b/mp3lib/dct64_mmx.c index 5dec11cb97..817913a016 100644 --- a/mp3lib/dct64_mmx.c +++ b/mp3lib/dct64_mmx.c @@ -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 --git a/mp3lib/dct64_sse.c b/mp3lib/dct64_sse.c index 9381b2adf7..46e951cc9a 100644 --- a/mp3lib/dct64_sse.c +++ b/mp3lib/dct64_sse.c @@ -6,8 +6,7 @@ */ #include "libavutil/internal.h" - -typedef float real; +#include "mpg123.h" extern float __attribute__((aligned(16))) costab_mmx[]; diff --git a/mp3lib/decode_i586.c b/mp3lib/decode_i586.c index 8d005735d3..d4cea638c1 100644 --- a/mp3lib/decode_i586.c +++ b/mp3lib/decode_i586.c @@ -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 --git a/mp3lib/decode_mmx.c b/mp3lib/decode_mmx.c index 7afcbd83c1..e850034254 100644 --- a/mp3lib/decode_mmx.c +++ b/mp3lib/decode_mmx.c @@ -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 --git a/mp3lib/l2tables.h b/mp3lib/l2tables.h index 6be9bc1b82..cf6299e88d 100644 --- a/mp3lib/l2tables.h +++ b/mp3lib/l2tables.h @@ -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 --git a/mp3lib/layer1.c b/mp3lib/layer1.c index 9a50b5df47..200aa453ba 100644 --- a/mp3lib/layer1.c +++ b/mp3lib/layer1.c @@ -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 --git a/mp3lib/layer2.c b/mp3lib/layer2.c index f2c134c827..867da2f2dc 100644 --- a/mp3lib/layer2.c +++ b/mp3lib/layer2.c @@ -11,7 +11,7 @@ * */ -//#include "mpg123.h" +#include "mpg123.h" #include "l2tables.h" static int grp_3tab[32 * 3] = { 0, }; /* used: 27 */ diff --git a/mp3lib/layer3.c b/mp3lib/layer3.c index 398e631913..fdac27f781 100644 --- a/mp3lib/layer3.c +++ b/mp3lib/layer3.c @@ -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 --git a/mp3lib/mpg123.h b/mp3lib/mpg123.h index 3af6be278a..f55fb27e43 100644 --- a/mp3lib/mpg123.h +++ b/mp3lib/mpg123.h @@ -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 --git a/mp3lib/sr1.c b/mp3lib/sr1.c index e0e616d955..77ba630453 100644 --- a/mp3lib/sr1.c +++ b/mp3lib/sr1.c @@ -13,9 +13,6 @@ #include #include -#define real float -// #define int long - #include "mpg123.h" #include "huffman.h" #include "mp3.h" diff --git a/mp3lib/tabinit.c b/mp3lib/tabinit.c index 7c6facd2f6..513d268eff 100644 --- a/mp3lib/tabinit.c +++ b/mp3lib/tabinit.c @@ -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 }; -- cgit v1.2.3