Browse files

Prefix some variables to avoid name colisions with lame.

  • Loading branch information...
1 parent b853a8a commit 6341ce5ff4e35187d48ab34a8fb3a33374e71e81 @toots committed Apr 7, 2013
Showing with 21 additions and 21 deletions.
  1. +1 −1 src/lib/huffman.c
  2. +1 −1 src/lib/huffman.h
  3. +4 −4 src/lib/l3bitstream.c
  4. +8 −8 src/lib/l3loop.c
  5. +3 −3 src/lib/l3subband.c
  6. +2 −2 src/lib/tables.c
  7. +2 −2 src/lib/tables.h
View
2 src/lib/huffman.c
@@ -79,7 +79,7 @@ static unsigned char t32l[] = {1, 4, 4, 5, 4, 6, 5, 6, 4, 5, 5, 6, 5, 6, 6, 6};
static unsigned char t33l[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4};
#define NOREF -1
-struct huffcodetab ht[HTN] =
+struct huffcodetab shine_huffman_table[HTN] =
{
{ 0, 0, 0, 0,NULL,NULL},
{ 2, 2, 0, 0,t1HB, t1l},
View
2 src/lib/huffman.h
@@ -11,7 +11,7 @@ struct huffcodetab {
unsigned char *hlen; /*pointer to array[xlen][ylen] */
};
-extern struct huffcodetab ht[HTN];/* global memory block */
+extern struct huffcodetab shine_huffman_table[HTN];/* global memory block */
/* array of all huffcodtable headers */
/* 0..31 Huffman code table 0..31 */
/* 32,33 count1-tables */
View
8 src/lib/l3bitstream.c
@@ -262,7 +262,7 @@ static void Huffmancodebits( BF_PartHolder **pph, int *ix, gr_info *gi, shine_gl
/* 1: Write the bigvalues */
bigvalues = gi->big_values <<1;
- int *scalefac = &sfBandIndex[config->mpeg.samplerate_index+3].l[0];
+ int *scalefac = &shine_scale_fact_band_index[config->mpeg.samplerate_index+3].l[0];
unsigned scalefac_index = 100;
scalefac_index = gi->region0_count + 1;
@@ -290,7 +290,7 @@ static void Huffmancodebits( BF_PartHolder **pph, int *ix, gr_info *gi, shine_gl
tableindex = gi->table_select[2];
pr = &r2;
}
- h = &ht[ tableindex ];
+ h = &shine_huffman_table[ tableindex ];
/* get huffman code */
x = ix[i];
y = ix[i + 1];
@@ -311,7 +311,7 @@ static void Huffmancodebits( BF_PartHolder **pph, int *ix, gr_info *gi, shine_gl
bvbits = bitsWritten;
/* 2: Write count1 area */
- h = &ht[gi->count1table_select + 32];
+ h = &shine_huffman_table[gi->count1table_select + 32];
count1End = bigvalues + (gi->count1 <<2);
for ( i = bigvalues; i < count1End; i += 4 )
{
@@ -399,7 +399,7 @@ int HuffmanCode(int table_select, int x, int y, unsigned int *code,
signx = abs_and_sign( &x );
signy = abs_and_sign( &y );
- h = &(ht[table_select]);
+ h = &(shine_huffman_table[table_select]);
xlen = h->xlen;
ylen = h->ylen;
linbits = h->linbits;
View
16 src/lib/l3loop.c
@@ -12,7 +12,7 @@
#define CBLIMIT 21
#define SFB_LMAX 22
-int *scalefac_band_long = &sfBandIndex[3].l[0];
+int *scalefac_band_long = &shine_scale_fact_band_index[3].l[0];
static void calc_scfsi(L3_psy_xmin_t *l3_xmin, int ch, int gr, shine_global_config *config);
static int part2_length(L3_scalefac_t *scalefac, int gr, int ch, L3_side_info_t *si);
@@ -99,7 +99,7 @@ void L3_iteration_loop(shine_global_config *config)
int ch, gr, i;
int *ix;
- scalefac_band_long = &sfBandIndex[config->mpeg.samplerate_index + 3].l[0];
+ scalefac_band_long = &shine_scale_fact_band_index[config->mpeg.samplerate_index + 3].l[0];
for(ch=config->wave.channels; ch--; )
{
@@ -505,8 +505,8 @@ int count1_bitcount(int ix[samp_per_frame2], gr_info *cod_info)
sum0 += signbits;
sum1 += signbits;
- sum0 += ht[32].hlen[p];
- sum1 += ht[33].hlen[p];
+ sum0 += shine_huffman_table[32].hlen[p];
+ sum1 += shine_huffman_table[33].hlen[p];
}
if(sum0<sum1)
@@ -652,7 +652,7 @@ int new_choose_table( int ix[samp_per_frame2], unsigned int begin, unsigned int
{
/* try tables with no linbits */
for ( i =14; i--; )
- if ( ht[i].xlen > max )
+ if ( shine_huffman_table[i].xlen > max )
{
choice[0] = i;
break;
@@ -711,14 +711,14 @@ int new_choose_table( int ix[samp_per_frame2], unsigned int begin, unsigned int
max -= 15;
for(i=15;i<24;i++)
- if(ht[i].linmax>=max)
+ if(shine_huffman_table[i].linmax>=max)
{
choice[0] = i;
break;
}
for(i=24;i<32;i++)
- if(ht[i].linmax>=max)
+ if(shine_huffman_table[i].linmax>=max)
{
choice[1] = i;
break;
@@ -769,7 +769,7 @@ int count_bit(int ix[samp_per_frame2],
if(!table)
return 0;
- h = &(ht[table]);
+ h = &(shine_huffman_table[table]);
sum = 0;
ylen = h->ylen;
View
6 src/lib/l3subband.c
@@ -33,10 +33,10 @@ void L3_subband_initialise(shine_global_config *config)
config->subband.fl[i][j] = (long)(filter * (0x7fffffff * 1e-9));
}
- /* note. 0.035781 is enwindow maximum value */
+ /* note. 0.035781 is shine_enwindow maximum value */
/* scale and convert to fixed point before storing */
for (i=HAN_SIZE; i--;)
- config->subband.ew[i] = (long)(enwindow[i] * 0x7fffffff);
+ config->subband.ew[i] = (long)(shine_enwindow[i] * 0x7fffffff);
}
/*
@@ -45,7 +45,7 @@ void L3_subband_initialise(shine_global_config *config)
* Overlapping window on PCM samples
* 32 16-bit pcm samples are scaled to fractional 2's complement and
* concatenated to the end of the window buffer #x#. The updated window
- * buffer #x# is then windowed by the analysis window #enwindow# to produce
+ * buffer #x# is then windowed by the analysis window #shine_enwindow# to produce
* the windowed sample #z#
* Calculates the analysis filter bank coefficients
* The windowed samples #z# is filtered by the digital filter matrix #filter#
View
4 src/lib/tables.c
@@ -7,7 +7,7 @@
#include "tables.h"
-struct scalefac_struct sfBandIndex[6] =
+struct scalefac_struct shine_scale_fact_band_index[6] =
{
{ /* Table B.2.b: 22.05 kHz */
@@ -36,7 +36,7 @@ struct scalefac_struct sfBandIndex[6] =
}
};
-double enwindow[] = {
+double shine_enwindow[] = {
0.000000, -0.000000, -0.000000, -0.000000, -0.000000, -0.000000, -0.000000, -0.000001, -0.000001, -0.000001,
-0.000001, -0.000001, -0.000001, -0.000002, -0.000002, -0.000002, -0.000002, -0.000003, -0.000003, -0.000003,
-0.000004, -0.000004, -0.000005, -0.000005, -0.000006, -0.000007, -0.000008, -0.000008, -0.000009, -0.000010,
View
4 src/lib/tables.h
@@ -7,8 +7,8 @@ struct scalefac_struct
int s[14];
};
-extern struct scalefac_struct sfBandIndex[6];
-extern double enwindow[];
+extern struct scalefac_struct shine_scale_fact_band_index[6];
+extern double shine_enwindow[];
#endif

0 comments on commit 6341ce5

Please sign in to comment.