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 #ifndef MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_
6 #define MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_
8 #include "base/basictypes.h"
9 #include "media/base/yuv_convert.h"
13 // These methods are exported for testing purposes only. Library users should
14 // only call the methods listed in yuv_convert.h.
16 MEDIA_EXPORT
void ConvertYUVToRGB32_C(const uint8
* yplane
,
27 MEDIA_EXPORT
void ConvertYUVToRGB32Row_C(const uint8
* yplane
,
32 const int16
* convert_table
);
34 MEDIA_EXPORT
void ConvertYUVAToARGB_C(const uint8
* yplane
,
47 MEDIA_EXPORT
void ConvertYUVAToARGBRow_C(const uint8
* yplane
,
53 const int16
* convert_table
);
55 MEDIA_EXPORT
void ConvertYUVToRGB32_SSE(const uint8
* yplane
,
66 MEDIA_EXPORT
void ConvertYUVAToARGB_MMX(const uint8
* yplane
,
79 MEDIA_EXPORT
void ScaleYUVToRGB32Row_C(const uint8
* y_buf
,
85 const int16
* convert_table
);
87 MEDIA_EXPORT
void LinearScaleYUVToRGB32Row_C(const uint8
* y_buf
,
93 const int16
* convert_table
);
95 MEDIA_EXPORT
void LinearScaleYUVToRGB32RowWithRange_C(
103 const int16
* convert_table
);
107 // Assembly functions are declared without namespace.
110 // We use ptrdiff_t instead of int for yasm routine parameters to portably
111 // sign-extend int. On Win64, MSVC does not sign-extend the value in the stack
112 // home of int function parameters, and yasm routines are unaware of this lack
113 // of extension and fault. ptrdiff_t is portably sign-extended and fixes this
114 // issue on at least Win64. The C-equivalent RowProc versions' prototypes
115 // include the same change to ptrdiff_t to reuse the typedefs.
117 MEDIA_EXPORT
void ConvertYUVAToARGBRow_MMX(const uint8
* yplane
,
123 const int16
* convert_table
);
125 MEDIA_EXPORT
void ConvertYUVToRGB32Row_SSE(const uint8
* yplane
,
130 const int16
* convert_table
);
132 MEDIA_EXPORT
void ScaleYUVToRGB32Row_SSE(const uint8
* y_buf
,
138 const int16
* convert_table
);
140 MEDIA_EXPORT
void ScaleYUVToRGB32Row_SSE2_X64(const uint8
* y_buf
,
146 const int16
* convert_table
);
148 MEDIA_EXPORT
void LinearScaleYUVToRGB32Row_SSE(const uint8
* y_buf
,
154 const int16
* convert_table
);
156 MEDIA_EXPORT
void LinearScaleYUVToRGB32Row_MMX_X64(const uint8
* y_buf
,
162 const int16
* convert_table
);
166 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_