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

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Oct 12 13:46:55 CEST 2015


Ganesh Ajjanagadde <gajjanag <at> mit.edu> writes:

> It is well known that fabs and fabsf are at least as fast and usually
> faster than the FFABS macro, at least on the gcc+glibc combination.

I wasn't aware of this.
And I believe we support other compilers and other 
libc implementations.

> For instance, see the reference:
> http://patchwork.sourceware.org/patch/6735/.
> This was a patch to glibc in order to remove their usages. Given their
> general performance obsession (more than FFmpeg in many cases), they
> have ensured that fabs and fabsf never peform worse than FFABS.

Ok but is this really related?

> I have tested on x86-64 Haswell with GCC 5.2 - even with no strict IEEE
> mode enabled, and just the standard -O3 optimizations, there is a
> performance benefit.

This is the only relevant information imo.
Please provide (very, very short) information 
on what you tested.

Since you mention libc so often: Does the patch 
work on win*, aix and other strange platforms?

Carl Eugen



More information about the ffmpeg-devel mailing list