1
0
Fork 0
forked from len0rd/rockbox

Clean up libfaad's fixed point implementation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28069 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2010-09-13 20:57:22 +00:00
parent aa0f895572
commit ddb936a0c5
6 changed files with 75 additions and 116 deletions

View file

@ -38,8 +38,6 @@ static void gen_rand_vector(real_t *spec, int16_t scale_factor, uint16_t size,
#ifdef FIXED_POINT
#define DIV(A, B) (((int64_t)A << REAL_BITS)/B)
#define step(shift) \
if ((0x40000000l >> shift) + root <= value) \
{ \
@ -126,7 +124,7 @@ static INLINE void gen_rand_vector(real_t *spec, int16_t scale_factor, uint16_t
energy = fp_sqrt(energy);
if (energy > 0)
{
scale = DIV(REAL_CONST(1),energy);
scale = DIV_R(REAL_CONST(1), energy);
exp = scale_factor >> 2;
frac = scale_factor & 3;