[FFmpeg-devel] FreeBSD patch - Log2() not available on freebsd

Måns Rullgård mans
Fri May 16 21:33:32 CEST 2008


Brice Leroy <bbrriiccee at gmail.com> writes:

> On May 16, 2008, at 12:24 PM, M?ns Rullg?rd wrote:
>
>> 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.
>
> Hello M?ns,
>
>    I'm sorry, I would not be offensive.

No offence taken.

> It's just that this way it's work fine for me.

I'm sure it does, but it's not fine for us.  You can keep patching
your copy of the code, or you can submit an acceptable patch, and
avoid that trouble in the future.  It's your choice.

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




More information about the ffmpeg-devel mailing list