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
,
33 MEDIA_EXPORT
void ConvertYUVAToARGB_C(const uint8
* yplane
,
46 MEDIA_EXPORT
void ConvertYUVAToARGBRow_C(const uint8
* yplane
,
53 MEDIA_EXPORT
void ConvertYUVToRGB32_SSE(const uint8
* yplane
,
64 MEDIA_EXPORT
void ConvertYUVToRGB32_MMX(const uint8
* yplane
,
75 MEDIA_EXPORT
void ConvertYUVAToARGB_MMX(const uint8
* yplane
,
88 MEDIA_EXPORT
void ScaleYUVToRGB32Row_C(const uint8
* y_buf
,
95 MEDIA_EXPORT
void LinearScaleYUVToRGB32Row_C(const uint8
* y_buf
,
100 ptrdiff_t source_dx
);
102 MEDIA_EXPORT
void LinearScaleYUVToRGB32RowWithRange_C(const uint8
* y_buf
,
112 // Assembly functions are declared without namespace.
115 // We use ptrdiff_t instead of int for yasm routine parameters to portably
116 // sign-extend int. On Win64, MSVC does not sign-extend the value in the stack
117 // home of int function parameters, and yasm routines are unaware of this lack
118 // of extension and fault. ptrdiff_t is portably sign-extended and fixes this
119 // issue on at least Win64. The C-equivalent RowProc versions' prototypes
120 // include the same change to ptrdiff_t to reuse the typedefs.
122 MEDIA_EXPORT
void ConvertYUVToRGB32Row_MMX(const uint8
* yplane
,
128 MEDIA_EXPORT
void ConvertYUVAToARGBRow_MMX(const uint8
* yplane
,
135 MEDIA_EXPORT
void ConvertYUVToRGB32Row_SSE(const uint8
* yplane
,
141 MEDIA_EXPORT
void ScaleYUVToRGB32Row_MMX(const uint8
* y_buf
,
146 ptrdiff_t source_dx
);
148 MEDIA_EXPORT
void ScaleYUVToRGB32Row_SSE(const uint8
* y_buf
,
153 ptrdiff_t source_dx
);
155 MEDIA_EXPORT
void ScaleYUVToRGB32Row_SSE2_X64(const uint8
* y_buf
,
160 ptrdiff_t source_dx
);
162 MEDIA_EXPORT
void LinearScaleYUVToRGB32Row_MMX(const uint8
* y_buf
,
167 ptrdiff_t source_dx
);
169 MEDIA_EXPORT
void LinearScaleYUVToRGB32Row_SSE(const uint8
* y_buf
,
174 ptrdiff_t source_dx
);
176 MEDIA_EXPORT
void LinearScaleYUVToRGB32Row_MMX_X64(const uint8
* y_buf
,
181 ptrdiff_t source_dx
);
185 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_