History

[Processing/x86] Add an AVX2 implementation of GeneralBilinearFastDownsample

Keep track of relative pixel offsets and utilize pshufb to efficiently extract relevant pixels for horizontal scaling ratios <= 8. Because pshufb does not cross 128-bit lanes, the overhead of address calculations and loads is relatively greater as compared with an SSSE3 implementation. Fall back to a generic approach for ratios > 8. The implementation assumes that data beyond the end of each line, before the next line begins, can be dirtied; which AFAICT is safe with the current usage of these routines. Speedup is ~10.42x/~5.23x (32-bit/64-bit) for horizontal ratios <= 2, ~9.49x/~4.64x for ratios within (2, 4], ~6.43x/~3.18x for ratios within (4, 8], and ~5.42x/~2.50x for ratios > 8 when not memory-bound on Haswell as compared with the current SSE2 implementation.

Sindre Aamås committed 10 years ago

Commit b43e58a1 parent b1013095 files · +709 −8Browse files

Showing the changes to test/processing/ProcessUT_DownSample.cpp (1 of 5 files). Show all

Unified · Split

test/processing/ProcessUT_DownSample.cpp+2−0
@@ -347,6 +347,8 @@ GENERATE_GeneralBilinearDownsampler_UT (GeneralBilinearFastDownsamplerWrap_ssse3 · 346 unmodified lines
347347 WELS_CPU_SSSE3)
348348 GENERATE_GeneralBilinearDownsampler_UT (GeneralBilinearAccurateDownsamplerWrap_sse41,
349349 GeneralBilinearAccurateDownsampler_ref, 1, WELS_CPU_SSE41)
350+GENERATE_GeneralBilinearDownsampler_UT (GeneralBilinearFastDownsamplerWrap_avx2, GeneralBilinearFastDownsampler_ref, 1,
351+ WELS_CPU_AVX2)
350352 #endif
351353
352354 #if defined(HAVE_NEON)

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