diff --git a/configure b/configure index 8460e5fad29985685062e2a54a61e07e015f4325..a741fc36df27ae79f98284eb8e1f0eec69b03896 100755 --- a/configure +++ b/configure @@ -1300,6 +1300,7 @@ HAVE_LIST_PUB=' MATH_FUNCS=" atanf atan2f + cbrt cbrtf cosf exp2 diff --git a/libavutil/libm.h b/libavutil/libm.h index bfcc21c5daf46d9b317a9ad889504239de8a9a8e..6c17b287b450a7e2e676d0eb1b708be67dd04f83 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) {