summaryrefslogtreecommitdiff
path: root/apps/codecs/lib/codeclib.h
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-12-06 04:43:23 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-12-06 04:43:23 +0000
commit50512cdeacdc66bd13c5848d15bf005ee3b456cd (patch)
treecc28278f08d1ef36f62e63199c30aa11df49482d /apps/codecs/lib/codeclib.h
parentcd22b32450757b5c204bca9add59b177c27cf4e7 (diff)
Fix red: av_log2 undefined for ARM_ARCH <= 4, missing codeclib.h includes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23869 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/lib/codeclib.h')
-rw-r--r--apps/codecs/lib/codeclib.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/codecs/lib/codeclib.h b/apps/codecs/lib/codeclib.h
index 4f30b306e3..9c3624b422 100644
--- a/apps/codecs/lib/codeclib.h
+++ b/apps/codecs/lib/codeclib.h
@@ -76,8 +76,7 @@ unsigned udiv32_arm(unsigned a, unsigned b);
/* TODO figure out if we really need to care about calculating
av_log2(0) */
-#ifdef CPU_ARM
-#if ARM_ARCH > 5
+#if defined(CPU_ARM) && ARM_ARCH >= 6
static inline unsigned int av_log2(uint32_t v)
{
unsigned int r;
@@ -87,12 +86,11 @@ static inline unsigned int av_log2(uint32_t v)
:[r] "=r" (r) : [v] "r" (v));
return(r);
}
-#elif ARM_ARCH > 4
+#elif defined(CPU_ARM) && ARM_ARCH >= 5
static inline unsigned int av_log2(uint32_t v)
{
return v ? 31 - __builtin_clz(v) : 0;
}
-#endif
#else /* CPU_ARM */
/* From libavutil/common.h */
extern const uint8_t ff_log2_tab[256] ICONST_ATTR;