changeset 753:b27973fe5960 libavutil

Add a log2 replacement for systems that haven't quite caught up with the C99 standard library.
author alexc
date Fri, 10 Jul 2009 19:20:06 +0000
parents 1e5bfdf9054d
children e67b4de734af
files internal.h
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/internal.h	Fri Jul 10 15:50:49 2009 +0000
+++ b/internal.h	Fri Jul 10 19:20:06 2009 +0000
@@ -265,6 +265,13 @@
 }
 #endif /* HAVE_LLRINT */
 
+#if !HAVE_LOG2
+static av_always_inline av_const double log2(double x)
+{
+    return log(x) * 1.44269504088896340736;
+}
+#endif /* HAVE_LOG2 */
+
 #if !HAVE_LRINT
 static av_always_inline av_const long int lrint(double x)
 {