Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(940)

Unified Diff: media/base/yuv_convert.cc

Issue 12082087: Replace or exclude MMX intrinsics in yuv_convert_simd_x86 due to lack of VS2010 support for them in… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix readability nit Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/yuv_convert.cc
diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc
index 7aa16cc063a630833378c557bf0b05bdf8130b97..7116ca635ec9161f85bb31394a1ad40373d7cea1 100644
--- a/media/base/yuv_convert.cc
+++ b/media/base/yuv_convert.cc
@@ -23,6 +23,7 @@
#include "build/build_config.h"
#include "media/base/simd/convert_rgb_to_yuv.h"
#include "media/base/simd/convert_yuv_to_rgb.h"
+#include "media/base/simd/empty_register_state.h"
#include "media/base/simd/filter_yuv.h"
#if defined(ARCH_CPU_X86_FAMILY)
@@ -40,9 +41,12 @@ static FilterYUVRowsProc ChooseFilterYUVRowsProc() {
base::CPU cpu;
if (cpu.has_sse2())
return &FilterYUVRows_SSE2;
+
+#if !defined(MEDIA_DO_NOT_USE_MMX_INTRINSICS)
if (cpu.has_mmx())
return &FilterYUVRows_MMX;
-#endif
+#endif // !defined(MEDIA_DO_NOT_USE_MMX_INTRINSICS)
+#endif // defined(ARCH_CPU_X86_FAMILY)
return &FilterYUVRows_C;
}
@@ -97,9 +101,16 @@ void EmptyRegisterState() {
has_mmx = cpu.has_mmx();
checked = true;
}
- if (has_mmx)
+
+ if (has_mmx) {
+#if defined(MEDIA_DO_NOT_USE_MMX_INTRINSICS)
+ EmptyRegisterState_MMX();
+#else
_mm_empty();
-#endif
+#endif // defined(MEDIA_DO_NOT_USE_MMX_INTRINSICS)
+ }
+
+#endif // defined(ARCH_CPU_X86_FAMILY)
}
// 16.16 fixed point arithmetic
« media/base/yuv_convert.h ('K') | « media/base/yuv_convert.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698