1
0
Fork 0
forked from len0rd/rockbox

Cosmetic changes - TAB and whitespace policing.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14135 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2007-08-02 07:41:28 +00:00
parent 206e883e78
commit 2ff816fab6
2 changed files with 1136 additions and 1144 deletions

View file

@ -1544,7 +1544,7 @@ const fixed64 lsp_pow_e_table[] =
};
/* table of exp noise values multiplied by 16 in order to reduce rounding error */
fixed32 noisetable_exp[] =
fixed32 noisetable_exp[] =
{
0x5, 0xfffffa2e, 0xc2c, 0xb47, 0xffffaebe, 0xfffffa63, 0xfffff7ff, 0x16bd,
0xffffe704, 0xffffe34e, 0x71ee, 0x396e, 0xffff8bfd, 0x3b4, 0x562f, 0xffffc362,
@ -2570,6 +2570,5 @@ const fixed64 lsp_pow_e_table[] =
0xffffb0ac, 0xffffda12, 0x3f00, 0x36ed, 0x38ec, 0xffff9a13, 0xffff9d40, 0x5ec5,
0x5a1b, 0x5a7d, 0xffffccab, 0xfffffcd1, 0xffffa33b, 0xffff9848, 0x31d8, 0x2224,
0x2eb0, 0xffffa658, 0xffff9e76, 0xffffd97a, 0x65a8, 0xffff8029, 0xf42, 0x2c21
};

View file

@ -857,7 +857,7 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx)
else
{
s->noise_mult = 0xa3d;
/*LSP values are simply 2x the EXP values*/
/* LSP values are simply 2x the EXP values */
for (i=0;i<NOISE_TAB_SIZE;++i)
noisetable_exp[i] = noisetable_exp[i]<< 1;
s->noise_table = noisetable_exp;
@ -950,9 +950,9 @@ static inline fixed32 pow_m1_4(WMADecodeContext *s, fixed32 x)
a = s->lsp_pow_m_table1[m];
b = s->lsp_pow_m_table2[m];
/*lsp_pow_e_table contains 32.32 format */
/*TODO: Since we're unlikely have value that cover the whole
* IEEE754 range, we probably don't need to have all possible exponents*/
/* lsp_pow_e_table contains 32.32 format */
/* TODO: Since we're unlikely have value that cover the whole
* IEEE754 range, we probably don't need to have all possible exponents */
return (lsp_pow_e_table[e] * (a + fixmul32(b, ftofix32(t.f))) >>32);
}
@ -966,9 +966,9 @@ static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len)
temp = fixdiv32(itofix32(1), itofix32(frame_len));
for (i=0; i<frame_len; ++i)
{
/*TODO: can probably reuse the trig_init values here */
/* TODO: can probably reuse the trig_init values here */
fsincos((temp*i)<<15, &temp2);
/*get 3 bits headroom + 1 bit from not doubleing the values*/
/* get 3 bits headroom + 1 bit from not doubleing the values */
s->lsp_cos_table[i] = temp2>>3;
}
@ -1013,11 +1013,11 @@ static void wma_lsp_to_curve(WMADecodeContext *s,
for (j=1;j<NB_LSP_COEFS;j+=2)
{
/*w is 5.27 format, lsp is in 16.16, temp2 becomes 5.27 format*/
/* w is 5.27 format, lsp is in 16.16, temp2 becomes 5.27 format */
temp2 = ((w - (lsp[j - 1]<<11)));
temp = q;
/*q is 16.16 format, temp2 is 5.27, q becomes 16.16 */
/* q is 16.16 format, temp2 is 5.27, q becomes 16.16 */
q = fixmul32b(q, temp2 )<<4;
p = fixmul32b(p, (w - (lsp[j]<<11)))<<4;
}
@ -1031,7 +1031,6 @@ static void wma_lsp_to_curve(WMADecodeContext *s,
if (v > val_max)
val_max = v;
out[i] = v;
}
*val_max_ptr = val_max;
@ -1157,9 +1156,6 @@ static int wma_decode_block(WMADecodeContext *s)
}
v = get_bits(&s->gb, n);
if (v >= s->nb_block_sizes)
{
// rb->splash(HZ*4, "v was %d", v); //5, 7
@ -1228,6 +1224,7 @@ static int wma_decode_block(WMADecodeContext *s)
coef_nb_bits = 10;
else
coef_nb_bits = 9;
/* compute number of coefficients */
n = s->coefs_end[bsize] - s->coefs_start;
@ -1289,8 +1286,8 @@ static int wma_decode_block(WMADecodeContext *s)
}
/* exponents can be reused in short blocks. */
if ((s->block_len_bits == s->frame_len_bits) || get_bits(&s->gb, 1)) {
if ((s->block_len_bits == s->frame_len_bits) || get_bits(&s->gb, 1))
{
for(ch = 0; ch < s->nb_channels; ++ch)
{
if (s->channel_coded[ch])
@ -1332,8 +1329,6 @@ static int wma_decode_block(WMADecodeContext *s)
eptr = ptr + nb_coefs[ch];
memset(ptr, 0, s->block_len * sizeof(int16_t));
for(;;)
{
code = get_vlc2(&s->gb, coef_vlc->table, VLCBITS, VLCMAX);
@ -1662,10 +1657,8 @@ static int wma_decode_frame(WMADecodeContext *s, int16_t *samples)
for (i=0;i<n;++i)
{
a = fixtoi32(*iptr++)<<1; //ugly but good enough for now
if (a > 32767)
{
a = 32767;