• Ganesh Ajjanagadde's avatar
    avfilter,swresample,swscale: use fabs, fabsf instead of FFABS · 8507b98c
    Ganesh Ajjanagadde authored
    It is well known that fabs and fabsf are at least as fast and sometimes
    faster than the FFABS macro, at least on the gcc+glibc combination.
    For instance, see the reference:
    http://patchwork.sourceware.org/patch/6735/.
    This was a patch to glibc in order to remove their usages of a macro.
    
    The reason essentially boils down to fabs using the __builtin_fabs of
    the compiler, while FFABS needs to infer to not use a branch and to
    simply change the sign bit. Usually the inference works, but sometimes
    it does not. This may be easily checked by looking at the asm.
    
    This also has the added benefit of reducing macro usage, which has
    problems with side-effects.
    
    Note that avcodec is not handled here, as it is huge and
    most things there are integer arithmetic anyway.
    
    Tested with FATE.
    Reviewed-by: 's avatarClément Bœsch <u@pkh.me>
    Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
    8507b98c
Name
Last commit
Last update
..
aarch64 Loading commit data...
arm Loading commit data...
x86 Loading commit data...
Makefile Loading commit data...
audioconvert.c Loading commit data...
audioconvert.h Loading commit data...
dither.c Loading commit data...
dither_template.c Loading commit data...
libswresample.v Loading commit data...
log2_tab.c Loading commit data...
noise_shaping_data.c Loading commit data...
options.c Loading commit data...
rematrix.c Loading commit data...
rematrix_template.c Loading commit data...
resample.c Loading commit data...
resample.h Loading commit data...
resample_dsp.c Loading commit data...
resample_template.c Loading commit data...
soxr_resample.c Loading commit data...
swresample-test.c Loading commit data...
swresample.c Loading commit data...
swresample.h Loading commit data...
swresample_frame.c Loading commit data...
swresample_internal.h Loading commit data...
swresampleres.rc Loading commit data...
version.h Loading commit data...