summaryrefslogtreecommitdiffstats
path: root/libavutil/internal.h
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2010-01-12 02:19:51 +0000
committerVitor Sessak <vitor1001@gmail.com>2010-01-12 02:19:51 +0000
commit6b7c7703f4c762d0419dfb0e186fa21cec78e4bc (patch)
treec6d588c65fc717ee3b29265359ccee892a1f82e4 /libavutil/internal.h
parent0941ee0fa656eb3abc2bdf8abd57fa0eb8dd8bac (diff)
downloadffmpeg-streaming-6b7c7703f4c762d0419dfb0e186fa21cec78e4bc.zip
ffmpeg-streaming-6b7c7703f4c762d0419dfb0e186fa21cec78e4bc.tar.gz
Add replacements for log2f(), exp2() and exp2f() for platforms that lacks it.
Should fix build breakage on some platforms introduced in r21125. Originally committed as revision 21155 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r--libavutil/internal.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 7f620d8..ad43206 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -263,6 +263,20 @@ if ((y) < (x)) {\
}\
}
+#if !HAVE_EXP2
+static av_always_inline av_const double exp2(double x)
+{
+ return exp(x * 0.693147180559945);
+}
+#endif /* HAVE_EXP2 */
+
+#if !HAVE_EXP2F
+static av_always_inline av_const float exp2f(float x)
+{
+ return exp2(x);
+}
+#endif /* HAVE_EXP2F */
+
#if !HAVE_LLRINT
static av_always_inline av_const long long llrint(double x)
{
@@ -277,6 +291,13 @@ static av_always_inline av_const double log2(double x)
}
#endif /* HAVE_LOG2 */
+#if !HAVE_LOG2F
+static av_always_inline av_const float log2f(float x)
+{
+ return log2(x);
+}
+#endif /* HAVE_LOG2F */
+
#if !HAVE_LRINT
static av_always_inline av_const long int lrint(double x)
{
OpenPOWER on IntegriCloud