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

Vitor Sessak vitor1001
Tue Jan 12 03:13:02 CET 2010


Michael Kostylev wrote:
> On Sun Jan 10 21:55:50 2010
> Vitor Sessak wrote:
> 
>>>> +#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.
>> Fine, even thought NetBSD lacks it (thats why we have a configure
>> check for it, so no problem there).
> 
> Just for completeness:
> 
>              log2 log2f exp2 exp2f
> FreeBSD      -    -     +    + 
> NetBSD       +    +     -    -
> DragonFly    +    +     -    -
> DJGPP        +    [1]   +    -

I don't know about the other platforms, but at least NetBSD is pretty 
responsive to patches [1,2].

[1] http://mail-index.netbsd.org/tech-userlevel/2010/01/11/msg003077.html
[2] http://mail-index.netbsd.org/source-changes/2010/01/11/msg005286.html

-Vitor



More information about the ffmpeg-devel mailing list