[FFmpeg-devel] [PATCH] avcodec/on2avc: use correct fft sizes

Marton Balint cus at passwd.hu
Sun Aug 6 15:42:02 EEST 2023


With the earlier patch this fixes the audio corruption regression caused by
6ba0aa1770ba29eb4126c6a706f6b0cd3809648f.

Fixes ticket #10029.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavcodec/on2avc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c
index 474adb149d..0d0869bc9c 100644
--- a/libavcodec/on2avc.c
+++ b/libavcodec/on2avc.c
@@ -956,13 +956,13 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx)
     if ((ret = av_tx_init(&c->mdct_small, &c->mdct_small_fn, AV_TX_FLOAT_MDCT, 1, 128, &scale, 0)) < 0)
         return ret;
 
-    if ((ret = av_tx_init(&c->fft1024, &c->fft1024_fn, AV_TX_FLOAT_FFT, 1, 1024, NULL, 0)) < 0)
+    if ((ret = av_tx_init(&c->fft1024, &c->fft1024_fn, AV_TX_FLOAT_FFT, 1, 512, NULL, 0)) < 0)
         return ret;
-    if ((ret = av_tx_init(&c->fft512, &c->fft512_fn, AV_TX_FLOAT_FFT, 1, 512, NULL, 0)) < 0)
+    if ((ret = av_tx_init(&c->fft512, &c->fft512_fn, AV_TX_FLOAT_FFT, 1, 256, NULL, 0)) < 0)
         return ret;
-    if ((ret = av_tx_init(&c->fft256, &c->fft256_fn, AV_TX_FLOAT_FFT, 0, 256, NULL, 0)) < 0)
+    if ((ret = av_tx_init(&c->fft256, &c->fft256_fn, AV_TX_FLOAT_FFT, 0, 128, NULL, 0)) < 0)
         return ret;
-    if ((ret = av_tx_init(&c->fft128, &c->fft128_fn, AV_TX_FLOAT_FFT, 0, 128, NULL, 0)) < 0)
+    if ((ret = av_tx_init(&c->fft128, &c->fft128_fn, AV_TX_FLOAT_FFT, 0, 64, NULL, 0)) < 0)
         return ret;
 
     c->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
-- 
2.35.3



More information about the ffmpeg-devel mailing list