Multi-stage oversampling and tuning of associated high order filters

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Music Engineer wrote:what's the point of turning a linear phase FIR into a minimum phase FIR? i
Yes, I've used elliptical filters for this in the past. They can be very efficient using TDF2, which at the time ran about twice as fast as DF1, and then normalising the feed forward coeffecients remove 2 multiplies per biquad stage again almost doubling processing speed.

However FIR can take full advantage of zero padding optimisations and lends itself nicley to SSE optimisation. Doesn't need to be done in stages for efficiency, unlike IIR. I'd be surprised if the IIR could outperform FIR for upsampling once the ratio is above x2, but when I get round to it I'll have to test that

Post

mystran > the reason why I designed for JUCE the class dsp::Oversampling with multi-stage 2 times oversampling for FIR designs is because I saw the proof (chap IX) in the book "Multirate filtering for digital signal processing" by Ljiljana Milic (which is great by the way) that for given specs, multi-stage half band filtering needs less multiplications than polyphase implementation of the equivalent L-band FIR filter. So lazy yourself and throw away your own code as well :lol: :hihi: Seriously, it just sounds logical than cascaded polyphase implementation of half-band filters is more efficient than polyphase implementation of any single L-band filter ?
While the up-sampling images from zero-stuffing are typically higher amplitude than the partials from band-width expansion that need to be removed to prevent aliasing, in practice the latter tends to cause more (audible) problems, so it actually ends up making sense to use roughly the same filter in both directions (plus you save the trouble of having to keep two filters around).
That's a valid point for not using less quality for upsampling and downsampling filters. I'm asking again because I have designed the half band filter coefficients generator functions in the DSP module as well to be able to experiment with bandwidth + attenuation options and see what's better there.
you won't beat the latency either with multi-stages, since your first 2x filter already needs as much latency as the whole polyphase for the same quality, which means that any latency from later passes just adds more on top of what you actually need
Well since the same specs can be obtained with a given L-band filter and a given multi-stage approach with several half-band filters, needing less multiplications for the processing that what is necessary with the L-band filter, that means that getting a lower latency as well is totally possible with the multi-stage approach for 4/8 times oversampling (but I won't say I'm sure at 100% until I write the proofs myself). But I would guess a yes, and that's what happens with the examples of the book I quoted before.

Anyway, the purpose of my class was to provide standard 2/4/8/16/32 times oversampling (not anything else, where cascaded 2 times stages are not meaningful), and I was wondering here what is the smartest way to set the filter design functions options for every stage :)
This is effectively semantics, for most, but zero stuffing introduces no artifacts. It simply changes the sample rate—no change in the the spectrum. But that means that some of the aliased (mirrored) parts of the spectrum now reside below the Nyquist frequency (half the sample rate). They didn't move, the Nyquist frequency moved. The filtering is about removing that stuff before moving on (say, with non-linear processing). It was always there—no new artifacts—you just didn't care about it before because your DAC would remove it when you played the audio.
You are right, and I'll change the way I talk about the mirrored parts of the structure in the future ;)

Post

Ivan_C wrote: Anyway, the purpose of my class was to provide standard 2/4/8/16/32 times oversampling (not anything else, where cascaded 2 times stages are not meaningful), and I was wondering here what is the smartest way to set the filter design functions options for every stage :)
I was a bit "moody" when I wrote the original reply, but in my experience the number of multiply-adds on it's own is not a very good predictor of anything at all on your average modern desktop platform, since the multiply-adds themselves are practically free.

The answer you should probably be asking is whether you can reduce your cache impact by using multiple stages.

Post Reply

Return to “DSP and Plugin Development”