Re: [LAD] fftw3 issue with transform higher than 1024

From: Fons Adriaensen <fons@email-addr-hidden>
Date: Mon Jul 27 2009 - 12:37:49 EEST

On Sun, Jul 26, 2009 at 09:15:20PM -0500, Gabriel M. Beddingfield wrote:
 
> On Sat, 25 Jul 2009, Justin Smith wrote:
> >>
> >> I am using the fftw3 library to implement a transform in a array of 5120
> >> elements .
> >> I have this array from a program that I created modifying the arecord
> >> program.
> [snip]
> >
> > I don't know fftw specifically, but I am fairly certain that you need
> > a table size that is an even power of two for fft in general (maybe
> > you can adjust your code to use 4096 or 8192?).
>
> Ditto that.
>
> If your data is 5120 samples... either truncate it to 4096 samples or pad
> it with zeros util you have 8192 samples.

FFTW3 can handle almost any size you want. If the size has
a large prime factor the transform may be significantly
slower, but for something like 5120 = 5 * 2^10 the speed
loss will be quite moderate.

> (The zeros won't affect your transform.)

They do affect it but in many cases not in a way that
matters to your application. Depends on the app.

Ciao,

-- 
FA
Io lo dico sempre: l'Italia è troppo stretta e lunga.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Mon Jul 27 16:15:01 2009

This archive was generated by hypermail 2.1.8 : Mon Jul 27 2009 - 16:15:02 EEST