History

[Processing/x86] DyadicBilinearDownsample optimizations

Average vertically before horizontally; horizontal averaging is more worksome. Doing the vertical averaging first reduces the number of horizontal averages by half. Use pmaddubsw and pavgw to do the horizontal averaging for a slight performance improvement. Minor tweaks. Improve the SSSE3 dyadic downsample routines and drop the SSE4 routines. The non-temporal loads used in the SSE4 routines do nothing for cache- backed memory AFAIK. Adjust tests because averaging vertically first gives slightly different output. ~2.39x speedup for the widthx32 routine on Haswell when not memory-bound. ~2.20x speedup for the widthx16 routine on Haswell when not memory-bound. Note that the widthx16 routine can be unrolled for further speedup.

Sindre Aamås committed 10 years ago

Commit 8a0af4a1 parent 7cbb75e7 files · +95 −372Browse files

Showing the changes to codec/processing/src/downsample/downsample.h (1 of 7 files). Show all

Unified · Split

codec/processing/src/downsample/downsample.h+0−4
@@ -94,10 +94,6 @@ HalveDownsampleFunc DyadicBilinearDownsamplerWidthx32_sse; · 93 unmodified lines
9494 HalveDownsampleFunc DyadicBilinearDownsamplerWidthx16_ssse3;
9595 // iSrcWidth= x32 pixels
9696 HalveDownsampleFunc DyadicBilinearDownsamplerWidthx32_ssse3;
97−// iSrcWidth= x16 pixels
98−HalveDownsampleFunc DyadicBilinearDownsamplerWidthx16_sse4;
99−// iSrcWidth= x32 pixels
100−HalveDownsampleFunc DyadicBilinearDownsamplerWidthx32_sse4;
10197
10298 GeneralDownsampleFunc GeneralBilinearFastDownsamplerWrap_sse2;
10399 GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_sse2;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t