summaryrefslogtreecommitdiff
path: root/libavutil/libm.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/libm.h')
-rw-r--r--libavutil/libm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/libm.h b/libavutil/libm.h
index 783f3cdfab..b6d8a94fce 100644
--- a/libavutil/libm.h
+++ b/libavutil/libm.h
@@ -28,6 +28,13 @@
#include "config.h"
#include "attributes.h"
+#if !HAVE_CBRTF
+static av_always_inline float cbrtf(float x)
+{
+ return x < 0 ? -powf(-x, 1.0 / 3.0) : powf(x, 1.0 / 3.0);
+}
+#endif
+
#if !HAVE_EXP2
#undef exp2
#define exp2(x) exp((x) * 0.693147180559945)