| Index: media/base/simd/convert_yuv_to_rgb.cc
|
| ===================================================================
|
| --- media/base/simd/convert_yuv_to_rgb.cc (revision 0)
|
| +++ media/base/simd/convert_yuv_to_rgb.cc (revision 0)
|
| @@ -0,0 +1,73 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "media/base/simd/convert_yuv_to_rgb.h"
|
| +
|
| +#include "build/build_config.h"
|
| +#include "media/base/cpu_features.h"
|
| +#include "media/base/simd/convert_yuv_to_rgb_ssse3.h"
|
| +
|
| +namespace media {
|
| +namespace simd {
|
| +
|
| +void ConvertYUVtoRGB32(const uint8* y_buf,
|
| + const uint8* u_buf,
|
| + const uint8* v_buf,
|
| + uint8* rgb_buf,
|
| + int width,
|
| + int height,
|
| + int y_pitch,
|
| + int uv_pitch,
|
| + int rgb_pitch,
|
| + YUVType yuv_type) {
|
| + int uv_pitch0 = media::YV12 ? 0 : uv_pitch;
|
| + for (; height >= 2; height -= 2) {
|
| + ConvertYUVtoARGBRow(y_buf, u_buf, v_buf, rgb_buf, width);
|
| + rgb_buf += rgb_pitch;
|
| + y_buf += y_pitch;
|
| + u_buf += uv_pitch0;
|
| + v_buf += uv_pitch0;
|
| +
|
| + ConvertYUVtoARGBRow(y_buf, u_buf, v_buf, rgb_buf, width);
|
| + rgb_buf += rgb_pitch;
|
| + y_buf += y_pitch;
|
| + u_buf += uv_pitch;
|
| + v_buf += uv_pitch;
|
| + }
|
| +
|
| + if (height)
|
| + ConvertYUVtoARGBRow(y_buf, u_buf, v_buf, rgb_buf, width);
|
| +}
|
| +
|
| +void ConvertYUVtoRGB24(const uint8* y_buf,
|
| + const uint8* u_buf,
|
| + const uint8* v_buf,
|
| + uint8* rgb_buf,
|
| + int width,
|
| + int height,
|
| + int y_pitch,
|
| + int uv_pitch,
|
| + int rgb_pitch,
|
| + YUVType yuv_type) {
|
| + int uv_pitch0 = media::YV12 ? 0 : uv_pitch;
|
| + for (; height >= 2; height -= 2) {
|
| + ConvertYUVtoRGBRow(y_buf, u_buf, v_buf, rgb_buf, width);
|
| + rgb_buf += rgb_pitch;
|
| + y_buf += y_pitch;
|
| + u_buf += uv_pitch0;
|
| + v_buf += uv_pitch0;
|
| +
|
| + ConvertYUVtoRGBRow(y_buf, u_buf, v_buf, rgb_buf, width);
|
| + rgb_buf += rgb_pitch;
|
| + y_buf += y_pitch;
|
| + u_buf += uv_pitch;
|
| + v_buf += uv_pitch;
|
| + }
|
| +
|
| + if (height)
|
| + ConvertYUVtoRGBRow(y_buf, u_buf, v_buf, rgb_buf, width);
|
| +}
|
| +
|
| +} // namespace simd
|
| +} // namespace media
|
|
|
| Property changes on: media\base\simd\convert_yuv_to_rgb.cc
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|