Ignore title parameter for navigator.registerProtocolHandler
[chromium-blink-merge.git] / media / base / simd / convert_yuv_to_rgb.h
blob6c0a9661135e113533c78790318bc64d59229575
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"
11 namespace media {
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,
17 const uint8* uplane,
18 const uint8* vplane,
19 uint8* rgbframe,
20 int width,
21 int height,
22 int ystride,
23 int uvstride,
24 int rgbstride,
25 YUVType yuv_type);
27 MEDIA_EXPORT void ConvertYUVToRGB32Row_C(const uint8* yplane,
28 const uint8* uplane,
29 const uint8* vplane,
30 uint8* rgbframe,
31 ptrdiff_t width,
32 const int16 convert_table[1024][4]);
34 MEDIA_EXPORT void ConvertYUVAToARGB_C(const uint8* yplane,
35 const uint8* uplane,
36 const uint8* vplane,
37 const uint8* aplane,
38 uint8* rgbframe,
39 int width,
40 int height,
41 int ystride,
42 int uvstride,
43 int avstride,
44 int rgbstride,
45 YUVType yuv_type);
47 MEDIA_EXPORT void ConvertYUVAToARGBRow_C(const uint8* yplane,
48 const uint8* uplane,
49 const uint8* vplane,
50 const uint8* aplane,
51 uint8* rgbframe,
52 ptrdiff_t width,
53 const int16 convert_table[1024][4]);
55 MEDIA_EXPORT void ConvertYUVToRGB32_SSE(const uint8* yplane,
56 const uint8* uplane,
57 const uint8* vplane,
58 uint8* rgbframe,
59 int width,
60 int height,
61 int ystride,
62 int uvstride,
63 int rgbstride,
64 YUVType yuv_type);
66 MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8* yplane,
67 const uint8* uplane,
68 const uint8* vplane,
69 uint8* rgbframe,
70 int width,
71 int height,
72 int ystride,
73 int uvstride,
74 int rgbstride,
75 YUVType yuv_type);
77 MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8* yplane,
78 const uint8* uplane,
79 const uint8* vplane,
80 const uint8* aplane,
81 uint8* rgbframe,
82 int width,
83 int height,
84 int ystride,
85 int uvstride,
86 int avstride,
87 int rgbstride,
88 YUVType yuv_type);
90 MEDIA_EXPORT void ScaleYUVToRGB32Row_C(const uint8* y_buf,
91 const uint8* u_buf,
92 const uint8* v_buf,
93 uint8* rgb_buf,
94 ptrdiff_t width,
95 ptrdiff_t source_dx,
96 const int16 convert_table[1024][4]);
98 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C(
99 const uint8* y_buf,
100 const uint8* u_buf,
101 const uint8* v_buf,
102 uint8* rgb_buf,
103 ptrdiff_t width,
104 ptrdiff_t source_dx,
105 const int16 convert_table[1024][4]);
107 MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C(
108 const uint8* y_buf,
109 const uint8* u_buf,
110 const uint8* v_buf,
111 uint8* rgb_buf,
112 int dest_width,
113 int source_x,
114 int source_dx,
115 const int16 convert_table[1024][4]);
117 } // namespace media
119 // Assembly functions are declared without namespace.
120 extern "C" {
122 // We use ptrdiff_t instead of int for yasm routine parameters to portably
123 // sign-extend int. On Win64, MSVC does not sign-extend the value in the stack
124 // home of int function parameters, and yasm routines are unaware of this lack
125 // of extension and fault. ptrdiff_t is portably sign-extended and fixes this
126 // issue on at least Win64. The C-equivalent RowProc versions' prototypes
127 // include the same change to ptrdiff_t to reuse the typedefs.
129 MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8* yplane,
130 const uint8* uplane,
131 const uint8* vplane,
132 uint8* rgbframe,
133 ptrdiff_t width,
134 const int16 convert_table[1024][4]);
136 MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane,
137 const uint8* uplane,
138 const uint8* vplane,
139 const uint8* aplane,
140 uint8* rgbframe,
141 ptrdiff_t width,
142 const int16 convert_table[1024][4]);
144 MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8* yplane,
145 const uint8* uplane,
146 const uint8* vplane,
147 uint8* rgbframe,
148 ptrdiff_t width,
149 const int16 convert_table[1024][4]);
151 MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8* y_buf,
152 const uint8* u_buf,
153 const uint8* v_buf,
154 uint8* rgb_buf,
155 ptrdiff_t width,
156 ptrdiff_t source_dx,
157 const int16 convert_table[1024][4]);
159 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf,
160 const uint8* u_buf,
161 const uint8* v_buf,
162 uint8* rgb_buf,
163 ptrdiff_t width,
164 ptrdiff_t source_dx,
165 const int16 convert_table[1024][4]);
167 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE2_X64(
168 const uint8* y_buf,
169 const uint8* u_buf,
170 const uint8* v_buf,
171 uint8* rgb_buf,
172 ptrdiff_t width,
173 ptrdiff_t source_dx,
174 const int16 convert_table[1024][4]);
176 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(
177 const uint8* y_buf,
178 const uint8* u_buf,
179 const uint8* v_buf,
180 uint8* rgb_buf,
181 ptrdiff_t width,
182 ptrdiff_t source_dx,
183 const int16 convert_table[1024][4]);
185 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(
186 const uint8* y_buf,
187 const uint8* u_buf,
188 const uint8* v_buf,
189 uint8* rgb_buf,
190 ptrdiff_t width,
191 ptrdiff_t source_dx,
192 const int16 convert_table[1024][4]);
194 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX_X64(
195 const uint8* y_buf,
196 const uint8* u_buf,
197 const uint8* v_buf,
198 uint8* rgb_buf,
199 ptrdiff_t width,
200 ptrdiff_t source_dx,
201 const int16 convert_table[1024][4]);
203 } // extern "C"
205 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_