diff --git a/README.chromium b/README.chromium index e263c2cf6..077de94fb 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 642 +Version: 643 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 933031adc..a6db6375c 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 642 +#define LIBYUV_VERSION 643 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/cpu_id.cc b/source/cpu_id.cc index e2a0d0546..da6362553 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -161,19 +161,20 @@ static bool TestEnv(const char* name) { LIBYUV_API int InitCpuFlags(void) { #if !defined(__CLR_VER) && defined(CPU_X86) - int cpu_info[4] = { 0, 0, 0, 0 }; - __cpuid(cpu_info, 1); - cpu_info_ = ((cpu_info[3] & 0x04000000) ? kCpuHasSSE2 : 0) | - ((cpu_info[2] & 0x00000200) ? kCpuHasSSSE3 : 0) | - ((cpu_info[2] & 0x00080000) ? kCpuHasSSE41 : 0) | - ((cpu_info[2] & 0x00100000) ? kCpuHasSSE42 : 0) | + int cpu_info1[4] = { 0, 0, 0, 0 }; + int cpu_info7[4] = { 0, 0, 0, 0 }; + __cpuid(cpu_info1, 1); + __cpuid(cpu_info7, 7); + cpu_info_ = ((cpu_info1[3] & 0x04000000) ? kCpuHasSSE2 : 0) | + ((cpu_info1[2] & 0x00000200) ? kCpuHasSSSE3 : 0) | + ((cpu_info1[2] & 0x00080000) ? kCpuHasSSE41 : 0) | + ((cpu_info1[2] & 0x00100000) ? kCpuHasSSE42 : 0) | + ((cpu_info7[1] & 0x00000200) ? kCpuHasERMS : 0) | kCpuHasX86; #ifdef HAS_XGETBV - if ((cpu_info[2] & 0x18000000) == 0x18000000 && // AVX and OSSave - (XGetBV(kXCR_XFEATURE_ENABLED_MASK) & 0x06) == 0x06) { // Save YMM - __cpuid(cpu_info, 7); - cpu_info_ |= ((cpu_info[1] & 0x00000020) ? kCpuHasAVX2 : 0) | - ((cpu_info[1] & 0x00000200) ? kCpuHasERMS : 0) | + if ((cpu_info1[2] & 0x18000000) == 0x18000000 && // AVX and OSSave + (XGetBV(kXCR_XFEATURE_ENABLED_MASK) & 0x06) == 0x06) { // Saves YMM. + cpu_info_ |= ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) | kCpuHasAVX; } #endif