From 0bebff0c18a6fff7900ffaea6342577b6b5533a5 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 12 Mar 2022 17:52:05 +0100 Subject: avfilter/af_afftdn: reduce scaling of input samples It was multiplied too much. --- 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; -- cgit v1.2.3