我一直在花时间理解和实现我自己的混合基数抽取时间快速傅立叶变换。我主要使用 Kiss_fft 和http://www.briangough.com/fftalgorithms.pdf来了解正在发生的事情。
根据我的阅读,我可以通过使用共轭旋转因子来反转 fft。
然而,当我阅读 Kiss_fft 源代码时,radix-4 实现实际上测试了我们是在进行正向变换还是逆变换,并且使用了稍微不同的数学。
https://github.com/itdaniher/kissfft/blob/master/kiss_fft.c#L77
if(st->inverse) {
Fout[m].r = scratch[5].r - scratch[4].i;
Fout[m].i = scratch[5].i + scratch[4].r;
Fout[m3].r = scratch[5].r + scratch[4].i;
Fout[m3].i = scratch[5].i - scratch[4].r;
}else{
Fout[m].r = scratch[5].r + scratch[4].i;
Fout[m].i = scratch[5].i - scratch[4].r;
Fout[m3].r = scratch[5].r - scratch[4].i;
Fout[m3].i = scratch[5].i + scratch[4].r;
}
我认为前向和反向 fft 使用的 fft 计算是相同的(就像 Kiss_fft 的 radix-2、3 和 5 实现一样)。
为什么kiss_fft radix-4计算需要做这个?