FFTW is the de facto standard for FFT calculation. I haven't had to use it, but check out this tutorial in the docs: Multi-Dimensional DFTs of Real Data - FFTW 3.3.3