[FFmpeg-cvslog] avfilter/af_anlmdn: ignore too small values

Paul B Mahol git at videolan.org
Wed Jan 9 22:20:00 EET 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Jan  9 21:00:16 2019 +0100| [ed3b64402ef770097f81e4f1e17f1fca253159aa] | committer: Paul B Mahol

avfilter/af_anlmdn: ignore too small values

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

 libavfilter/af_anlmdn.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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



More information about the ffmpeg-cvslog mailing list