[Webkit-unassigned] [Bug 74054] fast path to accelerate processing in AudioBus::processWithGainFromMonoStereo

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 9 08:51:13 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74054





--- Comment #7 from Raymond Toy <rtoy at chromium.org>  2011-12-09 08:51:13 PST ---
(In reply to comment #5)
> (In reply to comment #3)
> 
> I'd recommend not going so far as doing this optimization.  This code is very soon going to get a lot more complicated when we
> add upmixing paths for 5.1, etc., so I'd prefer to avoid this extra complexity.

Uh, ok.  I don't see that this adds any additional code except for the simple computation of nConv.  There will be two loops in any case.  Unless you're saying that we should not include the proposed patch at all.

> 
> > A side note on a different optimization.  It's not necessary to implement this instead of the proposed patch.
> > With the current patch, we still do (slightly) extra work if needDezipper is true.  During the loop, we may get close enough to the target that we don't need to dezipper anymore.
> > Since the dezippering is just an exponential filter, we can figure exactly how many steps will be needed to get with epsilon of the target value.  So compute this value, nConv, and have two loops:
> > N = min(nConv, framesToProcess);
> > for (k = 0; k < N; ++k) {
> >    <loop with dezippering>
> > }
> > for (k < framesToProcess; ++k) {
> >    <loop without dezippering>
> > }
> > Assuming I did the math correctly, 
> > nConv = log(eps/abs(g0 - totalDesiredGain))/log(1 - DezipperRate)
> >       = log(eps)/log(1-DezipperRate) 
> >          - log(abs(g0-totalDesiredGain))/log(1-DezipperRate)
> > where g0 is the starting gain value at the beginning of the routine.  All of the logs are constants except for log(abs(g0-totalDesiredGain)), so the computation of nConv is not too bad.  log, however, is not cheap, so it's hard to tell if we would get a net win or not since the processing in the loops is fairly simple.  A quick and dirty log approximation might be good enough.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list