Mercurial > mplayer.hg
comparison mp3lib/layer2.c @ 30990:0ad2da052b2e
the great MPlayer tab removal: part I
author | diego |
---|---|
date | Mon, 12 Apr 2010 10:56:17 +0000 |
parents | 347d152a5cfa |
children |
comparison
equal
deleted
inserted
replaced
30989:686241d65b86 | 30990:0ad2da052b2e |
---|---|
16 | 16 |
17 static int grp_3tab[32 * 3] = { 0, }; /* used: 27 */ | 17 static int grp_3tab[32 * 3] = { 0, }; /* used: 27 */ |
18 static int grp_5tab[128 * 3] = { 0, }; /* used: 125 */ | 18 static int grp_5tab[128 * 3] = { 0, }; /* used: 125 */ |
19 static int grp_9tab[1024 * 3] = { 0, }; /* used: 729 */ | 19 static int grp_9tab[1024 * 3] = { 0, }; /* used: 729 */ |
20 | 20 |
21 static real muls[27][64]; /* also used by layer 1 */ | 21 static real muls[27][64]; /* also used by layer 1 */ |
22 | 22 |
23 static void init_layer2(void) | 23 static void init_layer2(void) |
24 { | 24 { |
25 static double mulmul[27] = { | 25 static double mulmul[27] = { |
26 0.0 , -2.0/3.0 , 2.0/3.0 , | 26 0.0 , -2.0/3.0 , 2.0/3.0 , |
57 double m=mulmul[k]; | 57 double m=mulmul[k]; |
58 table = muls[k]; | 58 table = muls[k]; |
59 if(_has_mmx) | 59 if(_has_mmx) |
60 { | 60 { |
61 for(j=3,i=0;i<63;i++,j--) | 61 for(j=3,i=0;i<63;i++,j--) |
62 *table++ = 16384 * m * pow(2.0,(double) j / 3.0); | 62 *table++ = 16384 * m * pow(2.0,(double) j / 3.0); |
63 } | 63 } |
64 else | 64 else |
65 for(j=3,i=0;i<63;i++,j--) | 65 for(j=3,i=0;i<63;i++,j--) |
66 { | 66 { |
67 *table++ = m * pow(2.0,(double) j / 3.0); | 67 *table++ = m * pow(2.0,(double) j / 3.0); |
187 } | 187 } |
188 | 188 |
189 for (i=jsbound;i<sblimit;i++,alloc1+=(1<<step)) | 189 for (i=jsbound;i<sblimit;i++,alloc1+=(1<<step)) |
190 { | 190 { |
191 step = alloc1->bits; | 191 step = alloc1->bits; |
192 bita++; /* channel 1 and channel 2 bitalloc are the same */ | 192 bita++; /* channel 1 and channel 2 bitalloc are the same */ |
193 if ( (ba=*bita++) ) | 193 if ( (ba=*bita++) ) |
194 { | 194 { |
195 k=(alloc2 = alloc1+ba)->bits; | 195 k=(alloc2 = alloc1+ba)->bits; |
196 if( (d1=alloc2->d) < 0) | 196 if( (d1=alloc2->d) < 0) |
197 { | 197 { |