[Webkit-unassigned] [Bug 73789] Need SSE optimization for SincResampler::Process()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 6 17:19:39 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=73789
--- Comment #22 from xingnan.wang at intel.com 2011-12-06 17:19:39 PST ---
(In reply to comment #21)
> (From update of attachment 118008 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=118008&action=review
>
> > Source/WebCore/platform/audio/SincResampler.cpp:260
> > +#ifdef __SSE2__
>
> I think visually, it might make more sense to stick the entire #ifdef __SSE2__ code inside the original
> {
> float input;
> ...
> }
>
> So we get something like
> {
> float input;
> #ifdef __SSE2__
> ...
> #else
> <original code>
> #endif
> }
>
> > Source/WebCore/platform/audio/SincResampler.cpp:282
> > +#define CONVOLVE_4_SAMPLE \
>
> Nit: Probably should be named CONVOLVE_4_SAMPLES (plural, not singular).
>
> > Source/WebCore/platform/audio/SincResampler.cpp:293
> > + mInput = _mm_load_ps(inputP);
>
> I might consider adding a new macro
>
> #define LOAD_DATA(l1, l2) \
> mInput = mm_load_ps(inputP); \
> mK1 = _mm_##l1_ps(k1); \
> mK2 = _mm_##l2_ps(k2)
>
> Then here we can say
> LOAD_DATA(load, load);
>
> And below, we can have
> LOAD_DATA(loadu, load);
> LOAD_DATA(load, loadu);
> LOAD_DATA(loadu, loadu);
>
> This makes it easy to see that they're all the same except whether we do aligned or unaligned loads.
>
> (I didn't test this code; some minor changes might be needed.)
>
> > Source/WebCore/platform/audio/SincResampler.cpp:327
> > + groupSumP = reinterpret_cast<float*>(&sums2);
>
> I think I'd write the above as
>
> sum1 += groupSumP[0];
> sum1 += groupSumP[1];
> sum1 += groupSumP[2];
> sum1 += groupSumP[3];
>
> Or maybe just sum1 += groupSumP[0] + groupSumP[1] + groupSumP[2] + groupSumP[3]
>
> Same for sum2 below.
Hi Raymond,
Thanks your good comments, I`ll update it.
--
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