Forums

fftw_plan_dft_1d V.S. fftw_plan_dft_r2c_1d

Started by Merrr March 6, 2007
hi,

I'm using FFTW library for a Convolution Reverb application. Right now I'm
using the fftw_plan_dft_1d function to plan my dfts. Later on I tried using
the fftw_plan_dft_r2c_1d. I was expecting to get the same result, but the
results are different. Is my expectation wrong? Or do I have to overlook
my code?
These are the lines I use for the planning part
 
p1 = fftw_plan_dft_1d(BLOCK_SIZE * 2, inblock2, ir1+viOffset,
FFTW_FORWARD, FFTW_ESTIMATE);
p2 = fftw_plan_dft_r2c_1d(BLOCK_SIZE * 2, *inblock1, ir2+viOffset, 
FFTW_ESTIMATE);

Merlijn


On Mar 6, 9:20 am, "Merrr" <merlijn_de_r...@hotmail.com> wrote:
> hi, > > I'm using FFTW library for a Convolution Reverb application. Right now I'm > using the fftw_plan_dft_1d function to plan my dfts. Later on I tried using > the fftw_plan_dft_r2c_1d. I was expecting to get the same result, but the > results are different. Is my expectation wrong? Or do I have to overlook > my code? > These are the lines I use for the planning part > > p1 = fftw_plan_dft_1d(BLOCK_SIZE * 2, inblock2, ir1+viOffset, > FFTW_FORWARD, FFTW_ESTIMATE); > p2 = fftw_plan_dft_r2c_1d(BLOCK_SIZE * 2, *inblock1, ir2+viOffset, > FFTW_ESTIMATE); > > Merlijn
How did you define inblock1? If inblock1 is already a (double *) then you should use "inblock1" instead of "*inblock1". Hopefully it's that simple :) For reference, here are the two function prototypes: fftw_plan fftw_plan_dft_1d(int n, fftw_complex *in, fftw_complex *out, int sign, unsigned flags); fftw_plan fftw_plan_dft_r2c_1d(int n, double *in, fftw_complex *out, unsigned flags);