summaryrefslogtreecommitdiff
path: root/apps/codecs
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
parentcd22b32450757b5c204bca9add59b177c27cf4e7 (diff)
downloadrockbox-50512cdeacdc66bd13c5848d15bf005ee3b456cd.tar.gz
rockbox-50512cdeacdc66bd13c5848d15bf005ee3b456cd.zip
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')
-rw-r--r--apps/codecs/lib/codeclib.h6
-rw-r--r--apps/codecs/libcook/cook.c1
-rw-r--r--apps/codecs/libffmpegFLAC/shndec.c1
3 files changed, 4 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);
76 76
77/* TODO figure out if we really need to care about calculating 77/* TODO figure out if we really need to care about calculating
78 av_log2(0) */ 78 av_log2(0) */
79#ifdef CPU_ARM 79#if defined(CPU_ARM) && ARM_ARCH >= 6
80#if ARM_ARCH > 5
81static inline unsigned int av_log2(uint32_t v) 80static inline unsigned int av_log2(uint32_t v)
82{ 81{
83 unsigned int r; 82 unsigned int r;
@@ -87,12 +86,11 @@ static inline unsigned int av_log2(uint32_t v)
87 :[r] "=r" (r) : [v] "r" (v)); 86 :[r] "=r" (r) : [v] "r" (v));
88 return(r); 87 return(r);
89} 88}
90#elif ARM_ARCH > 4 89#elif defined(CPU_ARM) && ARM_ARCH >= 5
91static inline unsigned int av_log2(uint32_t v) 90static inline unsigned int av_log2(uint32_t v)
92{ 91{
93 return v ? 31 - __builtin_clz(v) : 0; 92 return v ? 31 - __builtin_clz(v) : 0;
94} 93}
95#endif
96#else /* CPU_ARM */ 94#else /* CPU_ARM */
97/* From libavutil/common.h */ 95/* From libavutil/common.h */
98extern const uint8_t ff_log2_tab[256] ICONST_ATTR; 96extern const uint8_t ff_log2_tab[256] ICONST_ATTR;
diff --git a/apps/codecs/libcook/cook.c b/apps/codecs/libcook/cook.c
index 74f695e627..3212c57abb 100644
--- a/apps/codecs/libcook/cook.c
+++ b/apps/codecs/libcook/cook.c
@@ -47,6 +47,7 @@
47#include <stdio.h> 47#include <stdio.h>
48#include <limits.h> 48#include <limits.h>
49#include <string.h> 49#include <string.h>
50#include "codeclib.h"
50 51
51#include "cook.h" 52#include "cook.h"
52#include "cookdata.h" 53#include "cookdata.h"
diff --git a/apps/codecs/libffmpegFLAC/shndec.c b/apps/codecs/libffmpegFLAC/shndec.c
index 1afcff6fbe..fb11f77bfa 100644
--- a/apps/codecs/libffmpegFLAC/shndec.c
+++ b/apps/codecs/libffmpegFLAC/shndec.c
@@ -27,6 +27,7 @@
27#include "bitstream.h" 27#include "bitstream.h"
28#include "golomb.h" 28#include "golomb.h"
29#include "shndec.h" 29#include "shndec.h"
30#include "codeclib.h"
30 31
31#define ULONGSIZE 2 32#define ULONGSIZE 2
32 33