Mercurial > libavutil.hg
diff 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 |
line wrap: on
line diff
--- a/intmath.h Mon Mar 08 22:16:05 2010 +0000 +++ b/intmath.h Tue Mar 09 01:19:28 2010 +0000 @@ -21,8 +21,9 @@ #ifndef AVUTIL_INTMATH_H #define AVUTIL_INTMATH_H +#include <stdint.h> #include "config.h" -#include "common.h" +#include "attributes.h" extern const uint32_t ff_inverse[257]; @@ -56,6 +57,22 @@ #endif /* FASTDIV */ +/* + * Get definition of av_log2_c from common.h. In the event we got + * here through common.h including this file, including it again will + * be a no-op due to multi-inclusion guards, so we must duplicate the + * fallback defines here. + */ + +#include "common.h" + +#ifndef av_log2 +# define av_log2 av_log2_c +#endif +#ifndef av_log2_16bit +# define av_log2_16bit av_log2_16bit_c +#endif + extern const uint8_t ff_sqrt_tab[256]; static inline av_const unsigned int ff_sqrt(unsigned int a)
