1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
11 #include "media/base/simd/convert_yuv_to_rgb.h"
12 #include "media/base/yuv_convert.h"
16 void ConvertYUVAToARGB_MMX(const uint8
* yplane
,
28 unsigned int y_shift
= GetVerticalShift(yuv_type
);
29 for (int y
= 0; y
< height
; ++y
) {
30 uint8
* rgb_row
= rgbframe
+ y
* rgbstride
;
31 const uint8
* y_ptr
= yplane
+ y
* ystride
;
32 const uint8
* u_ptr
= uplane
+ (y
>> y_shift
) * uvstride
;
33 const uint8
* v_ptr
= vplane
+ (y
>> y_shift
) * uvstride
;
34 const uint8
* a_ptr
= aplane
+ y
* astride
;
36 ConvertYUVAToARGBRow_MMX(y_ptr
,
42 GetLookupTable(yuv_type
));
48 void ConvertYUVToRGB32_SSE(const uint8
* yplane
,
58 unsigned int y_shift
= GetVerticalShift(yuv_type
);
59 for (int y
= 0; y
< height
; ++y
) {
60 uint8
* rgb_row
= rgbframe
+ y
* rgbstride
;
61 const uint8
* y_ptr
= yplane
+ y
* ystride
;
62 const uint8
* u_ptr
= uplane
+ (y
>> y_shift
) * uvstride
;
63 const uint8
* v_ptr
= vplane
+ (y
>> y_shift
) * uvstride
;
65 ConvertYUVToRGB32Row_SSE(y_ptr
,
70 GetLookupTable(yuv_type
));