# Filter design with 8-tap latency on recursion

I'm curious about the feasibility of designing a noise shaping filter (but might generalise to any recursive filter) with the constraint that the most recent output samples aren't available for several iterations of the filter.

The use case I have in mind is reducing the word length of an audio stream sampled at 48kHz, and the filter would try to keep most of the quantisation noise out of the 200Hz-8kHz band (where human hearing is more sensitive); but with the additional constraint that the most recent seven outputs are not available to the filter.

I'm applying this constraint so that the output can be produced several samples at a time using a mixture of SIMD and instruction-level parallelism -- working with a notional four-lane SIMD and two-fold unrolling.

There's a lot of work for each sample which could be performed in parallel (scaling, quantisation, dither) if not for the recursive factor. Normally one might hope to use SIMD for the multiply-accumulate of the coefficients, but that's not a great proportion of the work if the filter has only a handful of taps.

So I'm wondering if it's actually possible to design a filter that doesn't get in the way, here, but is still effective for its intended purpose.

Stereo would obviously offer an opportunity to halve the delay, but avoiding that assumption is preferable, as it makes mono a failure case and multi-channel becomes complicated.

• For the general case it is quite feasible/simple. However, for the noise-shaping case it is most likely more tricky. Just to get things clear: you are trying to reduce the wordlength of a signal and would like to shape the quantization noise such that it to a lesser part fall within a given range? – Oscar Apr 9 '14 at 7:00
• Yes, I am doing exactly what you say. When you say that the general case is simple, do you mean a FIR instead of an IIR, or is there a technique in IIR design that can explicitly handle early output taps being zeroed? – sh1 Apr 9 '14 at 17:28
• Why not find some filter structures that solve the noise shaping problem before imposing implementation details like SIMD. Once you have some filter structures, manipulate the structures so you retain the desired magnitude response but with a structure that can take advantage of your implementation goals. – user2718 Apr 9 '14 at 18:44
• @BZ, certainly there are a handful of well-known filters that I can borrow from; but I haven't had much luck idly poking at them and thought I should take a more structured approach. I'm also thinking about writing some code to search randomly until it finds something useful. – sh1 Apr 9 '14 at 19:36
• It is simple in the sense that you can apply some type of lookahead pipelining to insert zero values at will (basically you multiply both the numerator and denominator with identical polynomials, select coefficient values of the new polynomials such that you zero some coefficients, and cross your fingers/think a bit that they end up inside the unit circle). Which types of noise-shaping structures are you looking at? – Oscar Apr 9 '14 at 21:26

This is tricky. Any filter with 8 tab latency between coefficients can be represented in the z-domain as a rational function in $z^{-8}$ . That's basically the same as saying the impulse response has 7 zeros between each non zero tap. Any filter with this property is periodic in the frequency domain. You can pick any transfer function from -pi/8 to pi/8 but the regions from pi/8 to 3*pi/8,etc. will just be repetitions of that.
• sh, i think i understand exactly what you're looking for (and, unfortunately, no answer from me is forthcoming). even if the feedback filter is FIR, the whole transfer function is IIR because of the feedback. it might be an all-pole filter. and, similar to existing noise-shaping algs, which must have a $z^{-1}$ factor in the feedback (so all feedback terms have powers of $z^{-1}$ at least as large as 1), and in your case there is a $z^{-8}$ factor in cascade with the feedback FIR, so all feedback terms of $z^{-1}$ have powers of 8 or more. lemme think about this one. rots o' ruck. – robert bristow-johnson May 9 '14 at 22:11