[pulseaudio-discuss] [PATCH 0/4] Add support for libsoxr resampler

Andrey Semashev andrey.semashev at gmail.com
Wed Nov 12 04:32:51 PST 2014


On Wed, Nov 12, 2014 at 2:30 PM, Alexander E. Patrakov
<patrakov at gmail.com> wrote:
> 12.11.2014 15:59, Andrey Semashev wrote:
>>
>> On Wed, Nov 12, 2014 at 12:26 PM, Alexander E. Patrakov
>> <patrakov at gmail.com> wrote:
>>>
>>>
>>> We generally don't need a zoo of resamplers. But you have definitely
>>> changed
>>> something important from an earlier submission by Peter Meerwald so that
>>> the
>>> CPU figure became much better. I guess, that's SOXR_LINEAR_PHASE - that's
>>> the only obvious change.
>>
>>
>> SOXR_LINEAR_PHASE is 0, I added it mostly for documentation purpose,
>> in case if someone wants to add more modes with different phase
>> response presets. There is also another difference in that I
>> explicitly specify interleaved sample formats, although it is
>> numerically equivalent to those without the _I suffix.
>>
>> I think, the essential difference is quality. Peter's patches use
>> SOXR_QQ, while mine use other presets. I didn't add QQ because I don't
>> see much point in this mode.
>
> Indeed, QQ is just cubic interpolation, worse than speex-float-0. However, I
> have tried to change that to other values in the old patches, and the result
> was a good resampler that ate a lot more CPU than speex-float-5. Note,
> however, that the test was done with a Haswell (year 2013) earlier and with
> an Arrandale (year 2010) now.

I also noticed that Peter's patch supplied runtime_spec to
soxr_create(), with the number of threads equal to 0 (i.e.
auto-detected). In this case the library uses OpenMP to parallelize
some operations. In my patch the default is used, which means 1 thread
and no OpenMP. On small frames of audio, the overhead of OpenMP can
probably outweigh the benefit.


More information about the pulseaudio-discuss mailing list