aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/internal.h
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2009-07-10 19:20:06 +0000
committerAlex Converse <alex.converse@gmail.com>2009-07-10 19:20:06 +0000
commit291fd18a6ede0fc6a6d35c9a98af6ae7fd6d6117 (patch)
treec850a66c9a9c6109680c6f14582963c7c6cbe5e8 /libavutil/internal.h
parent451ae257242c4e10b6f1e816e14638bb45ad762b (diff)
downloadffmpeg-291fd18a6ede0fc6a6d35c9a98af6ae7fd6d6117.tar.gz
Add a log2 replacement for systems that haven't quite caught up with the C99
standard library. Originally committed as revision 19395 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r--libavutil/internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index a80ea2470b..1012f1c690 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -265,6 +265,13 @@ static av_always_inline av_const long long llrint(double x)
}
#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)
{