diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-01-17 17:43:54 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-01-17 17:46:58 +0100 |
commit | 11b02fc675bc2a4b98001c0f64fbcd45758077d9 (patch) | |
tree | 16de0e1bafafd64923d8a2eb133eb8717ed17f13 | |
parent | 180a7d2d6c0cdc7d5d84195d318e1aef5233dc62 (diff) | |
download | ffmpeg-11b02fc675bc2a4b98001c0f64fbcd45758077d9.tar.gz |
avfilter/af_arnndn: unbreak filtering
-rw-r--r-- | libavfilter/af_arnndn.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c index 1325f3d6d7..634f3b972f 100644 --- a/libavfilter/af_arnndn.c +++ b/libavfilter/af_arnndn.c @@ -373,14 +373,15 @@ static int config_input(AVFilterLink *inlink) for (int i = 0; i < s->channels; i++) { DenoiseState *st = &s->st[i]; + float scale = 1.f; if (!st->tx) - ret = av_tx_init(&st->tx, &st->tx_fn, AV_TX_FLOAT_FFT, 0, WINDOW_SIZE, NULL, 0); + ret = av_tx_init(&st->tx, &st->tx_fn, AV_TX_FLOAT_FFT, 0, WINDOW_SIZE, &scale, 0); if (ret < 0) return ret; if (!st->txi) - ret = av_tx_init(&st->txi, &st->txi_fn, AV_TX_FLOAT_FFT, 1, WINDOW_SIZE, NULL, 0); + ret = av_tx_init(&st->txi, &st->txi_fn, AV_TX_FLOAT_FFT, 1, WINDOW_SIZE, &scale, 0); if (ret < 0) return ret; } @@ -416,7 +417,7 @@ static void forward_transform(DenoiseState *st, AVComplexFloat *out, const float x[i].im = 0; } - st->tx_fn(st->tx, y, x, sizeof(float)); + st->tx_fn(st->tx, y, x, sizeof(AVComplexFloat)); RNN_COPY(out, y, FREQ_SIZE); } @@ -433,7 +434,7 @@ static void inverse_transform(DenoiseState *st, float *out, const AVComplexFloat x[i].im = -x[WINDOW_SIZE - i].im; } - st->txi_fn(st->txi, y, x, sizeof(float)); + st->txi_fn(st->txi, y, x, sizeof(AVComplexFloat)); for (int i = 0; i < WINDOW_SIZE; i++) out[i] = y[i].re / WINDOW_SIZE; |