mirror of https://git.ffmpeg.org/ffmpeg.git
8507b98c10
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: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> |
||
---|---|---|
.. | ||
aarch64 | ||
arm | ||
x86 | ||
Makefile | ||
audioconvert.c | ||
audioconvert.h | ||
dither.c | ||
dither_template.c | ||
libswresample.v | ||
log2_tab.c | ||
noise_shaping_data.c | ||
options.c | ||
rematrix.c | ||
rematrix_template.c | ||
resample.c | ||
resample.h | ||
resample_dsp.c | ||
resample_template.c | ||
soxr_resample.c | ||
swresample-test.c | ||
swresample.c | ||
swresample.h | ||
swresample_frame.c | ||
swresample_internal.h | ||
swresampleres.rc | ||
version.h |