summaryrefslogtreecommitdiffstats
path: root/mp3lib
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-13 02:58:57 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-13 02:58:57 +0000
commit6e9cbdc10448203e7c8b2de41447442fcc9f7bae (patch)
tree0ed465592509105fdbeab27fc12ddbb2e3590aa5 /mp3lib
parenteafe5b7517bbf408ae1ffc936a3abe2313c3b334 (diff)
downloadmpv-6e9cbdc10448203e7c8b2de41447442fcc9f7bae.tar.bz2
mpv-6e9cbdc10448203e7c8b2de41447442fcc9f7bae.tar.xz
whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib')
-rw-r--r--mp3lib/dct12.c6
-rw-r--r--mp3lib/dct36.c6
-rw-r--r--mp3lib/dct64_altivec.c22
-rw-r--r--mp3lib/decod386.c2
-rw-r--r--mp3lib/huffman.h14
-rw-r--r--mp3lib/l2tables.h4
-rw-r--r--mp3lib/layer1.c12
-rw-r--r--mp3lib/layer2.c36
-rw-r--r--mp3lib/layer3.c92
-rw-r--r--mp3lib/sr1.c4
-rw-r--r--mp3lib/test.c10
-rw-r--r--mp3lib/test2.c12
12 files changed, 110 insertions, 110 deletions
diff --git a/mp3lib/dct12.c b/mp3lib/dct12.c
index 61f2b29900..5ba45af389 100644
--- a/mp3lib/dct12.c
+++ b/mp3lib/dct12.c
@@ -39,7 +39,7 @@ static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,registe
register real *out1 = rawout1;
ts[SBLIMIT*0] = out1[0]; ts[SBLIMIT*1] = out1[1]; ts[SBLIMIT*2] = out1[2];
ts[SBLIMIT*3] = out1[3]; ts[SBLIMIT*4] = out1[4]; ts[SBLIMIT*5] = out1[5];
-
+
DCT12_PART1
{
@@ -73,7 +73,7 @@ static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,registe
{
real in0,in1,in2,in3,in4,in5;
register real *out2 = rawout2;
-
+
DCT12_PART1
{
@@ -102,7 +102,7 @@ static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,registe
ts[(17-2)*SBLIMIT] += in4 * wi[5-2];
}
- in++;
+ in++;
{
real in0,in1,in2,in3,in4,in5;
diff --git a/mp3lib/dct36.c b/mp3lib/dct36.c
index bc9ea25a93..753c2f25d5 100644
--- a/mp3lib/dct36.c
+++ b/mp3lib/dct36.c
@@ -4,7 +4,7 @@
* $Id$
*/
-/*
+/*
// This is an optimized DCT from Jeff Tsay's maplay 1.2+ package.
// Saved one multiplication by doing the 'twiddle factor' stuff
// together with the window mul. (MH)
@@ -187,7 +187,7 @@ static void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf)
out2[8-(v)] = tmp * w[26-(v)]; } \
sum0 -= sum1; \
ts[SBLIMIT*(8-(v))] = out1[8-(v)] + sum0 * w[8-(v)]; \
- ts[SBLIMIT*(9+(v))] = out1[9+(v)] + sum0 * w[9+(v)];
+ ts[SBLIMIT*(9+(v))] = out1[9+(v)] + sum0 * w[9+(v)];
#define MACRO1(v) { \
real sum0,sum1; \
sum0 = tmp1a + tmp2a; \
@@ -212,7 +212,7 @@ static void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf)
tb33 = in[2*3+1] * c[3];
tb66 = in[2*6+1] * c[6];
- {
+ {
real tmp1a,tmp2a,tmp1b,tmp2b;
tmp1a = in[2*1+0] * c[1] + ta33 + in[2*5+0] * c[5] + in[2*7+0] * c[7];
tmp1b = in[2*1+1] * c[1] + tb33 + in[2*5+1] * c[5] + in[2*7+1] * c[7];
diff --git a/mp3lib/dct64_altivec.c b/mp3lib/dct64_altivec.c
index 3f3eb0fedf..21a7b88699 100644
--- a/mp3lib/dct64_altivec.c
+++ b/mp3lib/dct64_altivec.c
@@ -46,7 +46,7 @@ void dct64_altivec(real *a,real *b,real *c)
{
real __attribute__ ((aligned(16))) b1[0x20];
real __attribute__ ((aligned(16))) b2[0x20];
-
+
real *out0 = a;
real *out1 = b;
real *samples = c;
@@ -57,7 +57,7 @@ void dct64_altivec(real *a,real *b,real *c)
if (((unsigned long)b1 & 0x0000000F) ||
((unsigned long)b2 & 0x0000000F))
-
+
{
printf("MISALIGNED:\t%p\t%p\t%p\t%p\t%p\n",
b1, b2, a, b, samples);
@@ -65,7 +65,7 @@ void dct64_altivec(real *a,real *b,real *c)
#ifdef ALTIVEC_USE_REFERENCE_C_CODE
-
+
{
register real *costab = mp3lib_pnts[0];
@@ -249,7 +249,7 @@ void dct64_altivec(real *a,real *b,real *c)
costabv3 = vec_perm(costabv3, costabv4, costab_perm);
costabv5 = vec_ld(64, costab);
costabv4 = vec_perm(costabv4, costabv5, costab_perm);
-
+
temp1 = vec_sub(vec_perm(samplesv4, samplesv4, reverse),
samplesv5);
temp2 = vec_madd(temp1,
@@ -257,7 +257,7 @@ void dct64_altivec(real *a,real *b,real *c)
vczero);
//vec_st(temp2, 64, b1);
b1v4 = temp2;
-
+
temp1 = vec_sub(vec_perm(samplesv3, samplesv3, reverse),
samplesv6);
temp2 = vec_madd(temp1,
@@ -272,7 +272,7 @@ void dct64_altivec(real *a,real *b,real *c)
vczero);
//vec_st(temp2, 96, b1);
b1v6 = temp2;
-
+
temp1 = vec_sub(vec_perm(samplesv1, samplesv1, reverse),
samplesv8);
temp2 = vec_madd(temp1,
@@ -299,7 +299,7 @@ void dct64_altivec(real *a,real *b,real *c)
costabv2 = vec_perm(costabv2, costabv3 , costab_perm);
costabv1r = vec_perm(costabv1, costabv1, reverse);
costabv2r = vec_perm(costabv2, costabv2, reverse);
-
+
temp1 = vec_add(b1v0, vec_perm(b1v3, b1v3, reverse));
//vec_st(temp1, 0, b2);
b2v0 = temp1;
@@ -333,7 +333,7 @@ void dct64_altivec(real *a,real *b,real *c)
{
register real *costab = mp3lib_pnts[2];
-
+
vector float costabv1r, costabv1, costabv2;
vector unsigned char costab_perm = vec_lvsl(0, costab);
@@ -341,13 +341,13 @@ void dct64_altivec(real *a,real *b,real *c)
costabv2 = vec_ld(16, costab);
costabv1 = vec_perm(costabv1, costabv2, costab_perm);
costabv1r = vec_perm(costabv1, costabv1, reverse);
-
+
temp1 = vec_add(b2v0, vec_perm(b2v1, b2v1, reverse));
vec_st(temp1, 0, b1);
temp2 = vec_sub(vec_perm(b2v0, b2v0, reverse), b2v1);
temp1 = vec_madd(temp2, costabv1r, vczero);
vec_st(temp1, 16, b1);
-
+
temp1 = vec_add(b2v2, vec_perm(b2v3, b2v3, reverse));
vec_st(temp1, 32, b1);
temp2 = vec_sub(b2v3, vec_perm(b2v2, b2v2, reverse));
@@ -365,7 +365,7 @@ void dct64_altivec(real *a,real *b,real *c)
temp2 = vec_sub(b2v7, vec_perm(b2v6, b2v6, reverse));
temp1 = vec_madd(temp2, costabv1r, vczero);
vec_st(temp1, 112, b1);
-
+
}
}
}
diff --git a/mp3lib/decod386.c b/mp3lib/decod386.c
index 841cf6981d..4b6d69bc4d 100644
--- a/mp3lib/decod386.c
+++ b/mp3lib/decod386.c
@@ -107,7 +107,7 @@ static synth_func_t synth_func;
#else /* HAVE_ALTIVEC */
#define dct64_base(a,b,c) dct64(a,b,c)
#endif /* HAVE_ALTIVEC */
-
+
static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
{
static real buffs[2][2][0x110];
diff --git a/mp3lib/huffman.h b/mp3lib/huffman.h
index 7fec0d589e..aa9e7b91fa 100644
--- a/mp3lib/huffman.h
+++ b/mp3lib/huffman.h
@@ -1,19 +1,19 @@
/*
* huffman tables ... recalcualted to work with my optimzed
* decoder scheme (MH)
- *
- * probably we could save a few bytes of memory, because the
+ *
+ * probably we could save a few bytes of memory, because the
* smaller tables are often the part of a bigger table
*/
-struct newhuff
+struct newhuff
{
unsigned int linbits;
short *table;
};
-static short tab0[] =
-{
+static short tab0[] =
+{
0
};
@@ -286,7 +286,7 @@ static short tab_c1[] =
-static struct newhuff ht[] =
+static struct newhuff ht[] =
{
{ /* 0 */ 0 , tab0 } ,
{ /* 2 */ 0 , tab1 } ,
@@ -323,7 +323,7 @@ static struct newhuff ht[] =
{ /* 16 */ 13, tab24 }
};
-static struct newhuff htc[] =
+static struct newhuff htc[] =
{
{ /* 1 , 1 , */ 0 , tab_c0 } ,
{ /* 1 , 1 , */ 0 , tab_c1 }
diff --git a/mp3lib/l2tables.h b/mp3lib/l2tables.h
index 662241742d..f62a546088 100644
--- a/mp3lib/l2tables.h
+++ b/mp3lib/l2tables.h
@@ -5,9 +5,9 @@
*/
/*
- * Layer 2 Alloc tables ..
+ * Layer 2 Alloc tables ..
* most other tables are calculated on program start (which is (of course)
- * not ISO-conform) ..
+ * not ISO-conform) ..
* Layer-3 huffman table is in huffman.h
*/
diff --git a/mp3lib/layer1.c b/mp3lib/layer1.c
index 444dab9a4d..9a50b5df47 100644
--- a/mp3lib/layer1.c
+++ b/mp3lib/layer1.c
@@ -1,10 +1,10 @@
-/*
- * Mpeg Layer-1 audio decoder
+/*
+ * Mpeg Layer-1 audio decoder
* --------------------------
* copyright (c) 1995 by Michael Hipp, All rights reserved. See also 'README'
* near unoptimzed ...
*
- * may have a few bugs after last optimization ...
+ * may have a few bugs after last optimization ...
*
*/
@@ -28,7 +28,7 @@ static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMI
if(fr->stereo == 2) {
int i;
int jsbound = fr->jsbound;
- for (i=0;i<jsbound;i++) {
+ for (i=0;i<jsbound;i++) {
*ba++ = getbits(4);
*ba++ = getbits(4);
}
@@ -80,7 +80,7 @@ static void I_step_two(real fraction[2][SBLIMIT],unsigned int balloc[2*SBLIMIT],
if ((n = *ba++))
*sample++ = getbits(n+1);
}
- for (i=jsbound;i<SBLIMIT;i++)
+ for (i=jsbound;i<SBLIMIT;i++)
if ((n = *ba++))
*sample++ = getbits(n+1);
@@ -137,7 +137,7 @@ static int do_layer1(struct frame *fr,int single)
// printf("do_layer1(0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X )\n",
// wordpointer[0],wordpointer[1],wordpointer[2],wordpointer[3],wordpointer[4],wordpointer[5],wordpointer[6],wordpointer[7]);
- fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ?
+ fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ?
(fr->mode_ext<<2)+4 : 32;
if(stereo == 1 || single == 3)
diff --git a/mp3lib/layer2.c b/mp3lib/layer2.c
index a1d3fa43fe..f2c134c827 100644
--- a/mp3lib/layer2.c
+++ b/mp3lib/layer2.c
@@ -4,8 +4,8 @@
* $Id$
*/
-/*
- * Mpeg Layer-2 audio decoder
+/*
+ * Mpeg Layer-2 audio decoder
* --------------------------
* copyright (c) 1995 by Michael Hipp, All rights reserved. See also 'README'
*
@@ -56,7 +56,7 @@ static void init_layer2(void)
{
double m=mulmul[k];
table = muls[k];
- if(_has_mmx)
+ if(_has_mmx)
{
for(j=3,i=0;i<63;i++,j--)
*table++ = 16384 * m * pow(2.0,(double) j / 3.0);
@@ -116,21 +116,21 @@ static void II_step_one(unsigned int *bit_alloc,int *scale,struct frame *fr)
bita = bit_alloc;
scfsi=scfsi_buf;
- for (i=sblimit2;i>0;i--)
+ for (i=sblimit2;i>0;i--)
if (*bita++)
- switch (*scfsi++)
+ switch (*scfsi++)
{
- case 0:
+ case 0:
*scale++ = getbits_fast(6);
*scale++ = getbits_fast(6);
*scale++ = getbits_fast(6);
break;
- case 1 :
+ case 1 :
*scale++ = sc = getbits_fast(6);
*scale++ = sc;
*scale++ = getbits_fast(6);
break;
- case 2:
+ case 2:
*scale++ = sc = getbits_fast(6);
*scale++ = sc;
*scale++ = sc;
@@ -159,17 +159,17 @@ static void II_step_two(unsigned int *bit_alloc,real fraction[2][4][SBLIMIT],int
step = alloc1->bits;
for (j=0;j<stereo;j++)
{
- if ( (ba=*bita++) )
+ if ( (ba=*bita++) )
{
k=(alloc2 = alloc1+ba)->bits;
- if( (d1=alloc2->d) < 0)
+ if( (d1=alloc2->d) < 0)
{
real cm=muls[k][scale[x1]];
fraction[j][0][i] = ((real) ((int)getbits(k) + d1)) * cm;
fraction[j][1][i] = ((real) ((int)getbits(k) + d1)) * cm;
fraction[j][2][i] = ((real) ((int)getbits(k) + d1)) * cm;
- }
- else
+ }
+ else
{
static int *table[] = { 0,0,0,grp_3tab,0,grp_5tab,0,0,0,grp_9tab };
unsigned int idx,*tab,m=scale[x1];
@@ -177,7 +177,7 @@ static void II_step_two(unsigned int *bit_alloc,real fraction[2][4][SBLIMIT],int
tab = (unsigned int *) (table[d1] + idx + idx + idx);
fraction[j][0][i] = muls[*tab++][m];
fraction[j][1][i] = muls[*tab++][m];
- fraction[j][2][i] = muls[*tab][m];
+ fraction[j][2][i] = muls[*tab][m];
}
scale+=3;
}
@@ -220,13 +220,13 @@ static void II_step_two(unsigned int *bit_alloc,real fraction[2][4][SBLIMIT],int
fraction[0][0][i] = fraction[0][1][i] = fraction[0][2][i] =
fraction[1][0][i] = fraction[1][1][i] = fraction[1][2][i] = 0.0;
}
-/*
+/*
should we use individual scalefac for channel 2 or
is the current way the right one , where we just copy channel 1 to
- channel 2 ??
+ channel 2 ??
The current 'strange' thing is, that we throw away the scalefac
values for the second channel ...!!
--> changed .. now we use the scalefac values of channel one !!
+-> changed .. now we use the scalefac values of channel one !!
*/
}
@@ -299,10 +299,10 @@ static int do_layer2(struct frame *fr,int outmode)
II_step_one(bit_alloc, scale, fr);
- for (i=0;i<SCALE_BLOCK;i++)
+ for (i=0;i<SCALE_BLOCK;i++)
{
II_step_two(bit_alloc,fraction,scale,fr,i>>2);
- for (j=0;j<3;j++)
+ for (j=0;j<3;j++)
{
if(single >= 0)
{
diff --git a/mp3lib/layer3.c b/mp3lib/layer3.c
index 71dec48663..398e631913 100644
--- a/mp3lib/layer3.c
+++ b/mp3lib/layer3.c
@@ -4,16 +4,16 @@
* $Id$
*/
-/*
- * Mpeg Layer-3 audio decoder
+/*
+ * Mpeg Layer-3 audio decoder
* --------------------------
* copyright (c) 1995-1999 by Michael Hipp.
* All rights reserved. See also 'README'
*
- * Optimize-TODO: put short bands into the band-field without the stride
+ * Optimize-TODO: put short bands into the band-field without the stride
* of 3 reals
* Length-optimze: unify long and short band code where it is possible
- */
+ */
#if 0
#define L3_DEBUG 1
@@ -53,7 +53,7 @@ struct bandInfoStruct {
static int longLimit[9][23];
static int shortLimit[9][14];
-static const struct bandInfoStruct bandInfo[9] = {
+static const 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},
@@ -331,11 +331,11 @@ static int III_get_side_info(struct III_sideinfo *si,int stereo,
static const int tabs[2][5] = { { 2,9,5,3,4 } , { 1,8,1,2,9 } };
const int *tab = tabs[lsf];
-
+
si->main_data_begin = getbits(tab[1]);
if (stereo == 1)
si->private_bits = getbits_fast(tab[2]);
- else
+ else
si->private_bits = getbits_fast(tab[3]);
if(!lsf) {
@@ -383,8 +383,8 @@ if(2*gr_info->big_values > bandInfo[sfreq].shortIdx[12])
fprintf(stderr,"Blocktype == 0 and window-switching == 1 not allowed.\n");
return 0;
}
-
- /* region_count/start parameters are implicit in this case. */
+
+ /* region_count/start parameters are implicit in this case. */
if(!lsf || gr_info->block_type == 2)
gr_info->region1start = 36>>1;
else {
@@ -474,7 +474,7 @@ static int III_get_scale_factors_1(int *scf,struct gr_info_s *gr_info)
numbits += num0 * 6;
}
else {
- scf += 6;
+ scf += 6;
}
if(!(scfsi & 0x4)) {
@@ -492,7 +492,7 @@ static int III_get_scale_factors_1(int *scf,struct gr_info_s *gr_info)
numbits += num1 * 5;
}
else {
- scf += 5;
+ scf += 5;
}
if(!(scfsi & 0x1)) {
@@ -523,7 +523,7 @@ static int III_get_scale_factors_2(int *scf,struct gr_info_s *gr_info,int i_ster
{ { 9, 9, 9,9 } , { 9, 9,12,6 } , { 18,18,0,0} ,
{12,12,12,0 } , {12, 9, 9,6 } , { 15,12,9,0} } ,
{ { 6, 9, 9,9 } , { 6, 9,12,6 } , { 15,18,0,0} ,
- { 6,15,12,0 } , { 6,12, 9,6 } , { 6,18,9,0} } };
+ { 6,15,12,0 } , { 6,12, 9,6 } , { 6,18,9,0} } };
if(i_stereo) /* i_stereo AND second channel -> do_layer3() checks this */
slen = i_slen2[gr_info->scalefac_compress>>1];
@@ -532,7 +532,7 @@ static int III_get_scale_factors_2(int *scf,struct gr_info_s *gr_info,int i_ster
gr_info->preflag = (slen>>15) & 0x1;
- n = 0;
+ n = 0;
if( gr_info->block_type == 2 ) {
n++;
if(gr_info->mixed_block_flag) n++;
@@ -551,7 +551,7 @@ static int III_get_scale_factors_2(int *scf,struct gr_info_s *gr_info,int i_ster
for(j=0;j<(int)(pnt[i]);j++) *scf++ = 0;
}
}
-
+
n = (n << 1) + 1;
for(i=0;i<n;i++) *scf++ = 0;
@@ -596,10 +596,10 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
int region1 = gr_info->region1start;
int region2 = gr_info->region2start;
- l3 = ((576>>1)-bv)>>1;
+ l3 = ((576>>1)-bv)>>1;
/*
- * we may lose the 'odd' bit here !!
- * check this later again
+ * we may lose the 'odd' bit here !!
+ * check this later again
*/
if(bv <= region1) {
l[0] = bv; l[1] = l[2] = 0;
@@ -614,10 +614,10 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
}
}
}
-
+
if(gr_info->block_type == 2) {
/*
- * decoding with short or mixed mode BandIndex table
+ * decoding with short or mixed mode BandIndex table
*/
int i,max[4];
int step=0,lwin=3,cb=0;
@@ -759,7 +759,7 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
if(part2remain+num <= 0) {
break;
}
- if(mask < 0)
+ if(mask < 0)
*xrpnt = -v;
else
*xrpnt = v;
@@ -922,7 +922,7 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
mc = *m++;
cb = *m++;
#ifdef CUT_HF
- if(cb == 21) {
+ if(cb == 21) {
fprintf(stderr,"c");
v = 0.0;
}
@@ -958,7 +958,7 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
bitindex -= num; wordpointer += (bitindex>>3); bitindex &= 0x7;
num = 0;
- while(xrpnt < &xr[SBLIMIT][0])
+ while(xrpnt < &xr[SBLIMIT][0])
*xrpnt++ = 0.0;
while( part2remain > 16 ) {
@@ -977,7 +977,7 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
-/*
+/*
* III_stereo: calculate real channel values for Joint-I-Stereo-mode
*/
static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac,
@@ -989,10 +989,10 @@ static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac,
const real *tab1,*tab2;
int tab;
- static const real *tabs[3][2][2] = {
+ static const real *tabs[3][2][2] = {
{ { tan1_1,tan2_1 } , { tan1_2,tan2_2 } },
{ { pow1_1[0],pow2_1[0] } , { pow1_2[0],pow2_2[0] } } ,
- { { pow1_1[1],pow2_1[1] } , { pow1_2[1],pow2_2[1] } }
+ { { pow1_1[1],pow2_1[1] } , { pow1_2[1],pow2_2[1] } }
};
tab = lsf + (gr_info->scalefac_compress & lsf);
@@ -1032,7 +1032,7 @@ static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac,
do_l = 0;
for(;sfb<12;sfb++) {
- is_p = scalefac[sfb*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */
+ is_p = scalefac[sfb*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */
if(is_p != 7) {
real t1,t2;
sb = bi->shortDiff[sfb];
@@ -1047,7 +1047,7 @@ static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac,
}
#if 1
-/* in the original: copy 10 to 11 , here: copy 11 to 12
+/* in the original: copy 10 to 11 , here: copy 11 to 12
maybe still wrong??? (copy 12 to 13?) */
is_p = scalefac[11*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */
sb = bi->shortDiff[12];
@@ -1060,7 +1060,7 @@ maybe still wrong??? (copy 12 to 13?) */
if(is_p != 7) {
real t1,t2;
t1 = tab1[is_p]; t2 = tab2[is_p];
- for ( ; sb > 0; sb--,idx+=3 ) {
+ for ( ; sb > 0; sb--,idx+=3 ) {
real v = xr[0][idx];
xr[0][idx] = REAL_MUL(v, t1);
xr[1][idx] = REAL_MUL(v, t2);
@@ -1069,7 +1069,7 @@ maybe still wrong??? (copy 12 to 13?) */
} /* end for(lwin; .. ; . ) */
/* also check l-part, if ALL bands in the three windows are 'empty'
- * and mode = mixed_mode
+ * and mode = mixed_mode
*/
if (do_l) {
int sfb = gr_info->maxbandl;
@@ -1087,17 +1087,17 @@ maybe still wrong??? (copy 12 to 13?) */
xr[1][idx] = REAL_MUL(v, t2);
}
}
- else
+ else
idx += sb;
}
- }
- }
+ }
+ }
else { /* ((gr_info->block_type != 2)) */
int sfb = gr_info->maxbandl;
int is_p,idx = bi->longIdx[sfb];
/* hmm ... maybe the maxbandl stuff for i-stereo is buggy? */
- if(sfb <= 21) {
+ if(sfb <= 21) {
for ( ; sfb<21; sfb++) {
int sb = bi->longDiff[sfb];
is_p = scalefac[sfb]; /* scale: 0-15 */
@@ -1117,7 +1117,7 @@ maybe still wrong??? (copy 12 to 13?) */
is_p = scalefac[20];
if(is_p != 7) { /* copy l-band 20 to l-band 21 */
int sb;
- real t1 = tab1[is_p],t2 = tab2[is_p];
+ real t1 = tab1[is_p],t2 = tab2[is_p];
for ( sb = bi->longDiff[21]; sb > 0; sb--,idx++ ) {
real v = xr[0][idx];
@@ -1133,9 +1133,9 @@ static void III_antialias(real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) {
int sblim;
if(gr_info->block_type == 2) {
- if(!gr_info->mixed_block_flag)
+ if(!gr_info->mixed_block_flag)
return;
- sblim = 1;
+ sblim = 1;
}
else {
sblim = gr_info->maxb-1;
@@ -1159,7 +1159,7 @@ static void III_antialias(real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) {
*xr1++ = (bd * (*cs++) ) + (bu * (*ca++) );
}
}
-
+
}
}
@@ -1172,9 +1172,9 @@ static void III_antialias(real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) {
/*
* III_hybrid
*/
-
+
static dct36_func_t dct36_func;
-
+
static void III_hybrid(real fsIn[SBLIMIT][SSLIMIT],real tsOut[SSLIMIT][SBLIMIT],
int ch,struct gr_info_s *gr_info)
{
@@ -1199,7 +1199,7 @@ static void III_hybrid(real fsIn[SBLIMIT][SSLIMIT],real tsOut[SSLIMIT][SBLIMIT],
(*dct36_func)(fsIn[1],rawout1+18,rawout2+18,win1[0],tspnt+1);
rawout1 += 36; rawout2 += 36; tspnt += 2;
}
-
+
bt = gr_info->block_type;
if(bt == 2) {
for (; sb<gr_info->maxb; sb+=2,tspnt+=2,rawout1+=36,rawout2+=36) {
@@ -1255,7 +1255,7 @@ static int do_layer3(struct frame *fr,int single){
if(!III_get_side_info(&sideinfo,stereo,ms_stereo,sfreq,single,fr->lsf))
return -1;
-
+
set_pointer(sideinfo.main_data_begin);
granules = (fr->lsf) ? 1 : 2;
@@ -1275,9 +1275,9 @@ static int do_layer3(struct frame *fr,int single){
if(stereo == 2) {
struct gr_info_s *gr_info = &(sideinfo.ch[1].gr[gr]);
-
+
int part2bits;
- if(fr->lsf)
+ if(fr->lsf)
part2bits = III_get_scale_factors_2(scalefacs[1],gr_info,i_stereo);
else
part2bits = III_get_scale_factors_1(scalefacs[1],gr_info);
@@ -1302,7 +1302,7 @@ static int do_layer3(struct frame *fr,int single){
III_i_stereo(hybridIn,scalefacs[1],gr_info,sfreq,ms_stereo,fr->lsf);
if(ms_stereo || i_stereo || (single == 3) ) {
- if(gr_info->maxb > sideinfo.ch[0].gr[gr].maxb)
+ if(gr_info->maxb > sideinfo.ch[0].gr[gr].maxb)
sideinfo.ch[0].gr[gr].maxb = gr_info->maxb;
else
gr_info->maxb = sideinfo.ch[0].gr[gr].maxb;
@@ -1313,7 +1313,7 @@ static int do_layer3(struct frame *fr,int single){
register int i;
register real *in0 = (real *) hybridIn[0],*in1 = (real *) hybridIn[1];
for(i=0;i<SSLIMIT*gr_info->maxb;i++,in0++)
- *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */
+ *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */
break; }
case 1: {
register int i;
@@ -1340,7 +1340,7 @@ static int do_layer3(struct frame *fr,int single){
clip += (fr->synth)(hybridOut[1][ss],1,pcm_sample,&pcm_point);
}
}
-
+
}
return clip;
diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c
index 9aa4dec827..224f838c7d 100644
--- a/mp3lib/sr1.c
+++ b/mp3lib/sr1.c
@@ -191,7 +191,7 @@ LOCAL int stream_head_read(unsigned char *hbuf,uint32_t *newhead){
* we may not be able to address unaligned 32-bit data on non-x86 cpus.
* Fall back to some portable code.
*/
- *newhead =
+ *newhead =
hbuf[0] << 24 |
hbuf[1] << 16 |
hbuf[2] << 8 |
@@ -215,7 +215,7 @@ LOCAL int stream_head_shift(unsigned char *hbuf,uint32_t *head){
LOCAL int decode_header(struct frame *fr,uint32_t newhead){
// head_check:
- if( (newhead & 0xffe00000) != 0xffe00000 ||
+ if( (newhead & 0xffe00000) != 0xffe00000 ||
(newhead & 0x0000fc00) == 0x0000fc00) return FALSE;
fr->lay = 4-((newhead>>17)&3);
diff --git a/mp3lib/test.c b/mp3lib/test.c
index ea0169185b..5246ad3ff8 100644
--- a/mp3lib/test.c
+++ b/mp3lib/test.c
@@ -18,7 +18,7 @@ static inline unsigned int GetTimer(void){
gettimeofday(&tv,&tz);
// s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec;
return (tv.tv_sec*1000000+tv.tv_usec);
-}
+}
static FILE* mp3file=NULL;
@@ -38,10 +38,10 @@ int main(int argc,char* argv[]){
FILE *f=NULL;
f=fopen("test.pcm","wb");
#endif
-
+
mp3file=fopen((argc>1)?argv[1]:"test.mp3","rb");
if(!mp3file){ printf("file not found\n"); exit(1); }
-
+
GetCpuCaps(&gCpuCaps);
// MPEG Audio:
@@ -51,7 +51,7 @@ int main(int argc,char* argv[]){
MP3_Init();
#endif
MP3_samplerate=MP3_channels=0;
-
+
time1=GetTimer();
while((len=MP3_DecodeFrame(buffer,-1))>0 && total<2000000){
total+=len;
@@ -66,7 +66,7 @@ int main(int argc,char* argv[]){
printf("\nDecoding time: %8.6f\n",(float)time1*0.000001f);
printf("Uncompressed size: %d bytes (%8.3f secs)\n",total,length);
printf("CPU usage at normal playback: %5.2f %%\n",time1*0.0001f/length);
-
+
fclose(mp3file);
return 0;
}
diff --git a/mp3lib/test2.c b/mp3lib/test2.c
index 0b6a7cbb25..f9bcfc073f 100644
--- a/mp3lib/test2.c
+++ b/mp3lib/test2.c
@@ -26,10 +26,10 @@ int main(int argc,char* argv[]){
int total=0;
int r;
int audio_fd;
-
+
mp3file=fopen((argc>1)?argv[1]:"test.mp3","rb");
if(!mp3file){ printf("file not found\n"); exit(1); }
-
+
GetCpuCaps(&gCpuCaps);
// MPEG Audio:
@@ -40,19 +40,19 @@ int main(int argc,char* argv[]){
#endif
MP3_samplerate=MP3_channels=0;
len=MP3_DecodeFrame(buffer,-1);
-
+
audio_fd=open("/dev/dsp", O_WRONLY);
if(audio_fd<0){ printf("Can't open audio device\n");exit(1); }
r=AFMT_S16_LE;ioctl (audio_fd, SNDCTL_DSP_SETFMT, &r);
r=MP3_channels-1;ioctl (audio_fd, SNDCTL_DSP_STEREO, &r);
r=MP3_samplerate;ioctl (audio_fd, SNDCTL_DSP_SPEED, &r);
printf("audio_setup: using %d Hz samplerate (requested: %d)\n",r,MP3_samplerate);
-
+
while(1){
int len2;
if(len==0) len=MP3_DecodeFrame(buffer,-1);
if(len<=0) break; // EOF
-
+
// play it
len2=write(audio_fd,buffer,len);
if(len2<0) break; // ERROR?
@@ -63,7 +63,7 @@ int main(int argc,char* argv[]){
putchar('!');fflush(stdout);
}
}
-
+
fclose(mp3file);
return 0;
}