1 diff --git a/media/libyuv/libyuv/include/libyuv/compare_row.h b/media/libyuv/libyuv/include/libyuv/compare_row.h
2 --- a/media/libyuv/libyuv/include/libyuv/compare_row.h
3 +++ b/media/libyuv/libyuv/include/libyuv/compare_row.h
4 @@ -40,32 +40,26 @@ extern "C" {
6 // clang >= 3.4.0 required for AVX2.
7 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
8 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
9 #define CLANG_HAS_AVX2 1
10 #endif // clang >= 3.4
13 -// The following are available for Visual C:
14 -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
15 - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
16 -#define HAS_HASHDJB2_AVX2
19 // The following are available for Visual C and GCC:
20 #if !defined(LIBYUV_DISABLE_X86) && \
21 (defined(__x86_64__) || defined(__i386__) || defined(_M_IX86))
22 #define HAS_HASHDJB2_SSE41
23 #define HAS_SUMSQUAREERROR_SSE2
24 #define HAS_HAMMINGDISTANCE_SSE42
27 // The following are available for Visual C and clangcl 32 bit:
28 -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
29 +#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
30 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
31 #define HAS_HASHDJB2_AVX2
32 #define HAS_SUMSQUAREERROR_AVX2
35 // The following are available for GCC and clangcl 64 bit:
36 #if !defined(LIBYUV_DISABLE_X86) && \
37 (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
38 diff --git a/media/libyuv/libyuv/include/libyuv/row.h b/media/libyuv/libyuv/include/libyuv/row.h
39 --- a/media/libyuv/libyuv/include/libyuv/row.h
40 +++ b/media/libyuv/libyuv/include/libyuv/row.h
41 @@ -227,17 +227,17 @@ extern "C" {
42 // TODO(fbarchard): fix build error on android_full_debug=1
43 // https://code.google.com/p/libyuv/issues/detail?id=517
44 #define HAS_I422ALPHATOARGBROW_AVX2
48 // The following are available for AVX2 Visual C and clangcl 32 bit:
49 // TODO(fbarchard): Port to gcc.
50 -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
51 +#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
52 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
53 #define HAS_ARGB1555TOARGBROW_AVX2
54 #define HAS_ARGB4444TOARGBROW_AVX2
55 #define HAS_ARGBTOARGB1555ROW_AVX2
56 #define HAS_ARGBTOARGB4444ROW_AVX2
57 #define HAS_ARGBTORGB565ROW_AVX2
58 #define HAS_J400TOARGBROW_AVX2
59 #define HAS_RGB565TOARGBROW_AVX2