diff options
author | Frank Barchard <fbarchard@google.com> | 2015-12-08 18:20:30 -0800 |
---|---|---|
committer | Frank Barchard <fbarchard@google.com> | 2015-12-08 18:20:30 -0800 |
commit | dee77a4ebeaebc781cb3acd80aa6627fd1c7c825 (patch) | |
tree | c3f53fb0d9d4b1dfd1a852054a29c01ea7b280c0 /source/cpu_id.cc | |
parent | fae1a105458a23d42c3e30f4d9ca321d08934e80 (diff) | |
download | libyuv-dee77a4ebeaebc781cb3acd80aa6627fd1c7c825.tar.gz |
Optimize yuv alpha blend AVX2 code to do 32 pixels at time.
out/Release/libyuv_unittest --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=9999 --libyuv_flags=-1 --gtest_filter=*I420Blend_Opt
Was LibYUVPlanarTest.I420Blend_Opt (2335 ms)
Now LibYUVPlanarTest.I420Blend_Opt (1937 ms)
vs SSSE3
LibYUVPlanarTest.I420Blend_Opt (2599 ms)
BUG=libyuv:527
R=dhrosa@google.com
Review URL: https://codereview.chromium.org/1505673003 .
Diffstat (limited to 'source/cpu_id.cc')
-rw-r--r-- | source/cpu_id.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/cpu_id.cc b/source/cpu_id.cc index 163da101..e58a42cd 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -10,7 +10,7 @@ #include "libyuv/cpu_id.h" -#if (defined(_MSC_VER) && !defined(__clang__)) && !defined(__clang__) +#if defined(_MSC_VER) && !defined(__clang__) #include <intrin.h> // For __cpuidex() #endif #if !defined(__pnacl__) && !defined(__CLR_VER) && \ @@ -207,8 +207,8 @@ int InitCpuFlags(void) { #ifdef HAS_XGETBV // AVX requires CPU has AVX, XSAVE and OSXSave for xgetbv - if ((cpu_info1[2] & 0x1c000000) == 0x1c000000 && // AVX and OSXSave - (GetXCR0() & 6) == 6) { // Test OD saves YMM registers + if (((cpu_info1[2] & 0x1c000000) == 0x1c000000) && // AVX and OSXSave + ((GetXCR0() & 6) == 6)) { // Test OS saves YMM registers cpu_info |= ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) | kCpuHasAVX; // Detect AVX512bw |