History

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.

Lynne committed 2 years ago

Commit 89a90421 parent 0534d2a1 file · +1 −1Browse files

Unified · Split

libavcodec/avfft.c+1−1
@@ -158,7 +158,7 @@ RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans) · 157 unmodified lines
158158 return NULL;
159159 }
160160
161− s->stride = (trans == DFT_C2R) ? sizeof(float) : sizeof(AVComplexFloat);
161+ s->stride = (trans == DFT_C2R) ? sizeof(AVComplexFloat) : sizeof(float);
162162 s->len = 1 << nbits;
163163 s->inv = trans == IDFT_C2R;
164164

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t