diff options
-rw-r--r-- | README.chromium | 2 | ||||
-rw-r--r-- | include/libyuv/cpu_id.h | 16 | ||||
-rw-r--r-- | include/libyuv/version.h | 2 | ||||
-rw-r--r-- | source/cpu_id.cc | 2 | ||||
-rw-r--r-- | unit_test/cpu_test.cc | 4 | ||||
-rw-r--r-- | unit_test/unit_test.cc | 6 | ||||
-rw-r--r-- | util/cpuid.c | 4 |
7 files changed, 18 insertions, 18 deletions
diff --git a/README.chromium b/README.chromium index 8fac3d14..8c340614 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: https://chromium.googlesource.com/libyuv/libyuv/ -Version: 1877 +Version: 1878 License: BSD License File: LICENSE Shipped: yes diff --git a/include/libyuv/cpu_id.h b/include/libyuv/cpu_id.h index 1f2f376a..434771bc 100644 --- a/include/libyuv/cpu_id.h +++ b/include/libyuv/cpu_id.h @@ -37,14 +37,14 @@ static const int kCpuHasAVX2 = 0x400; static const int kCpuHasERMS = 0x800; static const int kCpuHasFMA3 = 0x1000; static const int kCpuHasF16C = 0x2000; -static const int kCpuHasGFNI = 0x4000; /* deprecated */ -static const int kCpuHasAVX512BW = 0x8000; -static const int kCpuHasAVX512VL = 0x10000; -static const int kCpuHasAVX512VNNI = 0x20000; -static const int kCpuHasAVX512VBMI = 0x40000; -static const int kCpuHasAVX512VBMI2 = 0x80000; -static const int kCpuHasAVX512VBITALG = 0x100000; -static const int kCpuHasAVX512VPOPCNTDQ = 0x200000; +static const int kCpuHasAVX512BW = 0x4000; +static const int kCpuHasAVX512VL = 0x8000; +static const int kCpuHasAVX512VNNI = 0x10000; +static const int kCpuHasAVX512VBMI = 0x20000; +static const int kCpuHasAVX512VBMI2 = 0x40000; +static const int kCpuHasAVX512VBITALG = 0x80000; +static const int kCpuHasAVX512VPOPCNTDQ = 0x100000; +static const int kCpuHasAVXVNNI = 0x200000; static const int kCpuHasAVXVNNIINT8 = 0x400000; // These flags are only valid on MIPS processors. diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 0112faf9..e78a4fee 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 1877 +#define LIBYUV_VERSION 1878 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/cpu_id.cc b/source/cpu_id.cc index af614180..5dfe3b3a 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -311,6 +311,7 @@ static SAFEBUFFERS int GetCpuFlags(void) { cpu_info |= kCpuHasAVX | ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) | ((cpu_info1[2] & 0x00001000) ? kCpuHasFMA3 : 0) | ((cpu_info1[2] & 0x20000000) ? kCpuHasF16C : 0) | + ((cpu_einfo7[0] & 0x00000010) ? kCpuHasAVXVNNI : 0) | ((cpu_einfo7[3] & 0x00000010) ? kCpuHasAVXVNNIINT8 : 0); // Detect AVX512bw @@ -322,7 +323,6 @@ static SAFEBUFFERS int GetCpuFlags(void) { cpu_info |= (cpu_info7[2] & 0x00000800) ? kCpuHasAVX512VNNI : 0; cpu_info |= (cpu_info7[2] & 0x00001000) ? kCpuHasAVX512VBITALG : 0; cpu_info |= (cpu_info7[2] & 0x00004000) ? kCpuHasAVX512VPOPCNTDQ : 0; - cpu_info |= (cpu_info7[2] & 0x00000100) ? kCpuHasGFNI : 0; } } #endif diff --git a/unit_test/cpu_test.cc b/unit_test/cpu_test.cc index cdc321cf..150f5c48 100644 --- a/unit_test/cpu_test.cc +++ b/unit_test/cpu_test.cc @@ -54,8 +54,8 @@ TEST_F(LibYUVBaseTest, TestCpuHas) { int has_avx512vbmi2 = TestCpuFlag(kCpuHasAVX512VBMI2); int has_avx512vbitalg = TestCpuFlag(kCpuHasAVX512VBITALG); int has_avx512vpopcntdq = TestCpuFlag(kCpuHasAVX512VPOPCNTDQ); + int has_avxvnni = TestCpuFlag(kCpuHasAVXVNNI); int has_avxvnniint8 = TestCpuFlag(kCpuHasAVXVNNIINT8); - int has_gfni = TestCpuFlag(kCpuHasGFNI); printf("Has X86 0x%x\n", has_x86); printf("Has SSE2 0x%x\n", has_sse2); printf("Has SSSE3 0x%x\n", has_ssse3); @@ -73,8 +73,8 @@ TEST_F(LibYUVBaseTest, TestCpuHas) { printf("Has AVX512VBMI2 0x%x\n", has_avx512vbmi2); printf("Has AVX512VBITALG 0x%x\n", has_avx512vbitalg); printf("Has AVX512VPOPCNTDQ 0x%x\n", has_avx512vpopcntdq); + printf("HAS AVXVNNI 0x%x\n", has_avxvnni); printf("Has AVXVNNIINT8 0x%x\n", has_avxvnniint8); - printf("Has GFNI 0x%x\n", has_gfni); #endif #if defined(__mips__) int has_mips = TestCpuFlag(kCpuHasMIPS); diff --git a/unit_test/unit_test.cc b/unit_test/unit_test.cc index 9d543dee..3192760c 100644 --- a/unit_test/unit_test.cc +++ b/unit_test/unit_test.cc @@ -147,12 +147,12 @@ int TestCpuEnv(int cpu_info) { if (TestEnv("LIBYUV_DISABLE_AVX512VPOPCNTDQ")) { cpu_info &= ~libyuv::kCpuHasAVX512VPOPCNTDQ; } + if (TestEnv("LIBYUV_DISABLE_AVXVNNI")) { + cpu_info &= ~libyuv::kCpuHasAVXVNNI; + } if (TestEnv("LIBYUV_DISABLE_AVXVNNIINT8")) { cpu_info &= ~libyuv::kCpuHasAVXVNNIINT8; } - if (TestEnv("LIBYUV_DISABLE_GFNI")) { - cpu_info &= ~libyuv::kCpuHasGFNI; - } #endif if (TestEnv("LIBYUV_DISABLE_ASM")) { cpu_info = libyuv::kCpuInitialized; diff --git a/util/cpuid.c b/util/cpuid.c index 0ff7acc8..61399a77 100644 --- a/util/cpuid.c +++ b/util/cpuid.c @@ -103,8 +103,8 @@ int main(int argc, const char* argv[]) { int has_avx512vbmi2 = TestCpuFlag(kCpuHasAVX512VBMI2); int has_avx512vbitalg = TestCpuFlag(kCpuHasAVX512VBITALG); int has_avx512vpopcntdq = TestCpuFlag(kCpuHasAVX512VPOPCNTDQ); + int has_avxvnni = TestCpuFlag(kCpuHasAVXVNNI); int has_avxvnniint8 = TestCpuFlag(kCpuHasAVXVNNIINT8); - int has_gfni = TestCpuFlag(kCpuHasGFNI); printf("Has X86 0x%x\n", has_x86); printf("Has SSE2 0x%x\n", has_sse2); printf("Has SSSE3 0x%x\n", has_ssse3); @@ -122,8 +122,8 @@ int main(int argc, const char* argv[]) { printf("Has AVX512VBMI2 0x%x\n", has_avx512vbmi2); printf("Has AVX512VBITALG 0x%x\n", has_avx512vbitalg); printf("Has AVX512VPOPCNTDQ 0x%x\n", has_avx512vpopcntdq); + printf("HAS AVXVNNI 0x%x\n", has_avxvnni); printf("Has AVXVNNIINT8 0x%x\n", has_avxvnniint8); - printf("Has GFNI 0x%x\n", has_gfni); } return 0; } |