diff options
author | Lynne <dev@lynne.ee> | 2024-04-06 07:30:07 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-04-10 13:22:18 +0200 |
commit | 89a9042291e2f54be98e54e8e8fa50ee3fe7d1a6 (patch) | |
tree | 4fb31ce11d158a12252e725e44d157c11a7e2756 /libavcodec | |
parent | 0534d2ac8462e39955b83760d3148ccf45a1e310 (diff) | |
download | ffmpeg-89a9042291e2f54be98e54e8e8fa50ee3fe7d1a6.tar.gz |
lavc/avfft: fix RDFT wrapper stride
Per the lavu/tx docs:
> * For forward transforms (R2C), stride must be the spacing between two
> * samples in bytes. For inverse transforms, the stride must be set
> * to the spacing between two complex values in bytes.
The code did the reverse.
The stride parameter is currently not respected for RDFT transforms,
but has to be correct, for a potential future change.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avfft.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c index 627fd7a0be..f6787937f6 100644 --- a/libavcodec/avfft.c +++ b/libavcodec/avfft.c @@ -158,7 +158,7 @@ RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans) return NULL; } - s->stride = (trans == DFT_C2R) ? sizeof(float) : sizeof(AVComplexFloat); + s->stride = (trans == DFT_C2R) ? sizeof(AVComplexFloat) : sizeof(float); s->len = 1 << nbits; s->inv = trans == IDFT_C2R; |