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 test/api/decode_api_test.cpp (1 of 7 files). Show all

Unified · Split

test/api/decode_api_test.cpp+6−0
@@ -759,9 +759,15 @@ const uint32_t kiHeight = 96; //DO NOT CHANGE! · 758 unmodified lines
759const uint32_t kiFrameRate = 12; //DO NOT CHANGE!759const uint32_t kiFrameRate = 12; //DO NOT CHANGE!
760const uint32_t kiFrameNum = 100; //DO NOT CHANGE!760const uint32_t kiFrameNum = 100; //DO NOT CHANGE!
761const char* pHashStr[] = { //DO NOT CHANGE!761const char* pHashStr[] = { //DO NOT CHANGE!
762#ifdef X86_ASM
763 "244eebcb51f4c2a56e83fc5da3373cad9ec0e1e5",
764 "bbad99ef99e37b34bcb4f09a7ec4d144375f6be7",
765 "809f97e836650624d92f0b8e200a6ab25f810d6f"
766#else
762 "9c4e6146b29bac5d5d4be3c5bbab9c072dcb3f3f",767 "9c4e6146b29bac5d5d4be3c5bbab9c072dcb3f3f",
763 "f350001c333902029800bd291fbed915a4bdf19a",768 "f350001c333902029800bd291fbed915a4bdf19a",
764 "eb9d853b7daec03052c4850027ac94adc84c3a7e"769 "eb9d853b7daec03052c4850027ac94adc84c3a7e"
770#endif
765};771};
766 772
767class DecodeParseAPI : public ::testing::TestWithParam<EncodeDecodeFileParamBase>, public EncodeDecodeTestBase {773class DecodeParseAPI : public ::testing::TestWithParam<EncodeDecodeFileParamBase>, public EncodeDecodeTestBase {

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