2D Complex FFT fails to put result in Output array

2D Complex FFT fails to put result in Output array


2D backwards FFT, passing both input array and output array. both complex. upon return I see that the output array is all zero and the input array has been totally changed. returned status is zero on all calls.

C Code:


static complex Ip [2048][512]; // output of InterPolater
static complex RDop [2048][512]; // 2D FFT Output

long status, len[3];
len[0] = 512;
len[1] = 2048 ;
status = DftiCreateDescriptor( &ifft_handle, DFTI_SINGLE, DFTI_COMPLEX, 2, len);
status = DftiCommitDescriptor( ifft_handle);
status = DftiComputeBackward( ifft_handle, &(Ip[0][0]), &RDop); // 2D IFFT of Ip, result placed in Rdop
status = DftiFreeDescriptor(&ifft_handle);

What do I need to do to get the FFT output in RDop ? [Note: I have tried it both with and without the & on the array arguements. ] [Note also that the Ip array is filled -- no gaps, no stride issues]


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


Default descriptor is in-place. You need to do DftiSetValue(ifft_handle,DFTI_PLACEMENT,DFTI_NOT_INPLACE) before DftiCommitDescriptor.

Also, C/C++ interface assumes row-major ordering, that is len should be initialized in reverse order, as { 2048, 512 }.


Leave a Comment

Please sign in to add a comment. Not a member? Join today