Martin Storsjö <[email protected]> writes:

> From: "Ronald S. Bultje" <[email protected]>
>
> Add a fallback implementation if it does not exist.
> ---
>  configure        |    2 ++
>  libavutil/libm.h |    4 ++++
>  2 files changed, 6 insertions(+)
>
> diff --git a/configure b/configure
> index 3442797..06bf2c0 100755
> --- a/configure
> +++ b/configure
> @@ -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 783f3cd..b4d5af0 100644
> --- a/libavutil/libm.h
> +++ b/libavutil/libm.h
> @@ -28,6 +28,10 @@
>  #include "config.h"
>  #include "attributes.h"
>
> +#if !HAVE_CBRTF
> +#define cbrtf(x) powf(x, 1.0/3.0)
> +#endif /* HAVE_CBRTF */

I already posted a correct patch for this.  The code above is wrong for
reasons explained in my patch.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to