summaryrefslogtreecommitdiff
path: root/libavutil/libm.h
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2010-07-07 00:27:52 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-10-22 19:49:27 +0200
commitab2539708a241ddb2190d95d68a86b71b0bec601 (patch)
treebafd401f06b790587bced92aae967473b6758989 /libavutil/libm.h
parent9c48a7cc525130e4a6426a10a697de8c3b1c5cbc (diff)
Check for cbrtf() and provide fallback
(cherry picked from commit bfb37d7db1c6394099f6b177e10d6e769e678f6a) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/libm.h')
-rw-r--r--libavutil/libm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/libm.h b/libavutil/libm.h
index 7e5f668e16..62faea45be 100644
--- a/libavutil/libm.h
+++ b/libavutil/libm.h
@@ -28,6 +28,11 @@
#include "config.h"
#include "attributes.h"
+#if !HAVE_CBRTF
+#undef cbrtf
+#define cbrtf(x) powf(x, 1.0/3.0)
+#endif /* HAVE_CBRTF */
+
#if !HAVE_EXP2
#undef exp2
#define exp2(x) exp((x) * 0.693147180559945)