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:
parent
aa0f895572
commit
ddb936a0c5
6 changed files with 75 additions and 116 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue