But regarding the Oversampling, I was talking specifically about this:
Iām not sure what optimisation will do here, but I hardly believe any kind of SIMD will take place, I would say some loop unrolling at most.
But since it is convolution anyways, why not use the dsp::Convolution there and take advantage of the efficiency that frequency domain convolution provides, and on top of that, FloatVectorOperation optimization.
The reason why dsp:Convolution (which is SIMD optimized by the way, see the function ConvolutionEgine::convolutionProcessingAndAccumulate) is not used for FIR Oversampling is because it wouldnāt be as efficient as you think to do so. As a general rule, FFT convolution is supposed to be faster than time-domain convolution when the length of the IR is higher than 64 samples. Otherwise, the FFT operation itself all alone will be slower than the time domain operations.
About the SIMD optimization of Oversampling, Iāll have a look at some point, but I think I did already a good job by taking into account the symmetry and all the properties of 2 times upsampling / downsampling, even if it could be faster using SIMD for say multi channel oversampling. To me, the part that needs to be optimized most of the time is the process being oversampled itself, since the operation multiplies by two / four / eight its original CPU cost.
I think big gains (x2) could be achieved by using the parallel property of the IIR multi-phase filters. Itās two independent filters in parallel outputting interleaved samples, so they can be calculated at the same time using SIMD. The FIR filter could also be done using SIMD and could scale even more than 2-fold as itās parallel by design. This would all apply to single-channel oversampling and by extension also multi-channel.
Of course, the internal processing loop is the most important thing to optimize, but the oversampling itself is also oversampled for higher ratios and the filters are executed many times. For instants, an 8x oversampler filters the signal 6 times through all the stages and the innermost are running at 4x the sample rate. So overall we end up filtering 2*(4+2+1)x = 14x the amount of incoming audio samples.
btw. I had a thought about the -75dB max qualityā¦ would you use an audio interface with 75dB SNR? In my opinion, the same quality demands apply because the oversampling should be transparent to the audio.
Thanks a lot for the elucidation @IvanC.
Iām a heavy user of the Oversampling, and Iām very satisfied with the performance.
Just throwing ideas.
By reading the code I kinda get what you mean.
But just out of curiosity, I couldnāt understand if it is doing some kind of FIR poly-phase decomposition. Does that makes sense?