[Speex-dev] Updated resampler patch

Thorvald Natvig thorvald at natvig.com
Mon Apr 28 08:19:32 PDT 2008

Yet another resampler update.

This will, if the filter length is too large to fit inside the stack 
sizes we've set, allocate extra memory for the per-channel st->mem so 
that can be used as an input buffer directly. It currently allocates 160 
extra elements if so needed (determined at initialization time).

160 was picked as it's a good space/time tradeoff. I tested with 96->8 
and 8->96 resampling at Q3 and forcing the use of the st->mem buffering. 
8 => 96 was mostly unaffected by the size; if anything it was slightly 
faster with lower buffer levels as it has a smaller working set that 
fits in L1 cache.
For 96=>8, the optimal case with var_arrays and enough stack took 410ms, 
enough heap for the buffer to be unlimited also gives 410ms. Buffer of 
320 gives 440ms, 160 gives 469ms and 80 gave 471ms.
Note that under normal conditions, 96=>8 at Q3 would use the stack, so 
the overhead will always be less than what show here.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: speex-resampler-membuff.diff
Url: http://lists.xiph.org/pipermail/speex-dev/attachments/20080428/72dbcc4c/attachment-0001.txt 

More information about the Speex-dev mailing list