diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-01-09 21:00:16 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-01-09 21:16:34 +0100 |
commit | ed3b64402ef770097f81e4f1e17f1fca253159aa (patch) | |
tree | 46b2336218abc2fa9a86fd5f4d2df887238da664 /libavfilter | |
parent | 8a1fc95840cb8770e34659803060c00b5b3e733b (diff) | |
download | ffmpeg-ed3b64402ef770097f81e4f1e17f1fca253159aa.tar.gz |
avfilter/af_anlmdn: ignore too small values
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_anlmdn.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/af_anlmdn.c b/libavfilter/af_anlmdn.c index 62931e37cc..a6422c1748 100644 --- a/libavfilter/af_anlmdn.c +++ b/libavfilter/af_anlmdn.c @@ -168,7 +168,10 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) float w; av_assert0(distance >= 0.f); - w = expf(-distance * sw); + w = -distance * sw; + if (w < -11.f) + continue; + w = expf(w); P += w * f[i - S + j + (j >= S)]; Q += w; } |