1D processing thread

A IIR filter (the kind we are discussing) accumulates the values of all previous samples/pixels, so you need to process them sequentially. The advantage of this is you only need to have 2 samples in memory and only a few operations for each sample processed.

In other words, if you wanted to do this non-sequentially, you would need to hold the whole image in memory and the complexity of processing would increase for each pixel.

You would have to do what I described above

n1 = n1 * 0.9
n2 = n2 * 0.9 + n1 * 0.09
n3 = n3 * 0.9 + n2 * 0.09 + n1 * 0.009
n4 = n4 * 0.9 + n3 * 0.09 + n2 * 0.009 + n1 * 0.0009

For echo, you don’t accumulate results. You are only adding two values together so don’t have to do it sequentially.

Edit: If you add feedback to the echo that is a different story.