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

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: Localize use of new macro and yasm emms to yuv_convert.cc 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..e64ea48c458be2a6dd3d5e3cdddee9c1d70dd5dd 100644
--- a/media/base/yuv_convert.cc
+++ b/media/base/yuv_convert.cc
@@ -33,6 +33,11 @@
#endif
#endif
+// Assembly functions are declared without namespace.
+extern "C" {
+void EmptyRegisterState_MMX(void);
scherkus (not reviewing) 2013/02/01 01:13:17 nit: we don't typically put the void type in for p
wolenetz 2013/02/01 02:42:07 Done.
+} // extern "C"
+
namespace media {
static FilterYUVRowsProc ChooseFilterYUVRowsProc() {
@@ -40,9 +45,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 +105,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