DSPRelated.com
Forums

Biquad cascade

Started by baeksan July 1, 2008
I was wondering what the most computationally efficient way of implementing
a biquad cascade would be?   I've implemented an alsa application to
generate the filter coefficients and process some audio.  This works great
on my linux machine, but when I put the same code on a less powerful
embedded system, it sounds horrible and takes almost all the cpu.

The linux machine can handle around 20-30 biquads with no problem, but the
embedded system craps out using only 2.  

Is there something I am doing wrong with the cascade? I basically have a
for loop which processes the audio buffer a certain number of times,
depending on how many biquads are used.  Is there some way to process the
audio in parallel to save some processing time?

Thanks in advance


baeksan wrote:

> The linux machine can handle around 20-30 biquads with no problem, but the > embedded system craps out using only 2.
Are you using floating point calculations? If so, does your embedded system have a hardware floating point unit or is it emulating floating point instructions in software? Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "C++ is like jamming a helicopter inside a Miata and expecting some sort of improvement." -- Drew Olbrich
>Are you using floating point calculations? If so, does your embedded >system have a hardware floating point unit or is it emulating floating >point instructions in software?
The hardware is emulating floating point, so I was trying to convert the code to fixed point, but seem to be having some trouble. Is there any information on implementing biquad cascades in fixed point? I tried it and seem to be getting horrible quantization errors. Do you know of any information where I can see a good implementation of a fixed point biquad implementation? Thanks