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

Unified Diff: media/base/yuv_convert.h

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.h
diff --git a/media/base/yuv_convert.h b/media/base/yuv_convert.h
index afd47d79ca1ea836a4a9852b8fb1cd224287344e..92b0a7f52dc0c7650204b16e46c9faf2606286e3 100644
--- a/media/base/yuv_convert.h
+++ b/media/base/yuv_convert.h
@@ -9,6 +9,16 @@
namespace media {
+// Visual Studio 2010 does not support MMX intrinsics on x64.
+// Some win64 yuv_convert code paths use SSE+MMX yasm, so without rewriting
+// them, we use yasm EmptyRegisterState_MMX in place of _mm_empty() or
+// hide the versions implemented with heavy use of MMX intrinsics.
+// TODO(wolenetz): Use MMX intrinsics when compiling win64 with Visual
+// Studio 2012? (crbug.com/173450)
scherkus (not reviewing) 2013/02/01 01:13:17 pedantic nit: use "http://crbug.com/173450: withou
wolenetz 2013/02/01 02:42:07 Done.
+#if defined(ARCH_CPU_X86_64) && defined(COMPILER_MSVC)
+#define MEDIA_DO_NOT_USE_MMX_INTRINSICS
scherkus (not reviewing) 2013/02/01 01:13:17 nit: it'd be clearer to negate the define i.e., US
wolenetz 2013/02/01 02:42:07 Done.
+#endif
scherkus (not reviewing) 2013/02/01 01:13:17 I believe this can be moved to the .cc
wolenetz 2013/02/01 02:42:07 Done.
+
// Type of YUV surface.
// The value of these enums matter as they are used to shift vertical indices.
enum YUVType {
@@ -121,7 +131,6 @@ void ConvertNV21ToYUV(const uint8* src,
int height);
// Empty SIMD register state after calling optimized scaler functions.
-// This method is only used in unit test after calling SIMD functions.
void EmptyRegisterState();
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698