Chromium Code Reviews| Index: media/base/simd/convert_yuv_to_rgb_x86.cc |
| diff --git a/media/base/simd/convert_yuv_to_rgb_x86.cc b/media/base/simd/convert_yuv_to_rgb_x86.cc |
| index 3825bdb7a0e16f938636cc7e1f5bdd1b2f4ca8ed..c692b65ca8c5ce9f0d58a62771dc6c55c0b10272 100644 |
| --- a/media/base/simd/convert_yuv_to_rgb_x86.cc |
| +++ b/media/base/simd/convert_yuv_to_rgb_x86.cc |
| @@ -40,6 +40,37 @@ void ConvertYUVToRGB32_MMX(const uint8* yplane, |
| _mm_empty(); |
| } |
| +void ConvertYUVAToARGB_MMX(const uint8* yplane, |
| + const uint8* uplane, |
| + const uint8* vplane, |
| + const uint8* aplane, |
| + uint8* rgbframe, |
| + int width, |
| + int height, |
| + int ystride, |
| + int uvstride, |
| + int astride, |
| + int rgbstride, |
| + YUVType yuv_type) { |
| + unsigned int y_shift = yuv_type; |
| + for (int y = 0; y < height; y++) { |
|
Tom Finegan
2013/02/25 22:56:06
Pre-increment (consistent with other places in thi
vignesh
2013/02/25 23:33:14
Done.
|
| + uint8* rgb_row = rgbframe + y * rgbstride; |
| + const uint8* y_ptr = yplane + y * ystride; |
| + const uint8* u_ptr = uplane + (y >> y_shift) * uvstride; |
| + const uint8* v_ptr = vplane + (y >> y_shift) * uvstride; |
| + const uint8* a_ptr = aplane + y * astride; |
| + |
| + ConvertYUVAToARGBRow_MMX(y_ptr, |
| + u_ptr, |
| + v_ptr, |
| + a_ptr, |
| + rgb_row, |
| + width); |
| + } |
| + |
| + _mm_empty(); |
| +} |
| + |
| void ConvertYUVToRGB32_SSE(const uint8* yplane, |
| const uint8* uplane, |
| const uint8* vplane, |