Chromium Code Reviews| Index: media/base/simd/convert_rgb_to_yuv_c.cc |
| diff --git a/media/base/simd/convert_rgb_to_yuv_c.cc b/media/base/simd/convert_rgb_to_yuv_c.cc |
| index ae4c7313cd701cafcdf97286c2242e52e40d070d..71c8375005e431e993799d93890cee65a7c0a71f 100644 |
| --- a/media/base/simd/convert_rgb_to_yuv_c.cc |
| +++ b/media/base/simd/convert_rgb_to_yuv_c.cc |
| @@ -28,6 +28,16 @@ void ConvertRGB32ToYUV_C(const uint8* rgbframe, |
| for (int j = 0; j < width; ++j) { |
| // Since the input pixel format is RGB32, there are 4 bytes per pixel. |
| const uint8* pixel = rgbframe + 4 * j; |
| +#if defined(OS_ANDROID) |
| + yplane[j] = clip_byte(((pixel[0] * 66 + pixel[1] * 129 + |
|
scherkus (not reviewing)
2013/06/19 19:49:50
this is mostly duplicated -- can you instead do so
hkuang1
2013/06/19 23:21:11
Done.
|
| + pixel[2] * 25 + 128) >> 8) + 16); |
| + if (i % 2 == 0 && j % 2 == 0) { |
| + uplane[j / 2] = clip_byte(((pixel[0] * -38 + pixel[1] * -74 + |
| + pixel[2] * 112 + 128) >> 8) + 128); |
| + vplane[j / 2] = clip_byte(((pixel[0] * 112 + pixel[1] * -94 + |
| + pixel[2] * -18 + 128) >> 8) + 128); |
| + } |
| +#else |
| yplane[j] = clip_byte(((pixel[2] * 66 + pixel[1] * 129 + |
| pixel[0] * 25 + 128) >> 8) + 16); |
| if (i % 2 == 0 && j % 2 == 0) { |
| @@ -36,8 +46,8 @@ void ConvertRGB32ToYUV_C(const uint8* rgbframe, |
| vplane[j / 2] = clip_byte(((pixel[2] * 112 + pixel[1] * -94 + |
| pixel[0] * -18 + 128) >> 8) + 128); |
| } |
| +#endif |
| } |
| - |
| rgbframe += rgbstride; |
| yplane += ystride; |
| if (i % 2 == 0) { |