summaryrefslogtreecommitdiff
path: root/apps/codecs/libfaad/common.h
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-12-09 02:24:45 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-12-09 02:24:45 +0000
commit85aad9b3972208b0e34ba0241ebb5314118ae05e (patch)
tree27724c068f90b517d4bf9be6ed78d34a01eeba9b /apps/codecs/libfaad/common.h
parent3683bb67db4d5d59a55aabed6eaed72233323ee7 (diff)
Extend av_log2 in codeclib into a generic for scanning for set bits, which can provide either log2 or leading-zero-count output, and can force mapping 0 input to 0 output if needed (otherwise 0 input produces undefined result). Replace av_log2 in lib/codeclib.h, floor_log2 and wl_min_lzc in libfaad/common.c and common.h, and count_leading_zeros in libalac/alac.c with macros using bs_generic.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23903 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad/common.h')
-rw-r--r--apps/codecs/libfaad/common.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/codecs/libfaad/common.h b/apps/codecs/libfaad/common.h
index ea028b1b8e..fe0d02b228 100644
--- a/apps/codecs/libfaad/common.h
+++ b/apps/codecs/libfaad/common.h
@@ -399,9 +399,7 @@ typedef real_t complex_t[2];
/* common functions */
uint8_t cpu_has_sse(void);
uint32_t random_int(void);
-uint32_t ones32(uint32_t x);
-uint32_t floor_log2(uint32_t x);
-uint32_t wl_min_lzc(uint32_t x);
+#define wl_min_lzc(x) bs_generic(x, BS_LOG2|BS_0_0)
#ifdef FIXED_POINT
#define LOG2_MIN_INF REAL_CONST(-10000)
int32_t log2_int(uint32_t val);