diff options
Diffstat (limited to 'apps/codecs/lib')
-rw-r--r-- | apps/codecs/lib/codeclib.h | 6 |
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); | |||
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 | ||
81 | static inline unsigned int av_log2(uint32_t v) | 80 | static 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 |
91 | static inline unsigned int av_log2(uint32_t v) | 90 | static 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 */ |
98 | extern const uint8_t ff_log2_tab[256] ICONST_ATTR; | 96 | extern const uint8_t ff_log2_tab[256] ICONST_ATTR; |