DescriptionAdd SSE optimizations to SincResampler.
These are not the same optimizations in the WebKit version of
SincResampler. The WebKit version focuses on aligning the input
vector, resulting in at worst two unaligned loads on each kernel
index; or 2 * kKernelSize / 4 unaligned loads per call.
Instead I chose to focus on keeping the kernel vectors aligned
and eating at worst a single unaligned load on the input vector;
or kKernelSize / 4 unaligned loads per call.
Performance results from SincResamplerTest.ConvolveBenchmark:
clang version 3.2 (trunk 159409):
Convolve_C took 2100ms for 50000000 iterations.
Convolve_SSE (aligned) took 677ms for 50000000 iterations.
Convolve_SSE (unaligned) took 717ms for 50000000 iterations.
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
Convolve_C took 2183ms for 50000000 iterations.
Convolve_SSE (aligned) took 806ms for 50000000 iterations.
Convolve_SSE (unaligned) took 844ms for 50000000 iterations.
For reference, the original WebKit optimizations:
clang version 3.2 (trunk 159409):
Convolve_C took 2132ms for 50000000 iterations.
Convolve_SSE (aligned) took 1146ms for 50000000 iterations.
Convolve_SSE (unaligned) took 1797ms for 50000000 iterations.
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3:
Convolve_C took 2209ms for 50000000 iterations.
Convolve_SSE (aligned) took 1450ms for 50000000 iterations.
Convolve_SSE (unaligned) took 4415ms for 50000000 iterations.
In summary, SSE provides an ~2.6x to ~3x speedup on GCC and
clang respectively.
BUG=133637
TEST=media_unittests + SincResampler/* tests.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149569
Patch Set 1 #
Total comments: 14
Patch Set 2 : Fischman Fixes! #
Total comments: 8
Patch Set 3 : Switch to AlignedAlloc. Add runtime switch for benchmark. #Patch Set 4 : Reduce error checks to 2 decimal places of precision. #Patch Set 5 : Docs. #Patch Set 6 : Fix compile error. #
Messages
Total messages: 16 (0 generated)
|