I still wonder how that would compare to something like 2x oversampled cubic hermite though. That can be done really efficiently, and should give pretty good results.
Is there an implementation of such a resampler in existence that you know of? Never heard/seen one and would like to learn how it works.
I prototyped it quickly in matlab a while ago for the 48k to 44.1k case:
function out = over2x(in)
in2x=upsample(in,2);
f = [0 17/96 33/96 1]; a = [1 1 0 0 ];
b = firls(7,f,a);
upsampled=filter(b, [1; zeros(length(b),1)], in2x);
out = herm(upsampled, 2*48000/44100 );
function outbuf = herm(inptr, delta)
insamps=length(inptr);
pos=4;
phases=pos;
outsamps=0;
c=0;
while (pos < insamps)
c=c+1;
x3 = inptr(pos-3);
x2 = inptr(pos-2);
x1 = inptr(pos-1);
x0 = inptr(pos);
frac = phases -floor(phases);
%/* 4-tap Hermite, using Farrow structure */
acc0 = (3 * (x2 - x1) + x0 - x3) / 2;
acc0 = (acc0 * frac);
acc0 = acc0 + 2 * x1 + x3 - ((5 * x2 + x0) / 2);
acc0 = (acc0 * frac);
acc0 = acc0 + (x1 - x3) / 2;
acc0 = (acc0 * frac);
acc0 = acc0 + x2;
phases = phases +delta;
pos = floor(phases);
outsamps = outsamps+1;
outbuf(outsamps) = acc0;
end
Its a little ugly, but its basically ported straight over from some c code I found online for the hermite polynomial. Basically, my ideas was that you could FIR oversample by 2x which would both eliminate ultrasonic noise and reduce the error in the polynomial fit. Since hermite polynomials are simple, and on armv5e and higher you can do an FIR tap in 2.5 cycles (ignoring memory latency anyway), the overall computational load is pretty low. I did some quick testing and it indeed worked pretty well, much better then linear or conventional hermite. Then I found the speex code, and spent a while looking into it and haven't had time to come back to this.