How to use cuFFT to do a up sampling?

Hi all,

I am currently trying to use cuFFT lib to do a up sampling process, the process is like:

  1. do a FFT to get a fft result say: 1111111111
  2. then put them in a bigger array : 000000000011111111110000000000
  3. then do a iFFT to get a up sampled result.

But it looks like cuFFT handles data differently I can’t get the results I needed, I am suspecting that in the case of cuFFT, I should not put data in the bigger array like I did in the 2 step, do you guys have any idea how should I handle the data in the second step?

Thanks!

With most FFT routines the lower frequencies will be in the corners not at the center. So when you stick your date into a larger array, you also want to put it at the corners and pad the zeros into the middle.

i.e if your ft is

xxxx

xxxx

xxxx

xxxx

pad to

xxooooxx

xxooooxx

oooooooo

oooooooo

oooooooo

oooooooo

xxooooxx

xxooooxx

then invert to get 2x upsampled.

NB: might not be correct, worked for me though :)