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 ConvertYUVToRGB32_MMX(const uint8
* yplane
,
26 unsigned int y_shift
= yuv_type
;
27 for (int y
= 0; y
< height
; ++y
) {
28 uint8
* rgb_row
= rgbframe
+ y
* rgbstride
;
29 const uint8
* y_ptr
= yplane
+ y
* ystride
;
30 const uint8
* u_ptr
= uplane
+ (y
>> y_shift
) * uvstride
;
31 const uint8
* v_ptr
= vplane
+ (y
>> y_shift
) * uvstride
;
33 ConvertYUVToRGB32Row_MMX(y_ptr
,
43 void ConvertYUVAToARGB_MMX(const uint8
* yplane
,
55 unsigned int y_shift
= yuv_type
;
56 for (int y
= 0; y
< height
; ++y
) {
57 uint8
* rgb_row
= rgbframe
+ y
* rgbstride
;
58 const uint8
* y_ptr
= yplane
+ y
* ystride
;
59 const uint8
* u_ptr
= uplane
+ (y
>> y_shift
) * uvstride
;
60 const uint8
* v_ptr
= vplane
+ (y
>> y_shift
) * uvstride
;
61 const uint8
* a_ptr
= aplane
+ y
* astride
;
63 ConvertYUVAToARGBRow_MMX(y_ptr
,
74 void ConvertYUVToRGB32_SSE(const uint8
* yplane
,
84 unsigned int y_shift
= yuv_type
;
85 for (int y
= 0; y
< height
; ++y
) {
86 uint8
* rgb_row
= rgbframe
+ y
* rgbstride
;
87 const uint8
* y_ptr
= yplane
+ y
* ystride
;
88 const uint8
* u_ptr
= uplane
+ (y
>> y_shift
) * uvstride
;
89 const uint8
* v_ptr
= vplane
+ (y
>> y_shift
) * uvstride
;
91 ConvertYUVToRGB32Row_SSE(y_ptr
,