[FFmpeg-cvslog] avfilter/af_afftdn: reduce scaling of input samples

Paul B Mahol git at videolan.org
Sat Mar 12 19:57:15 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Mar 12 17:52:05 2022 +0100| [0bebff0c18a6fff7900ffaea6342577b6b5533a5] | committer: Paul B Mahol

avfilter/af_afftdn: reduce scaling of input samples

It was multiplied too much.

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

 libavfilter/af_afftdn.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c
index 79c29cdde5..04739ee4c2 100644
--- a/libavfilter/af_afftdn.c
+++ b/libavfilter/af_afftdn.c
@@ -881,7 +881,7 @@ static void sample_noise_block(AudioFFTDeNoiseContext *s,
     int edge, j, k, n, edgemax;
 
     for (int i = 0; i < s->window_length; i++) {
-        dnch->fft_in[i].re = s->window[i] * src[i] * (1LL << 24);
+        dnch->fft_in[i].re = s->window[i] * src[i] * (1LL << 23);
         dnch->fft_in[i].im = 0.0;
     }
 
@@ -1031,7 +1031,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job
         }
 
         for (int m = 0; m < s->window_length; m++) {
-            dnch->fft_in[m].re = s->window[m] * src[m] * (1LL << 24);
+            dnch->fft_in[m].re = s->window[m] * src[m] * (1LL << 23);
             dnch->fft_in[m].im = 0;
         }
 
@@ -1050,7 +1050,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job
         dnch->itx_fn(dnch->ifft, dnch->fft_in, dnch->fft_out, sizeof(float));
 
         for (int m = 0; m < s->window_length; m++)
-            dst[m] += s->window[m] * dnch->fft_in[m].re / (1LL << 24);
+            dst[m] += s->window[m] * dnch->fft_in[m].re / (1LL << 23);
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list