The resulting per-block speedup is measured to between ~1.96x and ~3.27x for horizontal filtering, between ~1.43x and ~2.09x for vertical filtering, and between ~1.47x and ~3.04x for 2-dimensional filtering on Haswell, depending on block size, as compared with the existing SSE2 routines. Outliers are 4-wide vertical and 2-dimensional filtering with a speedups of ~5.94x and ~8.41x respectively on Haswell (with clang-703.0.31) due to the C routines used previously.
Showing the changes to test/encoder/EncUT_MotionCompensation.cpp (1 of 4 files). Show all
Unified · Split
| @@ -222,6 +222,9 @@ DEF_LUMA_MCTESTS(~0, native) · 221 unmodified lines | ||
| 222 | 222 | #ifdef X86_ASM |
| 223 | 223 | DEF_LUMA_MCTESTS(WELS_CPU_SSE2, sse2) |
| 224 | 224 | DEF_LUMA_MCTESTS(WELS_CPU_SSE2 | WELS_CPU_SSSE3, ssse3) |
| 225 | +#ifdef HAVE_AVX2 | |
| 226 | +DEF_LUMA_MCTESTS(WELS_CPU_SSE2 | WELS_CPU_SSSE3 | WELS_CPU_AVX2, avx2) | |
| 227 | +#endif | |
| 225 | 228 | #endif |
| 226 | 229 | |
| 227 | 230 | #define DEF_CHROMA_MCTEST(iW,iH) \ |
| @@ -392,4 +395,7 @@ DEF_HALFPEL_MCTESTS(~0, native) · 164 unmodified lines | ||
| 392 | 395 | #ifdef X86_ASM |
| 393 | 396 | DEF_HALFPEL_MCTESTS(WELS_CPU_SSE2, sse2) |
| 394 | 397 | DEF_HALFPEL_MCTESTS(WELS_CPU_SSE2 | WELS_CPU_SSSE3, ssse3) |
| 398 | +#ifdef HAVE_AVX2 | |
| 399 | +DEF_HALFPEL_MCTESTS(WELS_CPU_SSE2 | WELS_CPU_SSSE3 | WELS_CPU_AVX2, avx2) | |
| 400 | +#endif | |
| 395 | 401 | #endif |