On Fri, Feb 01, 2019 at 10:45:24AM +0800, Jun Zhao wrote: > Remove the pdiff_lut_scale in nlmeans and increase weight_lut table size > from 2^9 to 800000, this change will avoid using pdiff_lut_scale in > nlmeans_slice() for weight_lut table search, it's will improve the > performance 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
Nice. I assume this is tested on x86_64? > > Reviewed-by: Carl Eugen Hoyos <ceffm...@gmail.com> > Signed-off-by: Jun Zhao <mypopy...@gmail.com> > --- > libavfilter/vf_nlmeans.c | 12 ++++-------- > 1 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c > index 82e779c..72eb819 100644 > --- a/libavfilter/vf_nlmeans.c > +++ b/libavfilter/vf_nlmeans.c > @@ -43,8 +43,7 @@ struct weighted_avg { > float sum; > }; > > -#define WEIGHT_LUT_NBITS 9 > -#define WEIGHT_LUT_SIZE (1<<WEIGHT_LUT_NBITS) > +#define WEIGHT_LUT_SIZE (800000) // need to > 300 * 300 * log(255) So the LUT is now 3.2MB? Why 300? 300*300*log(255) is closer to 500 000 than 800 000 [...] -- Clément B.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel