diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-06 01:06:21 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-06 01:06:21 +0000 |
commit | 0bdf67044ce904963374261c9426fe885aa34373 (patch) | |
tree | d2ce3617b46ed2cd955c1082a186a25b32e60b9d /mp3lib | |
parent | 834569d109748c88bb3c725056599733a760afa4 (diff) |
fix symbol clashes when linking with libmp3lame including mp3 decoder, man, mp3lib is so much bloated
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12132 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib')
-rw-r--r-- | mp3lib/dct64.c | 12 | ||||
-rw-r--r-- | mp3lib/dct64_altivec.c | 18 | ||||
-rw-r--r-- | mp3lib/dct64_i386.c | 12 | ||||
-rw-r--r-- | mp3lib/l2tables.h | 10 | ||||
-rw-r--r-- | mp3lib/layer2.c | 4 | ||||
-rw-r--r-- | mp3lib/layer3.c | 8 | ||||
-rw-r--r-- | mp3lib/mpg123.h | 7 | ||||
-rw-r--r-- | mp3lib/sr1.c | 6 | ||||
-rw-r--r-- | mp3lib/tabinit.c | 6 |
9 files changed, 38 insertions, 45 deletions
diff --git a/mp3lib/dct64.c b/mp3lib/dct64.c index 00d31d6ec1..70c7da50a9 100644 --- a/mp3lib/dct64.c +++ b/mp3lib/dct64.c @@ -11,7 +11,7 @@ static void dct64_1(real *out0,real *out1,real *b1,real *b2,real *samples) { { - register real *costab = pnts[0]; + register real *costab = mp3lib_pnts[0]; b1[0x00] = samples[0x00] + samples[0x1F]; b1[0x1F] = (samples[0x00] - samples[0x1F]) * costab[0x0]; @@ -64,7 +64,7 @@ static void dct64_1(real *out0,real *out1,real *b1,real *b2,real *samples) { - register real *costab = pnts[1]; + register real *costab = mp3lib_pnts[1]; b2[0x00] = b1[0x00] + b1[0x0F]; b2[0x0F] = (b1[0x00] - b1[0x0F]) * costab[0]; @@ -102,7 +102,7 @@ static void dct64_1(real *out0,real *out1,real *b1,real *b2,real *samples) } { - register real *costab = pnts[2]; + register real *costab = mp3lib_pnts[2]; b1[0x00] = b2[0x00] + b2[0x07]; b1[0x07] = (b2[0x00] - b2[0x07]) * costab[0]; @@ -142,8 +142,8 @@ static void dct64_1(real *out0,real *out1,real *b1,real *b2,real *samples) } { - register real const cos0 = pnts[3][0]; - register real const cos1 = pnts[3][1]; + register real const cos0 = mp3lib_pnts[3][0]; + register real const cos1 = mp3lib_pnts[3][1]; b2[0x00] = b1[0x00] + b1[0x03]; b2[0x03] = (b1[0x00] - b1[0x03]) * cos0; @@ -187,7 +187,7 @@ static void dct64_1(real *out0,real *out1,real *b1,real *b2,real *samples) } { - register real const cos0 = pnts[4][0]; + register real const cos0 = mp3lib_pnts[4][0]; b1[0x00] = b2[0x00] + b2[0x01]; b1[0x01] = (b2[0x00] - b2[0x01]) * cos0; diff --git a/mp3lib/dct64_altivec.c b/mp3lib/dct64_altivec.c index 71859f9a31..8ff50666f6 100644 --- a/mp3lib/dct64_altivec.c +++ b/mp3lib/dct64_altivec.c @@ -79,7 +79,7 @@ void dct64_altivec(real *a,real *b,real *c) #ifdef ALTIVEC_USE_REFERENCE_C_CODE { - register real *costab = pnts[0]; + register real *costab = mp3lib_pnts[0]; b1[0x00] = samples[0x00] + samples[0x1F]; b1[0x01] = samples[0x01] + samples[0x1E]; @@ -116,7 +116,7 @@ void dct64_altivec(real *a,real *b,real *c) } { - register real *costab = pnts[1]; + register real *costab = mp3lib_pnts[1]; b2[0x00] = b1[0x00] + b1[0x0F]; b2[0x01] = b1[0x01] + b1[0x0E]; @@ -154,7 +154,7 @@ void dct64_altivec(real *a,real *b,real *c) } { - register real *costab = pnts[2]; + register real *costab = mp3lib_pnts[2]; b1[0x00] = b2[0x00] + b2[0x07]; b1[0x01] = b2[0x01] + b2[0x06]; @@ -207,7 +207,7 @@ void dct64_altivec(real *a,real *b,real *c) temp1, temp2; { - register real *costab = pnts[0]; + register real *costab = mp3lib_pnts[0]; register vector float samplesv1, samplesv2, samplesv3, samplesv4, @@ -300,7 +300,7 @@ void dct64_altivec(real *a,real *b,real *c) b2v0, b2v1, b2v2, b2v3, b2v4, b2v5, b2v6, b2v7; { - register real *costab = pnts[1]; + register real *costab = mp3lib_pnts[1]; register vector float costabv1r, costabv2r, costabv1, costabv2, costabv3; register vector unsigned char costab_perm = vec_lvsl(0, costab); @@ -343,7 +343,7 @@ void dct64_altivec(real *a,real *b,real *c) } { - register real *costab = pnts[2]; + register real *costab = mp3lib_pnts[2]; vector float costabv1r, costabv1, costabv2; @@ -385,8 +385,8 @@ void dct64_altivec(real *a,real *b,real *c) #endif /* ALTIVEC_USE_REFERENCE_C_CODE */ { - register real const cos0 = pnts[3][0]; - register real const cos1 = pnts[3][1]; + register real const cos0 = mp3lib_pnts[3][0]; + register real const cos1 = mp3lib_pnts[3][1]; b2[0x00] = b1[0x00] + b1[0x03]; b2[0x01] = b1[0x01] + b1[0x02]; @@ -423,7 +423,7 @@ void dct64_altivec(real *a,real *b,real *c) } { - register real const cos0 = pnts[4][0]; + register real const cos0 = mp3lib_pnts[4][0]; b1[0x00] = b2[0x00] + b2[0x01]; b1[0x01] = (b2[0x00] - b2[0x01]) * cos0; diff --git a/mp3lib/dct64_i386.c b/mp3lib/dct64_i386.c index 845502159f..0eae194280 100644 --- a/mp3lib/dct64_i386.c +++ b/mp3lib/dct64_i386.c @@ -13,7 +13,7 @@ static void mpg123_dct64_1(real * out0, real * out1, real * b1, real * b2, real { { - register real *costab = pnts[0]; + register real *costab = mp3lib_pnts[0]; b1[0x00] = samples[0x00] + samples[0x1F]; b1[0x1F] = (samples[0x00] - samples[0x1F]) * costab[0x0]; @@ -65,7 +65,7 @@ static void mpg123_dct64_1(real * out0, real * out1, real * b1, real * b2, real } { - register real *costab = pnts[1]; + register real *costab = mp3lib_pnts[1]; b2[0x00] = b1[0x00] + b1[0x0F]; b2[0x0F] = (b1[0x00] - b1[0x0F]) * costab[0]; @@ -103,7 +103,7 @@ static void mpg123_dct64_1(real * out0, real * out1, real * b1, real * b2, real } { - register real *costab = pnts[2]; + register real *costab = mp3lib_pnts[2]; b1[0x00] = b2[0x00] + b2[0x07]; b1[0x07] = (b2[0x00] - b2[0x07]) * costab[0]; @@ -143,8 +143,8 @@ static void mpg123_dct64_1(real * out0, real * out1, real * b1, real * b2, real } { - register real const cos0 = pnts[3][0]; - register real const cos1 = pnts[3][1]; + register real const cos0 = mp3lib_pnts[3][0]; + register real const cos1 = mp3lib_pnts[3][1]; b2[0x00] = b1[0x00] + b1[0x03]; b2[0x03] = (b1[0x00] - b1[0x03]) * cos0; @@ -188,7 +188,7 @@ static void mpg123_dct64_1(real * out0, real * out1, real * b1, real * b2, real } { - register real const cos0 = pnts[4][0]; + register real const cos0 = mp3lib_pnts[4][0]; b1[0x00] = b2[0x00] + b2[0x01]; b1[0x01] = (b2[0x00] - b2[0x01]) * cos0; diff --git a/mp3lib/l2tables.h b/mp3lib/l2tables.h index 643201ef23..d9fcbee411 100644 --- a/mp3lib/l2tables.h +++ b/mp3lib/l2tables.h @@ -5,7 +5,7 @@ * Layer-3 huffman table is in huffman.h */ -struct al_table alloc_0[] = { +static struct al_table alloc_0[] = { {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, {11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767}, {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, @@ -45,7 +45,7 @@ struct al_table alloc_0[] = { {2,0},{5,3},{7,5},{16,-32767}, {2,0},{5,3},{7,5},{16,-32767} }; -struct al_table alloc_1[] = { +static struct al_table alloc_1[] = { {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, {11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767}, {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, @@ -88,7 +88,7 @@ struct al_table alloc_1[] = { {2,0},{5,3},{7,5},{16,-32767}, {2,0},{5,3},{7,5},{16,-32767} }; -struct al_table alloc_2[] = { +static struct al_table alloc_2[] = { {4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255}, {10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383}, {4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255}, @@ -100,7 +100,7 @@ struct al_table alloc_2[] = { {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63} }; -struct al_table alloc_3[] = { +static struct al_table alloc_3[] = { {4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255}, {10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383}, {4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255}, @@ -116,7 +116,7 @@ struct al_table alloc_3[] = { {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63} }; -struct al_table alloc_4[] = { +static struct al_table alloc_4[] = { {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191}, {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, diff --git a/mp3lib/layer2.c b/mp3lib/layer2.c index 07ee21101f..8c1073943c 100644 --- a/mp3lib/layer2.c +++ b/mp3lib/layer2.c @@ -274,7 +274,7 @@ static void II_select_table(struct frame *fr) } -int do_layer2(struct frame *fr,int outmode) +static int do_layer2(struct frame *fr,int outmode) { int clip=0; int i,j; @@ -314,5 +314,3 @@ int do_layer2(struct frame *fr,int outmode) return clip; } - - diff --git a/mp3lib/layer3.c b/mp3lib/layer3.c index d4863f5b36..49516fbcfe 100644 --- a/mp3lib/layer3.c +++ b/mp3lib/layer3.c @@ -44,10 +44,10 @@ struct bandInfoStruct { int shortDiff[13]; }; -int longLimit[9][23]; -int shortLimit[9][14]; +static int longLimit[9][23]; +static int shortLimit[9][14]; -struct bandInfoStruct bandInfo[9] = { +static struct bandInfoStruct bandInfo[9] = { /* MPEG 1.0 */ { {0,4,8,12,16,20,24,30,36,44,52,62,74, 90,110,134,162,196,238,288,342,418,576}, @@ -110,7 +110,7 @@ static real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16]; /* * init tables for layer-3 */ -void init_layer3(int down_sample_sblimit) +static void init_layer3(int down_sample_sblimit) { int i,j,k,l; diff --git a/mp3lib/mpg123.h b/mp3lib/mpg123.h index ea58c74b58..482e024b51 100644 --- a/mp3lib/mpg123.h +++ b/mp3lib/mpg123.h @@ -107,13 +107,8 @@ struct III_sideinfo } ch[2]; }; -static long freqs[9]; extern real mp3lib_decwin[(512+32)]; -extern real *pnts[]; - -static int do_layer2(struct frame *fr,int single); -static int do_layer3(struct frame *fr,int single); -static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt); +extern real *mp3lib_pnts[]; extern int synth_1to1_pent( real *,int,short * ); extern void make_decode_tables_MMX(long scaleval); diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c index c7dc78d49d..760c680294 100644 --- a/mp3lib/sr1.c +++ b/mp3lib/sr1.c @@ -86,8 +86,8 @@ static int bitindex; static unsigned char *wordpointer; static int bitsleft; -unsigned char *pcm_sample; /* outbuffer address */ -int pcm_point = 0; /* outbuffer offset */ +static unsigned char *pcm_sample; /* outbuffer address */ +static int pcm_point = 0; /* outbuffer offset */ static struct frame fr; @@ -372,7 +372,7 @@ retry1: return frames; } -int _has_mmx = 0; // used by layer2.c, layer3.c to pre-scale coeffs +static int _has_mmx = 0; // used by layer2.c, layer3.c to pre-scale coeffs #include "layer2.c" #include "layer3.c" diff --git a/mp3lib/tabinit.c b/mp3lib/tabinit.c index fd17bd95e6..cf5c0e2ee0 100644 --- a/mp3lib/tabinit.c +++ b/mp3lib/tabinit.c @@ -1,5 +1,5 @@ real mp3lib_decwin[(512+32)], cos64[32], cos32[16], cos16[8], cos8[4], cos4[2]; -real *pnts[]={ cos64,cos32,cos16,cos8,cos4 }; +real *mp3lib_pnts[]={ cos64,cos32,cos16,cos8,cos4 }; static long intwinbase[] = { 0, -1, -1, -1, -1, -1, -1, -2, -2, -2, @@ -29,7 +29,7 @@ static long intwinbase[] = { 64019, 65290, 66494, 67629, 68692, 69679, 70590, 71420, 72169, 72835, 73415, 73908, 74313, 74630, 74856, 74992, 75038 }; -void make_decode_tables(long scaleval) +static void make_decode_tables(long scaleval) { int i,j,k,kr,divv; real *table,*costab; @@ -38,7 +38,7 @@ void make_decode_tables(long scaleval) for(i=0;i<5;i++) { kr=0x10>>i; divv=0x40>>i; - costab = pnts[i]; + costab = mp3lib_pnts[i]; for(k=0;k<kr;k++) costab[k] = 1.0 / (2.0 * cos(M_PI * ((double) k * 2.0 + 1.0) / (double) divv)); } |