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.
Unified · Split
| @@ -158,7 +158,7 @@ RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans) · 157 unmodified lines | |||
| 158 | return NULL; | 158 | return NULL; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | s->stride = (trans == DFT_C2R) ? sizeof(float) : sizeof(AVComplexFloat); | 161 | s->stride = (trans == DFT_C2R) ? sizeof(AVComplexFloat) : sizeof(float); |
| 162 | s->len = 1 << nbits; | 162 | s->len = 1 << nbits; |
| 163 | s->inv = trans == IDFT_C2R; | 163 | s->inv = trans == IDFT_C2R; |
| 164 | 164 | ||