diff options
author | Thom Johansen <thomj@rockbox.org> | 2007-10-19 12:27:38 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2007-10-19 12:27:38 +0000 |
commit | 877ea486bad40bde6f8b969acc8af50f244884c0 (patch) | |
tree | a287e4a5348275592b331d65b466a9e241c02fd1 /apps/codecs/libwma/wmafixed.c | |
parent | d332601135f75dd4a06c1bc8347f0155dc2867f1 (diff) |
Move multiply routines into the header. Give Coldfire a fixmul32b(). Remove some tabs and empty lines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15205 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma/wmafixed.c')
-rw-r--r-- | apps/codecs/libwma/wmafixed.c | 54 |
1 files changed, 3 insertions, 51 deletions
diff --git a/apps/codecs/libwma/wmafixed.c b/apps/codecs/libwma/wmafixed.c index b53a1da607..9c3b211f59 100644 --- a/apps/codecs/libwma/wmafixed.c +++ b/apps/codecs/libwma/wmafixed.c @@ -43,56 +43,8 @@ fixed64 Fixed32To64(fixed32 x) return (fixed64)x; } - -/* - Fixed precision multiply code. - -*/ - -/*Sign-15.16 format */ -#ifdef CPU_ARM -/* these are defines in wmafixed.h*/ -#elif defined(CPU_COLDFIRE) - -#else - -fixed32 fixmul32(fixed32 x, fixed32 y) -{ - fixed64 temp; - temp = x; - temp *= y; - - temp >>= PRECISION; - - return (fixed32)temp; -} - -#endif -/* - Special fixmul32 that does a 16.16 x 1.31 multiply that returns a 16.16 value. - this is needed because the fft constants are all normalized to be less then 1 - and can't fit into a 16 bit number without excessive rounding - - -*/ -#ifndef CPU_ARM -fixed32 fixmul32b(fixed32 x, fixed32 y) -{ - fixed64 temp; - - temp = x; - temp *= y; - - temp >>= 31; //16+31-16 = 31 bits - - return (fixed32)temp; -} -#endif - - - /* - Not performance senstitive code here + Not performance senstitive code here */ @@ -204,7 +156,7 @@ static const unsigned long atan_table[] = { /* - Below here functions do not use standard fixed precision! + Below here functions do not use standard fixed precision! */ @@ -270,7 +222,7 @@ long fsincos(unsigned long phase, fixed32 *cos) /* - Old trig functions. Still used in 1 place each. + Old trig functions. Still used in 1 place each. */ |