kfr
kfr copied to clipboard
Fix bug: incorrect result of real dft when input size != 4N
The implementation of real DFT has bug: when input size is even but not equal to 4N, the result is incorrect. This is due to:
- incorrect calculation of twiddle factors
- to_fmt/from_fmt also needs special process according to csize is even/odd
An new unit test has also been added showing this bug.