summaryrefslogtreecommitdiffstats
path: root/mp3lib
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-08 02:39:39 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-08 02:39:39 +0200
commit852570d342943894f109e2dbd281237a369bcceb (patch)
tree51be0a2f91af492dc23020f5faaaeb1e9e11af7c /mp3lib
parentd1f0cbe5c8628d206fb0337835b0a7e99e7acc10 (diff)
parenta7a1f395c6b883b34aeaf008c0d22d6fe3dcd1c8 (diff)
downloadmpv-852570d342943894f109e2dbd281237a369bcceb.tar.bz2
mpv-852570d342943894f109e2dbd281237a369bcceb.tar.xz
Merge svn changes up to r30216
Diffstat (limited to 'mp3lib')
-rw-r--r--mp3lib/dct36_3dnow.c3
-rw-r--r--mp3lib/dct64_3dnow.c2
-rw-r--r--mp3lib/dct64_altivec.c2
-rw-r--r--mp3lib/dct64_k7.c2
-rw-r--r--mp3lib/dct64_mmx.c2
-rw-r--r--mp3lib/dct64_sse.c2
-rw-r--r--mp3lib/decode_i586.c2
-rw-r--r--mp3lib/decode_mmx.c2
-rw-r--r--mp3lib/huffman.h5
-rw-r--r--mp3lib/l2tables.h7
-rw-r--r--mp3lib/layer1.c2
-rw-r--r--mp3lib/layer2.c2
-rw-r--r--mp3lib/layer3.c2
-rw-r--r--mp3lib/mp3.h4
-rw-r--r--mp3lib/mpg123.h7
-rw-r--r--mp3lib/sr1.c3
-rw-r--r--mp3lib/tabinit.c2
17 files changed, 36 insertions, 15 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 <stdio.h>
#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 56caeddd71..2827f2c1b1 100644
--- a/mp3lib/dct64_sse.c
+++ b/mp3lib/dct64_sse.c
@@ -7,7 +7,7 @@
#include "libavutil/mem.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/huffman.h b/mp3lib/huffman.h
index 63cb978c7e..190775dbc0 100644
--- a/mp3lib/huffman.h
+++ b/mp3lib/huffman.h
@@ -6,6 +6,9 @@
* smaller tables are often the part of a bigger table
*/
+#ifndef MPLAYER_MP3LIB_HUFFMAN_H
+#define MPLAYER_MP3LIB_HUFFMAN_H
+
struct newhuff
{
unsigned int linbits;
@@ -328,3 +331,5 @@ static struct newhuff htc[] =
{ /* 1 , 1 , */ 0 , tab_c0 } ,
{ /* 1 , 1 , */ 0 , tab_c1 }
};
+
+#endif /* MPLAYER_MP3LIB_HUFFMAN_H */
diff --git a/mp3lib/l2tables.h b/mp3lib/l2tables.h
index 5f08a4f5a7..cf6299e88d 100644
--- a/mp3lib/l2tables.h
+++ b/mp3lib/l2tables.h
@@ -4,6 +4,11 @@
* $Id$
*/
+#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)
@@ -157,3 +162,5 @@ static struct al_table alloc_4[] = {
{2,0},{5,3},{7,5},{10,9},
{2,0},{5,3},{7,5},{10,9},
{2,0},{5,3},{7,5},{10,9} };
+
+#endif /* MPLAYER_MP3LIB_L2TABLES_H */
diff --git a/mp3lib/layer1.c b/mp3lib/layer1.c
index 3b560ec24b..d53c628314 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 b89bc9844d..16dfb06bb8 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/mp3.h b/mp3lib/mp3.h
index d43b5f8bcb..3877f0169b 100644
--- a/mp3lib/mp3.h
+++ b/mp3lib/mp3.h
@@ -1,5 +1,8 @@
/* MP3 Player Library 2.0 (C) 1999 A'rpi/Astral&ESP-team */
+#ifndef MPLAYER_MP3LIB_MP3_H
+#define MPLAYER_MP3LIB_MP3_H
+
/* decoder level: */
#ifdef CONFIG_FAKE_MONO
void MP3_Init(int fakemono);
@@ -33,3 +36,4 @@ void MP3_Play(void);
void MP3_Stop(void);
void MP3_CloseDevice(void);
+#endif /* MPLAYER_MP3LIB_MP3_H */
diff --git a/mp3lib/mpg123.h b/mp3lib/mpg123.h
index 2cbef31bdd..f55fb27e43 100644
--- a/mp3lib/mpg123.h
+++ b/mp3lib/mpg123.h
@@ -9,6 +9,9 @@
* used source: musicout.h from mpegaudio package
*/
+#ifndef MPLAYER_MP3LIB_MPG123_H
+#define MPLAYER_MP3LIB_MPG123_H
+
#include "config.h"
#ifndef M_PI
@@ -22,6 +25,8 @@
#undef MPG123_REMOTE /* Get rid of this stuff for Win32 */
+typedef float real;
+
/*
# define real float
# define real long double
@@ -126,3 +131,5 @@ void dct36_sse(real *, real *, real *, real *, real *);
typedef int (*synth_func_t)( real *,int,short * );
typedef void (*dct36_func_t)(real *,real *,real *,real *,real *);
+
+#endif /* MPLAYER_MP3LIB_MPG123_H */
diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c
index b4f2a146d9..fdbf19ba89 100644
--- a/mp3lib/sr1.c
+++ b/mp3lib/sr1.c
@@ -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"
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 };