[FFmpeg-devel] FreeBSD patch - Log2() not available on freebsd
Måns Rullgård
mans
Fri May 16 21:24:08 CEST 2008
Brice Leroy <bbrriiccee at gmail.com> writes:
> Hello,
>
> On FreeBsd log2() is not availble. This is a patch to define a
> temporary fake log2()
>
> Index: libavcodec/zmbvenc.c
> ===================================================================
> --- libavcodec/zmbvenc.c (revision 13183)
> +++ libavcodec/zmbvenc.c (working copy)
Such workarounds do not belong in individual codec source files.
> @@ -36,6 +36,11 @@
>
> #define ZMBV_BLOCK 16
>
> +#ifdef __FreeBSD__
Wrong. There should be an explicit test for the required function.
It may be missing on other systems as well, and it may (hopefully) be
added in a future FreeBSD version.
> +#define log2(x) (log(x) / M_LN2)
Maybe an inline function would be better. I don't know.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list