[pulseaudio-discuss] On replacing ffmpeg resampler with lavr
Alexander E. Patrakov
patrakov at gmail.com
Wed Oct 15 22:59:24 PDT 2014
16.10.2014 11:48, Alexander E. Patrakov wrote:
> FFMpeg code indeed looks cleaner and supports more sample formats
> instead of insisting on s16. However, if one inlines the
> resample_one() function from libavresample/resample_template.c into
> the if (!nearest_neighbour) branch of resample() from
> libavresample/resample.c, he will get almost exactly what we already
> have in PulseAudio's embedded copy of the ffmpeg resampler. So, all
> the speed benefits (if any) come from changing the working sample
> format and from ffmpeg build system that applies optimizations via
> CFLAGS that are sensible for this kind of code.
Sorry, I have to correct myself here.
One more possible reason for speed difference would be that PulseAudio's
copy repeatedly tests c->linear (which is BTW always false), while,
instead of that, FFMpeg's copy calls a function through a pointer in
order to distinguish between situations where linear interpolation
between filter taps is needed or unneeded.
--
Alexander E. Patrakov
More information about the pulseaudio-discuss
mailing list