ffmpeg/libswscale
Sebastian Pop c3a17ffff6 swscale/aarch64: use multiply accumulate and shift-right narrow
This patch rewrites the innermost loop of ff_yuv2planeX_8_neon to avoid zips and
horizontal adds by using fused multiply adds. The patch also uses ld1r to load
one element and replicate it across all lanes of the vector. The patch also
improves the clipping code by removing the shift right instructions and
performing the shift with the shift-right narrow instructions.

I see 8% difference on an m6g instance with neoverse-n1 CPUs:
$ ffmpeg -nostats -f lavfi -i testsrc2=4k:d=2 -vf bench=start,scale=1024x1024,bench=stop -f null -
before: t:0.014015 avg:0.014096 max:0.015018 min:0.013971
after:  t:0.012985 avg:0.013013 max:0.013996 min:0.012818

Tested with `make check` on aarch64-linux.

Signed-off-by: Sebastian Pop <spop@amazon.com>
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-04 20:59:31 +01:00
..
aarch64 swscale/aarch64: use multiply accumulate and shift-right narrow 2020-01-04 20:59:31 +01:00
arm
ppc swscale: Fix AltiVec/VSX build with recent GCC 2019-10-04 08:58:17 +03:00
tests
x86 swscale/x86/swscale: Fix undefined left shifts of negative numbers 2019-09-28 17:24:32 +02:00
Makefile
alphablend.c
bayer_template.c
gamma.c
hscale.c
hscale_fast_bilinear.c
input.c
libswscale.v
log2_tab.c
options.c
output.c swscale/output: Avoid 64bit in Alpha in yuv2ya16_X_c_template() 2019-10-16 19:17:57 +02:00
rgb2rgb.c
rgb2rgb.h
rgb2rgb_template.c
slice.c
swscale.c swscale/swscale: cosmetics 2019-09-27 10:58:30 +02:00
swscale.h
swscale_internal.h
swscale_unscaled.c swscale/swscale_unscaled: add AV_PIX_FMT_GBRAP10 for LE and BE conversion wrapper 2019-12-10 16:09:14 +01:00
swscaleres.rc
utils.c swscale/utils: remove access of AV_PIX_FMT_NB 2019-12-31 12:37:47 +01:00
version.h
vscale.c
yuv2rgb.c