| Index: media/base/yuv_convert.cc
|
| ===================================================================
|
| --- media/base/yuv_convert.cc (revision 99884)
|
| +++ media/base/yuv_convert.cc (working copy)
|
| @@ -19,6 +19,7 @@
|
|
|
| #include "build/build_config.h"
|
| #include "media/base/cpu_features.h"
|
| +#include "media/base/simd/convert_rgb_to_yuv.h"
|
| #include "media/base/yuv_convert_internal.h"
|
| #include "media/base/yuv_row.h"
|
|
|
| @@ -369,8 +370,10 @@
|
| // TODO(hclam): Implement a NEON version.
|
| convert_proc = &ConvertRGB32ToYUV_C;
|
| #else
|
| - // For x86 processors, check if SSE2 is supported.
|
| - 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;
|
| @@ -390,8 +393,21 @@
|
| 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,
|
|
|