[pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-18 Thread Wang Xingchao
if all channels have same volume setting, use fast way to do volume change. this patch intended to work for two formats: s16ne/s16re. Signed-off-by: Wang Xingchao --- src/pulsecore/svolume_c.c | 70 + 1 files changed, 70 insertions(+), 0 deletions(-)

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-18 Thread Wang Xingchao
Hi all, I didnot touch much formats optermization, only for most used s16nr/re, please help review whether the idea is acceptable. If so, i will take the responsbility for all formats. --xingchao 2011/10/18 Wang Xingchao : > if all channels have same volume setting, use fast way to > do volume c

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-18 Thread Tanu Kaskinen
On Tue, 2011-10-18 at 12:24 +0300, Wang Xingchao wrote: > Hi all, > > I didnot touch much formats optermization, only for most used > s16nr/re, please help review whether the idea is acceptable. If so, i > will take the responsbility for all formats. Have you measured the performance with and wit

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-18 Thread Maarten Bosmans
> 2011/10/18 Wang Xingchao : >> if all channels have same volume setting, use fast way to >> do volume change. this patch intended to work for two formats: >> s16ne/s16re. I did some work to optimize svolume already, see my branch on github: https://github.com/mkbosmans/pulseaudio/compare/master..

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-18 Thread Wang Xingchao
2011/10/18 Maarten Bosmans : >> 2011/10/18 Wang Xingchao : >>> if all channels have same volume setting, use fast way to >>> do volume change. this patch intended to work for two formats: >>> s16ne/s16re. > > I did some work to optimize svolume already, see my branch on github: > https://github.com

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-18 Thread Tanu Kaskinen
On Tue, 2011-10-18 at 14:49 +0300, Wang Xingchao wrote: > Tanu, i've not done much performance test, do you have some tools for > svolume test? All suggestions are appreciated. No, I don't know any particular tools. I was asking just because I don't think the patches can be merged before there is

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-18 Thread Wang Xingchao
2011/10/18 Tanu Kaskinen : > On Tue, 2011-10-18 at 14:49 +0300, Wang Xingchao wrote: >> Tanu, i've not done much performance test, do you have some tools for >> svolume test? All suggestions are appreciated. > > No, I don't know any particular tools. I was asking just because I don't > think the pa

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-19 Thread Wang Xingchao
hi, I got not stable results, which means the optimization is not as good as expected. All results based on plain c volume function, not touch sse part. All tests are for format s16ne. Result1: channels 4, with same volume, with patch; samples 1021, loop 1000; Result2: channels 4, with same volu

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-19 Thread Lu Guanqun
On Tue, Oct 18, 2011 at 06:10:06PM +0800, Maarten Bosmans wrote: > > 2011/10/18 Wang Xingchao : > >> if all channels have same volume setting, use fast way to > >> do volume change. this patch intended to work for two formats: > >> s16ne/s16re. > > I did some work to optimize svolume already, see

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-19 Thread Maarten Bosmans
2011/10/19 Lu Guanqun : > Hi Maarten, > > Thanks for your nice work, I'll take a look. > > According to my test here, it seems soft volume processing doesn't cost > CPU usage too much, instead, it's the resampling that takes much CPU > usage. e.g. one sink input, resampler of speex-float-3 is used,

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-19 Thread Maarten Bosmans
2011/10/19 Wang Xingchao : > hi, > > I got not stable results, which means the optimization is not as good > as expected. > All results based on plain c volume function, not touch sse part. It's good to test your optimizations. Be sure to also test with various lengths of the memblock (1021 below)

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-19 Thread Pierre-Louis Bossart
> In general you can assume than these resamplers are already as > optimized as possible. Especially for our default speex resampler, I > don't expect there's a lot to gain. But if you'd like you could work > with that project to see if there are improvements possible. Last week > I sent some patch

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-19 Thread Arun Raghavan
On Tue, 2011-10-18 at 17:09 -0400, Wang Xingchao wrote: > if all channels have same volume setting, use fast way to > do volume change. this patch intended to work for two formats: > s16ne/s16re. > > Signed-off-by: Wang Xingchao > --- As Tanu points out, some hard data here would be good. But ju

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-19 Thread Arun Raghavan
On Tue, 2011-10-18 at 12:10 +0200, Maarten Bosmans wrote: > > 2011/10/18 Wang Xingchao : > >> if all channels have same volume setting, use fast way to > >> do volume change. this patch intended to work for two formats: > >> s16ne/s16re. [...] > The Orc svolume implementation currently only handles

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-20 Thread Maarten Bosmans
2011/10/20 Arun Raghavan : > On Tue, 2011-10-18 at 12:10 +0200, Maarten Bosmans wrote: >> > 2011/10/18 Wang Xingchao : >> >> if all channels have same volume setting, use fast way to >> >> do volume change. this patch intended to work for two formats: >> >> s16ne/s16re. > [...] >> The Orc svolume i

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-20 Thread Maarten Bosmans
2011/10/20 Arun Raghavan : > On Tue, 2011-10-18 at 17:09 -0400, Wang Xingchao wrote: >> if all channels have same volume setting, use fast way to >> do volume change. this patch intended to work for two formats: >> s16ne/s16re. >> >> Signed-off-by: Wang Xingchao >> --- > > As Tanu points out, some

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-20 Thread Wang Xingchao
Hey Maarten, I checked some code of your branch, thanks you have done so much work in svolume part. And especially svolume-test is really very powerful and worth for try. i decide to use it as the tool to check whether the optimization is correct. meanwhile, i met some compile error in branch rem

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-20 Thread Colin Guthrie
'Twas brillig, and Wang Xingchao at 20/10/11 08:51 did gyre and gimble: > CC libpulsecommon_UNKNOWN.UNKNOWN_la-client-conf.lo > CC libpulsecommon_UNKNOWN.UNKNOWN_la-fork-detect.lo > CC libpulsecommon_UNKNOWN.UNKNOWN_la-xmalloc.lo > CC libpulsecommon_UNKNOWN.UNKNOWN_la-propli

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-20 Thread Wang Xingchao
> I've a funny feeling that this is caused by an old checkout/clone > This file was moved a long time ago, is it possible you've just not done > a "make distclean" for a while or were working of a 0.9.x branch previously? hey Col, i checkout remote branch "remotes/origin/orcify" after clone f

Re: [pulseaudio-discuss] [RFC PATCH] softvolume: implement fast volume translation

2011-10-20 Thread Wang Xingchao
Hey Maarten, with your test tool svolume-test, i get some new test results shows the patch has a positive performance improvement. please note i made some little change in svolume-test to disable "testing correctness" part, this save some time, the goal is to find out performance difference with f