]> git.sesse.net Git - ffmpeg/commit
lavfi/nlmeans: improve the performance
authorJun Zhao <mypopydev@gmail.com>
Fri, 1 Feb 2019 02:45:24 +0000 (10:45 +0800)
committerClément Bœsch <u@pkh.me>
Fri, 1 Feb 2019 19:58:43 +0000 (20:58 +0100)
commit6c586303a14a7bd72953b29202112a44676bd725
treed62d72ca6325b41455bb47dd1d36886504260035
parented20fbcd48b02597a39ec25676615a9ef4bf3d00
lavfi/nlmeans: improve the performance

Remove the pdiff_lut_scale in nlmeans and increase weight_lut table size
from 2^9 to 500000, this change will avoid using pdiff_lut_scale in
nlmeans_slice() for weight_lut table search, improving the performance
by about 12%. (in 1080P size picture case).

Use the profiling command like:

perf stat -a -d -r 5 ./ffmpeg -i input -an -vf nlmeans=s=30 -vframes 10 \
-f null /dev/null

without this change:
when s=1.0(default value) 63s
     s=30.0               72s

after this change:
     s=1.0(default value) 56s
     s=30.0               63s

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Clément Bœsch <u@pkh.me>
libavfilter/vf_nlmeans.c