diff options
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | libavutil/libm.h | 7 |
2 files changed, 9 insertions, 0 deletions
@@ -1059,6 +1059,7 @@ HAVE_LIST=" asm_mod_y attribute_may_alias attribute_packed + cbrtf closesocket cmov dcbzl @@ -2918,6 +2919,7 @@ done check_lib math.h sin -lm && LIBM="-lm" enabled vaapi && require vaapi va/va.h vaInitialize -lva +check_mathfunc cbrtf check_mathfunc exp2 check_mathfunc exp2f check_mathfunc llrint 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) |