Re: fft/ifft

From: Niels Gorisse (niels@bonneville.nl)
Date: Wed Dec 01 1999 - 21:46:48 EST


Hi,

>to twice Nyquist [pi:2*pi]. If that's not what's being calculated,
>there's a bug in saolc.

Somewhere in fft:
        for (i=0;i!=fftsize/2;i++) {
          set_table_value(re,i,inb[i].re);

set_table_value(im,i,inb[i].im);
        }
while at this point it should be
written out twice in each table.

>I hope fft()/ifft() are at least specified correctly, if not
>implemented correctly in saolc. This is a potentially very
>useful way of doing things, but I had a really hard time getting
>the semantics right.

I had a very hard time understanding the reference fft/ifft too;),
especially the len and size parameters and their mix-up, very confusing
alltogether.

>5.9.10.1 specifically limits size to a power of two. This is

I'm very sorry!, I have accidently printed out an old version of the
'manual', and it wasn't in there yet. Sorry!

>limited in an early draft of the spec) and I don't think it
>works right anyway.

It doesn't indeed because the wrong functions are being called. But I can
throw away the fix now. OK.

>Sorry I misunderstood you. The code looks to me like it's rounding UP to the
>nearest power of 2; this would probably assume the arrays are padded with
>zeros. So perhaps you could USE a non power of 2 array, but the opcode would
>COMPUTE a power of 2 elements. Can somebody tell us if this is right?

It's almost right. The length variable (opcode parameter 'len') is being
rounded to a power of two, if length is zero (and/or not given). It is more
obvious to do this with the size parameter / fftsize variable. But that
doesn't matter because if the size is not given, it is equated to the
length variable, which is rounded to a power of two two lines ago. I can go
on like this for some more lines (I don't, I've been there before).

Thanks,

Niels Gorisse



This archive was generated by hypermail 2b29 : Wed May 10 2000 - 12:15:49 EDT