diff options
author | Måns Rullgård <mans@mansr.com> | 2010-03-09 01:19:28 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-03-09 01:19:28 +0000 |
commit | b90b1b4c3c519d66146cf8a3ae16ba4c245f0a72 (patch) | |
tree | a5b3019baa6fe58310b78e899695fad724380c23 /libavutil/intmath.h | |
parent | 08a186c648c15aabac328996a46797119f7fae76 (diff) | |
download | ffmpeg-b90b1b4c3c519d66146cf8a3ae16ba4c245f0a72.tar.gz |
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.
Originally committed as revision 22366 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/intmath.h')
-rw-r--r-- | libavutil/intmath.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libavutil/intmath.h b/libavutil/intmath.h index 02870cb282..95ee1ff65c 100644 --- a/libavutil/intmath.h +++ b/libavutil/intmath.h @@ -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 @@ extern const uint32_t ff_inverse[257]; #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) |