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.
5 #include "media/base/simd/convert_rgb_to_yuv.h"
7 #include "build/build_config.h"
8 #include "media/base/simd/convert_rgb_to_yuv_ssse3.h"
12 void ConvertRGB32ToYUV_SSSE3(const uint8
* rgbframe
,
21 for (; height
>= 2; height
-= 2) {
22 ConvertARGBToYUVRow_SSSE3(rgbframe
, yplane
, uplane
, vplane
, width
);
23 rgbframe
+= rgbstride
;
26 ConvertARGBToYUVRow_SSSE3(rgbframe
, yplane
, NULL
, NULL
, width
);
27 rgbframe
+= rgbstride
;
35 ConvertARGBToYUVRow_SSSE3(rgbframe
, yplane
, uplane
, vplane
, width
);
38 void ConvertRGB24ToYUV_SSSE3(const uint8
* rgbframe
,
47 for (; height
>= 2; height
-= 2) {
48 ConvertRGBToYUVRow_SSSE3(rgbframe
, yplane
, uplane
, vplane
, width
);
49 rgbframe
+= rgbstride
;
52 ConvertRGBToYUVRow_SSSE3(rgbframe
, yplane
, NULL
, NULL
, width
);
53 rgbframe
+= rgbstride
;
61 ConvertRGBToYUVRow_SSSE3(rgbframe
, yplane
, uplane
, vplane
, width
);