1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

lavfi/nlmeans: simplify log() call

This commit is contained in:
Clément Bœsch 2019-02-01 20:45:52 +01:00
parent 6c586303a1
commit 65e61febc8

View File

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