Index: media/base/yuv_convert.cc |
diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc |
index 7aa16cc063a630833378c557bf0b05bdf8130b97..9de1dd210677d4a2faddba32354aa43acbf277ea 100644 |
--- a/media/base/yuv_convert.cc |
+++ b/media/base/yuv_convert.cc |
@@ -23,6 +23,9 @@ |
#include "build/build_config.h" |
#include "media/base/simd/convert_rgb_to_yuv.h" |
#include "media/base/simd/convert_yuv_to_rgb.h" |
+#if defined(ARCH_CPU_X86_FAMILY) |
Alpha Left Google
2013/01/31 19:43:15
No need to do ifdef, it's just a header file.
wolenetz
2013/01/31 22:13:45
Done.
|
+#include "media/base/simd/empty_register_state.h" |
+#endif |
#include "media/base/simd/filter_yuv.h" |
#if defined(ARCH_CPU_X86_FAMILY) |
@@ -40,9 +43,15 @@ static FilterYUVRowsProc ChooseFilterYUVRowsProc() { |
base::CPU cpu; |
if (cpu.has_sse2()) |
return &FilterYUVRows_SSE2; |
+ |
+ // Visual Studio 2010 does not support the needed MMX intrinsics on x64. |
+ // SSE2 is faster and guaranteed to exist in x64, so exclude the MMX |
+ // version in Win64. |
+#if !(defined(ARCH_CPU_X86_64) && defined(COMPILER_MSVC)) |
Alpha Left Google
2013/01/31 19:43:15
I suggest you move this block to yuv_convert.h and
wolenetz
2013/01/31 22:13:45
Done.
|
if (cpu.has_mmx()) |
return &FilterYUVRows_MMX; |
-#endif |
+#endif // !(defined(ARCH_CPU_X86_64) && defined(COMPILER_MSVC)) |
+#endif // defined(ARCH_CPU_X86_FAMILY) |
return &FilterYUVRows_C; |
} |
@@ -97,8 +106,11 @@ void EmptyRegisterState() { |
has_mmx = cpu.has_mmx(); |
checked = true; |
} |
+ |
+ // Visual Studio 2010 does not support _mm_empty() intrinsic on x64, |
+ // so unifying on yasm emms. |
if (has_mmx) |
- _mm_empty(); |
+ EmptyRegisterState_MMX(); |
Alpha Left Google
2013/01/31 19:43:15
Use the MEDIA_DO_NOT_USE_MMX_INTRINSICS macro.
wolenetz
2013/01/31 22:13:45
Done.
|
#endif |
} |