[FFmpeg-devel] [PATCH] Move libm replacements to new header libm.h

Måns Rullgård mans
Fri Mar 12 18:44:15 CET 2010


V?ctor Paesa <victorpaesa at googlemail.com> writes:

> Hi,
>
> On Fri, Mar 12, 2010 at 3:07 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
>> 2010/3/9 M?ns Rullg?rd <mans at mansr.com>:
>>> Michael Kostylev <michael.kostylev at gmail.com> writes:
>>>
>>>> On Tue Mar ?9 13:12:41 2010
>>>> M?ns Rullg?rd wrote:
>>>>
>>>>>>> ffmpeg.c uses lrintf(), which is missing on some systems.
>>>>>>
>>>>>> On which ones? Djgpp is almost dead, so I'd prefer to fix it locally.
>>>>>> Dietlibc? It is much more incomplete and no one cares.
>>>>>
>>>>> The DOS builds are failing because of this. We added these hacks to
>>>>> work around deficiencies like this.
>>>>
>>>> I remember.
>>>>
>>>>> ?Are you suggesting we drop them?
>>>>
>>>> More precisely, *lrint*(), round*() and truncf().
>>>
>>> Do we want to drop support for these systems? ?Will they be fixed
>>> upstream? ?If the answers to both of those questions are "no", we need
>>> to keep the workarounds.
>>
>> On a cygwin 1.7 config.h I get:
>> #define HAVE_LLRINT 1
>> #define HAVE_LRINT 1
>> #define HAVE_LRINTF 1
>> #define HAVE_ROUND 1
>> #define HAVE_ROUNDF 1
>> #define HAVE_TRUNCF 1
>>
>> On a cygwin 1.5 config.h I get:
>> #define HAVE_LLRINT 0
>> #define HAVE_LRINT 1
>> #define HAVE_LRINTF 1
>> #define HAVE_ROUND 1
>> #define HAVE_ROUNDF 1
>> #define HAVE_TRUNCF 1
>
> Cygwin 1.7 is considered stable by now, and 1.5 is obsolete,
> hence I'd love to have these work-arounds dropped.
> I will update the docs at http://www.ffmpeg.org/general.html#SEC19
> to favour 1.7 usage.

If the system you are building on has the functions, no workarounds
will be enabled.  That's the beauty of proper tests vs ugly, hard
ifdefs.

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



More information about the ffmpeg-devel mailing list