forked from len0rd/rockbox
Correct the scaling of the coeffs to 17bits.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27599 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a9acd1f45b
commit
7722c1d459
2 changed files with 3 additions and 3 deletions
|
|
@ -116,7 +116,7 @@ int ff_wma_run_level_decode(GetBitContext* gb,
|
|||
offset += run_table[code];
|
||||
sign = !get_bits1(gb);
|
||||
ptr[offset & coef_mask] = sign ? -level_table[code] : level_table[code];
|
||||
ptr[offset & coef_mask] <<= 16;
|
||||
ptr[offset & coef_mask] <<= 17;
|
||||
} else if (code == 1) {
|
||||
/** EOB */
|
||||
break;
|
||||
|
|
@ -144,7 +144,7 @@ int ff_wma_run_level_decode(GetBitContext* gb,
|
|||
}
|
||||
sign = !get_bits1(gb);
|
||||
ptr[offset & coef_mask] = sign ? -level : level;
|
||||
ptr[offset & coef_mask] <<=16;
|
||||
ptr[offset & coef_mask] <<=17;
|
||||
}
|
||||
}
|
||||
/** NOTE: EOB can be omitted */
|
||||
|
|
|
|||
|
|
@ -873,7 +873,7 @@ static int decode_coeffs(WMAProDecodeCtx *s, int c)
|
|||
for (i = 0; i < 4; i++) {
|
||||
if (vals[i]) {
|
||||
int sign = get_bits1(&s->gb) - 1;
|
||||
ci->coeffs[cur_coeff] = (sign == -1)? -vals[i]<<16 : vals[i]<<16;
|
||||
ci->coeffs[cur_coeff] = (sign == -1)? -vals[i]<<17 : vals[i]<<17;
|
||||
num_zeros = 0;
|
||||
} else {
|
||||
ci->coeffs[cur_coeff] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue