Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-01-09 23:00:16 +0300
committerPaul B Mahol <onemda@gmail.com>2019-01-09 23:16:34 +0300
commited3b64402ef770097f81e4f1e17f1fca253159aa (patch)
tree46b2336218abc2fa9a86fd5f4d2df887238da664 /libavfilter/af_anlmdn.c
parent8a1fc95840cb8770e34659803060c00b5b3e733b (diff)
avfilter/af_anlmdn: ignore too small values
Diffstat (limited to 'libavfilter/af_anlmdn.c')
-rw-r--r--libavfilter/af_anlmdn.c5
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;
}