summaryrefslogtreecommitdiff
path: root/libavutil/common.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-07-07 17:27:43 +0000
committerMåns Rullgård <mans@mansr.com>2010-07-07 17:27:43 +0000
commita955b5965825631986ba854d007d4e934e466c7d (patch)
treee1e1b025d9a11bd281779a8c877e892e93246108 /libavutil/common.h
parent2e874c77041773ff95286c1f31a7696c786d12eb (diff)
Remove macro duplication between common.h and intmath.h
Originally committed as revision 24086 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/common.h')
-rw-r--r--libavutil/common.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/libavutil/common.h b/libavutil/common.h
index afce3c8a12..6862666617 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -90,12 +90,8 @@ static inline av_const int av_log2_16bit_c(unsigned int v)
# include "intmath.h"
#endif
-#ifndef av_log2
-# define av_log2 av_log2_c
-#endif
-#ifndef av_log2_16bit
-# define av_log2_16bit av_log2_16bit_c
-#endif
+/* Pull in unguarded fallback defines at the end of this file. */
+#include "common.h"
/**
* Clip a signed integer value into the amin-amax range.
@@ -312,3 +308,15 @@ static inline av_const int av_ceil_log2(int x)
#endif /* HAVE_AV_CONFIG_H */
#endif /* AVUTIL_COMMON_H */
+
+/*
+ * The following definitions are outside the multiple inclusion guard
+ * to ensure they are immediately available in intmath.h.
+ */
+
+#ifndef av_log2
+# define av_log2 av_log2_c
+#endif
+#ifndef av_log2_16bit
+# define av_log2_16bit av_log2_16bit_c
+#endif