[pulseaudio-discuss] [PATCH] resampler: Support speex resampler compiled with FIXED_POINT

Alexander E. Patrakov patrakov at gmail.com
Sun May 11 01:44:07 PDT 2014


11.05.2014 03:01, Peter Meerwald wrote:
>>   * when PulseAudio starts from s16 samples and decides to use the speex-float
>> resampler via speex_resampler_process_float(), it has to convert s16 to float
>> first anyway;
> yes, this is handled explicitly in PA's sconv code (and there are
> optimizations for SSE and NEON)
>
> doing something like
> float *dst=...;
> int16_t *src=...;
> *dst = *src;
> as observed in speex's _process_int() when compiled with FIXED_POINT
> #undefined is not a good idea (performance wise)
>
>>   * it should not matter who converts s16 to float and back - speex or
>> PulseAudio.
> it does, PA can do better

OK, it indeed has SSE/NEON optimizations.

Then, based on the above, let's adopt this plan:

  * Autodetect fixed-point speex at runtime.
  * Don't change the existing speex-float code.
  * If speex is fixed-point, make pulseaudio use speex-fixed if a user 
requested speex-float.
  * Add a comment about the scaling problem somewhere.

If you prefer, I can do it on the next week, but today I am busy with 
another patch.

-- 
Alexander E. Patrakov


More information about the pulseaudio-discuss mailing list