cancel
Showing results for 
Search instead for 
Did you mean: 

2D-FFT rfft and cfft functions

AKhot.1
Senior

I have a 2D array input buffer. so, what is the correct way to implement the rfft and cfft functions?

float fftIn[16][512] is my input. So, I applied for a loop like below:

arm_rfft_fast_init_f32(&fftHandler, 512);

 

for(int d =0; d<16; d++){
arm_rfft_fast_f32(&fftHandler, &fftIn[d], &fftOut[d], 0);
}
Is this the correct way?
Since the fftout will be complex no. I have taken cfft along the column(by rearranging the 2d array in certain way) like below:
Here input is like fft2In[256][32]
for(int e = 0; e<256; e++){
arm_cfft_f32(&arm_cfft_sR_f32_len16, &fft2In[e], 0, 0);
}
Again is the correct way to implement? I am getting some output but I don't have a way to verify the result as of now.
Please help me with this?
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
AKhot.1
Senior

For those of you who might need help with 2D FFT, this is the correct approach.

View solution in original post

3 REPLIES 3
AKhot.1
Senior

Can anyone explain this?

Bob S
Principal

No help directly, but the first (or second) rule of algorithm development and testing is to have a known input data and the expected output, preferably multiple sets of inputs and outputs.  Without that you are just wasting your time.

AKhot.1
Senior

For those of you who might need help with 2D FFT, this is the correct approach.