[FFmpeg-cvslog] lavfi/nlmeans: simplify log() call

Clément Bœsch git at videolan.org
Fri Feb 1 21:59:24 EET 2019


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Fri Feb  1 20:45:52 2019 +0100| [65e61febc8ada48d52f3ade2948e1762332bbe6a] | committer: Clément Bœsch

lavfi/nlmeans: simplify log() call

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=65e61febc8ada48d52f3ade2948e1762332bbe6a
---

 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);



More information about the ffmpeg-cvslog mailing list