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 bfcc21c5da..6c17b287b4 100644
--- a/libavutil/libm.h
+++ b/libavutil/libm.h
@@ -48,6 +48,13 @@
#define powf(x, y) ((float)pow(x, y))
#endif
+#if !HAVE_CBRT
+static av_always_inline double cbrt(double x)
+{
+ return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0);
+}
+#endif
+
#if !HAVE_CBRTF
static av_always_inline float cbrtf(float x)
{