[MPlayer-cvslog] r30209 - in trunk/mp3lib: dct36_3dnow.c dct64_3dnow.c dct64_altivec.c dct64_k7.c dct64_mmx.c dct64_sse.c decode_i586.c decode_mmx.c l2tables.h layer1.c layer2.c layer3.c mpg123.h sr1.c tabinit.c

diego subversion at mplayerhq.hu
Mon Jan 4 20:36:18 CET 2010


Author: diego
Date: Mon Jan  4 20:36:18 2010
New Revision: 30209

Log:
Refactor real --> float #define to a typedef in a common header.

Modified:
   trunk/mp3lib/dct36_3dnow.c
   trunk/mp3lib/dct64_3dnow.c
   trunk/mp3lib/dct64_altivec.c
   trunk/mp3lib/dct64_k7.c
   trunk/mp3lib/dct64_mmx.c
   trunk/mp3lib/dct64_sse.c
   trunk/mp3lib/decode_i586.c
   trunk/mp3lib/decode_mmx.c
   trunk/mp3lib/l2tables.h
   trunk/mp3lib/layer1.c
   trunk/mp3lib/layer2.c
   trunk/mp3lib/layer3.c
   trunk/mp3lib/mpg123.h
   trunk/mp3lib/sr1.c
   trunk/mp3lib/tabinit.c

Modified: trunk/mp3lib/dct36_3dnow.c
==============================================================================
--- trunk/mp3lib/dct36_3dnow.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/dct36_3dnow.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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,

Modified: trunk/mp3lib/dct64_3dnow.c
==============================================================================
--- trunk/mp3lib/dct64_3dnow.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/dct64_3dnow.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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;

Modified: trunk/mp3lib/dct64_altivec.c
==============================================================================
--- trunk/mp3lib/dct64_altivec.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/dct64_altivec.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -7,8 +7,6 @@
  * modify it under the terms of the GNU Lesser General Public License
  */
 
-#define real float
-
 #include <stdio.h>
 #include "mpg123.h"
 

Modified: trunk/mp3lib/dct64_k7.c
==============================================================================
--- trunk/mp3lib/dct64_k7.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/dct64_k7.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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;

Modified: trunk/mp3lib/dct64_mmx.c
==============================================================================
--- trunk/mp3lib/dct64_mmx.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/dct64_mmx.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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)
 {

Modified: trunk/mp3lib/dct64_sse.c
==============================================================================
--- trunk/mp3lib/dct64_sse.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/dct64_sse.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -6,8 +6,7 @@
  */
 
 #include "libavutil/internal.h"
-
-typedef float real;
+#include "mpg123.h"
 
 extern float __attribute__((aligned(16))) costab_mmx[];
 

Modified: trunk/mp3lib/decode_i586.c
==============================================================================
--- trunk/mp3lib/decode_i586.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/decode_i586.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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;

Modified: trunk/mp3lib/decode_mmx.c
==============================================================================
--- trunk/mp3lib/decode_mmx.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/decode_mmx.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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;

Modified: trunk/mp3lib/l2tables.h
==============================================================================
--- trunk/mp3lib/l2tables.h	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/l2tables.h	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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)

Modified: trunk/mp3lib/layer1.c
==============================================================================
--- trunk/mp3lib/layer1.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/layer1.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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)
 {

Modified: trunk/mp3lib/layer2.c
==============================================================================
--- trunk/mp3lib/layer2.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/layer2.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -11,7 +11,7 @@
  *
  */
 
-//#include "mpg123.h"
+#include "mpg123.h"
 #include "l2tables.h"
 
 static int grp_3tab[32 * 3] = { 0, };   /* used: 27 */

Modified: trunk/mp3lib/layer3.c
==============================================================================
--- trunk/mp3lib/layer3.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/layer3.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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

Modified: trunk/mp3lib/mpg123.h
==============================================================================
--- trunk/mp3lib/mpg123.h	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/mpg123.h	Mon Jan  4 20:36:18 2010	(r30209)
@@ -25,6 +25,8 @@
 
 #undef MPG123_REMOTE           /* Get rid of this stuff for Win32 */
 
+typedef float real;
+
 /*
 #  define real float
 #  define real long double

Modified: trunk/mp3lib/sr1.c
==============================================================================
--- trunk/mp3lib/sr1.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/sr1.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -13,9 +13,6 @@
 #include        <string.h>
 #include        <math.h>
 
-#define real float
-// #define int long
-
 #include "mpg123.h"
 #include "huffman.h"
 #include "mp3.h"

Modified: trunk/mp3lib/tabinit.c
==============================================================================
--- trunk/mp3lib/tabinit.c	Mon Jan  4 20:04:33 2010	(r30208)
+++ trunk/mp3lib/tabinit.c	Mon Jan  4 20:36:18 2010	(r30209)
@@ -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 };


More information about the MPlayer-cvslog mailing list