ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Tue Feb 22 16:40:46 
2022 +0100| [72136b7a9fb0ef0babfb50cbed6879c5bd5a1f27] | committer: Paul B Mahol

avfilter/af_loudnorm: remove hard clipping of samples

It can cause unpleasant artifacts.

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

 libavfilter/af_loudnorm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libavfilter/af_loudnorm.c b/libavfilter/af_loudnorm.c
index 7c8ac3a39d..9bb0c65bb7 100644
--- a/libavfilter/af_loudnorm.c
+++ b/libavfilter/af_loudnorm.c
@@ -394,12 +394,8 @@ static void true_peak_limiter(LoudNormContext *s, double 
*out, int nb_samples, i
     } while (smp_cnt < nb_samples);
 
     for (n = 0; n < nb_samples; n++) {
-        for (c = 0; c < channels; c++) {
+        for (c = 0; c < channels; c++)
             out[c] = buf[index + c];
-            if (fabs(out[c]) > ceiling) {
-                out[c] = ceiling * (out[c] < 0 ? -1 : 1);
-            }
-        }
         out += channels;
         index += channels;
         if (index >= s->limiter_buf_size)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to