lavfi/nlmeans: make compute_safe_ssd_integral_image_c faster
authorClément Bœsch <u@pkh.me>
Sun, 6 May 2018 10:34:54 +0000 (12:34 +0200)
committerClément Bœsch <u@pkh.me>
Tue, 8 May 2018 08:28:06 +0000 (10:28 +0200)
commit43d16aef6395340c248ee79d35f60f9965427a45
treec844c123134ec0e83d695ce4e8e4e7998a8051c6
parentf679711c1b516786a39f9e582622a200502fff74
lavfi/nlmeans: make compute_safe_ssd_integral_image_c faster

before:  ssd_integral_image_c: 49204.6
after:   ssd_integral_image_c: 44272.8

Unrolling by 4 made the biggest difference on odroid-c2 (aarch64);
unrolling by 2 or 8 both raised 46k cycles vs 44k for 4.

Additionally, this is a much better reference when writing SIMD (SIMD
vectorization will just target 16 instead of 4).
libavfilter/vf_nlmeans.c