[FFmpeg-devel] [PATCH] avfilter, swresample, swscale: use fabs, fabsf instead of FFABS

Hendrik Leppkes h.leppkes at gmail.com
Thu Oct 15 12:50:50 CEST 2015


On Thu, Oct 15, 2015 at 12:41 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> On Thu, Oct 15, 2015 at 6:37 AM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>> On Thu, Oct 15, 2015 at 12:34 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
>>> On Wed, Oct 14, 2015 at 6:50 AM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>>>> On Wed, Oct 14, 2015 at 12:37 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
>>>>> On Wed, Oct 14, 2015 at 5:01 AM, Matt Oliver <protogonoi at gmail.com> wrote:
>>>>>> On 14 October 2015 at 09:46, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
>>>>>>
>>>>>>> On Tue, Oct 13, 2015 at 9:12 AM, Ganesh Ajjanagadde <gajjanag at mit.edu>
>>>>>>> wrote:
>>>>>>> > On Tue, Oct 13, 2015 at 4:02 AM, Clément Bœsch <u at pkh.me> wrote:
>>>>>>> >> On Tue, Oct 13, 2015 at 09:25:03AM +0200, Paul B Mahol wrote:
>>>>>>> >> [...]
>>>>>>> >>> What about fmax/FFMAX?
>>>>>>> >>
>>>>>>> >> Feel free to try that out (it looks OT regarding the patch), but fmax()
>>>>>>> >> looks glibc specific
>>>>>>>
>>>>>>> Seems they are actually ISO:
>>>>>>> http://en.cppreference.com/w/c/numeric/math/fmax
>>>>>>>
>>>>>>> Can someone check availability on all of our platforms of interest
>>>>>>> (e.g Microsoft)?
>>>>>>>
>>>>>>
>>>>>> fmax and fmin are only available on msvc using 2013 or newer. Currently the
>>>>>> only msvc version without fmax/fmin that FFmpeg supports is 2012 which uses
>>>>>> the C99 to C89 converter.
>>>>>
>>>>> And does that converter handle fmin, fmax, fmaxf, etc?
>>>>> Does it need patches?
>>>>> Bottom line: are they safe to use at the moment?
>>>>>
>>>>
>>>> No, they are not.
>>>>
>>>> One thing I don't understand - why are we bothering with something
>>>> that at best comes out as "same speed" from tests performed? (low
>>>> number of runs are irrelevant as they are not statistically
>>>> significant).
>>>
>>> Because if you actually bothered to run my random numbers benchmark
>>> instead of posting with no basis claiming "statistical
>>> insignificance", or for that matter matter bothered to actually check
>>> the libc link, or even looked at Clement's asm test - you would
>>> finally understand.
>>>
>>> Also, what needs to be done to get fmax, fmin, etc into the converter?
>>>
>>
>> The converter doesn't provide any functions, just alters the syntax if
>> needed. Functions not available cannot be fixed that way, sorry.
>
> Thanks for clarifying. I am still confused: how do we have llabs then?
> Per MSDN, this was not present in MSVC 2012, and was added in MSVC
> 2013 (looks like a similar case to fabs, fabsf).
>

Docs appear to be wrong in that particular case. It happens sometimes
that functions are available but didn't get added to the docs.

- Hendrik


More information about the ffmpeg-devel mailing list