[FFmpeg-cvslog] lavfi/earwax: clip sample, this is what sox does

Paul B Mahol git at videolan.org
Wed Apr 3 12:55:50 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Apr  3 10:52:01 2013 +0000| [0ab10f69efd3ab0e66ec9d611e2d41bdccea83cd] | committer: Paul B Mahol

lavfi/earwax: clip sample, this is what sox does

Fixes #1884.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavfilter/af_earwax.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c
index b1d3d6f..104fb18 100644
--- a/libavfilter/af_earwax.c
+++ b/libavfilter/af_earwax.c
@@ -98,10 +98,10 @@ static inline int16_t *scalarproduct(const int16_t *in, const int16_t *endin, in
     int16_t j;
 
     while (in < endin) {
-        sample = 32;
+        sample = 0;
         for (j = 0; j < NUMTAPS; j++)
             sample += in[j] * filt[j];
-        *out = sample >> 6;
+        *out = av_clip_int16(sample >> 6);
         out++;
         in++;
     }



More information about the ffmpeg-cvslog mailing list