diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-11 21:53:12 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-11 21:53:12 +0000 |
commit | c86da3b5be9af1d0bb78e6d8058ad8e0e295313d (patch) | |
tree | 5c323f253805f14dddfc819e257e18917d9a5715 /media | |
parent | b5f7615d258c25908fc09161d2458e9c8f50ef2c (diff) | |
download | chromium_src-c86da3b5be9af1d0bb78e6d8058ad8e0e295313d.zip chromium_src-c86da3b5be9af1d0bb78e6d8058ad8e0e295313d.tar.gz chromium_src-c86da3b5be9af1d0bb78e6d8058ad8e0e295313d.tar.bz2 |
Fixed build problem with disabled SSE.
BUG=19113
TEST=Code builds with disabled SSE.
Review URL: http://codereview.chromium.org/1576032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/base/yuv_convert.cc | 4 | ||||
-rw-r--r-- | media/base/yuv_row.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc index 257d7c8..8ff8b1f 100644 --- a/media/base/yuv_convert.cc +++ b/media/base/yuv_convert.cc @@ -20,7 +20,7 @@ // Header for low level row functions. #include "media/base/yuv_row.h" -#if USE_MMX +#if USE_SSE #if defined(_MSC_VER) #include <intrin.h> #else @@ -67,7 +67,7 @@ void ConvertYUVToRGB32(const uint8* y_buf, // 4 pixels are blended at a time. static void FilterRows(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr, int width, int scaled_y_fraction) { -#if USE_MMX +#if USE_SSE __m128i zero = _mm_setzero_si128(); __m128i y1_fraction = _mm_set1_epi16( static_cast<unsigned short>(scaled_y_fraction >> 8)); diff --git a/media/base/yuv_row.h b/media/base/yuv_row.h index 7e3163d..5392628 100644 --- a/media/base/yuv_row.h +++ b/media/base/yuv_row.h @@ -79,6 +79,12 @@ void LinearScaleYUVToRGB32Row(const uint8* y_buf, #endif #endif +#if defined(__SSE2__) || defined(_MSC_VER) +#define USE_SSE 1 +#else +#define USE_SSE 0 +#endif + // x64 uses MMX2 (SSE) so emms is not required. #if USE_MMX && !defined(ARCH_CPU_X86_64) #if defined(_MSC_VER) |