1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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.
This commit is contained in:
Lynne 2024-04-06 07:30:07 +02:00
parent 0534d2ac84
commit 89a9042291
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464

View File

@ -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;