diff --git a/README.chromium b/README.chromium index d7d3dc682..ab8a83040 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 526 +Version: 527 License: BSD License File: LICENSE diff --git a/include/libyuv/cpu_id.h b/include/libyuv/cpu_id.h index 0c50886cf..924a139f1 100644 --- a/include/libyuv/cpu_id.h +++ b/include/libyuv/cpu_id.h @@ -34,6 +34,7 @@ static const int kCpuHasSSE41 = 0x80; static const int kCpuHasSSE42 = 0x100; static const int kCpuHasAVX = 0x200; static const int kCpuHasAVX2 = 0x400; +static const int kCpuHasMOVBE = 0x800; // For test purposes. // These flags are only valid on MIPS processors. static const int kCpuHasMIPS = 0x1000; diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 65d4fdb4b..a3227f480 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 526 +#define LIBYUV_VERSION 527 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/cpu_id.cc b/source/cpu_id.cc index b932beb54..eb5e2d2c3 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -162,6 +162,7 @@ int InitCpuFlags(void) { ((cpu_info[2] & 0x00000200) ? kCpuHasSSSE3 : 0) | ((cpu_info[2] & 0x00080000) ? kCpuHasSSE41 : 0) | ((cpu_info[2] & 0x00100000) ? kCpuHasSSE42 : 0) | + ((cpu_info[2] & 0x00400000) ? kCpuHasMOVBE : 0) | (((cpu_info[2] & 0x18000000) == 0x18000000) ? kCpuHasAVX : 0) | kCpuHasX86; #ifdef HAS_XGETBV @@ -189,6 +190,9 @@ int InitCpuFlags(void) { if (TestEnv("LIBYUV_DISABLE_SSE42")) { cpu_info_ &= ~kCpuHasSSE42; } + if (TestEnv("LIBYUV_DISABLE_MOVBE")) { + cpu_info_ &= ~kCpuHasMOVBE; + } if (TestEnv("LIBYUV_DISABLE_AVX")) { cpu_info_ &= ~kCpuHasAVX; } diff --git a/unit_test/cpu_test.cc b/unit_test/cpu_test.cc index f271f3984..e6f3906af 100644 --- a/unit_test/cpu_test.cc +++ b/unit_test/cpu_test.cc @@ -35,6 +35,8 @@ TEST_F(libyuvTest, TestCpuHas) { printf("Has SSE4.1 %x\n", has_sse41); int has_sse42 = TestCpuFlag(kCpuHasSSE42); printf("Has SSE4.2 %x\n", has_sse42); + int has_movbe = TestCpuFlag(kCpuHasMOVBE); + printf("Has MOVBE %x\n", has_movbe); int has_avx = TestCpuFlag(kCpuHasAVX); printf("Has AVX %x\n", has_avx); int has_avx2 = TestCpuFlag(kCpuHasAVX2);