comparison intmath.h @ 870:3790c30fc3ad libavutil

Fix build on configurations without fast av_log2() This is a bit hackish. I will try to think of something nicer, but this will do for now.
author mru
date Tue, 09 Mar 2010 01:19:28 +0000
parents 41db9ae634fe
children 2cbad2391250
comparison
equal deleted inserted replaced
869:c66e06fb1b36 870:3790c30fc3ad
19 */ 19 */
20 20
21 #ifndef AVUTIL_INTMATH_H 21 #ifndef AVUTIL_INTMATH_H
22 #define AVUTIL_INTMATH_H 22 #define AVUTIL_INTMATH_H
23 23
24 #include <stdint.h>
24 #include "config.h" 25 #include "config.h"
25 #include "common.h" 26 #include "attributes.h"
26 27
27 extern const uint32_t ff_inverse[257]; 28 extern const uint32_t ff_inverse[257];
28 29
29 #if ARCH_ARM 30 #if ARCH_ARM
30 # include "arm/intmath.h" 31 # include "arm/intmath.h"
54 # define FASTDIV(a,b) ((a) / (b)) 55 # define FASTDIV(a,b) ((a) / (b))
55 #endif 56 #endif
56 57
57 #endif /* FASTDIV */ 58 #endif /* FASTDIV */
58 59
60 /*
61 * Get definition of av_log2_c from common.h. In the event we got
62 * here through common.h including this file, including it again will
63 * be a no-op due to multi-inclusion guards, so we must duplicate the
64 * fallback defines here.
65 */
66
67 #include "common.h"
68
69 #ifndef av_log2
70 # define av_log2 av_log2_c
71 #endif
72 #ifndef av_log2_16bit
73 # define av_log2_16bit av_log2_16bit_c
74 #endif
75
59 extern const uint8_t ff_sqrt_tab[256]; 76 extern const uint8_t ff_sqrt_tab[256];
60 77
61 static inline av_const unsigned int ff_sqrt(unsigned int a) 78 static inline av_const unsigned int ff_sqrt(unsigned int a)
62 { 79 {
63 unsigned int b; 80 unsigned int b;