vDSP: Do the FFT functions include windowing?

陌路散爱 提交于 2020-01-07 06:49:41

问题


I am working on implementing an algorithm using vDSP.

1) take FFT 2) take log of square of absolute value (can be done with lookup table) 3) take another FFT 4) take absolute value

I'm not sure if it is up to me to throw the incoming data through a windowing function before I run the FFT on it.

vDSP_fft_zrip(setupReal, &A, stride, log2n, direction);

that is my FFT function

Do I need to throw the data through vDSP_hamm_window(...) first?


回答1:


The iOS Accelerate library function vDSP_fft_zrip() does not include applying a window function (unless you count the implied rectangular window due to the finite length parameter).

So you need to apply your chosen window function (there are many different ones) first.




回答2:


I don't have any experience with your particular library, but in every other FFT library I know of it's up to you to window the data first. If nothing else, the library can't know what window you wish to use, and sometimes you don't want to use a window (if you're using the FFT for overlap-add filtering, or if you know the signal is exactly periodic in the transform block).

Also, just offhand, it seems like if you're doing 2 FFTs, the overhead of calling a logarithm function is relatively minor.




回答3:


It sounds like you're doing cepstral analysis and yes, you do need a window function prior to the first FFT. I would suggest a simple Hann or Hamming window.



来源:https://stackoverflow.com/questions/4583193/vdsp-do-the-fft-functions-include-windowing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!