[hpsdr] DttSP ovsv.c possible optimization?

Philip Covington p.covington at gmail.com
Mon Aug 13 05:57:25 PDT 2007


Frank, Bob,

In DttSP ovsv.c, the output of the ifft is normalized over each block.
 The scaling factor is computed as scale = 1.0/(real) fftlen.

I am thinking that it should be possible to pre-scale the filter
coefficients by the same factor (1.0/(real)fftlen).  Since the filter
is only re-calculated on a filter change and not on a block by block
basis, this would avoid fftlen (blocksize real + blocksize imag)
multiplications per block.

So instead of

...
 /* scale */
  for (i = 0; i < n; i++)
    zovec[i].re *= scl, zovec[i].im *= scl;
...

in the function filter_OvSv(...)

you would apply the same scl factor (1.0/(real)fftlen) to the filter
calculated in

newFiltOvSv(...)

since the fast convolution is a linear operation.

At least it saves some non-trivial multiplications per bock...

73 Phil N8VB



More information about the Hpsdr mailing list