stv014
Headphoneus Supremus
- Joined
- Jul 17, 2011
- Posts
- 3,493
- Likes
- 273
Quote:
One easy way to improve performance would be to replace my FFT code with the Ooura FFT library, which is also used in SoX, for example. It is about 1.5 times faster. Also, in the resample utility (which is currently about 1.8 times slower than the sox "rate" effect at similar settings), there are some possible changes for additional speedup: the FIR lowpass filter for integer power of two resample ratios could take advantage of the fact that there are zero samples in the input (upsample), or samples of the output will be discarded (downsample). Additionally, the interpolation could use a pre-calculated lookup table for simple rational resample ratios, rather than calculating the sinc function and window directly, as long as the memory requirement of the table is reasonably small.
Very nice work stv014. Have you considered using valarrays? IME they are faster and have certain arithmetic features that make them more appealing than vectors in certain situations. It's much easier to dynamically grow vectors though.
One easy way to improve performance would be to replace my FFT code with the Ooura FFT library, which is also used in SoX, for example. It is about 1.5 times faster. Also, in the resample utility (which is currently about 1.8 times slower than the sox "rate" effect at similar settings), there are some possible changes for additional speedup: the FIR lowpass filter for integer power of two resample ratios could take advantage of the fact that there are zero samples in the input (upsample), or samples of the output will be discarded (downsample). Additionally, the interpolation could use a pre-calculated lookup table for simple rational resample ratios, rather than calculating the sinc function and window directly, as long as the memory requirement of the table is reasonably small.