summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 01:05:21 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 01:05:21 +0000
commitcaf09f737c0d48bca9c541130daf78ab40fe6953 (patch)
tree6f4031f328c4fd7bdb2df26c40da830faf6b5055 /media
parent7195b839a8980e4ef349c1a3a0d0030d8dca1d55 (diff)
downloadchromium_src-caf09f737c0d48bca9c541130daf78ab40fe6953.zip
chromium_src-caf09f737c0d48bca9c541130daf78ab40fe6953.tar.gz
chromium_src-caf09f737c0d48bca9c541130daf78ab40fe6953.tar.bz2
Revert 100917 - Not use SSSE3 code that was merged accidentally
Failed on official Linux 32 builder. (x486?) http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Linux/builds/11240/steps/compile/logs/stdio In file included from media/base/yuv_convert.cc:33: /usr/lib/gcc/i486-linux-gnu/4.4.3/include/emmintrin.h:32:3:error: #error "SSE2 instruction set not enabled" make: *** [out/Release/obj.target/yuv_convert/media/base/yuv_convert.o] Error 1 Disable SSSE3 conversion code as tests are not running. TBR=hbono@chromium.org BUG=None TEST=None Review URL: http://codereview.chromium.org/7888014 TBR=hclam@chromium.org Review URL: http://codereview.chromium.org/7890023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/yuv_convert.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc
index 69c03e4..22f1a24 100644
--- a/media/base/yuv_convert.cc
+++ b/media/base/yuv_convert.cc
@@ -297,7 +297,10 @@ void ConvertRGB32ToYUV(const uint8* rgbframe,
// TODO(hclam): Implement a NEON version.
convert_proc = &ConvertRGB32ToYUV_C;
#else
- if (hasSSE2())
+ // For x86 processors, check if SSSE3 (or SSE2) is supported.
+ if (hasSSSE3())
+ convert_proc = &ConvertRGB32ToYUV_SSSE3;
+ else if (hasSSE2())
convert_proc = &ConvertRGB32ToYUV_SSE2;
else
convert_proc = &ConvertRGB32ToYUV_C;
@@ -317,8 +320,21 @@ void ConvertRGB24ToYUV(const uint8* rgbframe,
int rgbstride,
int ystride,
int uvstride) {
+#if defined(ARCH_CPU_ARM_FAMILY)
ConvertRGB24ToYUV_C(rgbframe, yplane, uplane, vplane, width, height,
rgbstride, ystride, uvstride);
+#else
+ static void (*convert_proc)(const uint8*, uint8*, uint8*, uint8*,
+ int, int, int, int, int) = NULL;
+ if (!convert_proc) {
+ if (hasSSSE3())
+ convert_proc = &ConvertRGB24ToYUV_SSSE3;
+ else
+ convert_proc = &ConvertRGB24ToYUV_C;
+ }
+ convert_proc(rgbframe, yplane, uplane, vplane, width, height,
+ rgbstride, ystride, uvstride);
+#endif
}
void ConvertYUY2ToYUV(const uint8* src,