[Speex-dev] question about spx_fft

William Zhang espzzh at gmail.com
Tue Apr 17 00:25:09 PDT 2007


Thanks for the explaination.   Please see my questions and comment in lines.


On 4/16/07, Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> wrote:
> (keeping this on the list)
>
> William Zhang wrote:
> > I read the mdf.c an my understanding is that N is actually window size
for
> > the FFT. The actual length L = N/2 which is the frame length.  The
> > second part of the buffer is padded with the new frame data.  So this is
> > like the overlap-save method for improving the acuracy in calculating
> > the fft of
> > long sequence of data?
>
> The reason for the zero padding is that it's the only way to compute the
> convolution correctly in the frequency domain (that is, without circular
> convolution effects).
>
> > My hardware logic can perform N real point FFT real fast and it produce
> > N complex fft results
>
> If that's the case, then you can still benefit by converting the N-point
> real FFT into an N/2 point complex FFT and an update pass.
This is what the kiss_fftr function does, right?

> > RIRIRI...RI. How does it map to your N/2 complex
> > output especially
> > the first R and last R in your sequecne?
>
> The packing is actually R(0), R(1), I(1), R(2), I(2), ... R(N/2)

> Because the input is real, it means that I(0) and R(N/2) are equal to
                                                       I think you mean
I(R/2), correct?
> zero (so we don't need to include them). Also, everything above N/2 is
> the complex conjugate of what's below so it's uninteresting as well.
>
>
> > And do you think the hardware
> > approach will fit in
> > your AEC module?
>
> Sure, use the right ordering (and be careful with scaling!) and it'll
work.

In the FIX_POINT version of the spx_fft function, where is the actual code
that do
the forward FFT normaliaztion by 1/N? I saw the code first maxmize the input
before the FFT and renormalize it back afterwards. Isn't this making the
signal bigger
and easy to overflow? If I am not mistaking, the input to the kiss_fft is
the 2's complement
value.

I use the Xilinx Logicore FFT IP which also supports the 16bit fixed point
FFT and it
has some internal scaling for each stage. Do I need to match the same
scaling of 1/N
in the software code?

>        Jean-Marc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070417/b9df09a5/attachment.html


More information about the Speex-dev mailing list