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:
parent
206e883e78
commit
2ff816fab6
2 changed files with 1136 additions and 1144 deletions
|
@ -2570,6 +2570,5 @@ const fixed64 lsp_pow_e_table[] =
|
||||||
0xffffb0ac, 0xffffda12, 0x3f00, 0x36ed, 0x38ec, 0xffff9a13, 0xffff9d40, 0x5ec5,
|
0xffffb0ac, 0xffffda12, 0x3f00, 0x36ed, 0x38ec, 0xffff9a13, 0xffff9d40, 0x5ec5,
|
||||||
0x5a1b, 0x5a7d, 0xffffccab, 0xfffffcd1, 0xffffa33b, 0xffff9848, 0x31d8, 0x2224,
|
0x5a1b, 0x5a7d, 0xffffccab, 0xfffffcd1, 0xffffa33b, 0xffff9848, 0x31d8, 0x2224,
|
||||||
0x2eb0, 0xffffa658, 0xffff9e76, 0xffffd97a, 0x65a8, 0xffff8029, 0xf42, 0x2c21
|
0x2eb0, 0xffffa658, 0xffff9e76, 0xffffd97a, 0x65a8, 0xffff8029, 0xf42, 0x2c21
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1013,10 +1013,10 @@ static void wma_lsp_to_curve(WMADecodeContext *s,
|
||||||
|
|
||||||
for (j=1;j<NB_LSP_COEFS;j+=2)
|
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)));
|
temp2 = ((w - (lsp[j - 1]<<11)));
|
||||||
temp = q;
|
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;
|
q = fixmul32b(q, temp2 )<<4;
|
||||||
p = fixmul32b(p, (w - (lsp[j]<<11)))<<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)
|
if (v > val_max)
|
||||||
val_max = v;
|
val_max = v;
|
||||||
out[i] = v;
|
out[i] = v;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*val_max_ptr = val_max;
|
*val_max_ptr = val_max;
|
||||||
|
@ -1157,9 +1156,6 @@ static int wma_decode_block(WMADecodeContext *s)
|
||||||
}
|
}
|
||||||
v = get_bits(&s->gb, n);
|
v = get_bits(&s->gb, n);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (v >= s->nb_block_sizes)
|
if (v >= s->nb_block_sizes)
|
||||||
{
|
{
|
||||||
// rb->splash(HZ*4, "v was %d", v); //5, 7
|
// 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;
|
coef_nb_bits = 10;
|
||||||
else
|
else
|
||||||
coef_nb_bits = 9;
|
coef_nb_bits = 9;
|
||||||
|
|
||||||
/* compute number of coefficients */
|
/* compute number of coefficients */
|
||||||
n = s->coefs_end[bsize] - s->coefs_start;
|
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. */
|
/* 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)
|
for(ch = 0; ch < s->nb_channels; ++ch)
|
||||||
{
|
{
|
||||||
if (s->channel_coded[ch])
|
if (s->channel_coded[ch])
|
||||||
|
@ -1332,8 +1329,6 @@ static int wma_decode_block(WMADecodeContext *s)
|
||||||
eptr = ptr + nb_coefs[ch];
|
eptr = ptr + nb_coefs[ch];
|
||||||
memset(ptr, 0, s->block_len * sizeof(int16_t));
|
memset(ptr, 0, s->block_len * sizeof(int16_t));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
code = get_vlc2(&s->gb, coef_vlc->table, VLCBITS, VLCMAX);
|
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)
|
for (i=0;i<n;++i)
|
||||||
{
|
{
|
||||||
|
|
||||||
a = fixtoi32(*iptr++)<<1; //ugly but good enough for now
|
a = fixtoi32(*iptr++)<<1; //ugly but good enough for now
|
||||||
|
|
||||||
|
|
||||||
if (a > 32767)
|
if (a > 32767)
|
||||||
{
|
{
|
||||||
a = 32767;
|
a = 32767;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue