[Webkit-unassigned] [Bug 74693] Optimize with memcpy instead of copying frame by frame in Realtimeanalyser::doFFTAnalysis

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 21 16:42:21 PST 2011


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





--- Comment #9 from Wei James <james.wei at intel.com>  2011-12-21 16:42:21 PST ---
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > (From update of attachment 119717 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=119717&action=review
> > > 
> > > >> Source/WebCore/webaudio/RealtimeAnalyser.cpp:162
> > > >> +        memcpy(tempP, inputBuffer + writeIndex - fftSize + InputBufferSize, sizeof(*tempP) * (fftSize - writeIndex));
> > > > 
> > > > Does this handle wrapping the index as the original code did?  It seems to me that writeIndex (m_writeIndex) could be as large as InputBufferSize - 1, so the memcpy might be reading past the end of the inputBuffer.
> > > 
> > > this memcpy is under the if(writeIndex < fftSize) statement. the case you mentioned is under else statement. thanks
> > 
> > raymond, does it answer your question? or do you think the patch still need revise? thanks
> 
> Sorry.  It seems that my reply from yesterday got lost some how.  Yes, you've answered my question.  Wrapping is handled.  (I had convinced myself in the first patch that it was correct, but promptly forgot in the second patch review.)

thanks. :)

-- 
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