From 65e61febc8ada48d52f3ade2948e1762332bbe6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Fri, 1 Feb 2019 20:45:52 +0100 Subject: [PATCH] lavfi/nlmeans: simplify log() call --- libavfilter/vf_nlmeans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c index 992dfb1aab..ed868e666f 100644 --- a/libavfilter/vf_nlmeans.c +++ b/libavfilter/vf_nlmeans.c @@ -528,7 +528,7 @@ static av_cold int init(AVFilterContext *ctx) const double h = s->sigma * 10.; s->pdiff_scale = 1. / (h * h); - s->max_meaningful_diff = -log(1/255.) / s->pdiff_scale; + s->max_meaningful_diff = log(255.) / s->pdiff_scale; av_assert0((s->max_meaningful_diff - 1) < FF_ARRAY_ELEMS(s->weight_lut)); for (i = 0; i < WEIGHT_LUT_SIZE; i++) s->weight_lut[i] = exp(-i * s->pdiff_scale);