[FFmpeg-devel] [PATCH] fix compilation in cygwin

Måns Rullgård mans
Mon Jan 11 02:11:07 CET 2010


Vitor Sessak <vitor1001 at gmail.com> writes:

> +#if !HAVE_LOG2F
> +static av_always_inline av_const float log2f(float x)
> +{
> +    return log(x) * 1.44269504088896340736;
> +}
> +#endif /* HAVE_LOG2F */

Calling log2() should be better.  Most of the bad libs have a full set
of double-precision functions.  It's the single-precision ones, which
were added in C99 that are often missing.

> +#if !HAVE_EXP2F
> +static av_always_inline av_const float exp2f(float x)
> +{
> +    return exp(x) * 0.693147180559945;
> +}
> +#endif /* HAVE_EXP2F */

Same again.  exp2() should be preferred.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list