From d3ff009d841805fc39c2f8962b413bb2dd0a7618 Mon Sep 17 00:00:00 2001 From: James Zern Date: Sun, 8 Jun 2014 18:25:37 -0700 Subject: [PATCH] vp9_sad*x4d: disable avx2 variants tests failing under Win32/Win64 + sad_test: add missing avx2 functions (disabled) Change-Id: I8224fba2b270f6039ab1877d71e1e512f0081856 --- test/sad_test.cc | 20 ++++++++++++++++++++ vp9/common/vp9_rtcd_defs.pl | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/test/sad_test.cc b/test/sad_test.cc index f9ffa92de..89d8c4152 100644 --- a/test/sad_test.cc +++ b/test/sad_test.cc @@ -627,4 +627,24 @@ INSTANTIATE_TEST_CASE_P(SSE3, SADTest, ::testing::Values( #endif // CONFIG_USE_X86INC #endif // HAVE_SSSE3 +#if HAVE_AVX2 +#if CONFIG_VP9_ENCODER +// TODO(jzern): these prototypes can be removed after the avx2 versions are +// reenabled in vp9_rtcd_defs.pl. +extern "C" { +void vp9_sad32x32x4d_avx2(const uint8_t *src_ptr, int src_stride, + const uint8_t *const ref_ptr[], int ref_stride, + unsigned int *sad_array); +void vp9_sad64x64x4d_avx2(const uint8_t *src_ptr, int src_stride, + const uint8_t *const ref_ptr[], int ref_stride, + unsigned int *sad_array); +} +const sad_n_by_n_by_4_fn_t sad_64x64x4d_avx2 = vp9_sad64x64x4d_avx2; +const sad_n_by_n_by_4_fn_t sad_32x32x4d_avx2 = vp9_sad32x32x4d_avx2; +INSTANTIATE_TEST_CASE_P(DISABLED_AVX2, SADx4Test, ::testing::Values( + make_tuple(32, 32, sad_32x32x4d_avx2), + make_tuple(64, 64, sad_64x64x4d_avx2))); +#endif // CONFIG_VP9_ENCODER +#endif // HAVE_AVX2 + } // namespace diff --git a/vp9/common/vp9_rtcd_defs.pl b/vp9/common/vp9_rtcd_defs.pl index e5358a7c0..514fb641f 100644 --- a/vp9/common/vp9_rtcd_defs.pl +++ b/vp9/common/vp9_rtcd_defs.pl @@ -653,7 +653,7 @@ add_proto qw/void vp9_sad4x4x8/, "const uint8_t *src_ptr, int src_stride, const specialize qw/vp9_sad4x4x8 sse4/; add_proto qw/void vp9_sad64x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array"; -specialize qw/vp9_sad64x64x4d sse2 avx2/; +specialize qw/vp9_sad64x64x4d sse2/; add_proto qw/void vp9_sad32x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array"; specialize qw/vp9_sad32x64x4d sse2/; @@ -668,7 +668,7 @@ add_proto qw/void vp9_sad16x32x4d/, "const uint8_t *src_ptr, int src_stride, co specialize qw/vp9_sad16x32x4d sse2/; add_proto qw/void vp9_sad32x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array"; -specialize qw/vp9_sad32x32x4d sse2 avx2/; +specialize qw/vp9_sad32x32x4d sse2/; add_proto qw/void vp9_sad16x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array"; specialize qw/vp9_sad16x16x4d sse2/;