aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-03-12 17:52:05 +0100
committerPaul B Mahol <onemda@gmail.com>2022-03-12 18:58:24 +0100
commit0bebff0c18a6fff7900ffaea6342577b6b5533a5 (patch)
tree28ab53340c8fffed5b19b7bc4238db863e776a66
parent4a8b62c29a489b40c848714141b661733f585443 (diff)
downloadffmpeg-0bebff0c18a6fff7900ffaea6342577b6b5533a5.tar.gz
avfilter/af_afftdn: reduce scaling of input samples
It was multiplied too much.
-rw-r--r--libavfilter/af_afftdn.c6
1 files 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;