Resampler quality evaluation: now with room noise!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



26.09.2014 02:56, David Henningsson wrote:
>
>
> On 2014-09-25 21:54, Alexander E. Patrakov wrote:
>> The conclusion of that work was that we need to use speex-float-5 to
>> match the metric of "never introducing audible distortions" (that other
>> operating systems meet by default) when resampling from 44.1 to 48 kHz.
>> However, David Henningsson argued that this "never" included a lot of
>> unrealistic worst-case conditions, i.e. that the quality achieved in
>> proprietary OSes is actually overkill.
>
> To elaborate, I'm not saying they're completely unrealistic, I'm don't
> doubt that the resampler noises are hearable in *some* environments. The
> question is how common it is.
>
> We need to find a balance between quality on one side and CPU
> consumption on the other side.
>
> We used to have speex-float-3 but changed to speex-float-1 because
> distros had changed, which in turn was because people complained that PA
> took too much CPU. So speex-float-3 was causing problems for some people.

I think (but cannot claim this yet as a scientific fact) that we can 
safely ignore these CPU-overuse or battery-life complaints at least on 
Sandy Bridge CPUs if speex has been compiled with SSE support. I have 
directly checked the impact of the resampler choice on the battery life 
of my Sony Vaio Z23A4R laptop, under the following conditions:

1. The whole system is in initramfs. The initramfs just plays a 
CD-quality wav file with some music of ~1 minute length in a loop with 
paplay, and after each loop, logs the battery energy until less than 2% 
of energy remains in the battery. Then it saves the log to the SSD. I.e. 
there is no SSD access until the final saving of the log.

2. The screen is turned off. The hardware radio switch is also off.

3. Absolutely no keyboard/touchpad interaction.

4. Default volume, headphones connected, resampling from 44.1 to 48 kHz 
achieved by setting both default and alternate rates to 48000 Hz in 
daemon.conf.

5. laptop-mode-tools are installed, in their default configuration.

6. The kernel version is 3.17-rc5, PulseAudio is from the yesterday's 
git. Everything else is from yesterday's Gentoo amd64.

All these conditions are aimed at obtaining reproducible results and 
saving as much energy as possible, so that any variations due to the 
resampler are clearly visible.

The CPU is: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz (with available 
frequencies from 0.8 to 3.5 GHz).

Result: with speex-float-1, the laptop lasted 26371 seconds, while with 
speex-float-5, the result was "only" 25997 seconds. I.e. less than 1.5% 
of difference (and even less under more realistic conditions, i.e. with 
the SSD, WiFi and display being on), or only 81 mW of extra power 
consumed. And I don't yet know the standard error (will repeat the test 
several times and report separately).

Note: for "real" mobile devices like phones, the impact will be more 
significant. So I limit my "ignore complaints as invalid" proposal only 
to laptops with Sandy Bridge CPUs.

>
> So, as a very rough measure, if we have one set of people complaining
> about resampler CPU consumption, and another set of people complaining
> about resampler noises, and the size of those two groups are roughly
> equivalent, we're somewhat on a balance. :-)
>
> I think your findings are very interesting when comparing different
> resamplers though - i e, that speex seems to give best quality, given a
> fixed processing power.
>

-- 
Alexander E. Patrakov


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux