From 57461d7c4f612bed0e8cd9644a0689dbfe56d684 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Mon, 15 Feb 2010 13:00:02 +0000 Subject: Work on atrac Joint Stereo mode. Correct calculation in getChannelWeights(), introduce lookup table and remove obsolete code. Optimize interpolation macro. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24665 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libatrac/fixp_math.h | 43 ---------------------------------------- 1 file changed, 43 deletions(-) (limited to 'apps/codecs/libatrac/fixp_math.h') diff --git a/apps/codecs/libatrac/fixp_math.h b/apps/codecs/libatrac/fixp_math.h index 5174cc7cc6..29d47a9e53 100644 --- a/apps/codecs/libatrac/fixp_math.h +++ b/apps/codecs/libatrac/fixp_math.h @@ -91,46 +91,3 @@ return (int32_t)temp; } #endif - -static inline int32_t fixdiv16(int32_t x, int32_t y) -{ - int64_t temp; - temp = x << 16; - temp /= y; - - return (int32_t)temp; -} - -/* - * Fast integer square root adapted from algorithm, - * Martin Guy @ UKC, June 1985. - * Originally from a book on programming abaci by Mr C. Woo. - * This is taken from : - * http://wiki.forum.nokia.com/index.php/How_to_use_fixed_point_maths#How_to_get_square_root_for_integers - * with a added shift up of the result by 8 bits to return result in 16.16 fixed-point representation. - */ -static inline int32_t fastSqrt(int32_t n) -{ - /* - * Logically, these are unsigned. - * We need the sign bit to test - * whether (op - res - one) underflowed. - */ - int32_t op, res, one; - op = n; - res = 0; - /* "one" starts at the highest power of four <= than the argument. */ - one = 1 << 30; /* second-to-top bit set */ - while (one > op) one >>= 2; - while (one != 0) - { - if (op >= res + one) - { - op = op - (res + one); - res = res + (one<<1); - } - res >>= 1; - one >>= 2; - } - return(res << 8); -} -- cgit v1.2.3