1 /*
2  *  Copyright 2011 The LibYuv Project Authors. All rights reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS. All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef INCLUDE_LIBYUV_ROW_H_
12 #define INCLUDE_LIBYUV_ROW_H_
13 
14 #include <stdlib.h>  // For malloc.
15 
16 #include "libyuv/basic_types.h"
17 
18 #ifdef __cplusplus
19 namespace libyuv {
20 extern "C" {
21 #endif
22 
23 #if defined(__pnacl__) || defined(__CLR_VER) ||            \
24     (defined(__native_client__) && defined(__x86_64__)) || \
25     (defined(__i386__) && !defined(__SSE__) && !defined(__clang__))
26 #define LIBYUV_DISABLE_X86
27 #endif
28 #if defined(__native_client__)
29 #define LIBYUV_DISABLE_NEON
30 #endif
31 // MemorySanitizer does not support assembly code yet. http://crbug.com/344505
32 #if defined(__has_feature)
33 #if __has_feature(memory_sanitizer)
34 #define LIBYUV_DISABLE_X86
35 #endif
36 #endif
37 // clang >= 3.5.0 required for Arm64.
38 #if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON)
39 #if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5))
40 #define LIBYUV_DISABLE_NEON
41 #endif  // clang >= 3.5
42 #endif  // __clang__
43 
44 // GCC >= 4.7.0 required for AVX2.
45 #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
46 #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
47 #define GCC_HAS_AVX2 1
48 #endif  // GNUC >= 4.7
49 #endif  // __GNUC__
50 
51 // clang >= 3.4.0 required for AVX2.
52 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
53 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
54 #define CLANG_HAS_AVX2 1
55 #endif  // clang >= 3.4
56 #endif  // __clang__
57 
58 // clang >= 6.0.0 required for AVX512.
59 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
60 // clang in xcode follows a different versioning scheme.
61 // TODO(fbarchard): fix xcode 9 ios b/789.
62 #if (__clang_major__ >= 7) && !defined(__APPLE__)
63 #define CLANG_HAS_AVX512 1
64 #endif  // clang >= 7
65 #endif  // __clang__
66 
67 // Visual C 2012 required for AVX2.
68 #if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \
69     _MSC_VER >= 1700
70 #define VISUALC_HAS_AVX2 1
71 #endif  // VisualStudio >= 2012
72 
73 // The following are available on all x86 platforms:
74 #if !defined(LIBYUV_DISABLE_X86) && \
75     (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
76 // Conversions:
77 #define HAS_ABGRTOUVROW_SSSE3
78 #define HAS_ABGRTOYROW_SSSE3
79 #define HAS_ARGB1555TOARGBROW_SSE2
80 #define HAS_ARGB4444TOARGBROW_SSE2
81 #define HAS_ARGBEXTRACTALPHAROW_SSE2
82 #define HAS_ARGBSETROW_X86
83 #define HAS_ARGBSHUFFLEROW_SSSE3
84 #define HAS_ARGBTOARGB1555ROW_SSE2
85 #define HAS_ARGBTOARGB4444ROW_SSE2
86 #define HAS_ARGBTORAWROW_SSSE3
87 #define HAS_ARGBTORGB24ROW_SSSE3
88 #define HAS_ARGBTORGB565DITHERROW_SSE2
89 #define HAS_ARGBTORGB565ROW_SSE2
90 #define HAS_ARGBTOUV444ROW_SSSE3
91 #define HAS_ARGBTOUVJROW_SSSE3
92 #define HAS_ARGBTOUVROW_SSSE3
93 #define HAS_ARGBTOYJROW_SSSE3
94 #define HAS_ARGBTOYROW_SSSE3
95 #define HAS_BGRATOUVROW_SSSE3
96 #define HAS_BGRATOYROW_SSSE3
97 #define HAS_COPYROW_ERMS
98 #define HAS_COPYROW_SSE2
99 #define HAS_H422TOARGBROW_SSSE3
100 #define HAS_HALFFLOATROW_SSE2
101 #define HAS_I422TOARGB1555ROW_SSSE3
102 #define HAS_I422TOARGB4444ROW_SSSE3
103 #define HAS_I422TOARGBROW_SSSE3
104 #define HAS_I422TORGB24ROW_SSSE3
105 #define HAS_I422TORGB565ROW_SSSE3
106 #define HAS_I422TORGBAROW_SSSE3
107 #define HAS_I422TOUYVYROW_SSE2
108 #define HAS_I422TOYUY2ROW_SSE2
109 #define HAS_I444TOARGBROW_SSSE3
110 #define HAS_J400TOARGBROW_SSE2
111 #define HAS_J422TOARGBROW_SSSE3
112 #define HAS_MERGEUVROW_SSE2
113 #define HAS_MIRRORROW_SSSE3
114 #define HAS_MIRRORSPLITUVROW_SSSE3
115 #define HAS_NV12TOARGBROW_SSSE3
116 #define HAS_NV12TORGB24ROW_SSSE3
117 #define HAS_NV12TORGB565ROW_SSSE3
118 #define HAS_NV21TOARGBROW_SSSE3
119 #define HAS_NV21TORGB24ROW_SSSE3
120 #define HAS_RAWTOARGBROW_SSSE3
121 #define HAS_RAWTORGB24ROW_SSSE3
122 #define HAS_RAWTOYROW_SSSE3
123 #define HAS_RGB24TOARGBROW_SSSE3
124 #define HAS_RGB24TOYROW_SSSE3
125 #define HAS_RGB24TOYJROW_SSSE3
126 #define HAS_RAWTOYJROW_SSSE3
127 #define HAS_RGB565TOARGBROW_SSE2
128 #define HAS_RGBATOUVROW_SSSE3
129 #define HAS_RGBATOYROW_SSSE3
130 #define HAS_SETROW_ERMS
131 #define HAS_SETROW_X86
132 #define HAS_SPLITUVROW_SSE2
133 #define HAS_UYVYTOARGBROW_SSSE3
134 #define HAS_UYVYTOUV422ROW_SSE2
135 #define HAS_UYVYTOUVROW_SSE2
136 #define HAS_UYVYTOYROW_SSE2
137 #define HAS_YUY2TOARGBROW_SSSE3
138 #define HAS_YUY2TOUV422ROW_SSE2
139 #define HAS_YUY2TOUVROW_SSE2
140 #define HAS_YUY2TOYROW_SSE2
141 
142 // Effects:
143 #define HAS_ARGBADDROW_SSE2
144 #define HAS_ARGBAFFINEROW_SSE2
145 #define HAS_ARGBATTENUATEROW_SSSE3
146 #define HAS_ARGBBLENDROW_SSSE3
147 #define HAS_ARGBCOLORMATRIXROW_SSSE3
148 #define HAS_ARGBCOLORTABLEROW_X86
149 #define HAS_ARGBCOPYALPHAROW_SSE2
150 #define HAS_ARGBCOPYYTOALPHAROW_SSE2
151 #define HAS_ARGBGRAYROW_SSSE3
152 #define HAS_ARGBLUMACOLORTABLEROW_SSSE3
153 #define HAS_ARGBMIRRORROW_SSE2
154 #define HAS_ARGBMULTIPLYROW_SSE2
155 #define HAS_ARGBPOLYNOMIALROW_SSE2
156 #define HAS_ARGBQUANTIZEROW_SSE2
157 #define HAS_ARGBSEPIAROW_SSSE3
158 #define HAS_ARGBSHADEROW_SSE2
159 #define HAS_ARGBSUBTRACTROW_SSE2
160 #define HAS_ARGBUNATTENUATEROW_SSE2
161 #define HAS_BLENDPLANEROW_SSSE3
162 #define HAS_COMPUTECUMULATIVESUMROW_SSE2
163 #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
164 #define HAS_INTERPOLATEROW_SSSE3
165 #define HAS_RGBCOLORTABLEROW_X86
166 #define HAS_SOBELROW_SSE2
167 #define HAS_SOBELTOPLANEROW_SSE2
168 #define HAS_SOBELXROW_SSE2
169 #define HAS_SOBELXYROW_SSE2
170 #define HAS_SOBELYROW_SSE2
171 
172 // The following functions fail on gcc/clang 32 bit with fpic and framepointer.
173 // caveat: clangcl uses row_win.cc which works.
174 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
175     defined(_MSC_VER)
176 // TODO(fbarchard): fix build error on android_full_debug=1
177 // https://code.google.com/p/libyuv/issues/detail?id=517
178 #define HAS_I422ALPHATOARGBROW_SSSE3
179 #define HAS_I444ALPHATOARGBROW_SSSE3
180 #endif
181 #endif
182 
183 // The following are available on all x86 platforms, but
184 // require VS2012, clang 3.4 or gcc 4.7.
185 #if !defined(LIBYUV_DISABLE_X86) &&                          \
186     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \
187      defined(GCC_HAS_AVX2))
188 #define HAS_ARGBCOPYALPHAROW_AVX2
189 #define HAS_ARGBCOPYYTOALPHAROW_AVX2
190 #define HAS_ARGBEXTRACTALPHAROW_AVX2
191 #define HAS_ARGBMIRRORROW_AVX2
192 #define HAS_ARGBPOLYNOMIALROW_AVX2
193 #define HAS_ARGBSHUFFLEROW_AVX2
194 #define HAS_ARGBTORGB565DITHERROW_AVX2
195 #define HAS_ARGBTOUVJROW_AVX2
196 #define HAS_ARGBTOUVROW_AVX2
197 #define HAS_ARGBTOYJROW_AVX2
198 #define HAS_ARGBTOYROW_AVX2
199 #define HAS_RGB24TOYJROW_AVX2
200 #define HAS_RAWTOYJROW_AVX2
201 #define HAS_COPYROW_AVX
202 #define HAS_H422TOARGBROW_AVX2
203 #define HAS_HALFFLOATROW_AVX2
204 //  #define HAS_HALFFLOATROW_F16C  // Enable to test halffloat cast
205 #define HAS_I422TOARGB1555ROW_AVX2
206 #define HAS_I422TOARGB4444ROW_AVX2
207 #define HAS_I422TOARGBROW_AVX2
208 #define HAS_I422TORGB24ROW_AVX2
209 #define HAS_I422TORGB565ROW_AVX2
210 #define HAS_I422TORGBAROW_AVX2
211 #define HAS_I444TOARGBROW_AVX2
212 #define HAS_INTERPOLATEROW_AVX2
213 #define HAS_J422TOARGBROW_AVX2
214 #define HAS_MERGEUVROW_AVX2
215 #define HAS_MIRRORROW_AVX2
216 #define HAS_NV12TOARGBROW_AVX2
217 #define HAS_NV12TORGB24ROW_AVX2
218 #define HAS_NV12TORGB565ROW_AVX2
219 #define HAS_NV21TOARGBROW_AVX2
220 #define HAS_NV21TORGB24ROW_AVX2
221 #define HAS_SPLITUVROW_AVX2
222 #define HAS_UYVYTOARGBROW_AVX2
223 #define HAS_UYVYTOUV422ROW_AVX2
224 #define HAS_UYVYTOUVROW_AVX2
225 #define HAS_UYVYTOYROW_AVX2
226 #define HAS_YUY2TOARGBROW_AVX2
227 #define HAS_YUY2TOUV422ROW_AVX2
228 #define HAS_YUY2TOUVROW_AVX2
229 #define HAS_YUY2TOYROW_AVX2
230 
231 // Effects:
232 #define HAS_ARGBADDROW_AVX2
233 #define HAS_ARGBATTENUATEROW_AVX2
234 #define HAS_ARGBMULTIPLYROW_AVX2
235 #define HAS_ARGBSUBTRACTROW_AVX2
236 #define HAS_ARGBUNATTENUATEROW_AVX2
237 #define HAS_BLENDPLANEROW_AVX2
238 
239 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
240     defined(_MSC_VER)
241 // TODO(fbarchard): fix build error on android_full_debug=1
242 // https://code.google.com/p/libyuv/issues/detail?id=517
243 #define HAS_I422ALPHATOARGBROW_AVX2
244 #define HAS_I444ALPHATOARGBROW_AVX2
245 #endif
246 #endif
247 
248 // The following are available for AVX2 Visual C 32 bit:
249 // TODO(fbarchard): Port to gcc.
250 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
251     !defined(__clang__) && defined(VISUALC_HAS_AVX2)
252 #define HAS_ARGB1555TOARGBROW_AVX2
253 #define HAS_ARGB4444TOARGBROW_AVX2
254 #define HAS_ARGBTOARGB1555ROW_AVX2
255 #define HAS_ARGBTOARGB4444ROW_AVX2
256 #define HAS_ARGBTORGB565ROW_AVX2
257 #define HAS_J400TOARGBROW_AVX2
258 #define HAS_RGB565TOARGBROW_AVX2
259 #endif
260 
261 // The following are also available on x64 Visual C.
262 #if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \
263     (!defined(__clang__) || defined(__SSSE3__))
264 #define HAS_I444ALPHATOARGBROW_SSSE3
265 #define HAS_I444TOARGBROW_SSSE3
266 #define HAS_I422ALPHATOARGBROW_SSSE3
267 #define HAS_I422TOARGBROW_SSSE3
268 #endif
269 
270 // The following are available for gcc/clang x86 platforms:
271 // TODO(fbarchard): Port to Visual C
272 #if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
273 #define HAS_ABGRTOAR30ROW_SSSE3
274 #define HAS_ARGBTOAR30ROW_SSSE3
275 #define HAS_ARGBTOAR64ROW_SSSE3
276 #define HAS_ARGBTOAB64ROW_SSSE3
277 #define HAS_AR64TOARGBROW_SSSE3
278 #define HAS_AB64TOARGBROW_SSSE3
279 #define HAS_CONVERT16TO8ROW_SSSE3
280 #define HAS_CONVERT8TO16ROW_SSE2
281 #define HAS_HALFMERGEUVROW_SSSE3
282 #define HAS_I210TOAR30ROW_SSSE3
283 #define HAS_I210TOARGBROW_SSSE3
284 #define HAS_I212TOAR30ROW_SSSE3
285 #define HAS_I212TOARGBROW_SSSE3
286 #define HAS_I400TOARGBROW_SSE2
287 #define HAS_I422TOAR30ROW_SSSE3
288 #define HAS_I410TOAR30ROW_SSSE3
289 #define HAS_I410TOARGBROW_SSSE3
290 #define HAS_MERGEARGBROW_SSE2
291 #define HAS_MERGEXRGBROW_SSE2
292 #define HAS_MERGERGBROW_SSSE3
293 #define HAS_MIRRORUVROW_SSSE3
294 #define HAS_P210TOAR30ROW_SSSE3
295 #define HAS_P210TOARGBROW_SSSE3
296 #define HAS_P410TOAR30ROW_SSSE3
297 #define HAS_P410TOARGBROW_SSSE3
298 #define HAS_RAWTORGBAROW_SSSE3
299 #define HAS_RGB24MIRRORROW_SSSE3
300 #define HAS_RGBATOYJROW_SSSE3
301 #define HAS_SPLITARGBROW_SSE2
302 #define HAS_SPLITARGBROW_SSSE3
303 #define HAS_SPLITXRGBROW_SSE2
304 #define HAS_SPLITXRGBROW_SSSE3
305 #define HAS_SPLITRGBROW_SSSE3
306 #define HAS_SWAPUVROW_SSSE3
307 
308 #if defined(__x86_64__) || !defined(__pic__)
309 // TODO(fbarchard): fix build error on android_full_debug=1
310 // https://code.google.com/p/libyuv/issues/detail?id=517
311 #define HAS_I210ALPHATOARGBROW_SSSE3
312 #define HAS_I410ALPHATOARGBROW_SSSE3
313 #endif
314 #endif
315 
316 // The following are available for AVX2 gcc/clang x86 platforms:
317 // TODO(fbarchard): Port to Visual C
318 #if !defined(LIBYUV_DISABLE_X86) &&               \
319     (defined(__x86_64__) || defined(__i386__)) && \
320     (defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
321 #define HAS_ABGRTOAR30ROW_AVX2
322 #define HAS_ABGRTOUVROW_AVX2
323 #define HAS_ABGRTOYROW_AVX2
324 #define HAS_ARGBTOAR30ROW_AVX2
325 #define HAS_ARGBTORAWROW_AVX2
326 #define HAS_ARGBTORGB24ROW_AVX2
327 #define HAS_ARGBTOAR64ROW_AVX2
328 #define HAS_ARGBTOAB64ROW_AVX2
329 #define HAS_AR64TOARGBROW_AVX2
330 #define HAS_AB64TOARGBROW_AVX2
331 #define HAS_CONVERT16TO8ROW_AVX2
332 #define HAS_CONVERT8TO16ROW_AVX2
333 #define HAS_DIVIDEROW_16_AVX2
334 #define HAS_HALFMERGEUVROW_AVX2
335 #define HAS_MERGEAR64ROW_AVX2
336 #define HAS_MERGEARGB16TO8ROW_AVX2
337 #define HAS_MERGEARGBROW_AVX2
338 #define HAS_MERGEXR30ROW_AVX2
339 #define HAS_MERGEXR64ROW_AVX2
340 #define HAS_MERGEXRGB16TO8ROW_AVX2
341 #define HAS_MERGEXRGBROW_AVX2
342 #define HAS_I210TOAR30ROW_AVX2
343 #define HAS_I210TOARGBROW_AVX2
344 #define HAS_I212TOAR30ROW_AVX2
345 #define HAS_I212TOARGBROW_AVX2
346 #define HAS_I400TOARGBROW_AVX2
347 #define HAS_I410TOAR30ROW_AVX2
348 #define HAS_I410TOARGBROW_AVX2
349 #define HAS_P210TOAR30ROW_AVX2
350 #define HAS_P210TOARGBROW_AVX2
351 #define HAS_P410TOAR30ROW_AVX2
352 #define HAS_P410TOARGBROW_AVX2
353 #define HAS_I422TOAR30ROW_AVX2
354 #define HAS_I422TOUYVYROW_AVX2
355 #define HAS_I422TOYUY2ROW_AVX2
356 #define HAS_MERGEUVROW_16_AVX2
357 #define HAS_MIRRORUVROW_AVX2
358 #define HAS_MULTIPLYROW_16_AVX2
359 #define HAS_RGBATOYJROW_AVX2
360 #define HAS_SPLITARGBROW_AVX2
361 #define HAS_SPLITXRGBROW_AVX2
362 #define HAS_SPLITUVROW_16_AVX2
363 #define HAS_SWAPUVROW_AVX2
364 // TODO(fbarchard): Fix AVX2 version of YUV24
365 // #define HAS_NV21TOYUV24ROW_AVX2
366 
367 #if defined(__x86_64__) || !defined(__pic__)
368 // TODO(fbarchard): fix build error on android_full_debug=1
369 // https://code.google.com/p/libyuv/issues/detail?id=517
370 #define HAS_I210ALPHATOARGBROW_AVX2
371 #define HAS_I410ALPHATOARGBROW_AVX2
372 #endif
373 #endif
374 
375 // The following are available for AVX512 clang x86 platforms:
376 // TODO(fbarchard): Port to GCC and Visual C
377 // TODO(fbarchard): re-enable HAS_ARGBTORGB24ROW_AVX512VBMI. Issue libyuv:789
378 #if !defined(LIBYUV_DISABLE_X86) && \
379     (defined(__x86_64__) || defined(__i386__)) && (defined(CLANG_HAS_AVX512))
380 #define HAS_ARGBTORGB24ROW_AVX512VBMI
381 #endif
382 
383 // The following are available on Neon platforms:
384 #if !defined(LIBYUV_DISABLE_NEON) && \
385     (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON))
386 #define HAS_ABGRTOUVROW_NEON
387 #define HAS_ABGRTOYROW_NEON
388 #define HAS_ARGB1555TOARGBROW_NEON
389 #define HAS_ARGB1555TOUVROW_NEON
390 #define HAS_ARGB1555TOYROW_NEON
391 #define HAS_ARGB4444TOARGBROW_NEON
392 #define HAS_ARGB4444TOUVROW_NEON
393 #define HAS_ARGB4444TOYROW_NEON
394 #define HAS_ARGBEXTRACTALPHAROW_NEON
395 #define HAS_ARGBSETROW_NEON
396 #define HAS_ARGBTOARGB1555ROW_NEON
397 #define HAS_ARGBTOARGB4444ROW_NEON
398 #define HAS_ARGBTORAWROW_NEON
399 #define HAS_ARGBTORGB24ROW_NEON
400 #define HAS_ARGBTORGB565DITHERROW_NEON
401 #define HAS_ARGBTORGB565ROW_NEON
402 #define HAS_ARGBTOAR64ROW_NEON
403 #define HAS_ARGBTOAB64ROW_NEON
404 #define HAS_AR64TOARGBROW_NEON
405 #define HAS_AB64TOARGBROW_NEON
406 #define HAS_ARGBTOUV444ROW_NEON
407 #define HAS_ARGBTOUVJROW_NEON
408 #define HAS_ARGBTOUVROW_NEON
409 #define HAS_ARGBTOYJROW_NEON
410 #define HAS_ARGBTOYROW_NEON
411 #define HAS_AYUVTOUVROW_NEON
412 #define HAS_AYUVTOVUROW_NEON
413 #define HAS_AYUVTOYROW_NEON
414 #define HAS_BGRATOUVROW_NEON
415 #define HAS_BGRATOYROW_NEON
416 #define HAS_BYTETOFLOATROW_NEON
417 #define HAS_COPYROW_NEON
418 #define HAS_DIVIDEROW_16_NEON
419 #define HAS_HALFFLOATROW_NEON
420 #define HAS_HALFMERGEUVROW_NEON
421 #define HAS_I400TOARGBROW_NEON
422 #define HAS_I444ALPHATOARGBROW_NEON
423 #define HAS_I422ALPHATOARGBROW_NEON
424 #define HAS_I422TOARGB1555ROW_NEON
425 #define HAS_I422TOARGB4444ROW_NEON
426 #define HAS_I422TOARGBROW_NEON
427 #define HAS_I422TORGB24ROW_NEON
428 #define HAS_I422TORGB565ROW_NEON
429 #define HAS_I422TORGBAROW_NEON
430 #define HAS_I422TOUYVYROW_NEON
431 #define HAS_I422TOYUY2ROW_NEON
432 #define HAS_I444TOARGBROW_NEON
433 #define HAS_J400TOARGBROW_NEON
434 #define HAS_MERGEAR64ROW_NEON
435 #define HAS_MERGEARGB16TO8ROW_NEON
436 #define HAS_MERGEARGBROW_NEON
437 #define HAS_MERGEXR30ROW_NEON
438 #define HAS_MERGEXR64ROW_NEON
439 #define HAS_MERGEXRGB16TO8ROW_NEON
440 #define HAS_MERGEXRGBROW_NEON
441 #define HAS_MERGEUVROW_NEON
442 #define HAS_MERGEUVROW_16_NEON
443 #define HAS_MIRRORROW_NEON
444 #define HAS_MIRRORUVROW_NEON
445 #define HAS_MIRRORSPLITUVROW_NEON
446 #define HAS_MULTIPLYROW_16_NEON
447 #define HAS_NV12TOARGBROW_NEON
448 #define HAS_NV12TORGB24ROW_NEON
449 #define HAS_NV12TORGB565ROW_NEON
450 #define HAS_NV21TOARGBROW_NEON
451 #define HAS_NV21TORGB24ROW_NEON
452 #define HAS_NV21TOYUV24ROW_NEON
453 #define HAS_RAWTOARGBROW_NEON
454 #define HAS_RAWTORGB24ROW_NEON
455 #define HAS_RAWTORGBAROW_NEON
456 #define HAS_RAWTOUVROW_NEON
457 #define HAS_RAWTOYJROW_NEON
458 #define HAS_RAWTOYROW_NEON
459 #define HAS_RGB24TOARGBROW_NEON
460 #define HAS_RGB24TOUVROW_NEON
461 #define HAS_RGB24TOYJROW_NEON
462 #define HAS_RGB24TOYROW_NEON
463 #define HAS_RGB565TOARGBROW_NEON
464 #define HAS_RGB565TOUVROW_NEON
465 #define HAS_RGB565TOYROW_NEON
466 #define HAS_RGBATOUVROW_NEON
467 #define HAS_RGBATOYJROW_NEON
468 #define HAS_RGBATOYROW_NEON
469 #define HAS_SETROW_NEON
470 #define HAS_SPLITARGBROW_NEON
471 #define HAS_SPLITXRGBROW_NEON
472 #define HAS_SPLITRGBROW_NEON
473 #define HAS_SPLITUVROW_NEON
474 #define HAS_SPLITUVROW_16_NEON
475 #define HAS_SWAPUVROW_NEON
476 #define HAS_UYVYTOARGBROW_NEON
477 #define HAS_UYVYTOUV422ROW_NEON
478 #define HAS_UYVYTOUVROW_NEON
479 #define HAS_UYVYTOYROW_NEON
480 #define HAS_YUY2TOARGBROW_NEON
481 #define HAS_YUY2TOUV422ROW_NEON
482 #define HAS_YUY2TOUVROW_NEON
483 #define HAS_YUY2TOYROW_NEON
484 
485 // Effects:
486 #define HAS_ARGBADDROW_NEON
487 #define HAS_ARGBATTENUATEROW_NEON
488 #define HAS_ARGBBLENDROW_NEON
489 #define HAS_ARGBCOLORMATRIXROW_NEON
490 #define HAS_ARGBGRAYROW_NEON
491 #define HAS_ARGBMIRRORROW_NEON
492 #define HAS_RGB24MIRRORROW_NEON
493 #define HAS_ARGBMULTIPLYROW_NEON
494 #define HAS_ARGBQUANTIZEROW_NEON
495 #define HAS_ARGBSEPIAROW_NEON
496 #define HAS_ARGBSHADEROW_NEON
497 #define HAS_ARGBSHUFFLEROW_NEON
498 #define HAS_ARGBSUBTRACTROW_NEON
499 #define HAS_INTERPOLATEROW_NEON
500 #define HAS_SOBELROW_NEON
501 #define HAS_SOBELTOPLANEROW_NEON
502 #define HAS_SOBELXROW_NEON
503 #define HAS_SOBELXYROW_NEON
504 #define HAS_SOBELYROW_NEON
505 #endif
506 
507 // The following are available on AArch64 platforms:
508 #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
509 #define HAS_SCALESUMSAMPLES_NEON
510 #define HAS_GAUSSROW_F32_NEON
511 #define HAS_GAUSSCOL_F32_NEON
512 
513 #endif
514 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
515 #define HAS_ABGRTOUVROW_MSA
516 #define HAS_ABGRTOYROW_MSA
517 #define HAS_ARGB1555TOARGBROW_MSA
518 #define HAS_ARGB1555TOUVROW_MSA
519 #define HAS_ARGB1555TOYROW_MSA
520 #define HAS_ARGB4444TOARGBROW_MSA
521 #define HAS_ARGBADDROW_MSA
522 #define HAS_ARGBATTENUATEROW_MSA
523 #define HAS_ARGBBLENDROW_MSA
524 #define HAS_ARGBCOLORMATRIXROW_MSA
525 #define HAS_ARGBEXTRACTALPHAROW_MSA
526 #define HAS_ARGBGRAYROW_MSA
527 #define HAS_ARGBMIRRORROW_MSA
528 #define HAS_ARGBMULTIPLYROW_MSA
529 #define HAS_ARGBQUANTIZEROW_MSA
530 #define HAS_ARGBSEPIAROW_MSA
531 #define HAS_ARGBSETROW_MSA
532 #define HAS_ARGBSHADEROW_MSA
533 #define HAS_ARGBSHUFFLEROW_MSA
534 #define HAS_ARGBSUBTRACTROW_MSA
535 #define HAS_ARGBTOARGB1555ROW_MSA
536 #define HAS_ARGBTOARGB4444ROW_MSA
537 #define HAS_ARGBTORAWROW_MSA
538 #define HAS_ARGBTORGB24ROW_MSA
539 #define HAS_ARGBTORGB565DITHERROW_MSA
540 #define HAS_ARGBTORGB565ROW_MSA
541 #define HAS_ARGBTOUV444ROW_MSA
542 #define HAS_ARGBTOUVJROW_MSA
543 #define HAS_ARGBTOUVROW_MSA
544 #define HAS_ARGBTOYJROW_MSA
545 #define HAS_ARGBTOYROW_MSA
546 #define HAS_BGRATOUVROW_MSA
547 #define HAS_BGRATOYROW_MSA
548 #define HAS_HALFFLOATROW_MSA
549 #define HAS_I400TOARGBROW_MSA
550 #define HAS_I422TOUYVYROW_MSA
551 #define HAS_I422TOYUY2ROW_MSA
552 #define HAS_INTERPOLATEROW_MSA
553 #define HAS_J400TOARGBROW_MSA
554 #define HAS_MERGEUVROW_MSA
555 #define HAS_MIRRORROW_MSA
556 #define HAS_MIRRORUVROW_MSA
557 #define HAS_MIRRORSPLITUVROW_MSA
558 #define HAS_RAWTOARGBROW_MSA
559 #define HAS_RAWTORGB24ROW_MSA
560 #define HAS_RAWTOUVROW_MSA
561 #define HAS_RAWTOYROW_MSA
562 #define HAS_RGB24TOARGBROW_MSA
563 #define HAS_RGB24TOUVROW_MSA
564 #define HAS_RGB24TOYROW_MSA
565 #define HAS_RGB565TOARGBROW_MSA
566 #define HAS_RGB565TOUVROW_MSA
567 #define HAS_RGB565TOYROW_MSA
568 #define HAS_RGBATOUVROW_MSA
569 #define HAS_RGBATOYROW_MSA
570 #define HAS_SETROW_MSA
571 #define HAS_SOBELROW_MSA
572 #define HAS_SOBELTOPLANEROW_MSA
573 #define HAS_SOBELXROW_MSA
574 #define HAS_SOBELXYROW_MSA
575 #define HAS_SOBELYROW_MSA
576 #define HAS_SPLITUVROW_MSA
577 #define HAS_UYVYTOUVROW_MSA
578 #define HAS_UYVYTOYROW_MSA
579 #define HAS_YUY2TOUV422ROW_MSA
580 #define HAS_YUY2TOUVROW_MSA
581 #define HAS_YUY2TOYROW_MSA
582 #endif
583 
584 #if !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A)
585 #define HAS_ABGRTOUVROW_MMI
586 #define HAS_ABGRTOYROW_MMI
587 #define HAS_ARGB1555TOARGBROW_MMI
588 #define HAS_ARGB1555TOUVROW_MMI
589 #define HAS_ARGB1555TOYROW_MMI
590 #define HAS_ARGB4444TOARGBROW_MMI
591 #define HAS_ARGB4444TOUVROW_MMI
592 #define HAS_ARGB4444TOYROW_MMI
593 #define HAS_ARGBADDROW_MMI
594 #define HAS_ARGBATTENUATEROW_MMI
595 #define HAS_ARGBBLENDROW_MMI
596 #define HAS_ARGBCOLORMATRIXROW_MMI
597 #define HAS_ARGBCOPYALPHAROW_MMI
598 #define HAS_ARGBCOPYYTOALPHAROW_MMI
599 #define HAS_ARGBEXTRACTALPHAROW_MMI
600 #define HAS_ARGBGRAYROW_MMI
601 #define HAS_ARGBMIRRORROW_MMI
602 #define HAS_ARGBMULTIPLYROW_MMI
603 #define HAS_ARGBSEPIAROW_MMI
604 #define HAS_ARGBSETROW_MMI
605 #define HAS_ARGBSHADEROW_MMI
606 #define HAS_ARGBSHUFFLEROW_MMI
607 #define HAS_ARGBSUBTRACTROW_MMI
608 #define HAS_ARGBTOARGB1555ROW_MMI
609 #define HAS_ARGBTOARGB4444ROW_MMI
610 #define HAS_ARGBTORAWROW_MMI
611 #define HAS_ARGBTORGB24ROW_MMI
612 #define HAS_ARGBTORGB565DITHERROW_MMI
613 #define HAS_ARGBTORGB565ROW_MMI
614 #define HAS_ARGBTOUV444ROW_MMI
615 #define HAS_ARGBTOUVJROW_MMI
616 #define HAS_ARGBTOUVROW_MMI
617 #define HAS_ARGBTOYJROW_MMI
618 #define HAS_ARGBTOYROW_MMI
619 #define HAS_BGRATOUVROW_MMI
620 #define HAS_BGRATOYROW_MMI
621 #define HAS_BLENDPLANEROW_MMI
622 #define HAS_COMPUTECUMULATIVESUMROW_MMI
623 #define HAS_CUMULATIVESUMTOAVERAGEROW_MMI
624 #define HAS_HALFFLOATROW_MMI
625 #define HAS_I400TOARGBROW_MMI
626 #define HAS_I422TOUYVYROW_MMI
627 #define HAS_I422TOYUY2ROW_MMI
628 #define HAS_INTERPOLATEROW_MMI
629 #define HAS_J400TOARGBROW_MMI
630 #define HAS_MERGERGBROW_MMI
631 #define HAS_MERGEUVROW_MMI
632 #define HAS_MIRRORROW_MMI
633 #define HAS_MIRRORSPLITUVROW_MMI
634 #define HAS_RAWTOARGBROW_MMI
635 #define HAS_RAWTORGB24ROW_MMI
636 #define HAS_RAWTOUVROW_MMI
637 #define HAS_RAWTOYROW_MMI
638 #define HAS_RGB24TOARGBROW_MMI
639 #define HAS_RGB24TOUVROW_MMI
640 #define HAS_RGB24TOYROW_MMI
641 #define HAS_RGB565TOARGBROW_MMI
642 #define HAS_RGB565TOUVROW_MMI
643 #define HAS_RGB565TOYROW_MMI
644 #define HAS_RGBATOUVROW_MMI
645 #define HAS_RGBATOYROW_MMI
646 #define HAS_SOBELROW_MMI
647 #define HAS_SOBELTOPLANEROW_MMI
648 #define HAS_SOBELXROW_MMI
649 #define HAS_SOBELXYROW_MMI
650 #define HAS_SOBELYROW_MMI
651 #define HAS_SPLITRGBROW_MMI
652 #define HAS_SPLITUVROW_MMI
653 #define HAS_UYVYTOUVROW_MMI
654 #define HAS_UYVYTOYROW_MMI
655 #define HAS_YUY2TOUV422ROW_MMI
656 #define HAS_YUY2TOUVROW_MMI
657 #define HAS_YUY2TOYROW_MMI
658 #endif
659 
660 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__)
661 #if defined(VISUALC_HAS_AVX2)
662 #define SIMD_ALIGNED(var) __declspec(align(32)) var
663 #else
664 #define SIMD_ALIGNED(var) __declspec(align(16)) var
665 #endif
666 #define LIBYUV_NOINLINE __declspec(noinline)
667 typedef __declspec(align(16)) int16_t vec16[8];
668 typedef __declspec(align(16)) int32_t vec32[4];
669 typedef __declspec(align(16)) float vecf32[4];
670 typedef __declspec(align(16)) int8_t vec8[16];
671 typedef __declspec(align(16)) uint16_t uvec16[8];
672 typedef __declspec(align(16)) uint32_t uvec32[4];
673 typedef __declspec(align(16)) uint8_t uvec8[16];
674 typedef __declspec(align(32)) int16_t lvec16[16];
675 typedef __declspec(align(32)) int32_t lvec32[8];
676 typedef __declspec(align(32)) int8_t lvec8[32];
677 typedef __declspec(align(32)) uint16_t ulvec16[16];
678 typedef __declspec(align(32)) uint32_t ulvec32[8];
679 typedef __declspec(align(32)) uint8_t ulvec8[32];
680 #elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__))
681 // Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
682 #if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)
683 #define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
684 #else
685 #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
686 #endif
687 #define LIBYUV_NOINLINE __attribute__((noinline))
688 typedef int16_t __attribute__((vector_size(16))) vec16;
689 typedef int32_t __attribute__((vector_size(16))) vec32;
690 typedef float __attribute__((vector_size(16))) vecf32;
691 typedef int8_t __attribute__((vector_size(16))) vec8;
692 typedef uint16_t __attribute__((vector_size(16))) uvec16;
693 typedef uint32_t __attribute__((vector_size(16))) uvec32;
694 typedef uint8_t __attribute__((vector_size(16))) uvec8;
695 typedef int16_t __attribute__((vector_size(32))) lvec16;
696 typedef int32_t __attribute__((vector_size(32))) lvec32;
697 typedef int8_t __attribute__((vector_size(32))) lvec8;
698 typedef uint16_t __attribute__((vector_size(32))) ulvec16;
699 typedef uint32_t __attribute__((vector_size(32))) ulvec32;
700 typedef uint8_t __attribute__((vector_size(32))) ulvec8;
701 #else
702 #define SIMD_ALIGNED(var) var
703 #define LIBYUV_NOINLINE
704 typedef int16_t vec16[8];
705 typedef int32_t vec32[4];
706 typedef float vecf32[4];
707 typedef int8_t vec8[16];
708 typedef uint16_t uvec16[8];
709 typedef uint32_t uvec32[4];
710 typedef uint8_t uvec8[16];
711 typedef int16_t lvec16[16];
712 typedef int32_t lvec32[8];
713 typedef int8_t lvec8[32];
714 typedef uint16_t ulvec16[16];
715 typedef uint32_t ulvec32[8];
716 typedef uint8_t ulvec8[32];
717 #endif
718 
719 #if defined(__aarch64__) || defined(__arm__)
720 // This struct is for ARM color conversion.
721 struct YuvConstants {
722   uvec8 kUVCoeff;
723   vec16 kRGBCoeffBias;
724 };
725 #else
726 // This struct is for Intel color conversion.
727 struct YuvConstants {
728   uint8_t kUVToB[32];
729   uint8_t kUVToG[32];
730   uint8_t kUVToR[32];
731   int16_t kYToRgb[16];
732   int16_t kYBiasToRgb[16];
733 };
734 
735 // Offsets into YuvConstants structure
736 #define KUVTOB 0
737 #define KUVTOG 32
738 #define KUVTOR 64
739 #define KYTORGB 96
740 #define KYBIASTORGB 128
741 
742 #endif
743 
744 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
745 
746 #define align_buffer_64(var, size)                                           \
747   uint8_t* var##_mem = (uint8_t*)(malloc((size) + 63));         /* NOLINT */ \
748   uint8_t* var = (uint8_t*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */
749 
750 #define free_aligned_buffer_64(var) \
751   free(var##_mem);                  \
752   var = 0
753 
754 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__)
755 #define OMITFP
756 #else
757 #define OMITFP __attribute__((optimize("omit-frame-pointer")))
758 #endif
759 
760 // NaCL macros for GCC x86 and x64.
761 #if defined(__native_client__)
762 #define LABELALIGN ".p2align 5\n"
763 #else
764 #define LABELALIGN
765 #endif
766 
767 // Intel Code Analizer markers.  Insert IACA_START IACA_END around code to be
768 // measured and then run with iaca -64 libyuv_unittest.
769 // IACA_ASM_START amd IACA_ASM_END are equivalents that can be used within
770 // inline assembly blocks.
771 // example of iaca:
772 // ~/iaca-lin64/bin/iaca.sh -64 -analysis LATENCY out/Release/libyuv_unittest
773 
774 #if defined(__x86_64__) || defined(__i386__)
775 
776 #define IACA_ASM_START  \
777   ".byte 0x0F, 0x0B\n"  \
778   " movl $111, %%ebx\n" \
779   ".byte 0x64, 0x67, 0x90\n"
780 
781 #define IACA_ASM_END         \
782   " movl $222, %%ebx\n"      \
783   ".byte 0x64, 0x67, 0x90\n" \
784   ".byte 0x0F, 0x0B\n"
785 
786 #define IACA_SSC_MARK(MARK_ID)                        \
787   __asm__ __volatile__("\n\t  movl $" #MARK_ID        \
788                        ", %%ebx"                      \
789                        "\n\t  .byte 0x64, 0x67, 0x90" \
790                        :                              \
791                        :                              \
792                        : "memory");
793 
794 #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B");
795 
796 #else /* Visual C */
797 #define IACA_UD_BYTES \
798   { __asm _emit 0x0F __asm _emit 0x0B }
799 
800 #define IACA_SSC_MARK(x) \
801   { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 }
802 
803 #define IACA_VC64_START __writegsbyte(111, 111);
804 #define IACA_VC64_END __writegsbyte(222, 222);
805 #endif
806 
807 #define IACA_START     \
808   {                    \
809     IACA_UD_BYTES      \
810     IACA_SSC_MARK(111) \
811   }
812 #define IACA_END       \
813   {                    \
814     IACA_SSC_MARK(222) \
815     IACA_UD_BYTES      \
816   }
817 
818 void I444ToARGBRow_NEON(const uint8_t* src_y,
819                         const uint8_t* src_u,
820                         const uint8_t* src_v,
821                         uint8_t* dst_argb,
822                         const struct YuvConstants* yuvconstants,
823                         int width);
824 void I422ToARGBRow_NEON(const uint8_t* src_y,
825                         const uint8_t* src_u,
826                         const uint8_t* src_v,
827                         uint8_t* dst_argb,
828                         const struct YuvConstants* yuvconstants,
829                         int width);
830 void I444AlphaToARGBRow_NEON(const uint8_t* src_y,
831                              const uint8_t* src_u,
832                              const uint8_t* src_v,
833                              const uint8_t* src_a,
834                              uint8_t* dst_argb,
835                              const struct YuvConstants* yuvconstants,
836                              int width);
837 void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
838                              const uint8_t* src_u,
839                              const uint8_t* src_v,
840                              const uint8_t* src_a,
841                              uint8_t* dst_argb,
842                              const struct YuvConstants* yuvconstants,
843                              int width);
844 void I422ToRGBARow_NEON(const uint8_t* src_y,
845                         const uint8_t* src_u,
846                         const uint8_t* src_v,
847                         uint8_t* dst_rgba,
848                         const struct YuvConstants* yuvconstants,
849                         int width);
850 void I422ToRGB24Row_NEON(const uint8_t* src_y,
851                          const uint8_t* src_u,
852                          const uint8_t* src_v,
853                          uint8_t* dst_rgb24,
854                          const struct YuvConstants* yuvconstants,
855                          int width);
856 void I422ToRGB565Row_NEON(const uint8_t* src_y,
857                           const uint8_t* src_u,
858                           const uint8_t* src_v,
859                           uint8_t* dst_rgb565,
860                           const struct YuvConstants* yuvconstants,
861                           int width);
862 void I422ToARGB1555Row_NEON(const uint8_t* src_y,
863                             const uint8_t* src_u,
864                             const uint8_t* src_v,
865                             uint8_t* dst_argb1555,
866                             const struct YuvConstants* yuvconstants,
867                             int width);
868 void I422ToARGB4444Row_NEON(const uint8_t* src_y,
869                             const uint8_t* src_u,
870                             const uint8_t* src_v,
871                             uint8_t* dst_argb4444,
872                             const struct YuvConstants* yuvconstants,
873                             int width);
874 void NV12ToARGBRow_NEON(const uint8_t* src_y,
875                         const uint8_t* src_uv,
876                         uint8_t* dst_argb,
877                         const struct YuvConstants* yuvconstants,
878                         int width);
879 void NV12ToRGB565Row_NEON(const uint8_t* src_y,
880                           const uint8_t* src_uv,
881                           uint8_t* dst_rgb565,
882                           const struct YuvConstants* yuvconstants,
883                           int width);
884 void NV21ToARGBRow_NEON(const uint8_t* src_y,
885                         const uint8_t* src_vu,
886                         uint8_t* dst_argb,
887                         const struct YuvConstants* yuvconstants,
888                         int width);
889 void NV12ToRGB24Row_NEON(const uint8_t* src_y,
890                          const uint8_t* src_uv,
891                          uint8_t* dst_rgb24,
892                          const struct YuvConstants* yuvconstants,
893                          int width);
894 void NV21ToRGB24Row_NEON(const uint8_t* src_y,
895                          const uint8_t* src_vu,
896                          uint8_t* dst_rgb24,
897                          const struct YuvConstants* yuvconstants,
898                          int width);
899 void NV21ToYUV24Row_NEON(const uint8_t* src_y,
900                          const uint8_t* src_vu,
901                          uint8_t* dst_yuv24,
902                          int width);
903 void YUY2ToARGBRow_NEON(const uint8_t* src_yuy2,
904                         uint8_t* dst_argb,
905                         const struct YuvConstants* yuvconstants,
906                         int width);
907 void UYVYToARGBRow_NEON(const uint8_t* src_uyvy,
908                         uint8_t* dst_argb,
909                         const struct YuvConstants* yuvconstants,
910                         int width);
911 void I444ToARGBRow_MSA(const uint8_t* src_y,
912                        const uint8_t* src_u,
913                        const uint8_t* src_v,
914                        uint8_t* dst_argb,
915                        const struct YuvConstants* yuvconstants,
916                        int width);
917 void I444ToARGBRow_MMI(const uint8_t* src_y,
918                        const uint8_t* src_u,
919                        const uint8_t* src_v,
920                        uint8_t* dst_argb,
921                        const struct YuvConstants* yuvconstants,
922                        int width);
923 
924 void I422ToARGBRow_MSA(const uint8_t* src_y,
925                        const uint8_t* src_u,
926                        const uint8_t* src_v,
927                        uint8_t* dst_argb,
928                        const struct YuvConstants* yuvconstants,
929                        int width);
930 void I422ToRGBARow_MSA(const uint8_t* src_y,
931                        const uint8_t* src_u,
932                        const uint8_t* src_v,
933                        uint8_t* dst_argb,
934                        const struct YuvConstants* yuvconstants,
935                        int width);
936 void I422ToARGBRow_MMI(const uint8_t* src_y,
937                        const uint8_t* src_u,
938                        const uint8_t* src_v,
939                        uint8_t* dst_argb,
940                        const struct YuvConstants* yuvconstants,
941                        int width);
942 void I422AlphaToARGBRow_MSA(const uint8_t* src_y,
943                             const uint8_t* src_u,
944                             const uint8_t* src_v,
945                             const uint8_t* src_a,
946                             uint8_t* dst_argb,
947                             const struct YuvConstants* yuvconstants,
948                             int width);
949 void I422ToRGB24Row_MSA(const uint8_t* src_y,
950                         const uint8_t* src_u,
951                         const uint8_t* src_v,
952                         uint8_t* dst_argb,
953                         const struct YuvConstants* yuvconstants,
954                         int width);
955 void I422ToRGB565Row_MSA(const uint8_t* src_y,
956                          const uint8_t* src_u,
957                          const uint8_t* src_v,
958                          uint8_t* dst_rgb565,
959                          const struct YuvConstants* yuvconstants,
960                          int width);
961 void I422ToARGB4444Row_MSA(const uint8_t* src_y,
962                            const uint8_t* src_u,
963                            const uint8_t* src_v,
964                            uint8_t* dst_argb4444,
965                            const struct YuvConstants* yuvconstants,
966                            int width);
967 void I422ToARGB1555Row_MSA(const uint8_t* src_y,
968                            const uint8_t* src_u,
969                            const uint8_t* src_v,
970                            uint8_t* dst_argb1555,
971                            const struct YuvConstants* yuvconstants,
972                            int width);
973 void NV12ToARGBRow_MSA(const uint8_t* src_y,
974                        const uint8_t* src_uv,
975                        uint8_t* dst_argb,
976                        const struct YuvConstants* yuvconstants,
977                        int width);
978 void NV12ToRGB565Row_MSA(const uint8_t* src_y,
979                          const uint8_t* src_uv,
980                          uint8_t* dst_rgb565,
981                          const struct YuvConstants* yuvconstants,
982                          int width);
983 void NV21ToARGBRow_MSA(const uint8_t* src_y,
984                        const uint8_t* src_vu,
985                        uint8_t* dst_argb,
986                        const struct YuvConstants* yuvconstants,
987                        int width);
988 void YUY2ToARGBRow_MSA(const uint8_t* src_yuy2,
989                        uint8_t* dst_argb,
990                        const struct YuvConstants* yuvconstants,
991                        int width);
992 void UYVYToARGBRow_MSA(const uint8_t* src_uyvy,
993                        uint8_t* dst_argb,
994                        const struct YuvConstants* yuvconstants,
995                        int width);
996 
997 void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width);
998 void ARGBToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
999 void ABGRToYRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1000 void ABGRToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1001 void ARGBToYRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width);
1002 void ARGBToYJRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width);
1003 void ARGBToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1004 void ARGBToYJRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width);
1005 void RGBAToYJRow_AVX2(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1006 void RGBAToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1007 void RGBAToYJRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1008 void BGRAToYRow_SSSE3(const uint8_t* src_bgra, uint8_t* dst_y, int width);
1009 void ABGRToYRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1010 void RGBAToYRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1011 void RGB24ToYRow_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1012 void RGB24ToYJRow_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1013 void RAWToYRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_y, int width);
1014 void RAWToYJRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1015 void RGB24ToYJRow_AVX2(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1016 void RAWToYJRow_AVX2(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1017 void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width);
1018 void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width);
1019 void RGBAToYJRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1020 void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1021 void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1022 void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1023 void ARGBToYJRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1024 void ARGBToUV444Row_NEON(const uint8_t* src_argb,
1025                          uint8_t* dst_u,
1026                          uint8_t* dst_v,
1027                          int width);
1028 void ARGBToUVRow_NEON(const uint8_t* src_argb,
1029                       int src_stride_argb,
1030                       uint8_t* dst_u,
1031                       uint8_t* dst_v,
1032                       int width);
1033 void ARGBToUV444Row_MSA(const uint8_t* src_argb,
1034                         uint8_t* dst_u,
1035                         uint8_t* dst_v,
1036                         int width);
1037 void ARGBToUVRow_MSA(const uint8_t* src_argb,
1038                      int src_stride_argb,
1039                      uint8_t* dst_u,
1040                      uint8_t* dst_v,
1041                      int width);
1042 void ARGBToUV444Row_MMI(const uint8_t* src_argb,
1043                         uint8_t* dst_u,
1044                         uint8_t* dst_v,
1045                         int width);
1046 void ARGBToUVRow_MMI(const uint8_t* src_argb,
1047                      int src_stride_argb,
1048                      uint8_t* dst_u,
1049                      uint8_t* dst_v,
1050                      int width);
1051 void ARGBToUVJRow_NEON(const uint8_t* src_argb,
1052                        int src_stride_argb,
1053                        uint8_t* dst_u,
1054                        uint8_t* dst_v,
1055                        int width);
1056 void BGRAToUVRow_NEON(const uint8_t* src_bgra,
1057                       int src_stride_bgra,
1058                       uint8_t* dst_u,
1059                       uint8_t* dst_v,
1060                       int width);
1061 void ABGRToUVRow_NEON(const uint8_t* src_abgr,
1062                       int src_stride_abgr,
1063                       uint8_t* dst_u,
1064                       uint8_t* dst_v,
1065                       int width);
1066 void RGBAToUVRow_NEON(const uint8_t* src_rgba,
1067                       int src_stride_rgba,
1068                       uint8_t* dst_u,
1069                       uint8_t* dst_v,
1070                       int width);
1071 void RGB24ToUVRow_NEON(const uint8_t* src_rgb24,
1072                        int src_stride_rgb24,
1073                        uint8_t* dst_u,
1074                        uint8_t* dst_v,
1075                        int width);
1076 void RAWToUVRow_NEON(const uint8_t* src_raw,
1077                      int src_stride_raw,
1078                      uint8_t* dst_u,
1079                      uint8_t* dst_v,
1080                      int width);
1081 void RGB565ToUVRow_NEON(const uint8_t* src_rgb565,
1082                         int src_stride_rgb565,
1083                         uint8_t* dst_u,
1084                         uint8_t* dst_v,
1085                         int width);
1086 void ARGB1555ToUVRow_NEON(const uint8_t* src_argb1555,
1087                           int src_stride_argb1555,
1088                           uint8_t* dst_u,
1089                           uint8_t* dst_v,
1090                           int width);
1091 void ARGB4444ToUVRow_NEON(const uint8_t* src_argb4444,
1092                           int src_stride_argb4444,
1093                           uint8_t* dst_u,
1094                           uint8_t* dst_v,
1095                           int width);
1096 void ARGBToUVJRow_MSA(const uint8_t* src_rgb,
1097                       int src_stride_rgb,
1098                       uint8_t* dst_u,
1099                       uint8_t* dst_v,
1100                       int width);
1101 void BGRAToUVRow_MSA(const uint8_t* src_rgb,
1102                      int src_stride_rgb,
1103                      uint8_t* dst_u,
1104                      uint8_t* dst_v,
1105                      int width);
1106 void ABGRToUVRow_MSA(const uint8_t* src_rgb,
1107                      int src_stride_rgb,
1108                      uint8_t* dst_u,
1109                      uint8_t* dst_v,
1110                      int width);
1111 void RGBAToUVRow_MSA(const uint8_t* src_rgb,
1112                      int src_stride_rgb,
1113                      uint8_t* dst_u,
1114                      uint8_t* dst_v,
1115                      int width);
1116 void RGB24ToUVRow_MSA(const uint8_t* src_rgb,
1117                       int src_stride_rgb,
1118                       uint8_t* dst_u,
1119                       uint8_t* dst_v,
1120                       int width);
1121 void RAWToUVRow_MSA(const uint8_t* src_rgb,
1122                     int src_stride_rgb,
1123                     uint8_t* dst_u,
1124                     uint8_t* dst_v,
1125                     int width);
1126 void RGB565ToUVRow_MSA(const uint8_t* src_rgb565,
1127                        int src_stride_rgb565,
1128                        uint8_t* dst_u,
1129                        uint8_t* dst_v,
1130                        int width);
1131 void ARGB1555ToUVRow_MSA(const uint8_t* src_argb1555,
1132                          int src_stride_argb1555,
1133                          uint8_t* dst_u,
1134                          uint8_t* dst_v,
1135                          int width);
1136 void ARGBToUVJRow_MMI(const uint8_t* src_rgb,
1137                       int src_stride_rgb,
1138                       uint8_t* dst_u,
1139                       uint8_t* dst_v,
1140                       int width);
1141 void BGRAToUVRow_MMI(const uint8_t* src_rgb,
1142                      int src_stride_rgb,
1143                      uint8_t* dst_u,
1144                      uint8_t* dst_v,
1145                      int width);
1146 void ABGRToUVRow_MMI(const uint8_t* src_rgb,
1147                      int src_stride_rgb,
1148                      uint8_t* dst_u,
1149                      uint8_t* dst_v,
1150                      int width);
1151 void RGBAToUVRow_MMI(const uint8_t* src_rgb,
1152                      int src_stride_rgb,
1153                      uint8_t* dst_u,
1154                      uint8_t* dst_v,
1155                      int width);
1156 void RGB24ToUVRow_MMI(const uint8_t* src_rgb,
1157                       int src_stride_rgb,
1158                       uint8_t* dst_u,
1159                       uint8_t* dst_v,
1160                       int width);
1161 void RAWToUVRow_MMI(const uint8_t* src_rgb,
1162                     int src_stride_rgb,
1163                     uint8_t* dst_u,
1164                     uint8_t* dst_v,
1165                     int width);
1166 void RGB565ToUVRow_MMI(const uint8_t* src_rgb565,
1167                        int src_stride_rgb565,
1168                        uint8_t* dst_u,
1169                        uint8_t* dst_v,
1170                        int width);
1171 void ARGB1555ToUVRow_MMI(const uint8_t* src_argb1555,
1172                          int src_stride_argb1555,
1173                          uint8_t* dst_u,
1174                          uint8_t* dst_v,
1175                          int width);
1176 void ARGB4444ToUVRow_MMI(const uint8_t* src_argb4444,
1177                          int src_stride_argb4444,
1178                          uint8_t* dst_u,
1179                          uint8_t* dst_v,
1180                          int width);
1181 void BGRAToYRow_NEON(const uint8_t* src_bgra, uint8_t* dst_y, int width);
1182 void ABGRToYRow_NEON(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1183 void RGBAToYRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1184 void RGB24ToYRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1185 void RGB24ToYJRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1186 void RAWToYRow_NEON(const uint8_t* src_raw, uint8_t* dst_y, int width);
1187 void RAWToYJRow_NEON(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1188 void RGB565ToYRow_NEON(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1189 void ARGB1555ToYRow_NEON(const uint8_t* src_argb1555,
1190                          uint8_t* dst_y,
1191                          int width);
1192 void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444,
1193                          uint8_t* dst_y,
1194                          int width);
1195 void BGRAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1196 void ABGRToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1197 void RGBAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1198 void RGB24ToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1199 void RAWToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1200 void RGB565ToYRow_MSA(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1201 void ARGB1555ToYRow_MSA(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1202 void BGRAToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width);
1203 void ABGRToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width);
1204 void RGBAToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width);
1205 void RGB24ToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width);
1206 void RAWToYRow_MMI(const uint8_t* src_argb, uint8_t* dst_y, int width);
1207 void RGB565ToYRow_MMI(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1208 void ARGB1555ToYRow_MMI(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1209 void ARGB4444ToYRow_MMI(const uint8_t* src_argb4444, uint8_t* dst_y, int width);
1210 
1211 void ARGBToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1212 void ARGBToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1213 void RGBAToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1214 void BGRAToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1215 void ABGRToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1216 void RGBAToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1217 void RGB24ToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1218 void RGB24ToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1219 void RAWToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1220 void RAWToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1221 void RGB565ToYRow_C(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1222 void ARGB1555ToYRow_C(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1223 void ARGB4444ToYRow_C(const uint8_t* src_argb4444, uint8_t* dst_y, int width);
1224 void ARGBToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1225 void ARGBToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1226 void RGBAToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1227 void BGRAToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1228 void ABGRToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1229 void RGBAToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1230 void RGB24ToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1231 void RGB24ToYJRow_Any_SSSE3(const uint8_t* src_ptr,
1232                             uint8_t* dst_ptr,
1233                             int width);
1234 void RAWToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1235 void RAWToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1236 void RGB24ToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1237 void RAWToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1238 void ARGBToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1239 void ARGBToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1240 void RGBAToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1241 void BGRAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1242 void ABGRToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1243 void RGBAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1244 void RGB24ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1245 void RGB24ToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1246 void RAWToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1247 void RAWToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1248 void RGB565ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1249 void ARGB1555ToYRow_Any_NEON(const uint8_t* src_ptr,
1250                              uint8_t* dst_ptr,
1251                              int width);
1252 void ARGB4444ToYRow_Any_NEON(const uint8_t* src_ptr,
1253                              uint8_t* dst_ptr,
1254                              int width);
1255 void BGRAToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1256 void ABGRToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1257 void RGBAToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1258 void ARGBToYJRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1259 void ARGBToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1260 void RGB24ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1261 void RAWToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1262 void RGB565ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1263 void ARGB1555ToYRow_Any_MSA(const uint8_t* src_ptr,
1264                             uint8_t* dst_ptr,
1265                             int width);
1266 void BGRAToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1267 void ABGRToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1268 void RGBAToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1269 void ARGBToYJRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1270 void ARGBToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1271 void RGB24ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1272 void RAWToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1273 void RGB565ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1274 void ARGB1555ToYRow_Any_MMI(const uint8_t* src_ptr,
1275                             uint8_t* dst_ptr,
1276                             int width);
1277 void ARGB4444ToYRow_Any_MMI(const uint8_t* src_ptr,
1278                             uint8_t* dst_ptr,
1279                             int width);
1280 
1281 void ARGBToUVRow_AVX2(const uint8_t* src_argb,
1282                       int src_stride_argb,
1283                       uint8_t* dst_u,
1284                       uint8_t* dst_v,
1285                       int width);
1286 void ABGRToUVRow_AVX2(const uint8_t* src_abgr,
1287                       int src_stride_abgr,
1288                       uint8_t* dst_u,
1289                       uint8_t* dst_v,
1290                       int width);
1291 void ARGBToUVJRow_AVX2(const uint8_t* src_argb,
1292                        int src_stride_argb,
1293                        uint8_t* dst_u,
1294                        uint8_t* dst_v,
1295                        int width);
1296 void ARGBToUVRow_SSSE3(const uint8_t* src_argb,
1297                        int src_stride_argb,
1298                        uint8_t* dst_u,
1299                        uint8_t* dst_v,
1300                        int width);
1301 void ARGBToUVJRow_SSSE3(const uint8_t* src_argb,
1302                         int src_stride_argb,
1303                         uint8_t* dst_u,
1304                         uint8_t* dst_v,
1305                         int width);
1306 void BGRAToUVRow_SSSE3(const uint8_t* src_bgra,
1307                        int src_stride_bgra,
1308                        uint8_t* dst_u,
1309                        uint8_t* dst_v,
1310                        int width);
1311 void ABGRToUVRow_SSSE3(const uint8_t* src_abgr,
1312                        int src_stride_abgr,
1313                        uint8_t* dst_u,
1314                        uint8_t* dst_v,
1315                        int width);
1316 void RGBAToUVRow_SSSE3(const uint8_t* src_rgba,
1317                        int src_stride_rgba,
1318                        uint8_t* dst_u,
1319                        uint8_t* dst_v,
1320                        int width);
1321 void ARGBToUVRow_Any_AVX2(const uint8_t* src_ptr,
1322                           int src_stride,
1323                           uint8_t* dst_u,
1324                           uint8_t* dst_v,
1325                           int width);
1326 void ABGRToUVRow_Any_AVX2(const uint8_t* src_ptr,
1327                           int src_stride,
1328                           uint8_t* dst_u,
1329                           uint8_t* dst_v,
1330                           int width);
1331 void ARGBToUVJRow_Any_AVX2(const uint8_t* src_ptr,
1332                            int src_stride,
1333                            uint8_t* dst_u,
1334                            uint8_t* dst_v,
1335                            int width);
1336 void ARGBToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1337                            int src_stride,
1338                            uint8_t* dst_u,
1339                            uint8_t* dst_v,
1340                            int width);
1341 void ARGBToUVJRow_Any_SSSE3(const uint8_t* src_ptr,
1342                             int src_stride,
1343                             uint8_t* dst_u,
1344                             uint8_t* dst_v,
1345                             int width);
1346 void BGRAToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1347                            int src_stride,
1348                            uint8_t* dst_u,
1349                            uint8_t* dst_v,
1350                            int width);
1351 void ABGRToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1352                            int src_stride,
1353                            uint8_t* dst_u,
1354                            uint8_t* dst_v,
1355                            int width);
1356 void RGBAToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1357                            int src_stride,
1358                            uint8_t* dst_u,
1359                            uint8_t* dst_v,
1360                            int width);
1361 void ARGBToUV444Row_Any_NEON(const uint8_t* src_ptr,
1362                              uint8_t* dst_u,
1363                              uint8_t* dst_v,
1364                              int width);
1365 void ARGBToUVRow_Any_NEON(const uint8_t* src_ptr,
1366                           int src_stride,
1367                           uint8_t* dst_u,
1368                           uint8_t* dst_v,
1369                           int width);
1370 void ARGBToUV444Row_Any_MSA(const uint8_t* src_ptr,
1371                             uint8_t* dst_u,
1372                             uint8_t* dst_v,
1373                             int width);
1374 void ARGBToUVRow_Any_MSA(const uint8_t* src_ptr,
1375                          int src_stride_ptr,
1376                          uint8_t* dst_u,
1377                          uint8_t* dst_v,
1378                          int width);
1379 void ARGBToUV444Row_Any_MMI(const uint8_t* src_ptr,
1380                             uint8_t* dst_u,
1381                             uint8_t* dst_v,
1382                             int width);
1383 void ARGBToUVRow_Any_MMI(const uint8_t* src_ptr,
1384                          int src_stride_ptr,
1385                          uint8_t* dst_u,
1386                          uint8_t* dst_v,
1387                          int width);
1388 void ARGBToUVJRow_Any_NEON(const uint8_t* src_ptr,
1389                            int src_stride,
1390                            uint8_t* dst_u,
1391                            uint8_t* dst_v,
1392                            int width);
1393 void BGRAToUVRow_Any_NEON(const uint8_t* src_ptr,
1394                           int src_stride,
1395                           uint8_t* dst_u,
1396                           uint8_t* dst_v,
1397                           int width);
1398 void ABGRToUVRow_Any_NEON(const uint8_t* src_ptr,
1399                           int src_stride,
1400                           uint8_t* dst_u,
1401                           uint8_t* dst_v,
1402                           int width);
1403 void RGBAToUVRow_Any_NEON(const uint8_t* src_ptr,
1404                           int src_stride,
1405                           uint8_t* dst_u,
1406                           uint8_t* dst_v,
1407                           int width);
1408 void RGB24ToUVRow_Any_NEON(const uint8_t* src_ptr,
1409                            int src_stride,
1410                            uint8_t* dst_u,
1411                            uint8_t* dst_v,
1412                            int width);
1413 void RAWToUVRow_Any_NEON(const uint8_t* src_ptr,
1414                          int src_stride,
1415                          uint8_t* dst_u,
1416                          uint8_t* dst_v,
1417                          int width);
1418 void RGB565ToUVRow_Any_NEON(const uint8_t* src_ptr,
1419                             int src_stride,
1420                             uint8_t* dst_u,
1421                             uint8_t* dst_v,
1422                             int width);
1423 void ARGB1555ToUVRow_Any_NEON(const uint8_t* src_ptr,
1424                               int src_stride,
1425                               uint8_t* dst_u,
1426                               uint8_t* dst_v,
1427                               int width);
1428 void ARGB4444ToUVRow_Any_NEON(const uint8_t* src_ptr,
1429                               int src_stride,
1430                               uint8_t* dst_u,
1431                               uint8_t* dst_v,
1432                               int width);
1433 void ARGBToUVJRow_Any_MSA(const uint8_t* src_ptr,
1434                           int src_stride_ptr,
1435                           uint8_t* dst_u,
1436                           uint8_t* dst_v,
1437                           int width);
1438 void BGRAToUVRow_Any_MSA(const uint8_t* src_ptr,
1439                          int src_stride_ptr,
1440                          uint8_t* dst_u,
1441                          uint8_t* dst_v,
1442                          int width);
1443 void ABGRToUVRow_Any_MSA(const uint8_t* src_ptr,
1444                          int src_stride_ptr,
1445                          uint8_t* dst_u,
1446                          uint8_t* dst_v,
1447                          int width);
1448 void RGBAToUVRow_Any_MSA(const uint8_t* src_ptr,
1449                          int src_stride_ptr,
1450                          uint8_t* dst_u,
1451                          uint8_t* dst_v,
1452                          int width);
1453 void RGB24ToUVRow_Any_MSA(const uint8_t* src_ptr,
1454                           int src_stride_ptr,
1455                           uint8_t* dst_u,
1456                           uint8_t* dst_v,
1457                           int width);
1458 void RAWToUVRow_Any_MSA(const uint8_t* src_ptr,
1459                         int src_stride_ptr,
1460                         uint8_t* dst_u,
1461                         uint8_t* dst_v,
1462                         int width);
1463 void RGB565ToUVRow_Any_MSA(const uint8_t* src_ptr,
1464                            int src_stride_ptr,
1465                            uint8_t* dst_u,
1466                            uint8_t* dst_v,
1467                            int width);
1468 void ARGB1555ToUVRow_Any_MSA(const uint8_t* src_ptr,
1469                              int src_stride_ptr,
1470                              uint8_t* dst_u,
1471                              uint8_t* dst_v,
1472                              int width);
1473 void ARGBToUVJRow_Any_MMI(const uint8_t* src_ptr,
1474                           int src_stride_ptr,
1475                           uint8_t* dst_u,
1476                           uint8_t* dst_v,
1477                           int width);
1478 void BGRAToUVRow_Any_MMI(const uint8_t* src_ptr,
1479                          int src_stride_ptr,
1480                          uint8_t* dst_u,
1481                          uint8_t* dst_v,
1482                          int width);
1483 void ABGRToUVRow_Any_MMI(const uint8_t* src_ptr,
1484                          int src_stride_ptr,
1485                          uint8_t* dst_u,
1486                          uint8_t* dst_v,
1487                          int width);
1488 void RGBAToUVRow_Any_MMI(const uint8_t* src_ptr,
1489                          int src_stride_ptr,
1490                          uint8_t* dst_u,
1491                          uint8_t* dst_v,
1492                          int width);
1493 void RGB24ToUVRow_Any_MMI(const uint8_t* src_ptr,
1494                           int src_stride_ptr,
1495                           uint8_t* dst_u,
1496                           uint8_t* dst_v,
1497                           int width);
1498 void RAWToUVRow_Any_MMI(const uint8_t* src_ptr,
1499                         int src_stride_ptr,
1500                         uint8_t* dst_u,
1501                         uint8_t* dst_v,
1502                         int width);
1503 void RGB565ToUVRow_Any_MMI(const uint8_t* src_ptr,
1504                            int src_stride_ptr,
1505                            uint8_t* dst_u,
1506                            uint8_t* dst_v,
1507                            int width);
1508 void ARGB1555ToUVRow_Any_MMI(const uint8_t* src_ptr,
1509                              int src_stride_ptr,
1510                              uint8_t* dst_u,
1511                              uint8_t* dst_v,
1512                              int width);
1513 void ARGB4444ToUVRow_Any_MMI(const uint8_t* src_ptr,
1514                              int src_stride_ptr,
1515                              uint8_t* dst_u,
1516                              uint8_t* dst_v,
1517                              int width);
1518 void ARGBToUVRow_C(const uint8_t* src_rgb,
1519                    int src_stride_rgb,
1520                    uint8_t* dst_u,
1521                    uint8_t* dst_v,
1522                    int width);
1523 void ARGBToUVJRow_C(const uint8_t* src_rgb,
1524                     int src_stride_rgb,
1525                     uint8_t* dst_u,
1526                     uint8_t* dst_v,
1527                     int width);
1528 void ARGBToUVRow_C(const uint8_t* src_rgb,
1529                    int src_stride_rgb,
1530                    uint8_t* dst_u,
1531                    uint8_t* dst_v,
1532                    int width);
1533 void ARGBToUVJRow_C(const uint8_t* src_rgb,
1534                     int src_stride_rgb,
1535                     uint8_t* dst_u,
1536                     uint8_t* dst_v,
1537                     int width);
1538 void BGRAToUVRow_C(const uint8_t* src_rgb,
1539                    int src_stride_rgb,
1540                    uint8_t* dst_u,
1541                    uint8_t* dst_v,
1542                    int width);
1543 void ABGRToUVRow_C(const uint8_t* src_rgb,
1544                    int src_stride_rgb,
1545                    uint8_t* dst_u,
1546                    uint8_t* dst_v,
1547                    int width);
1548 void RGBAToUVRow_C(const uint8_t* src_rgb,
1549                    int src_stride_rgb,
1550                    uint8_t* dst_u,
1551                    uint8_t* dst_v,
1552                    int width);
1553 void RGB24ToUVRow_C(const uint8_t* src_rgb,
1554                     int src_stride_rgb,
1555                     uint8_t* dst_u,
1556                     uint8_t* dst_v,
1557                     int width);
1558 void RAWToUVRow_C(const uint8_t* src_rgb,
1559                   int src_stride_rgb,
1560                   uint8_t* dst_u,
1561                   uint8_t* dst_v,
1562                   int width);
1563 void RGB565ToUVRow_C(const uint8_t* src_rgb565,
1564                      int src_stride_rgb565,
1565                      uint8_t* dst_u,
1566                      uint8_t* dst_v,
1567                      int width);
1568 void ARGB1555ToUVRow_C(const uint8_t* src_argb1555,
1569                        int src_stride_argb1555,
1570                        uint8_t* dst_u,
1571                        uint8_t* dst_v,
1572                        int width);
1573 void ARGB4444ToUVRow_C(const uint8_t* src_argb4444,
1574                        int src_stride_argb4444,
1575                        uint8_t* dst_u,
1576                        uint8_t* dst_v,
1577                        int width);
1578 
1579 void ARGBToUV444Row_SSSE3(const uint8_t* src_argb,
1580                           uint8_t* dst_u,
1581                           uint8_t* dst_v,
1582                           int width);
1583 void ARGBToUV444Row_Any_SSSE3(const uint8_t* src_ptr,
1584                               uint8_t* dst_u,
1585                               uint8_t* dst_v,
1586                               int width);
1587 
1588 void ARGBToUV444Row_C(const uint8_t* src_argb,
1589                       uint8_t* dst_u,
1590                       uint8_t* dst_v,
1591                       int width);
1592 
1593 void MirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
1594 void MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width);
1595 void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width);
1596 void MirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width);
1597 void MirrorRow_MMI(const uint8_t* src, uint8_t* dst, int width);
1598 void MirrorRow_C(const uint8_t* src, uint8_t* dst, int width);
1599 void MirrorRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1600 void MirrorRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1601 void MirrorRow_Any_SSE2(const uint8_t* src, uint8_t* dst, int width);
1602 void MirrorRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1603 void MirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1604 void MirrorRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1605 void MirrorUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_uv, int width);
1606 void MirrorUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_uv, int width);
1607 void MirrorUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_uv, int width);
1608 void MirrorUVRow_MSA(const uint8_t* src_uv, uint8_t* dst_uv, int width);
1609 void MirrorUVRow_C(const uint8_t* src_uv, uint8_t* dst_uv, int width);
1610 void MirrorUVRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1611 void MirrorUVRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1612 void MirrorUVRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1613 void MirrorUVRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1614 
1615 void MirrorSplitUVRow_SSSE3(const uint8_t* src,
1616                             uint8_t* dst_u,
1617                             uint8_t* dst_v,
1618                             int width);
1619 void MirrorSplitUVRow_NEON(const uint8_t* src_uv,
1620                            uint8_t* dst_u,
1621                            uint8_t* dst_v,
1622                            int width);
1623 void MirrorSplitUVRow_MSA(const uint8_t* src_uv,
1624                           uint8_t* dst_u,
1625                           uint8_t* dst_v,
1626                           int width);
1627 void MirrorSplitUVRow_MMI(const uint8_t* src_uv,
1628                           uint8_t* dst_u,
1629                           uint8_t* dst_v,
1630                           int width);
1631 void MirrorSplitUVRow_C(const uint8_t* src_uv,
1632                         uint8_t* dst_u,
1633                         uint8_t* dst_v,
1634                         int width);
1635 
1636 void ARGBMirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
1637 void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
1638 void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width);
1639 void ARGBMirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width);
1640 void ARGBMirrorRow_MMI(const uint8_t* src, uint8_t* dst, int width);
1641 void ARGBMirrorRow_C(const uint8_t* src, uint8_t* dst, int width);
1642 void ARGBMirrorRow_Any_AVX2(const uint8_t* src_ptr,
1643                             uint8_t* dst_ptr,
1644                             int width);
1645 void ARGBMirrorRow_Any_SSE2(const uint8_t* src_ptr,
1646                             uint8_t* dst_ptr,
1647                             int width);
1648 void ARGBMirrorRow_Any_NEON(const uint8_t* src_ptr,
1649                             uint8_t* dst_ptr,
1650                             int width);
1651 void ARGBMirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1652 void ARGBMirrorRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1653 
1654 void RGB24MirrorRow_SSSE3(const uint8_t* src_rgb24,
1655                           uint8_t* dst_rgb24,
1656                           int width);
1657 void RGB24MirrorRow_NEON(const uint8_t* src_rgb24,
1658                          uint8_t* dst_rgb24,
1659                          int width);
1660 void RGB24MirrorRow_C(const uint8_t* src_rgb24, uint8_t* dst_rgb24, int width);
1661 void RGB24MirrorRow_Any_SSSE3(const uint8_t* src_ptr,
1662                               uint8_t* dst_ptr,
1663                               int width);
1664 void RGB24MirrorRow_Any_NEON(const uint8_t* src_ptr,
1665                              uint8_t* dst_ptr,
1666                              int width);
1667 
1668 void SplitUVRow_C(const uint8_t* src_uv,
1669                   uint8_t* dst_u,
1670                   uint8_t* dst_v,
1671                   int width);
1672 void SplitUVRow_SSE2(const uint8_t* src_uv,
1673                      uint8_t* dst_u,
1674                      uint8_t* dst_v,
1675                      int width);
1676 void SplitUVRow_AVX2(const uint8_t* src_uv,
1677                      uint8_t* dst_u,
1678                      uint8_t* dst_v,
1679                      int width);
1680 void SplitUVRow_NEON(const uint8_t* src_uv,
1681                      uint8_t* dst_u,
1682                      uint8_t* dst_v,
1683                      int width);
1684 void SplitUVRow_MSA(const uint8_t* src_uv,
1685                     uint8_t* dst_u,
1686                     uint8_t* dst_v,
1687                     int width);
1688 void SplitUVRow_MMI(const uint8_t* src_uv,
1689                     uint8_t* dst_u,
1690                     uint8_t* dst_v,
1691                     int width);
1692 void SplitUVRow_Any_SSE2(const uint8_t* src_ptr,
1693                          uint8_t* dst_u,
1694                          uint8_t* dst_v,
1695                          int width);
1696 void SplitUVRow_Any_AVX2(const uint8_t* src_ptr,
1697                          uint8_t* dst_u,
1698                          uint8_t* dst_v,
1699                          int width);
1700 void SplitUVRow_Any_NEON(const uint8_t* src_ptr,
1701                          uint8_t* dst_u,
1702                          uint8_t* dst_v,
1703                          int width);
1704 void SplitUVRow_Any_MSA(const uint8_t* src_ptr,
1705                         uint8_t* dst_u,
1706                         uint8_t* dst_v,
1707                         int width);
1708 void SplitUVRow_Any_MMI(const uint8_t* src_ptr,
1709                         uint8_t* dst_u,
1710                         uint8_t* dst_v,
1711                         int width);
1712 
1713 void MergeUVRow_C(const uint8_t* src_u,
1714                   const uint8_t* src_v,
1715                   uint8_t* dst_uv,
1716                   int width);
1717 void MergeUVRow_SSE2(const uint8_t* src_u,
1718                      const uint8_t* src_v,
1719                      uint8_t* dst_uv,
1720                      int width);
1721 void MergeUVRow_AVX2(const uint8_t* src_u,
1722                      const uint8_t* src_v,
1723                      uint8_t* dst_uv,
1724                      int width);
1725 void MergeUVRow_NEON(const uint8_t* src_u,
1726                      const uint8_t* src_v,
1727                      uint8_t* dst_uv,
1728                      int width);
1729 void MergeUVRow_MSA(const uint8_t* src_u,
1730                     const uint8_t* src_v,
1731                     uint8_t* dst_uv,
1732                     int width);
1733 void MergeUVRow_MMI(const uint8_t* src_u,
1734                     const uint8_t* src_v,
1735                     uint8_t* dst_uv,
1736                     int width);
1737 void MergeUVRow_Any_SSE2(const uint8_t* y_buf,
1738                          const uint8_t* uv_buf,
1739                          uint8_t* dst_ptr,
1740                          int width);
1741 void MergeUVRow_Any_AVX2(const uint8_t* y_buf,
1742                          const uint8_t* uv_buf,
1743                          uint8_t* dst_ptr,
1744                          int width);
1745 void MergeUVRow_Any_NEON(const uint8_t* y_buf,
1746                          const uint8_t* uv_buf,
1747                          uint8_t* dst_ptr,
1748                          int width);
1749 void MergeUVRow_Any_MSA(const uint8_t* y_buf,
1750                         const uint8_t* uv_buf,
1751                         uint8_t* dst_ptr,
1752                         int width);
1753 void MergeUVRow_Any_MMI(const uint8_t* y_buf,
1754                         const uint8_t* uv_buf,
1755                         uint8_t* dst_ptr,
1756                         int width);
1757 
1758 void HalfMergeUVRow_C(const uint8_t* src_u,
1759                       int src_stride_u,
1760                       const uint8_t* src_v,
1761                       int src_stride_v,
1762                       uint8_t* dst_uv,
1763                       int width);
1764 
1765 void HalfMergeUVRow_NEON(const uint8_t* src_u,
1766                          int src_stride_u,
1767                          const uint8_t* src_v,
1768                          int src_stride_v,
1769                          uint8_t* dst_uv,
1770                          int width);
1771 
1772 void HalfMergeUVRow_SSSE3(const uint8_t* src_u,
1773                           int src_stride_u,
1774                           const uint8_t* src_v,
1775                           int src_stride_v,
1776                           uint8_t* dst_uv,
1777                           int width);
1778 
1779 void HalfMergeUVRow_AVX2(const uint8_t* src_u,
1780                          int src_stride_u,
1781                          const uint8_t* src_v,
1782                          int src_stride_v,
1783                          uint8_t* dst_uv,
1784                          int width);
1785 
1786 void SplitRGBRow_C(const uint8_t* src_rgb,
1787                    uint8_t* dst_r,
1788                    uint8_t* dst_g,
1789                    uint8_t* dst_b,
1790                    int width);
1791 void SplitRGBRow_SSSE3(const uint8_t* src_rgb,
1792                        uint8_t* dst_r,
1793                        uint8_t* dst_g,
1794                        uint8_t* dst_b,
1795                        int width);
1796 void SplitRGBRow_NEON(const uint8_t* src_rgb,
1797                       uint8_t* dst_r,
1798                       uint8_t* dst_g,
1799                       uint8_t* dst_b,
1800                       int width);
1801 void SplitRGBRow_MMI(const uint8_t* src_rgb,
1802                      uint8_t* dst_r,
1803                      uint8_t* dst_g,
1804                      uint8_t* dst_b,
1805                      int width);
1806 void SplitRGBRow_Any_SSSE3(const uint8_t* src_ptr,
1807                            uint8_t* dst_r,
1808                            uint8_t* dst_g,
1809                            uint8_t* dst_b,
1810                            int width);
1811 void SplitRGBRow_Any_NEON(const uint8_t* src_ptr,
1812                           uint8_t* dst_r,
1813                           uint8_t* dst_g,
1814                           uint8_t* dst_b,
1815                           int width);
1816 void SplitRGBRow_Any_MMI(const uint8_t* src_ptr,
1817                          uint8_t* dst_r,
1818                          uint8_t* dst_g,
1819                          uint8_t* dst_b,
1820                          int width);
1821 
1822 void MergeRGBRow_C(const uint8_t* src_r,
1823                    const uint8_t* src_g,
1824                    const uint8_t* src_b,
1825                    uint8_t* dst_rgb,
1826                    int width);
1827 void MergeRGBRow_SSSE3(const uint8_t* src_r,
1828                        const uint8_t* src_g,
1829                        const uint8_t* src_b,
1830                        uint8_t* dst_rgb,
1831                        int width);
1832 void MergeRGBRow_NEON(const uint8_t* src_r,
1833                       const uint8_t* src_g,
1834                       const uint8_t* src_b,
1835                       uint8_t* dst_rgb,
1836                       int width);
1837 void MergeRGBRow_MMI(const uint8_t* src_r,
1838                      const uint8_t* src_g,
1839                      const uint8_t* src_b,
1840                      uint8_t* dst_rgb,
1841                      int width);
1842 void MergeRGBRow_Any_SSSE3(const uint8_t* y_buf,
1843                            const uint8_t* u_buf,
1844                            const uint8_t* v_buf,
1845                            uint8_t* dst_ptr,
1846                            int width);
1847 void MergeRGBRow_Any_NEON(const uint8_t* src_r,
1848                           const uint8_t* src_g,
1849                           const uint8_t* src_b,
1850                           uint8_t* dst_rgb,
1851                           int width);
1852 void MergeRGBRow_Any_MMI(const uint8_t* src_r,
1853                          const uint8_t* src_g,
1854                          const uint8_t* src_b,
1855                          uint8_t* dst_rgb,
1856                          int width);
1857 void MergeARGBRow_C(const uint8_t* src_r,
1858                     const uint8_t* src_g,
1859                     const uint8_t* src_b,
1860                     const uint8_t* src_a,
1861                     uint8_t* dst_argb,
1862                     int width);
1863 void MergeARGBRow_SSE2(const uint8_t* src_r,
1864                        const uint8_t* src_g,
1865                        const uint8_t* src_b,
1866                        const uint8_t* src_a,
1867                        uint8_t* dst_argb,
1868                        int width);
1869 void MergeARGBRow_AVX2(const uint8_t* src_r,
1870                        const uint8_t* src_g,
1871                        const uint8_t* src_b,
1872                        const uint8_t* src_a,
1873                        uint8_t* dst_argb,
1874                        int width);
1875 void MergeARGBRow_NEON(const uint8_t* src_r,
1876                        const uint8_t* src_g,
1877                        const uint8_t* src_b,
1878                        const uint8_t* src_a,
1879                        uint8_t* dst_argb,
1880                        int width);
1881 void MergeARGBRow_Any_SSE2(const uint8_t* y_buf,
1882                            const uint8_t* u_buf,
1883                            const uint8_t* v_buf,
1884                            const uint8_t* a_buf,
1885                            uint8_t* dst_ptr,
1886                            int width);
1887 void MergeARGBRow_Any_AVX2(const uint8_t* y_buf,
1888                            const uint8_t* u_buf,
1889                            const uint8_t* v_buf,
1890                            const uint8_t* a_buf,
1891                            uint8_t* dst_ptr,
1892                            int width);
1893 void MergeARGBRow_Any_NEON(const uint8_t* y_buf,
1894                            const uint8_t* u_buf,
1895                            const uint8_t* v_buf,
1896                            const uint8_t* a_buf,
1897                            uint8_t* dst_ptr,
1898                            int width);
1899 void SplitARGBRow_C(const uint8_t* src_argb,
1900                     uint8_t* dst_r,
1901                     uint8_t* dst_g,
1902                     uint8_t* dst_b,
1903                     uint8_t* dst_a,
1904                     int width);
1905 void SplitARGBRow_SSE2(const uint8_t* src_argb,
1906                        uint8_t* dst_r,
1907                        uint8_t* dst_g,
1908                        uint8_t* dst_b,
1909                        uint8_t* dst_a,
1910                        int width);
1911 void SplitARGBRow_SSSE3(const uint8_t* src_argb,
1912                         uint8_t* dst_r,
1913                         uint8_t* dst_g,
1914                         uint8_t* dst_b,
1915                         uint8_t* dst_a,
1916                         int width);
1917 void SplitARGBRow_AVX2(const uint8_t* src_argb,
1918                        uint8_t* dst_r,
1919                        uint8_t* dst_g,
1920                        uint8_t* dst_b,
1921                        uint8_t* dst_a,
1922                        int width);
1923 void SplitARGBRow_NEON(const uint8_t* src_rgba,
1924                        uint8_t* dst_r,
1925                        uint8_t* dst_g,
1926                        uint8_t* dst_b,
1927                        uint8_t* dst_a,
1928                        int width);
1929 void SplitARGBRow_Any_SSE2(const uint8_t* src_ptr,
1930                            uint8_t* dst_r,
1931                            uint8_t* dst_g,
1932                            uint8_t* dst_b,
1933                            uint8_t* dst_a,
1934                            int width);
1935 void SplitARGBRow_Any_SSSE3(const uint8_t* src_ptr,
1936                             uint8_t* dst_r,
1937                             uint8_t* dst_g,
1938                             uint8_t* dst_b,
1939                             uint8_t* dst_a,
1940                             int width);
1941 void SplitARGBRow_Any_AVX2(const uint8_t* src_ptr,
1942                            uint8_t* dst_r,
1943                            uint8_t* dst_g,
1944                            uint8_t* dst_b,
1945                            uint8_t* dst_a,
1946                            int width);
1947 void SplitARGBRow_Any_NEON(const uint8_t* src_ptr,
1948                            uint8_t* dst_r,
1949                            uint8_t* dst_g,
1950                            uint8_t* dst_b,
1951                            uint8_t* dst_a,
1952                            int width);
1953 void MergeXRGBRow_C(const uint8_t* src_r,
1954                     const uint8_t* src_g,
1955                     const uint8_t* src_b,
1956                     uint8_t* dst_argb,
1957                     int width);
1958 void MergeXRGBRow_SSE2(const uint8_t* src_r,
1959                        const uint8_t* src_g,
1960                        const uint8_t* src_b,
1961                        uint8_t* dst_argb,
1962                        int width);
1963 void MergeXRGBRow_AVX2(const uint8_t* src_r,
1964                        const uint8_t* src_g,
1965                        const uint8_t* src_b,
1966                        uint8_t* dst_argb,
1967                        int width);
1968 void MergeXRGBRow_NEON(const uint8_t* src_r,
1969                        const uint8_t* src_g,
1970                        const uint8_t* src_b,
1971                        uint8_t* dst_argb,
1972                        int width);
1973 void MergeXRGBRow_Any_SSE2(const uint8_t* y_buf,
1974                            const uint8_t* u_buf,
1975                            const uint8_t* v_buf,
1976                            uint8_t* dst_ptr,
1977                            int width);
1978 void MergeXRGBRow_Any_AVX2(const uint8_t* y_buf,
1979                            const uint8_t* u_buf,
1980                            const uint8_t* v_buf,
1981                            uint8_t* dst_ptr,
1982                            int width);
1983 void MergeXRGBRow_Any_NEON(const uint8_t* y_buf,
1984                            const uint8_t* u_buf,
1985                            const uint8_t* v_buf,
1986                            uint8_t* dst_ptr,
1987                            int width);
1988 void SplitXRGBRow_C(const uint8_t* src_argb,
1989                     uint8_t* dst_r,
1990                     uint8_t* dst_g,
1991                     uint8_t* dst_b,
1992                     int width);
1993 void SplitXRGBRow_SSE2(const uint8_t* src_argb,
1994                        uint8_t* dst_r,
1995                        uint8_t* dst_g,
1996                        uint8_t* dst_b,
1997                        int width);
1998 void SplitXRGBRow_SSSE3(const uint8_t* src_argb,
1999                         uint8_t* dst_r,
2000                         uint8_t* dst_g,
2001                         uint8_t* dst_b,
2002                         int width);
2003 void SplitXRGBRow_AVX2(const uint8_t* src_argb,
2004                        uint8_t* dst_r,
2005                        uint8_t* dst_g,
2006                        uint8_t* dst_b,
2007                        int width);
2008 void SplitXRGBRow_NEON(const uint8_t* src_rgba,
2009                        uint8_t* dst_r,
2010                        uint8_t* dst_g,
2011                        uint8_t* dst_b,
2012                        int width);
2013 void SplitXRGBRow_Any_SSE2(const uint8_t* src_ptr,
2014                            uint8_t* dst_r,
2015                            uint8_t* dst_g,
2016                            uint8_t* dst_b,
2017                            int width);
2018 void SplitXRGBRow_Any_SSSE3(const uint8_t* src_ptr,
2019                             uint8_t* dst_r,
2020                             uint8_t* dst_g,
2021                             uint8_t* dst_b,
2022                             int width);
2023 void SplitXRGBRow_Any_AVX2(const uint8_t* src_ptr,
2024                            uint8_t* dst_r,
2025                            uint8_t* dst_g,
2026                            uint8_t* dst_b,
2027                            int width);
2028 void SplitXRGBRow_Any_NEON(const uint8_t* src_ptr,
2029                            uint8_t* dst_r,
2030                            uint8_t* dst_g,
2031                            uint8_t* dst_b,
2032                            int width);
2033 
2034 void MergeXR30Row_C(const uint16_t* src_r,
2035                     const uint16_t* src_g,
2036                     const uint16_t* src_b,
2037                     uint8_t* dst_ar30,
2038                     int depth,
2039                     int width);
2040 void MergeAR64Row_C(const uint16_t* src_r,
2041                     const uint16_t* src_g,
2042                     const uint16_t* src_b,
2043                     const uint16_t* src_a,
2044                     uint16_t* dst_ar64,
2045                     int depth,
2046                     int width);
2047 void MergeARGB16To8Row_C(const uint16_t* src_r,
2048                          const uint16_t* src_g,
2049                          const uint16_t* src_b,
2050                          const uint16_t* src_a,
2051                          uint8_t* dst_argb,
2052                          int depth,
2053                          int width);
2054 void MergeXR64Row_C(const uint16_t* src_r,
2055                     const uint16_t* src_g,
2056                     const uint16_t* src_b,
2057                     uint16_t* dst_ar64,
2058                     int depth,
2059                     int width);
2060 void MergeXRGB16To8Row_C(const uint16_t* src_r,
2061                          const uint16_t* src_g,
2062                          const uint16_t* src_b,
2063                          uint8_t* dst_argb,
2064                          int depth,
2065                          int width);
2066 void MergeXR30Row_AVX2(const uint16_t* src_r,
2067                        const uint16_t* src_g,
2068                        const uint16_t* src_b,
2069                        uint8_t* dst_ar30,
2070                        int depth,
2071                        int width);
2072 void MergeAR64Row_AVX2(const uint16_t* src_r,
2073                        const uint16_t* src_g,
2074                        const uint16_t* src_b,
2075                        const uint16_t* src_a,
2076                        uint16_t* dst_ar64,
2077                        int depth,
2078                        int width);
2079 void MergeARGB16To8Row_AVX2(const uint16_t* src_r,
2080                             const uint16_t* src_g,
2081                             const uint16_t* src_b,
2082                             const uint16_t* src_a,
2083                             uint8_t* dst_argb,
2084                             int depth,
2085                             int width);
2086 void MergeXR64Row_AVX2(const uint16_t* src_r,
2087                        const uint16_t* src_g,
2088                        const uint16_t* src_b,
2089                        uint16_t* dst_ar64,
2090                        int depth,
2091                        int width);
2092 void MergeXRGB16To8Row_AVX2(const uint16_t* src_r,
2093                             const uint16_t* src_g,
2094                             const uint16_t* src_b,
2095                             uint8_t* dst_argb,
2096                             int depth,
2097                             int width);
2098 void MergeXR30Row_NEON(const uint16_t* src_r,
2099                        const uint16_t* src_g,
2100                        const uint16_t* src_b,
2101                        uint8_t* dst_ar30,
2102                        int depth,
2103                        int width);
2104 void MergeXR30Row_10_NEON(const uint16_t* src_r,
2105                           const uint16_t* src_g,
2106                           const uint16_t* src_b,
2107                           uint8_t* dst_ar30,
2108                           int /* depth */,
2109                           int width);
2110 void MergeAR64Row_NEON(const uint16_t* src_r,
2111                        const uint16_t* src_g,
2112                        const uint16_t* src_b,
2113                        const uint16_t* src_a,
2114                        uint16_t* dst_ar64,
2115                        int depth,
2116                        int width);
2117 void MergeARGB16To8Row_NEON(const uint16_t* src_r,
2118                             const uint16_t* src_g,
2119                             const uint16_t* src_b,
2120                             const uint16_t* src_a,
2121                             uint8_t* dst_argb,
2122                             int depth,
2123                             int width);
2124 void MergeXR64Row_NEON(const uint16_t* src_r,
2125                        const uint16_t* src_g,
2126                        const uint16_t* src_b,
2127                        uint16_t* dst_ar64,
2128                        int depth,
2129                        int width);
2130 void MergeXRGB16To8Row_NEON(const uint16_t* src_r,
2131                             const uint16_t* src_g,
2132                             const uint16_t* src_b,
2133                             uint8_t* dst_argb,
2134                             int depth,
2135                             int width);
2136 void MergeXR30Row_Any_AVX2(const uint16_t* r_buf,
2137                            const uint16_t* g_buf,
2138                            const uint16_t* b_buf,
2139                            uint8_t* dst_ptr,
2140                            int depth,
2141                            int width);
2142 void MergeAR64Row_Any_AVX2(const uint16_t* r_buf,
2143                            const uint16_t* g_buf,
2144                            const uint16_t* b_buf,
2145                            const uint16_t* a_buf,
2146                            uint16_t* dst_ptr,
2147                            int depth,
2148                            int width);
2149 void MergeXR64Row_Any_AVX2(const uint16_t* r_buf,
2150                            const uint16_t* g_buf,
2151                            const uint16_t* b_buf,
2152                            uint16_t* dst_ptr,
2153                            int depth,
2154                            int width);
2155 void MergeARGB16To8Row_Any_AVX2(const uint16_t* r_buf,
2156                                 const uint16_t* g_buf,
2157                                 const uint16_t* b_buf,
2158                                 const uint16_t* a_buf,
2159                                 uint8_t* dst_ptr,
2160                                 int depth,
2161                                 int width);
2162 void MergeXRGB16To8Row_Any_AVX2(const uint16_t* r_buf,
2163                                 const uint16_t* g_buf,
2164                                 const uint16_t* b_buf,
2165                                 uint8_t* dst_ptr,
2166                                 int depth,
2167                                 int width);
2168 void MergeXR30Row_Any_NEON(const uint16_t* r_buf,
2169                            const uint16_t* g_buf,
2170                            const uint16_t* b_buf,
2171                            uint8_t* dst_ptr,
2172                            int depth,
2173                            int width);
2174 void MergeXR30Row_10_Any_NEON(const uint16_t* r_buf,
2175                               const uint16_t* g_buf,
2176                               const uint16_t* b_buf,
2177                               uint8_t* dst_ptr,
2178                               int depth,
2179                               int width);
2180 void MergeAR64Row_Any_NEON(const uint16_t* r_buf,
2181                            const uint16_t* g_buf,
2182                            const uint16_t* b_buf,
2183                            const uint16_t* a_buf,
2184                            uint16_t* dst_ptr,
2185                            int depth,
2186                            int width);
2187 void MergeARGB16To8Row_Any_NEON(const uint16_t* r_buf,
2188                                 const uint16_t* g_buf,
2189                                 const uint16_t* b_buf,
2190                                 const uint16_t* a_buf,
2191                                 uint8_t* dst_ptr,
2192                                 int depth,
2193                                 int width);
2194 void MergeXR64Row_Any_NEON(const uint16_t* r_buf,
2195                            const uint16_t* g_buf,
2196                            const uint16_t* b_buf,
2197                            uint16_t* dst_ptr,
2198                            int depth,
2199                            int width);
2200 void MergeXRGB16To8Row_Any_NEON(const uint16_t* r_buf,
2201                                 const uint16_t* g_buf,
2202                                 const uint16_t* b_buf,
2203                                 uint8_t* dst_ptr,
2204                                 int depth,
2205                                 int width);
2206 
2207 void MergeUVRow_16_C(const uint16_t* src_u,
2208                      const uint16_t* src_v,
2209                      uint16_t* dst_uv,
2210                      int depth,
2211                      int width);
2212 void MergeUVRow_16_AVX2(const uint16_t* src_u,
2213                         const uint16_t* src_v,
2214                         uint16_t* dst_uv,
2215                         int depth,
2216                         int width);
2217 void MergeUVRow_16_Any_AVX2(const uint16_t* src_u,
2218                             const uint16_t* src_v,
2219                             uint16_t* dst_uv,
2220                             int depth,
2221                             int width);
2222 void MergeUVRow_16_NEON(const uint16_t* src_u,
2223                         const uint16_t* src_v,
2224                         uint16_t* dst_uv,
2225                         int depth,
2226                         int width);
2227 void MergeUVRow_16_Any_NEON(const uint16_t* src_u,
2228                             const uint16_t* src_v,
2229                             uint16_t* dst_uv,
2230                             int depth,
2231                             int width);
2232 
2233 void SplitUVRow_16_C(const uint16_t* src_uv,
2234                      uint16_t* dst_u,
2235                      uint16_t* dst_v,
2236                      int depth,
2237                      int width);
2238 void SplitUVRow_16_AVX2(const uint16_t* src_uv,
2239                         uint16_t* dst_u,
2240                         uint16_t* dst_v,
2241                         int depth,
2242                         int width);
2243 void SplitUVRow_16_Any_AVX2(const uint16_t* src_uv,
2244                             uint16_t* dst_u,
2245                             uint16_t* dst_v,
2246                             int depth,
2247                             int width);
2248 void SplitUVRow_16_NEON(const uint16_t* src_uv,
2249                         uint16_t* dst_u,
2250                         uint16_t* dst_v,
2251                         int depth,
2252                         int width);
2253 void SplitUVRow_16_Any_NEON(const uint16_t* src_uv,
2254                             uint16_t* dst_u,
2255                             uint16_t* dst_v,
2256                             int depth,
2257                             int width);
2258 
2259 void MultiplyRow_16_C(const uint16_t* src_y,
2260                       uint16_t* dst_y,
2261                       int scale,
2262                       int width);
2263 void MultiplyRow_16_AVX2(const uint16_t* src_y,
2264                          uint16_t* dst_y,
2265                          int scale,
2266                          int width);
2267 void MultiplyRow_16_Any_AVX2(const uint16_t* src_ptr,
2268                              uint16_t* dst_ptr,
2269                              int scale,
2270                              int width);
2271 void MultiplyRow_16_NEON(const uint16_t* src_y,
2272                          uint16_t* dst_y,
2273                          int scale,
2274                          int width);
2275 void MultiplyRow_16_Any_NEON(const uint16_t* src_ptr,
2276                              uint16_t* dst_ptr,
2277                              int scale,
2278                              int width);
2279 
2280 void DivideRow_16_C(const uint16_t* src_y,
2281                     uint16_t* dst_y,
2282                     int scale,
2283                     int width);
2284 void DivideRow_16_AVX2(const uint16_t* src_y,
2285                        uint16_t* dst_y,
2286                        int scale,
2287                        int width);
2288 void DivideRow_16_Any_AVX2(const uint16_t* src_ptr,
2289                            uint16_t* dst_ptr,
2290                            int scale,
2291                            int width);
2292 void DivideRow_16_NEON(const uint16_t* src_y,
2293                        uint16_t* dst_y,
2294                        int scale,
2295                        int width);
2296 void DivideRow_16_Any_NEON(const uint16_t* src_ptr,
2297                            uint16_t* dst_ptr,
2298                            int scale,
2299                            int width);
2300 
2301 void Convert8To16Row_C(const uint8_t* src_y,
2302                        uint16_t* dst_y,
2303                        int scale,
2304                        int width);
2305 void Convert8To16Row_SSE2(const uint8_t* src_y,
2306                           uint16_t* dst_y,
2307                           int scale,
2308                           int width);
2309 void Convert8To16Row_AVX2(const uint8_t* src_y,
2310                           uint16_t* dst_y,
2311                           int scale,
2312                           int width);
2313 void Convert8To16Row_Any_SSE2(const uint8_t* src_ptr,
2314                               uint16_t* dst_ptr,
2315                               int scale,
2316                               int width);
2317 void Convert8To16Row_Any_AVX2(const uint8_t* src_ptr,
2318                               uint16_t* dst_ptr,
2319                               int scale,
2320                               int width);
2321 
2322 void Convert16To8Row_C(const uint16_t* src_y,
2323                        uint8_t* dst_y,
2324                        int scale,
2325                        int width);
2326 void Convert16To8Row_SSSE3(const uint16_t* src_y,
2327                            uint8_t* dst_y,
2328                            int scale,
2329                            int width);
2330 void Convert16To8Row_AVX2(const uint16_t* src_y,
2331                           uint8_t* dst_y,
2332                           int scale,
2333                           int width);
2334 void Convert16To8Row_Any_SSSE3(const uint16_t* src_ptr,
2335                                uint8_t* dst_ptr,
2336                                int scale,
2337                                int width);
2338 void Convert16To8Row_Any_AVX2(const uint16_t* src_ptr,
2339                               uint8_t* dst_ptr,
2340                               int scale,
2341                               int width);
2342 
2343 void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
2344 void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width);
2345 void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width);
2346 void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width);
2347 void CopyRow_MIPS(const uint8_t* src, uint8_t* dst, int count);
2348 void CopyRow_C(const uint8_t* src, uint8_t* dst, int count);
2349 void CopyRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2350 void CopyRow_Any_AVX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2351 void CopyRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2352 
2353 void CopyRow_16_C(const uint16_t* src, uint16_t* dst, int count);
2354 
2355 void ARGBCopyAlphaRow_C(const uint8_t* src, uint8_t* dst, int width);
2356 void ARGBCopyAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
2357 void ARGBCopyAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
2358 void ARGBCopyAlphaRow_MMI(const uint8_t* src, uint8_t* dst, int width);
2359 void ARGBCopyAlphaRow_Any_SSE2(const uint8_t* src_ptr,
2360                                uint8_t* dst_ptr,
2361                                int width);
2362 void ARGBCopyAlphaRow_Any_AVX2(const uint8_t* src_ptr,
2363                                uint8_t* dst_ptr,
2364                                int width);
2365 void ARGBCopyAlphaRow_Any_MMI(const uint8_t* src_ptr,
2366                               uint8_t* dst_ptr,
2367                               int width);
2368 
2369 void ARGBExtractAlphaRow_C(const uint8_t* src_argb, uint8_t* dst_a, int width);
2370 void ARGBExtractAlphaRow_SSE2(const uint8_t* src_argb,
2371                               uint8_t* dst_a,
2372                               int width);
2373 void ARGBExtractAlphaRow_AVX2(const uint8_t* src_argb,
2374                               uint8_t* dst_a,
2375                               int width);
2376 void ARGBExtractAlphaRow_NEON(const uint8_t* src_argb,
2377                               uint8_t* dst_a,
2378                               int width);
2379 void ARGBExtractAlphaRow_MSA(const uint8_t* src_argb,
2380                              uint8_t* dst_a,
2381                              int width);
2382 void ARGBExtractAlphaRow_MMI(const uint8_t* src_argb,
2383                              uint8_t* dst_a,
2384                              int width);
2385 void ARGBExtractAlphaRow_Any_SSE2(const uint8_t* src_ptr,
2386                                   uint8_t* dst_ptr,
2387                                   int width);
2388 void ARGBExtractAlphaRow_Any_AVX2(const uint8_t* src_ptr,
2389                                   uint8_t* dst_ptr,
2390                                   int width);
2391 void ARGBExtractAlphaRow_Any_NEON(const uint8_t* src_ptr,
2392                                   uint8_t* dst_ptr,
2393                                   int width);
2394 void ARGBExtractAlphaRow_Any_MSA(const uint8_t* src_ptr,
2395                                  uint8_t* dst_ptr,
2396                                  int width);
2397 void ARGBExtractAlphaRow_Any_MMI(const uint8_t* src_ptr,
2398                                  uint8_t* dst_ptr,
2399                                  int width);
2400 
2401 void ARGBCopyYToAlphaRow_C(const uint8_t* src, uint8_t* dst, int width);
2402 void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
2403 void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
2404 void ARGBCopyYToAlphaRow_MMI(const uint8_t* src, uint8_t* dst, int width);
2405 void ARGBCopyYToAlphaRow_Any_SSE2(const uint8_t* src_ptr,
2406                                   uint8_t* dst_ptr,
2407                                   int width);
2408 void ARGBCopyYToAlphaRow_Any_AVX2(const uint8_t* src_ptr,
2409                                   uint8_t* dst_ptr,
2410                                   int width);
2411 void ARGBCopyYToAlphaRow_Any_MMI(const uint8_t* src_ptr,
2412                                  uint8_t* dst_ptr,
2413                                  int width);
2414 
2415 void SetRow_C(uint8_t* dst, uint8_t v8, int width);
2416 void SetRow_MSA(uint8_t* dst, uint8_t v8, int width);
2417 void SetRow_X86(uint8_t* dst, uint8_t v8, int width);
2418 void SetRow_ERMS(uint8_t* dst, uint8_t v8, int width);
2419 void SetRow_NEON(uint8_t* dst, uint8_t v8, int width);
2420 void SetRow_Any_X86(uint8_t* dst_ptr, uint8_t v32, int width);
2421 void SetRow_Any_NEON(uint8_t* dst_ptr, uint8_t v32, int width);
2422 
2423 void ARGBSetRow_C(uint8_t* dst_argb, uint32_t v32, int width);
2424 void ARGBSetRow_X86(uint8_t* dst_argb, uint32_t v32, int width);
2425 void ARGBSetRow_NEON(uint8_t* dst, uint32_t v32, int width);
2426 void ARGBSetRow_Any_NEON(uint8_t* dst_ptr, uint32_t v32, int width);
2427 void ARGBSetRow_MSA(uint8_t* dst_argb, uint32_t v32, int width);
2428 void ARGBSetRow_Any_MSA(uint8_t* dst_ptr, uint32_t v32, int width);
2429 void ARGBSetRow_MMI(uint8_t* dst_argb, uint32_t v32, int width);
2430 void ARGBSetRow_Any_MMI(uint8_t* dst_ptr, uint32_t v32, int width);
2431 
2432 // ARGBShufflers for BGRAToARGB etc.
2433 void ARGBShuffleRow_C(const uint8_t* src_argb,
2434                       uint8_t* dst_argb,
2435                       const uint8_t* shuffler,
2436                       int width);
2437 void ARGBShuffleRow_SSSE3(const uint8_t* src_argb,
2438                           uint8_t* dst_argb,
2439                           const uint8_t* shuffler,
2440                           int width);
2441 void ARGBShuffleRow_AVX2(const uint8_t* src_argb,
2442                          uint8_t* dst_argb,
2443                          const uint8_t* shuffler,
2444                          int width);
2445 void ARGBShuffleRow_NEON(const uint8_t* src_argb,
2446                          uint8_t* dst_argb,
2447                          const uint8_t* shuffler,
2448                          int width);
2449 void ARGBShuffleRow_MSA(const uint8_t* src_argb,
2450                         uint8_t* dst_argb,
2451                         const uint8_t* shuffler,
2452                         int width);
2453 void ARGBShuffleRow_MMI(const uint8_t* src_argb,
2454                         uint8_t* dst_argb,
2455                         const uint8_t* shuffler,
2456                         int width);
2457 void ARGBShuffleRow_Any_SSSE3(const uint8_t* src_ptr,
2458                               uint8_t* dst_ptr,
2459                               const uint8_t* param,
2460                               int width);
2461 void ARGBShuffleRow_Any_AVX2(const uint8_t* src_ptr,
2462                              uint8_t* dst_ptr,
2463                              const uint8_t* param,
2464                              int width);
2465 void ARGBShuffleRow_Any_NEON(const uint8_t* src_ptr,
2466                              uint8_t* dst_ptr,
2467                              const uint8_t* param,
2468                              int width);
2469 void ARGBShuffleRow_Any_MSA(const uint8_t* src_ptr,
2470                             uint8_t* dst_ptr,
2471                             const uint8_t* param,
2472                             int width);
2473 void ARGBShuffleRow_Any_MMI(const uint8_t* src_ptr,
2474                             uint8_t* dst_ptr,
2475                             const uint8_t* param,
2476                             int width);
2477 
2478 void RGB24ToARGBRow_SSSE3(const uint8_t* src_rgb24,
2479                           uint8_t* dst_argb,
2480                           int width);
2481 void RAWToARGBRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_argb, int width);
2482 void RAWToRGBARow_SSSE3(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
2483 void RAWToRGB24Row_SSSE3(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
2484 void RGB565ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
2485 void ARGB1555ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
2486 void ARGB4444ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
2487 void RGB565ToARGBRow_AVX2(const uint8_t* src_rgb565,
2488                           uint8_t* dst_argb,
2489                           int width);
2490 void ARGB1555ToARGBRow_AVX2(const uint8_t* src_argb1555,
2491                             uint8_t* dst_argb,
2492                             int width);
2493 void ARGB4444ToARGBRow_AVX2(const uint8_t* src_argb4444,
2494                             uint8_t* dst_argb,
2495                             int width);
2496 
2497 void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24,
2498                          uint8_t* dst_argb,
2499                          int width);
2500 void RGB24ToARGBRow_MSA(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
2501 void RGB24ToARGBRow_MMI(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
2502 void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width);
2503 void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
2504 void RAWToARGBRow_MSA(const uint8_t* src_raw, uint8_t* dst_argb, int width);
2505 void RAWToARGBRow_MMI(const uint8_t* src_raw, uint8_t* dst_argb, int width);
2506 void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
2507 void RAWToRGB24Row_MSA(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
2508 void RAWToRGB24Row_MMI(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
2509 void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565,
2510                           uint8_t* dst_argb,
2511                           int width);
2512 void RGB565ToARGBRow_MSA(const uint8_t* src_rgb565,
2513                          uint8_t* dst_argb,
2514                          int width);
2515 void RGB565ToARGBRow_MMI(const uint8_t* src_rgb565,
2516                          uint8_t* dst_argb,
2517                          int width);
2518 void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555,
2519                             uint8_t* dst_argb,
2520                             int width);
2521 void ARGB1555ToARGBRow_MSA(const uint8_t* src_argb1555,
2522                            uint8_t* dst_argb,
2523                            int width);
2524 void ARGB1555ToARGBRow_MMI(const uint8_t* src_argb1555,
2525                            uint8_t* dst_argb,
2526                            int width);
2527 void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444,
2528                             uint8_t* dst_argb,
2529                             int width);
2530 void ARGB4444ToARGBRow_MSA(const uint8_t* src_argb4444,
2531                            uint8_t* dst_argb,
2532                            int width);
2533 void ARGB4444ToARGBRow_MMI(const uint8_t* src_argb4444,
2534                            uint8_t* dst_argb,
2535                            int width);
2536 void RGB24ToARGBRow_C(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
2537 void RAWToARGBRow_C(const uint8_t* src_raw, uint8_t* dst_argb, int width);
2538 void RAWToRGBARow_C(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
2539 void RAWToRGB24Row_C(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
2540 void RGB565ToARGBRow_C(const uint8_t* src_rgb565, uint8_t* dst_argb, int width);
2541 void ARGB1555ToARGBRow_C(const uint8_t* src_argb1555,
2542                          uint8_t* dst_argb,
2543                          int width);
2544 void ARGB4444ToARGBRow_C(const uint8_t* src_argb4444,
2545                          uint8_t* dst_argb,
2546                          int width);
2547 void AR30ToARGBRow_C(const uint8_t* src_ar30, uint8_t* dst_argb, int width);
2548 void AR30ToABGRRow_C(const uint8_t* src_ar30, uint8_t* dst_abgr, int width);
2549 void ARGBToAR30Row_C(const uint8_t* src_argb, uint8_t* dst_ar30, int width);
2550 void AR30ToAB30Row_C(const uint8_t* src_ar30, uint8_t* dst_ab30, int width);
2551 
2552 void RGB24ToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
2553                               uint8_t* dst_ptr,
2554                               int width);
2555 void RAWToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
2556                             uint8_t* dst_ptr,
2557                             int width);
2558 void RAWToRGBARow_Any_SSSE3(const uint8_t* src_ptr,
2559                             uint8_t* dst_ptr,
2560                             int width);
2561 void RAWToRGB24Row_Any_SSSE3(const uint8_t* src_ptr,
2562                              uint8_t* dst_ptr,
2563                              int width);
2564 
2565 void RGB565ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
2566                               uint8_t* dst_ptr,
2567                               int width);
2568 void ARGB1555ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
2569                                 uint8_t* dst_ptr,
2570                                 int width);
2571 void ARGB4444ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
2572                                 uint8_t* dst_ptr,
2573                                 int width);
2574 void RGB565ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
2575                               uint8_t* dst_ptr,
2576                               int width);
2577 void ARGB1555ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
2578                                 uint8_t* dst_ptr,
2579                                 int width);
2580 void ARGB4444ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
2581                                 uint8_t* dst_ptr,
2582                                 int width);
2583 
2584 void RGB24ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2585                              uint8_t* dst_ptr,
2586                              int width);
2587 void RGB24ToARGBRow_Any_MSA(const uint8_t* src_ptr,
2588                             uint8_t* dst_ptr,
2589                             int width);
2590 void RGB24ToARGBRow_Any_MMI(const uint8_t* src_ptr,
2591                             uint8_t* dst_ptr,
2592                             int width);
2593 void RAWToARGBRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2594 void RAWToRGBARow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2595 void RAWToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2596 void RAWToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2597 void RAWToRGB24Row_Any_NEON(const uint8_t* src_ptr,
2598                             uint8_t* dst_ptr,
2599                             int width);
2600 void RAWToRGB24Row_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2601 void RAWToRGB24Row_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2602 void RGB565ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2603                               uint8_t* dst_ptr,
2604                               int width);
2605 void RGB565ToARGBRow_Any_MSA(const uint8_t* src_ptr,
2606                              uint8_t* dst_ptr,
2607                              int width);
2608 void RGB565ToARGBRow_Any_MMI(const uint8_t* src_ptr,
2609                              uint8_t* dst_ptr,
2610                              int width);
2611 void ARGB1555ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2612                                 uint8_t* dst_ptr,
2613                                 int width);
2614 void ARGB1555ToARGBRow_Any_MSA(const uint8_t* src_ptr,
2615                                uint8_t* dst_ptr,
2616                                int width);
2617 void ARGB1555ToARGBRow_Any_MMI(const uint8_t* src_ptr,
2618                                uint8_t* dst_ptr,
2619                                int width);
2620 void ARGB4444ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2621                                 uint8_t* dst_ptr,
2622                                 int width);
2623 
2624 void ARGB4444ToARGBRow_Any_MSA(const uint8_t* src_ptr,
2625                                uint8_t* dst_ptr,
2626                                int width);
2627 void ARGB4444ToARGBRow_Any_MMI(const uint8_t* src_ptr,
2628                                uint8_t* dst_ptr,
2629                                int width);
2630 
2631 void ARGBToRGB24Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2632 void ARGBToRAWRow_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2633 void ARGBToRGB565Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
2634 void ARGBToARGB1555Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
2635 void ARGBToARGB4444Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
2636 void ABGRToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2637 void ARGBToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2638 
2639 void ARGBToRAWRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
2640 void ARGBToRGB24Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
2641 
2642 void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width);
2643 
2644 void ARGBToRGB565DitherRow_C(const uint8_t* src_argb,
2645                              uint8_t* dst_rgb,
2646                              const uint32_t dither4,
2647                              int width);
2648 void ARGBToRGB565DitherRow_SSE2(const uint8_t* src,
2649                                 uint8_t* dst,
2650                                 const uint32_t dither4,
2651                                 int width);
2652 void ARGBToRGB565DitherRow_AVX2(const uint8_t* src,
2653                                 uint8_t* dst,
2654                                 const uint32_t dither4,
2655                                 int width);
2656 
2657 void ARGBToRGB565Row_AVX2(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2658 void ARGBToARGB1555Row_AVX2(const uint8_t* src_argb,
2659                             uint8_t* dst_rgb,
2660                             int width);
2661 void ARGBToARGB4444Row_AVX2(const uint8_t* src_argb,
2662                             uint8_t* dst_rgb,
2663                             int width);
2664 void ABGRToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
2665 void ARGBToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
2666 
2667 void ARGBToRGB24Row_NEON(const uint8_t* src_argb,
2668                          uint8_t* dst_rgb24,
2669                          int width);
2670 void ARGBToRAWRow_NEON(const uint8_t* src_argb, uint8_t* dst_raw, int width);
2671 void ARGBToRGB565Row_NEON(const uint8_t* src_argb,
2672                           uint8_t* dst_rgb565,
2673                           int width);
2674 void ARGBToARGB1555Row_NEON(const uint8_t* src_argb,
2675                             uint8_t* dst_argb1555,
2676                             int width);
2677 void ARGBToARGB4444Row_NEON(const uint8_t* src_argb,
2678                             uint8_t* dst_argb4444,
2679                             int width);
2680 void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb,
2681                                 uint8_t* dst_rgb,
2682                                 const uint32_t dither4,
2683                                 int width);
2684 void ARGBToRGB24Row_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2685 void ARGBToRAWRow_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2686 void ARGBToRGB565Row_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2687 void ARGBToARGB1555Row_MSA(const uint8_t* src_argb,
2688                            uint8_t* dst_rgb,
2689                            int width);
2690 void ARGBToARGB4444Row_MSA(const uint8_t* src_argb,
2691                            uint8_t* dst_rgb,
2692                            int width);
2693 void ARGBToRGB565DitherRow_MSA(const uint8_t* src_argb,
2694                                uint8_t* dst_rgb,
2695                                const uint32_t dither4,
2696                                int width);
2697 
2698 void ARGBToRGB24Row_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2699 void ARGBToRAWRow_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2700 void ARGBToRGB565Row_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2701 void ARGBToARGB1555Row_MMI(const uint8_t* src_argb,
2702                            uint8_t* dst_rgb,
2703                            int width);
2704 void ARGBToARGB4444Row_MMI(const uint8_t* src_argb,
2705                            uint8_t* dst_rgb,
2706                            int width);
2707 void ARGBToRGB565DitherRow_MMI(const uint8_t* src_argb,
2708                                uint8_t* dst_rgb,
2709                                const uint32_t dither4,
2710                                int width);
2711 
2712 void ARGBToRGBARow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2713 void ARGBToRGB24Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2714 void ARGBToRAWRow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2715 void ARGBToRGB565Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2716 void ARGBToARGB1555Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2717 void ARGBToARGB4444Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2718 void ABGRToAR30Row_C(const uint8_t* src_abgr, uint8_t* dst_ar30, int width);
2719 void ARGBToAR30Row_C(const uint8_t* src_argb, uint8_t* dst_ar30, int width);
2720 
2721 void ARGBToAR64Row_C(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
2722 void ARGBToAB64Row_C(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
2723 void AR64ToARGBRow_C(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
2724 void AB64ToARGBRow_C(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
2725 void AR64ShuffleRow_C(const uint8_t* src_ar64,
2726                       uint8_t* dst_ar64,
2727                       const uint8_t* shuffler,
2728                       int width);
2729 void ARGBToAR64Row_SSSE3(const uint8_t* src_argb,
2730                          uint16_t* dst_ar64,
2731                          int width);
2732 void ARGBToAB64Row_SSSE3(const uint8_t* src_argb,
2733                          uint16_t* dst_ab64,
2734                          int width);
2735 void AR64ToARGBRow_SSSE3(const uint16_t* src_ar64,
2736                          uint8_t* dst_argb,
2737                          int width);
2738 void AB64ToARGBRow_SSSE3(const uint16_t* src_ab64,
2739                          uint8_t* dst_argb,
2740                          int width);
2741 void ARGBToAR64Row_AVX2(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
2742 void ARGBToAB64Row_AVX2(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
2743 void AR64ToARGBRow_AVX2(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
2744 void AB64ToARGBRow_AVX2(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
2745 void ARGBToAR64Row_NEON(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
2746 void ARGBToAB64Row_NEON(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
2747 void AR64ToARGBRow_NEON(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
2748 void AB64ToARGBRow_NEON(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
2749 void ARGBToAR64Row_Any_SSSE3(const uint8_t* src_ptr,
2750                              uint16_t* dst_ptr,
2751                              int width);
2752 void ARGBToAB64Row_Any_SSSE3(const uint8_t* src_ptr,
2753                              uint16_t* dst_ptr,
2754                              int width);
2755 void AR64ToARGBRow_Any_SSSE3(const uint16_t* src_ptr,
2756                              uint8_t* dst_ptr,
2757                              int width);
2758 void AB64ToARGBRow_Any_SSSE3(const uint16_t* src_ptr,
2759                              uint8_t* dst_ptr,
2760                              int width);
2761 void ARGBToAR64Row_Any_AVX2(const uint8_t* src_ptr,
2762                             uint16_t* dst_ptr,
2763                             int width);
2764 void ARGBToAB64Row_Any_AVX2(const uint8_t* src_ptr,
2765                             uint16_t* dst_ptr,
2766                             int width);
2767 void AR64ToARGBRow_Any_AVX2(const uint16_t* src_ptr,
2768                             uint8_t* dst_ptr,
2769                             int width);
2770 void AB64ToARGBRow_Any_AVX2(const uint16_t* src_ptr,
2771                             uint8_t* dst_ptr,
2772                             int width);
2773 void ARGBToAR64Row_Any_NEON(const uint8_t* src_ptr,
2774                             uint16_t* dst_ptr,
2775                             int width);
2776 void ARGBToAB64Row_Any_NEON(const uint8_t* src_ptr,
2777                             uint16_t* dst_ptr,
2778                             int width);
2779 void AR64ToARGBRow_Any_NEON(const uint16_t* src_ptr,
2780                             uint8_t* dst_ptr,
2781                             int width);
2782 void AB64ToARGBRow_Any_NEON(const uint16_t* src_ptr,
2783                             uint8_t* dst_ptr,
2784                             int width);
2785 
2786 void J400ToARGBRow_SSE2(const uint8_t* src_y, uint8_t* dst_argb, int width);
2787 void J400ToARGBRow_AVX2(const uint8_t* src_y, uint8_t* dst_argb, int width);
2788 void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width);
2789 void J400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width);
2790 void J400ToARGBRow_MMI(const uint8_t* src_y, uint8_t* dst_argb, int width);
2791 void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width);
2792 void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
2793                             uint8_t* dst_ptr,
2794                             int width);
2795 void J400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
2796                             uint8_t* dst_ptr,
2797                             int width);
2798 void J400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2799                             uint8_t* dst_ptr,
2800                             int width);
2801 void J400ToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2802 void J400ToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2803 
2804 void I444ToARGBRow_C(const uint8_t* src_y,
2805                      const uint8_t* src_u,
2806                      const uint8_t* src_v,
2807                      uint8_t* rgb_buf,
2808                      const struct YuvConstants* yuvconstants,
2809                      int width);
2810 void I422ToARGBRow_C(const uint8_t* src_y,
2811                      const uint8_t* src_u,
2812                      const uint8_t* src_v,
2813                      uint8_t* rgb_buf,
2814                      const struct YuvConstants* yuvconstants,
2815                      int width);
2816 void I422ToAR30Row_C(const uint8_t* src_y,
2817                      const uint8_t* src_u,
2818                      const uint8_t* src_v,
2819                      uint8_t* rgb_buf,
2820                      const struct YuvConstants* yuvconstants,
2821                      int width);
2822 void I210ToAR30Row_C(const uint16_t* src_y,
2823                      const uint16_t* src_u,
2824                      const uint16_t* src_v,
2825                      uint8_t* rgb_buf,
2826                      const struct YuvConstants* yuvconstants,
2827                      int width);
2828 void I210ToARGBRow_C(const uint16_t* src_y,
2829                      const uint16_t* src_u,
2830                      const uint16_t* src_v,
2831                      uint8_t* rgb_buf,
2832                      const struct YuvConstants* yuvconstants,
2833                      int width);
2834 void I212ToAR30Row_C(const uint16_t* src_y,
2835                      const uint16_t* src_u,
2836                      const uint16_t* src_v,
2837                      uint8_t* rgb_buf,
2838                      const struct YuvConstants* yuvconstants,
2839                      int width);
2840 void I212ToARGBRow_C(const uint16_t* src_y,
2841                      const uint16_t* src_u,
2842                      const uint16_t* src_v,
2843                      uint8_t* rgb_buf,
2844                      const struct YuvConstants* yuvconstants,
2845                      int width);
2846 void I410ToAR30Row_C(const uint16_t* src_y,
2847                      const uint16_t* src_u,
2848                      const uint16_t* src_v,
2849                      uint8_t* rgb_buf,
2850                      const struct YuvConstants* yuvconstants,
2851                      int width);
2852 void I410ToARGBRow_C(const uint16_t* src_y,
2853                      const uint16_t* src_u,
2854                      const uint16_t* src_v,
2855                      uint8_t* rgb_buf,
2856                      const struct YuvConstants* yuvconstants,
2857                      int width);
2858 void I210AlphaToARGBRow_C(const uint16_t* src_y,
2859                           const uint16_t* src_u,
2860                           const uint16_t* src_v,
2861                           const uint16_t* src_a,
2862                           uint8_t* rgb_buf,
2863                           const struct YuvConstants* yuvconstants,
2864                           int width);
2865 void I410AlphaToARGBRow_C(const uint16_t* src_y,
2866                           const uint16_t* src_u,
2867                           const uint16_t* src_v,
2868                           const uint16_t* src_a,
2869                           uint8_t* rgb_buf,
2870                           const struct YuvConstants* yuvconstants,
2871                           int width);
2872 void I444AlphaToARGBRow_C(const uint8_t* src_y,
2873                           const uint8_t* src_u,
2874                           const uint8_t* src_v,
2875                           const uint8_t* src_a,
2876                           uint8_t* rgb_buf,
2877                           const struct YuvConstants* yuvconstants,
2878                           int width);
2879 void I422AlphaToARGBRow_C(const uint8_t* src_y,
2880                           const uint8_t* src_u,
2881                           const uint8_t* src_v,
2882                           const uint8_t* src_a,
2883                           uint8_t* rgb_buf,
2884                           const struct YuvConstants* yuvconstants,
2885                           int width);
2886 void NV12ToARGBRow_C(const uint8_t* src_y,
2887                      const uint8_t* src_uv,
2888                      uint8_t* rgb_buf,
2889                      const struct YuvConstants* yuvconstants,
2890                      int width);
2891 void NV12ToRGB565Row_C(const uint8_t* src_y,
2892                        const uint8_t* src_uv,
2893                        uint8_t* dst_rgb565,
2894                        const struct YuvConstants* yuvconstants,
2895                        int width);
2896 void NV21ToARGBRow_C(const uint8_t* src_y,
2897                      const uint8_t* src_vu,
2898                      uint8_t* rgb_buf,
2899                      const struct YuvConstants* yuvconstants,
2900                      int width);
2901 void NV12ToRGB24Row_C(const uint8_t* src_y,
2902                       const uint8_t* src_uv,
2903                       uint8_t* rgb_buf,
2904                       const struct YuvConstants* yuvconstants,
2905                       int width);
2906 void NV21ToRGB24Row_C(const uint8_t* src_y,
2907                       const uint8_t* src_vu,
2908                       uint8_t* rgb_buf,
2909                       const struct YuvConstants* yuvconstants,
2910                       int width);
2911 void NV21ToYUV24Row_C(const uint8_t* src_y,
2912                       const uint8_t* src_vu,
2913                       uint8_t* dst_yuv24,
2914                       int width);
2915 void YUY2ToARGBRow_C(const uint8_t* src_yuy2,
2916                      uint8_t* rgb_buf,
2917                      const struct YuvConstants* yuvconstants,
2918                      int width);
2919 void UYVYToARGBRow_C(const uint8_t* src_uyvy,
2920                      uint8_t* rgb_buf,
2921                      const struct YuvConstants* yuvconstants,
2922                      int width);
2923 void P210ToARGBRow_C(const uint16_t* src_y,
2924                      const uint16_t* src_uv,
2925                      uint8_t* dst_argb,
2926                      const struct YuvConstants* yuvconstants,
2927                      int width);
2928 void P410ToARGBRow_C(const uint16_t* src_y,
2929                      const uint16_t* src_uv,
2930                      uint8_t* dst_argb,
2931                      const struct YuvConstants* yuvconstants,
2932                      int width);
2933 void P210ToAR30Row_C(const uint16_t* src_y,
2934                      const uint16_t* src_uv,
2935                      uint8_t* dst_ar30,
2936                      const struct YuvConstants* yuvconstants,
2937                      int width);
2938 void P410ToAR30Row_C(const uint16_t* src_y,
2939                      const uint16_t* src_uv,
2940                      uint8_t* dst_ar30,
2941                      const struct YuvConstants* yuvconstants,
2942                      int width);
2943 
2944 void I422ToRGBARow_C(const uint8_t* src_y,
2945                      const uint8_t* src_u,
2946                      const uint8_t* src_v,
2947                      uint8_t* rgb_buf,
2948                      const struct YuvConstants* yuvconstants,
2949                      int width);
2950 void I422ToRGB24Row_C(const uint8_t* src_y,
2951                       const uint8_t* src_u,
2952                       const uint8_t* src_v,
2953                       uint8_t* rgb_buf,
2954                       const struct YuvConstants* yuvconstants,
2955                       int width);
2956 void I422ToARGB4444Row_C(const uint8_t* src_y,
2957                          const uint8_t* src_u,
2958                          const uint8_t* src_v,
2959                          uint8_t* dst_argb4444,
2960                          const struct YuvConstants* yuvconstants,
2961                          int width);
2962 void I422ToARGB1555Row_C(const uint8_t* src_y,
2963                          const uint8_t* src_u,
2964                          const uint8_t* src_v,
2965                          uint8_t* dst_argb1555,
2966                          const struct YuvConstants* yuvconstants,
2967                          int width);
2968 void I422ToRGB565Row_C(const uint8_t* src_y,
2969                        const uint8_t* src_u,
2970                        const uint8_t* src_v,
2971                        uint8_t* dst_rgb565,
2972                        const struct YuvConstants* yuvconstants,
2973                        int width);
2974 void I422ToARGBRow_AVX2(const uint8_t* y_buf,
2975                         const uint8_t* u_buf,
2976                         const uint8_t* v_buf,
2977                         uint8_t* dst_argb,
2978                         const struct YuvConstants* yuvconstants,
2979                         int width);
2980 void I422ToRGBARow_AVX2(const uint8_t* y_buf,
2981                         const uint8_t* u_buf,
2982                         const uint8_t* v_buf,
2983                         uint8_t* dst_argb,
2984                         const struct YuvConstants* yuvconstants,
2985                         int width);
2986 void I444ToARGBRow_SSSE3(const uint8_t* y_buf,
2987                          const uint8_t* u_buf,
2988                          const uint8_t* v_buf,
2989                          uint8_t* dst_argb,
2990                          const struct YuvConstants* yuvconstants,
2991                          int width);
2992 void I444ToARGBRow_AVX2(const uint8_t* y_buf,
2993                         const uint8_t* u_buf,
2994                         const uint8_t* v_buf,
2995                         uint8_t* dst_argb,
2996                         const struct YuvConstants* yuvconstants,
2997                         int width);
2998 void I422ToARGBRow_SSSE3(const uint8_t* y_buf,
2999                          const uint8_t* u_buf,
3000                          const uint8_t* v_buf,
3001                          uint8_t* dst_argb,
3002                          const struct YuvConstants* yuvconstants,
3003                          int width);
3004 
3005 void I422ToAR30Row_SSSE3(const uint8_t* y_buf,
3006                          const uint8_t* u_buf,
3007                          const uint8_t* v_buf,
3008                          uint8_t* dst_ar30,
3009                          const struct YuvConstants* yuvconstants,
3010                          int width);
3011 void I210ToAR30Row_SSSE3(const uint16_t* y_buf,
3012                          const uint16_t* u_buf,
3013                          const uint16_t* v_buf,
3014                          uint8_t* dst_ar30,
3015                          const struct YuvConstants* yuvconstants,
3016                          int width);
3017 void I210ToARGBRow_SSSE3(const uint16_t* y_buf,
3018                          const uint16_t* u_buf,
3019                          const uint16_t* v_buf,
3020                          uint8_t* dst_argb,
3021                          const struct YuvConstants* yuvconstants,
3022                          int width);
3023 void I212ToAR30Row_SSSE3(const uint16_t* y_buf,
3024                          const uint16_t* u_buf,
3025                          const uint16_t* v_buf,
3026                          uint8_t* dst_ar30,
3027                          const struct YuvConstants* yuvconstants,
3028                          int width);
3029 void I212ToARGBRow_SSSE3(const uint16_t* y_buf,
3030                          const uint16_t* u_buf,
3031                          const uint16_t* v_buf,
3032                          uint8_t* dst_argb,
3033                          const struct YuvConstants* yuvconstants,
3034                          int width);
3035 void I410ToAR30Row_SSSE3(const uint16_t* y_buf,
3036                          const uint16_t* u_buf,
3037                          const uint16_t* v_buf,
3038                          uint8_t* dst_ar30,
3039                          const struct YuvConstants* yuvconstants,
3040                          int width);
3041 void I410ToARGBRow_SSSE3(const uint16_t* y_buf,
3042                          const uint16_t* u_buf,
3043                          const uint16_t* v_buf,
3044                          uint8_t* dst_argb,
3045                          const struct YuvConstants* yuvconstants,
3046                          int width);
3047 void I210AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
3048                               const uint16_t* u_buf,
3049                               const uint16_t* v_buf,
3050                               const uint16_t* a_buf,
3051                               uint8_t* dst_argb,
3052                               const struct YuvConstants* yuvconstants,
3053                               int width);
3054 void I410AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
3055                               const uint16_t* u_buf,
3056                               const uint16_t* v_buf,
3057                               const uint16_t* a_buf,
3058                               uint8_t* dst_argb,
3059                               const struct YuvConstants* yuvconstants,
3060                               int width);
3061 void I422ToAR30Row_AVX2(const uint8_t* y_buf,
3062                         const uint8_t* u_buf,
3063                         const uint8_t* v_buf,
3064                         uint8_t* dst_ar30,
3065                         const struct YuvConstants* yuvconstants,
3066                         int width);
3067 void I210ToARGBRow_AVX2(const uint16_t* y_buf,
3068                         const uint16_t* u_buf,
3069                         const uint16_t* v_buf,
3070                         uint8_t* dst_argb,
3071                         const struct YuvConstants* yuvconstants,
3072                         int width);
3073 void I210ToAR30Row_AVX2(const uint16_t* y_buf,
3074                         const uint16_t* u_buf,
3075                         const uint16_t* v_buf,
3076                         uint8_t* dst_ar30,
3077                         const struct YuvConstants* yuvconstants,
3078                         int width);
3079 void I212ToARGBRow_AVX2(const uint16_t* y_buf,
3080                         const uint16_t* u_buf,
3081                         const uint16_t* v_buf,
3082                         uint8_t* dst_argb,
3083                         const struct YuvConstants* yuvconstants,
3084                         int width);
3085 void I212ToAR30Row_AVX2(const uint16_t* y_buf,
3086                         const uint16_t* u_buf,
3087                         const uint16_t* v_buf,
3088                         uint8_t* dst_ar30,
3089                         const struct YuvConstants* yuvconstants,
3090                         int width);
3091 void I410ToAR30Row_AVX2(const uint16_t* y_buf,
3092                         const uint16_t* u_buf,
3093                         const uint16_t* v_buf,
3094                         uint8_t* dst_ar30,
3095                         const struct YuvConstants* yuvconstants,
3096                         int width);
3097 void I410ToARGBRow_AVX2(const uint16_t* y_buf,
3098                         const uint16_t* u_buf,
3099                         const uint16_t* v_buf,
3100                         uint8_t* dst_argb,
3101                         const struct YuvConstants* yuvconstants,
3102                         int width);
3103 void I210AlphaToARGBRow_AVX2(const uint16_t* y_buf,
3104                              const uint16_t* u_buf,
3105                              const uint16_t* v_buf,
3106                              const uint16_t* a_buf,
3107                              uint8_t* dst_argb,
3108                              const struct YuvConstants* yuvconstants,
3109                              int width);
3110 void I410AlphaToARGBRow_AVX2(const uint16_t* y_buf,
3111                              const uint16_t* u_buf,
3112                              const uint16_t* v_buf,
3113                              const uint16_t* a_buf,
3114                              uint8_t* dst_argb,
3115                              const struct YuvConstants* yuvconstants,
3116                              int width);
3117 void I444AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
3118                               const uint8_t* u_buf,
3119                               const uint8_t* v_buf,
3120                               const uint8_t* a_buf,
3121                               uint8_t* dst_argb,
3122                               const struct YuvConstants* yuvconstants,
3123                               int width);
3124 void I444AlphaToARGBRow_AVX2(const uint8_t* y_buf,
3125                              const uint8_t* u_buf,
3126                              const uint8_t* v_buf,
3127                              const uint8_t* a_buf,
3128                              uint8_t* dst_argb,
3129                              const struct YuvConstants* yuvconstants,
3130                              int width);
3131 void I422AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
3132                               const uint8_t* u_buf,
3133                               const uint8_t* v_buf,
3134                               const uint8_t* a_buf,
3135                               uint8_t* dst_argb,
3136                               const struct YuvConstants* yuvconstants,
3137                               int width);
3138 void I422AlphaToARGBRow_AVX2(const uint8_t* y_buf,
3139                              const uint8_t* u_buf,
3140                              const uint8_t* v_buf,
3141                              const uint8_t* a_buf,
3142                              uint8_t* dst_argb,
3143                              const struct YuvConstants* yuvconstants,
3144                              int width);
3145 void NV12ToARGBRow_SSSE3(const uint8_t* y_buf,
3146                          const uint8_t* uv_buf,
3147                          uint8_t* dst_argb,
3148                          const struct YuvConstants* yuvconstants,
3149                          int width);
3150 void NV12ToARGBRow_AVX2(const uint8_t* y_buf,
3151                         const uint8_t* uv_buf,
3152                         uint8_t* dst_argb,
3153                         const struct YuvConstants* yuvconstants,
3154                         int width);
3155 void NV12ToRGB24Row_SSSE3(const uint8_t* src_y,
3156                           const uint8_t* src_uv,
3157                           uint8_t* dst_rgb24,
3158                           const struct YuvConstants* yuvconstants,
3159                           int width);
3160 void NV21ToRGB24Row_SSSE3(const uint8_t* src_y,
3161                           const uint8_t* src_vu,
3162                           uint8_t* dst_rgb24,
3163                           const struct YuvConstants* yuvconstants,
3164                           int width);
3165 void NV12ToRGB565Row_SSSE3(const uint8_t* src_y,
3166                            const uint8_t* src_uv,
3167                            uint8_t* dst_rgb565,
3168                            const struct YuvConstants* yuvconstants,
3169                            int width);
3170 void NV12ToRGB24Row_AVX2(const uint8_t* src_y,
3171                          const uint8_t* src_uv,
3172                          uint8_t* dst_rgb24,
3173                          const struct YuvConstants* yuvconstants,
3174                          int width);
3175 void NV21ToRGB24Row_AVX2(const uint8_t* src_y,
3176                          const uint8_t* src_vu,
3177                          uint8_t* dst_rgb24,
3178                          const struct YuvConstants* yuvconstants,
3179                          int width);
3180 void NV21ToYUV24Row_AVX2(const uint8_t* src_y,
3181                          const uint8_t* src_vu,
3182                          uint8_t* dst_yuv24,
3183                          int width);
3184 void NV12ToRGB565Row_AVX2(const uint8_t* src_y,
3185                           const uint8_t* src_uv,
3186                           uint8_t* dst_rgb565,
3187                           const struct YuvConstants* yuvconstants,
3188                           int width);
3189 void NV21ToARGBRow_SSSE3(const uint8_t* y_buf,
3190                          const uint8_t* vu_buf,
3191                          uint8_t* dst_argb,
3192                          const struct YuvConstants* yuvconstants,
3193                          int width);
3194 void NV21ToARGBRow_AVX2(const uint8_t* y_buf,
3195                         const uint8_t* vu_buf,
3196                         uint8_t* dst_argb,
3197                         const struct YuvConstants* yuvconstants,
3198                         int width);
3199 void YUY2ToARGBRow_SSSE3(const uint8_t* yuy2_buf,
3200                          uint8_t* dst_argb,
3201                          const struct YuvConstants* yuvconstants,
3202                          int width);
3203 void UYVYToARGBRow_SSSE3(const uint8_t* uyvy_buf,
3204                          uint8_t* dst_argb,
3205                          const struct YuvConstants* yuvconstants,
3206                          int width);
3207 void YUY2ToARGBRow_AVX2(const uint8_t* yuy2_buf,
3208                         uint8_t* dst_argb,
3209                         const struct YuvConstants* yuvconstants,
3210                         int width);
3211 void UYVYToARGBRow_AVX2(const uint8_t* uyvy_buf,
3212                         uint8_t* dst_argb,
3213                         const struct YuvConstants* yuvconstants,
3214                         int width);
3215 
3216 void P210ToARGBRow_SSSE3(const uint16_t* y_buf,
3217                          const uint16_t* uv_buf,
3218                          uint8_t* dst_argb,
3219                          const struct YuvConstants* yuvconstants,
3220                          int width);
3221 void P410ToARGBRow_SSSE3(const uint16_t* y_buf,
3222                          const uint16_t* uv_buf,
3223                          uint8_t* dst_argb,
3224                          const struct YuvConstants* yuvconstants,
3225                          int width);
3226 void P210ToAR30Row_SSSE3(const uint16_t* y_buf,
3227                          const uint16_t* uv_buf,
3228                          uint8_t* dst_ar30,
3229                          const struct YuvConstants* yuvconstants,
3230                          int width);
3231 void P410ToAR30Row_SSSE3(const uint16_t* y_buf,
3232                          const uint16_t* uv_buf,
3233                          uint8_t* dst_ar30,
3234                          const struct YuvConstants* yuvconstants,
3235                          int width);
3236 void P210ToARGBRow_AVX2(const uint16_t* y_buf,
3237                         const uint16_t* uv_buf,
3238                         uint8_t* dst_argb,
3239                         const struct YuvConstants* yuvconstants,
3240                         int width);
3241 void P410ToARGBRow_AVX2(const uint16_t* y_buf,
3242                         const uint16_t* uv_buf,
3243                         uint8_t* dst_argb,
3244                         const struct YuvConstants* yuvconstants,
3245                         int width);
3246 void P210ToAR30Row_AVX2(const uint16_t* y_buf,
3247                         const uint16_t* uv_buf,
3248                         uint8_t* dst_ar30,
3249                         const struct YuvConstants* yuvconstants,
3250                         int width);
3251 void P410ToAR30Row_AVX2(const uint16_t* y_buf,
3252                         const uint16_t* uv_buf,
3253                         uint8_t* dst_ar30,
3254                         const struct YuvConstants* yuvconstants,
3255                         int width);
3256 
3257 void I422ToRGBARow_SSSE3(const uint8_t* y_buf,
3258                          const uint8_t* u_buf,
3259                          const uint8_t* v_buf,
3260                          uint8_t* dst_rgba,
3261                          const struct YuvConstants* yuvconstants,
3262                          int width);
3263 void I422ToARGB4444Row_SSSE3(const uint8_t* src_y,
3264                              const uint8_t* src_u,
3265                              const uint8_t* src_v,
3266                              uint8_t* dst_argb4444,
3267                              const struct YuvConstants* yuvconstants,
3268                              int width);
3269 void I422ToARGB4444Row_AVX2(const uint8_t* src_y,
3270                             const uint8_t* src_u,
3271                             const uint8_t* src_v,
3272                             uint8_t* dst_argb4444,
3273                             const struct YuvConstants* yuvconstants,
3274                             int width);
3275 void I422ToARGB1555Row_SSSE3(const uint8_t* src_y,
3276                              const uint8_t* src_u,
3277                              const uint8_t* src_v,
3278                              uint8_t* dst_argb1555,
3279                              const struct YuvConstants* yuvconstants,
3280                              int width);
3281 void I422ToARGB1555Row_AVX2(const uint8_t* src_y,
3282                             const uint8_t* src_u,
3283                             const uint8_t* src_v,
3284                             uint8_t* dst_argb1555,
3285                             const struct YuvConstants* yuvconstants,
3286                             int width);
3287 void I422ToRGB565Row_SSSE3(const uint8_t* src_y,
3288                            const uint8_t* src_u,
3289                            const uint8_t* src_v,
3290                            uint8_t* dst_rgb565,
3291                            const struct YuvConstants* yuvconstants,
3292                            int width);
3293 void I422ToRGB565Row_AVX2(const uint8_t* src_y,
3294                           const uint8_t* src_u,
3295                           const uint8_t* src_v,
3296                           uint8_t* dst_rgb565,
3297                           const struct YuvConstants* yuvconstants,
3298                           int width);
3299 void I422ToRGB24Row_SSSE3(const uint8_t* y_buf,
3300                           const uint8_t* u_buf,
3301                           const uint8_t* v_buf,
3302                           uint8_t* dst_rgb24,
3303                           const struct YuvConstants* yuvconstants,
3304                           int width);
3305 void I422ToRGB24Row_AVX2(const uint8_t* src_y,
3306                          const uint8_t* src_u,
3307                          const uint8_t* src_v,
3308                          uint8_t* dst_rgb24,
3309                          const struct YuvConstants* yuvconstants,
3310                          int width);
3311 void I422ToARGBRow_Any_AVX2(const uint8_t* y_buf,
3312                             const uint8_t* u_buf,
3313                             const uint8_t* v_buf,
3314                             uint8_t* dst_ptr,
3315                             const struct YuvConstants* yuvconstants,
3316                             int width);
3317 void I422ToRGBARow_Any_AVX2(const uint8_t* y_buf,
3318                             const uint8_t* u_buf,
3319                             const uint8_t* v_buf,
3320                             uint8_t* dst_ptr,
3321                             const struct YuvConstants* yuvconstants,
3322                             int width);
3323 void I444ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
3324                              const uint8_t* u_buf,
3325                              const uint8_t* v_buf,
3326                              uint8_t* dst_ptr,
3327                              const struct YuvConstants* yuvconstants,
3328                              int width);
3329 void I444ToARGBRow_Any_AVX2(const uint8_t* y_buf,
3330                             const uint8_t* u_buf,
3331                             const uint8_t* v_buf,
3332                             uint8_t* dst_ptr,
3333                             const struct YuvConstants* yuvconstants,
3334                             int width);
3335 void I422ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
3336                              const uint8_t* u_buf,
3337                              const uint8_t* v_buf,
3338                              uint8_t* dst_ptr,
3339                              const struct YuvConstants* yuvconstants,
3340                              int width);
3341 void I422ToAR30Row_Any_SSSE3(const uint8_t* y_buf,
3342                              const uint8_t* u_buf,
3343                              const uint8_t* v_buf,
3344                              uint8_t* dst_ptr,
3345                              const struct YuvConstants* yuvconstants,
3346                              int width);
3347 void I210ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
3348                              const uint16_t* u_buf,
3349                              const uint16_t* v_buf,
3350                              uint8_t* dst_ptr,
3351                              const struct YuvConstants* yuvconstants,
3352                              int width);
3353 void I210ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
3354                              const uint16_t* u_buf,
3355                              const uint16_t* v_buf,
3356                              uint8_t* dst_ptr,
3357                              const struct YuvConstants* yuvconstants,
3358                              int width);
3359 void I212ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
3360                              const uint16_t* u_buf,
3361                              const uint16_t* v_buf,
3362                              uint8_t* dst_ptr,
3363                              const struct YuvConstants* yuvconstants,
3364                              int width);
3365 void I212ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
3366                              const uint16_t* u_buf,
3367                              const uint16_t* v_buf,
3368                              uint8_t* dst_ptr,
3369                              const struct YuvConstants* yuvconstants,
3370                              int width);
3371 void I410ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
3372                              const uint16_t* u_buf,
3373                              const uint16_t* v_buf,
3374                              uint8_t* dst_ptr,
3375                              const struct YuvConstants* yuvconstants,
3376                              int width);
3377 void I410ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
3378                              const uint16_t* u_buf,
3379                              const uint16_t* v_buf,
3380                              uint8_t* dst_ptr,
3381                              const struct YuvConstants* yuvconstants,
3382                              int width);
3383 void I210AlphaToARGBRow_Any_SSSE3(const uint16_t* y_buf,
3384                                   const uint16_t* u_buf,
3385                                   const uint16_t* v_buf,
3386                                   const uint16_t* a_buf,
3387                                   uint8_t* dst_ptr,
3388                                   const struct YuvConstants* yuvconstants,
3389                                   int width);
3390 void I410AlphaToARGBRow_Any_SSSE3(const uint16_t* y_buf,
3391                                   const uint16_t* u_buf,
3392                                   const uint16_t* v_buf,
3393                                   const uint16_t* a_buf,
3394                                   uint8_t* dst_ptr,
3395                                   const struct YuvConstants* yuvconstants,
3396                                   int width);
3397 void I422ToAR30Row_Any_AVX2(const uint8_t* y_buf,
3398                             const uint8_t* u_buf,
3399                             const uint8_t* v_buf,
3400                             uint8_t* dst_ptr,
3401                             const struct YuvConstants* yuvconstants,
3402                             int width);
3403 void I210ToARGBRow_Any_AVX2(const uint16_t* y_buf,
3404                             const uint16_t* u_buf,
3405                             const uint16_t* v_buf,
3406                             uint8_t* dst_ptr,
3407                             const struct YuvConstants* yuvconstants,
3408                             int width);
3409 void I210ToAR30Row_Any_AVX2(const uint16_t* y_buf,
3410                             const uint16_t* u_buf,
3411                             const uint16_t* v_buf,
3412                             uint8_t* dst_ptr,
3413                             const struct YuvConstants* yuvconstants,
3414                             int width);
3415 void I212ToARGBRow_Any_AVX2(const uint16_t* y_buf,
3416                             const uint16_t* u_buf,
3417                             const uint16_t* v_buf,
3418                             uint8_t* dst_ptr,
3419                             const struct YuvConstants* yuvconstants,
3420                             int width);
3421 void I212ToAR30Row_Any_AVX2(const uint16_t* y_buf,
3422                             const uint16_t* u_buf,
3423                             const uint16_t* v_buf,
3424                             uint8_t* dst_ptr,
3425                             const struct YuvConstants* yuvconstants,
3426                             int width);
3427 void I410ToAR30Row_Any_AVX2(const uint16_t* y_buf,
3428                             const uint16_t* u_buf,
3429                             const uint16_t* v_buf,
3430                             uint8_t* dst_ptr,
3431                             const struct YuvConstants* yuvconstants,
3432                             int width);
3433 void I410ToARGBRow_Any_AVX2(const uint16_t* y_buf,
3434                             const uint16_t* u_buf,
3435                             const uint16_t* v_buf,
3436                             uint8_t* dst_ptr,
3437                             const struct YuvConstants* yuvconstants,
3438                             int width);
3439 void I210AlphaToARGBRow_Any_AVX2(const uint16_t* y_buf,
3440                                  const uint16_t* u_buf,
3441                                  const uint16_t* v_buf,
3442                                  const uint16_t* a_buf,
3443                                  uint8_t* dst_ptr,
3444                                  const struct YuvConstants* yuvconstants,
3445                                  int width);
3446 void I410AlphaToARGBRow_Any_AVX2(const uint16_t* y_buf,
3447                                  const uint16_t* u_buf,
3448                                  const uint16_t* v_buf,
3449                                  const uint16_t* a_buf,
3450                                  uint8_t* dst_ptr,
3451                                  const struct YuvConstants* yuvconstants,
3452                                  int width);
3453 void I444AlphaToARGBRow_Any_SSSE3(const uint8_t* y_buf,
3454                                   const uint8_t* u_buf,
3455                                   const uint8_t* v_buf,
3456                                   const uint8_t* a_buf,
3457                                   uint8_t* dst_ptr,
3458                                   const struct YuvConstants* yuvconstants,
3459                                   int width);
3460 void I444AlphaToARGBRow_Any_AVX2(const uint8_t* y_buf,
3461                                  const uint8_t* u_buf,
3462                                  const uint8_t* v_buf,
3463                                  const uint8_t* a_buf,
3464                                  uint8_t* dst_ptr,
3465                                  const struct YuvConstants* yuvconstants,
3466                                  int width);
3467 void I422AlphaToARGBRow_Any_SSSE3(const uint8_t* y_buf,
3468                                   const uint8_t* u_buf,
3469                                   const uint8_t* v_buf,
3470                                   const uint8_t* a_buf,
3471                                   uint8_t* dst_ptr,
3472                                   const struct YuvConstants* yuvconstants,
3473                                   int width);
3474 void I422AlphaToARGBRow_Any_AVX2(const uint8_t* y_buf,
3475                                  const uint8_t* u_buf,
3476                                  const uint8_t* v_buf,
3477                                  const uint8_t* a_buf,
3478                                  uint8_t* dst_ptr,
3479                                  const struct YuvConstants* yuvconstants,
3480                                  int width);
3481 void NV12ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
3482                              const uint8_t* uv_buf,
3483                              uint8_t* dst_ptr,
3484                              const struct YuvConstants* yuvconstants,
3485                              int width);
3486 void NV12ToARGBRow_Any_AVX2(const uint8_t* y_buf,
3487                             const uint8_t* uv_buf,
3488                             uint8_t* dst_ptr,
3489                             const struct YuvConstants* yuvconstants,
3490                             int width);
3491 void NV21ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
3492                              const uint8_t* uv_buf,
3493                              uint8_t* dst_ptr,
3494                              const struct YuvConstants* yuvconstants,
3495                              int width);
3496 void NV21ToARGBRow_Any_AVX2(const uint8_t* y_buf,
3497                             const uint8_t* uv_buf,
3498                             uint8_t* dst_ptr,
3499                             const struct YuvConstants* yuvconstants,
3500                             int width);
3501 void NV12ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
3502                               const uint8_t* uv_buf,
3503                               uint8_t* dst_ptr,
3504                               const struct YuvConstants* yuvconstants,
3505                               int width);
3506 void NV21ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
3507                               const uint8_t* uv_buf,
3508                               uint8_t* dst_ptr,
3509                               const struct YuvConstants* yuvconstants,
3510                               int width);
3511 void NV12ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
3512                              const uint8_t* uv_buf,
3513                              uint8_t* dst_ptr,
3514                              const struct YuvConstants* yuvconstants,
3515                              int width);
3516 void NV21ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
3517                              const uint8_t* uv_buf,
3518                              uint8_t* dst_ptr,
3519                              const struct YuvConstants* yuvconstants,
3520                              int width);
3521 void NV21ToYUV24Row_Any_AVX2(const uint8_t* src_y,
3522                              const uint8_t* src_vu,
3523                              uint8_t* dst_yuv24,
3524                              int width);
3525 void NV12ToRGB565Row_Any_SSSE3(const uint8_t* y_buf,
3526                                const uint8_t* uv_buf,
3527                                uint8_t* dst_ptr,
3528                                const struct YuvConstants* yuvconstants,
3529                                int width);
3530 void NV12ToRGB565Row_Any_AVX2(const uint8_t* y_buf,
3531                               const uint8_t* uv_buf,
3532                               uint8_t* dst_ptr,
3533                               const struct YuvConstants* yuvconstants,
3534                               int width);
3535 void YUY2ToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
3536                              uint8_t* dst_ptr,
3537                              const struct YuvConstants* yuvconstants,
3538                              int width);
3539 void UYVYToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
3540                              uint8_t* dst_ptr,
3541                              const struct YuvConstants* yuvconstants,
3542                              int width);
3543 void YUY2ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
3544                             uint8_t* dst_ptr,
3545                             const struct YuvConstants* yuvconstants,
3546                             int width);
3547 void UYVYToARGBRow_Any_AVX2(const uint8_t* src_ptr,
3548                             uint8_t* dst_ptr,
3549                             const struct YuvConstants* yuvconstants,
3550                             int width);
3551 void P210ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
3552                              const uint16_t* uv_buf,
3553                              uint8_t* dst_ptr,
3554                              const struct YuvConstants* yuvconstants,
3555                              int width);
3556 void P410ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
3557                              const uint16_t* uv_buf,
3558                              uint8_t* dst_ptr,
3559                              const struct YuvConstants* yuvconstants,
3560                              int width);
3561 void P210ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
3562                              const uint16_t* uv_buf,
3563                              uint8_t* dst_ptr,
3564                              const struct YuvConstants* yuvconstants,
3565                              int width);
3566 void P410ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
3567                              const uint16_t* uv_buf,
3568                              uint8_t* dst_ptr,
3569                              const struct YuvConstants* yuvconstants,
3570                              int width);
3571 void P210ToARGBRow_Any_AVX2(const uint16_t* y_buf,
3572                             const uint16_t* uv_buf,
3573                             uint8_t* dst_ptr,
3574                             const struct YuvConstants* yuvconstants,
3575                             int width);
3576 void P410ToARGBRow_Any_AVX2(const uint16_t* y_buf,
3577                             const uint16_t* uv_buf,
3578                             uint8_t* dst_ptr,
3579                             const struct YuvConstants* yuvconstants,
3580                             int width);
3581 void P210ToAR30Row_Any_AVX2(const uint16_t* y_buf,
3582                             const uint16_t* uv_buf,
3583                             uint8_t* dst_ptr,
3584                             const struct YuvConstants* yuvconstants,
3585                             int width);
3586 void P410ToAR30Row_Any_AVX2(const uint16_t* y_buf,
3587                             const uint16_t* uv_buf,
3588                             uint8_t* dst_ptr,
3589                             const struct YuvConstants* yuvconstants,
3590                             int width);
3591 void I422ToRGBARow_Any_SSSE3(const uint8_t* y_buf,
3592                              const uint8_t* u_buf,
3593                              const uint8_t* v_buf,
3594                              uint8_t* dst_ptr,
3595                              const struct YuvConstants* yuvconstants,
3596                              int width);
3597 void I422ToARGB4444Row_Any_SSSE3(const uint8_t* y_buf,
3598                                  const uint8_t* u_buf,
3599                                  const uint8_t* v_buf,
3600                                  uint8_t* dst_ptr,
3601                                  const struct YuvConstants* yuvconstants,
3602                                  int width);
3603 void I422ToARGB4444Row_Any_AVX2(const uint8_t* y_buf,
3604                                 const uint8_t* u_buf,
3605                                 const uint8_t* v_buf,
3606                                 uint8_t* dst_ptr,
3607                                 const struct YuvConstants* yuvconstants,
3608                                 int width);
3609 void I422ToARGB1555Row_Any_SSSE3(const uint8_t* y_buf,
3610                                  const uint8_t* u_buf,
3611                                  const uint8_t* v_buf,
3612                                  uint8_t* dst_ptr,
3613                                  const struct YuvConstants* yuvconstants,
3614                                  int width);
3615 void I422ToARGB1555Row_Any_AVX2(const uint8_t* y_buf,
3616                                 const uint8_t* u_buf,
3617                                 const uint8_t* v_buf,
3618                                 uint8_t* dst_ptr,
3619                                 const struct YuvConstants* yuvconstants,
3620                                 int width);
3621 void I422ToRGB565Row_Any_SSSE3(const uint8_t* y_buf,
3622                                const uint8_t* u_buf,
3623                                const uint8_t* v_buf,
3624                                uint8_t* dst_ptr,
3625                                const struct YuvConstants* yuvconstants,
3626                                int width);
3627 void I422ToRGB565Row_Any_AVX2(const uint8_t* y_buf,
3628                               const uint8_t* u_buf,
3629                               const uint8_t* v_buf,
3630                               uint8_t* dst_ptr,
3631                               const struct YuvConstants* yuvconstants,
3632                               int width);
3633 void I422ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
3634                               const uint8_t* u_buf,
3635                               const uint8_t* v_buf,
3636                               uint8_t* dst_ptr,
3637                               const struct YuvConstants* yuvconstants,
3638                               int width);
3639 void I422ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
3640                              const uint8_t* u_buf,
3641                              const uint8_t* v_buf,
3642                              uint8_t* dst_ptr,
3643                              const struct YuvConstants* yuvconstants,
3644                              int width);
3645 
3646 void I400ToARGBRow_C(const uint8_t* src_y,
3647                      uint8_t* rgb_buf,
3648                      const struct YuvConstants* yuvconstants,
3649                      int width);
3650 void I400ToARGBRow_SSE2(const uint8_t* y_buf,
3651                         uint8_t* dst_argb,
3652                         const struct YuvConstants* yuvconstants,
3653                         int width);
3654 void I400ToARGBRow_AVX2(const uint8_t* y_buf,
3655                         uint8_t* dst_argb,
3656                         const struct YuvConstants* yuvconstants,
3657                         int width);
3658 void I400ToARGBRow_NEON(const uint8_t* src_y,
3659                         uint8_t* dst_argb,
3660                         const struct YuvConstants* yuvconstants,
3661                         int width);
3662 void I400ToARGBRow_MSA(const uint8_t* src_y,
3663                        uint8_t* dst_argb,
3664                        const struct YuvConstants* yuvconstants,
3665                        int width);
3666 void I400ToARGBRow_MMI(const uint8_t* src_y,
3667                        uint8_t* dst_argb,
3668                        const struct YuvConstants* yuvconstants,
3669                        int width);
3670 void I400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
3671                             uint8_t* dst_ptr,
3672                             const struct YuvConstants* param,
3673                             int width);
3674 void I400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
3675                             uint8_t* dst_ptr,
3676                             const struct YuvConstants* param,
3677                             int width);
3678 void I400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
3679                             uint8_t* dst_ptr,
3680                             const struct YuvConstants* param,
3681                             int width);
3682 void I400ToARGBRow_Any_MSA(const uint8_t* src_ptr,
3683                            uint8_t* dst_ptr,
3684                            const struct YuvConstants* yuvconstants,
3685                            int width);
3686 void I400ToARGBRow_Any_MMI(const uint8_t* src_ptr,
3687                            uint8_t* dst_ptr,
3688                            const struct YuvConstants* yuvconstants,
3689                            int width);
3690 
3691 // ARGB preattenuated alpha blend.
3692 void ARGBBlendRow_SSSE3(const uint8_t* src_argb,
3693                         const uint8_t* src_argb1,
3694                         uint8_t* dst_argb,
3695                         int width);
3696 void ARGBBlendRow_NEON(const uint8_t* src_argb,
3697                        const uint8_t* src_argb1,
3698                        uint8_t* dst_argb,
3699                        int width);
3700 void ARGBBlendRow_MSA(const uint8_t* src_argb0,
3701                       const uint8_t* src_argb1,
3702                       uint8_t* dst_argb,
3703                       int width);
3704 void ARGBBlendRow_MMI(const uint8_t* src_argb0,
3705                       const uint8_t* src_argb1,
3706                       uint8_t* dst_argb,
3707                       int width);
3708 void ARGBBlendRow_C(const uint8_t* src_argb,
3709                     const uint8_t* src_argb1,
3710                     uint8_t* dst_argb,
3711                     int width);
3712 
3713 // Unattenuated planar alpha blend.
3714 void BlendPlaneRow_SSSE3(const uint8_t* src0,
3715                          const uint8_t* src1,
3716                          const uint8_t* alpha,
3717                          uint8_t* dst,
3718                          int width);
3719 void BlendPlaneRow_Any_SSSE3(const uint8_t* y_buf,
3720                              const uint8_t* u_buf,
3721                              const uint8_t* v_buf,
3722                              uint8_t* dst_ptr,
3723                              int width);
3724 void BlendPlaneRow_AVX2(const uint8_t* src0,
3725                         const uint8_t* src1,
3726                         const uint8_t* alpha,
3727                         uint8_t* dst,
3728                         int width);
3729 void BlendPlaneRow_Any_AVX2(const uint8_t* y_buf,
3730                             const uint8_t* u_buf,
3731                             const uint8_t* v_buf,
3732                             uint8_t* dst_ptr,
3733                             int width);
3734 void BlendPlaneRow_MMI(const uint8_t* src0,
3735                        const uint8_t* src1,
3736                        const uint8_t* alpha,
3737                        uint8_t* dst,
3738                        int width);
3739 void BlendPlaneRow_Any_MMI(const uint8_t* y_buf,
3740                            const uint8_t* u_buf,
3741                            const uint8_t* v_buf,
3742                            uint8_t* dst_ptr,
3743                            int width);
3744 void BlendPlaneRow_C(const uint8_t* src0,
3745                      const uint8_t* src1,
3746                      const uint8_t* alpha,
3747                      uint8_t* dst,
3748                      int width);
3749 
3750 // ARGB multiply images. Same API as Blend, but these require
3751 // pointer and width alignment for SSE2.
3752 void ARGBMultiplyRow_C(const uint8_t* src_argb,
3753                        const uint8_t* src_argb1,
3754                        uint8_t* dst_argb,
3755                        int width);
3756 void ARGBMultiplyRow_SSE2(const uint8_t* src_argb,
3757                           const uint8_t* src_argb1,
3758                           uint8_t* dst_argb,
3759                           int width);
3760 void ARGBMultiplyRow_Any_SSE2(const uint8_t* y_buf,
3761                               const uint8_t* uv_buf,
3762                               uint8_t* dst_ptr,
3763                               int width);
3764 void ARGBMultiplyRow_AVX2(const uint8_t* src_argb,
3765                           const uint8_t* src_argb1,
3766                           uint8_t* dst_argb,
3767                           int width);
3768 void ARGBMultiplyRow_Any_AVX2(const uint8_t* y_buf,
3769                               const uint8_t* uv_buf,
3770                               uint8_t* dst_ptr,
3771                               int width);
3772 void ARGBMultiplyRow_NEON(const uint8_t* src_argb,
3773                           const uint8_t* src_argb1,
3774                           uint8_t* dst_argb,
3775                           int width);
3776 void ARGBMultiplyRow_Any_NEON(const uint8_t* y_buf,
3777                               const uint8_t* uv_buf,
3778                               uint8_t* dst_ptr,
3779                               int width);
3780 void ARGBMultiplyRow_MSA(const uint8_t* src_argb0,
3781                          const uint8_t* src_argb1,
3782                          uint8_t* dst_argb,
3783                          int width);
3784 void ARGBMultiplyRow_Any_MSA(const uint8_t* y_buf,
3785                              const uint8_t* uv_buf,
3786                              uint8_t* dst_ptr,
3787                              int width);
3788 void ARGBMultiplyRow_MMI(const uint8_t* src_argb0,
3789                          const uint8_t* src_argb1,
3790                          uint8_t* dst_argb,
3791                          int width);
3792 void ARGBMultiplyRow_Any_MMI(const uint8_t* y_buf,
3793                              const uint8_t* uv_buf,
3794                              uint8_t* dst_ptr,
3795                              int width);
3796 
3797 // ARGB add images.
3798 void ARGBAddRow_C(const uint8_t* src_argb,
3799                   const uint8_t* src_argb1,
3800                   uint8_t* dst_argb,
3801                   int width);
3802 void ARGBAddRow_SSE2(const uint8_t* src_argb,
3803                      const uint8_t* src_argb1,
3804                      uint8_t* dst_argb,
3805                      int width);
3806 void ARGBAddRow_Any_SSE2(const uint8_t* y_buf,
3807                          const uint8_t* uv_buf,
3808                          uint8_t* dst_ptr,
3809                          int width);
3810 void ARGBAddRow_AVX2(const uint8_t* src_argb,
3811                      const uint8_t* src_argb1,
3812                      uint8_t* dst_argb,
3813                      int width);
3814 void ARGBAddRow_Any_AVX2(const uint8_t* y_buf,
3815                          const uint8_t* uv_buf,
3816                          uint8_t* dst_ptr,
3817                          int width);
3818 void ARGBAddRow_NEON(const uint8_t* src_argb,
3819                      const uint8_t* src_argb1,
3820                      uint8_t* dst_argb,
3821                      int width);
3822 void ARGBAddRow_Any_NEON(const uint8_t* y_buf,
3823                          const uint8_t* uv_buf,
3824                          uint8_t* dst_ptr,
3825                          int width);
3826 void ARGBAddRow_MSA(const uint8_t* src_argb0,
3827                     const uint8_t* src_argb1,
3828                     uint8_t* dst_argb,
3829                     int width);
3830 void ARGBAddRow_Any_MSA(const uint8_t* y_buf,
3831                         const uint8_t* uv_buf,
3832                         uint8_t* dst_ptr,
3833                         int width);
3834 void ARGBAddRow_MMI(const uint8_t* src_argb0,
3835                     const uint8_t* src_argb1,
3836                     uint8_t* dst_argb,
3837                     int width);
3838 void ARGBAddRow_Any_MMI(const uint8_t* y_buf,
3839                         const uint8_t* uv_buf,
3840                         uint8_t* dst_ptr,
3841                         int width);
3842 
3843 // ARGB subtract images. Same API as Blend, but these require
3844 // pointer and width alignment for SSE2.
3845 void ARGBSubtractRow_C(const uint8_t* src_argb,
3846                        const uint8_t* src_argb1,
3847                        uint8_t* dst_argb,
3848                        int width);
3849 void ARGBSubtractRow_SSE2(const uint8_t* src_argb,
3850                           const uint8_t* src_argb1,
3851                           uint8_t* dst_argb,
3852                           int width);
3853 void ARGBSubtractRow_Any_SSE2(const uint8_t* y_buf,
3854                               const uint8_t* uv_buf,
3855                               uint8_t* dst_ptr,
3856                               int width);
3857 void ARGBSubtractRow_AVX2(const uint8_t* src_argb,
3858                           const uint8_t* src_argb1,
3859                           uint8_t* dst_argb,
3860                           int width);
3861 void ARGBSubtractRow_Any_AVX2(const uint8_t* y_buf,
3862                               const uint8_t* uv_buf,
3863                               uint8_t* dst_ptr,
3864                               int width);
3865 void ARGBSubtractRow_NEON(const uint8_t* src_argb,
3866                           const uint8_t* src_argb1,
3867                           uint8_t* dst_argb,
3868                           int width);
3869 void ARGBSubtractRow_Any_NEON(const uint8_t* y_buf,
3870                               const uint8_t* uv_buf,
3871                               uint8_t* dst_ptr,
3872                               int width);
3873 void ARGBSubtractRow_MSA(const uint8_t* src_argb0,
3874                          const uint8_t* src_argb1,
3875                          uint8_t* dst_argb,
3876                          int width);
3877 void ARGBSubtractRow_Any_MSA(const uint8_t* y_buf,
3878                              const uint8_t* uv_buf,
3879                              uint8_t* dst_ptr,
3880                              int width);
3881 void ARGBSubtractRow_MMI(const uint8_t* src_argb0,
3882                          const uint8_t* src_argb1,
3883                          uint8_t* dst_argb,
3884                          int width);
3885 void ARGBSubtractRow_Any_MMI(const uint8_t* y_buf,
3886                              const uint8_t* uv_buf,
3887                              uint8_t* dst_ptr,
3888                              int width);
3889 
3890 void ARGBToRGB24Row_Any_SSSE3(const uint8_t* src_ptr,
3891                               uint8_t* dst_ptr,
3892                               int width);
3893 void ARGBToRAWRow_Any_SSSE3(const uint8_t* src_ptr,
3894                             uint8_t* dst_ptr,
3895                             int width);
3896 void ARGBToRGB565Row_Any_SSE2(const uint8_t* src_ptr,
3897                               uint8_t* dst_ptr,
3898                               int width);
3899 void ARGBToARGB1555Row_Any_SSE2(const uint8_t* src_ptr,
3900                                 uint8_t* dst_ptr,
3901                                 int width);
3902 void ARGBToARGB4444Row_Any_SSE2(const uint8_t* src_ptr,
3903                                 uint8_t* dst_ptr,
3904                                 int width);
3905 void ABGRToAR30Row_Any_SSSE3(const uint8_t* src_ptr,
3906                              uint8_t* dst_ptr,
3907                              int width);
3908 void ARGBToAR30Row_Any_SSSE3(const uint8_t* src_ptr,
3909                              uint8_t* dst_ptr,
3910                              int width);
3911 void ARGBToRAWRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3912 void ARGBToRGB24Row_Any_AVX2(const uint8_t* src_ptr,
3913                              uint8_t* dst_ptr,
3914                              int width);
3915 void ARGBToRGB24Row_Any_AVX512VBMI(const uint8_t* src_ptr,
3916                                    uint8_t* dst_ptr,
3917                                    int width);
3918 void ARGBToRGB565DitherRow_Any_SSE2(const uint8_t* src_ptr,
3919                                     uint8_t* dst_ptr,
3920                                     const uint32_t param,
3921                                     int width);
3922 void ARGBToRGB565DitherRow_Any_AVX2(const uint8_t* src_ptr,
3923                                     uint8_t* dst_ptr,
3924                                     const uint32_t param,
3925                                     int width);
3926 
3927 void ARGBToRGB565Row_Any_AVX2(const uint8_t* src_ptr,
3928                               uint8_t* dst_ptr,
3929                               int width);
3930 void ARGBToARGB1555Row_Any_AVX2(const uint8_t* src_ptr,
3931                                 uint8_t* dst_ptr,
3932                                 int width);
3933 void ARGBToARGB4444Row_Any_AVX2(const uint8_t* src_ptr,
3934                                 uint8_t* dst_ptr,
3935                                 int width);
3936 void ABGRToAR30Row_Any_AVX2(const uint8_t* src_ptr,
3937                             uint8_t* dst_ptr,
3938                             int width);
3939 void ARGBToAR30Row_Any_AVX2(const uint8_t* src_ptr,
3940                             uint8_t* dst_ptr,
3941                             int width);
3942 
3943 void ARGBToRGB24Row_Any_NEON(const uint8_t* src_ptr,
3944                              uint8_t* dst_ptr,
3945                              int width);
3946 void ARGBToRAWRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3947 void ARGBToRGB565Row_Any_NEON(const uint8_t* src_ptr,
3948                               uint8_t* dst_ptr,
3949                               int width);
3950 void ARGBToARGB1555Row_Any_NEON(const uint8_t* src_ptr,
3951                                 uint8_t* dst_ptr,
3952                                 int width);
3953 void ARGBToARGB4444Row_Any_NEON(const uint8_t* src_ptr,
3954                                 uint8_t* dst_ptr,
3955                                 int width);
3956 void ARGBToRGB565DitherRow_Any_NEON(const uint8_t* src_ptr,
3957                                     uint8_t* dst_ptr,
3958                                     const uint32_t param,
3959                                     int width);
3960 void ARGBToRGB24Row_Any_MSA(const uint8_t* src_ptr,
3961                             uint8_t* dst_ptr,
3962                             int width);
3963 void ARGBToRAWRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3964 void ARGBToRGB565Row_Any_MSA(const uint8_t* src_ptr,
3965                              uint8_t* dst_ptr,
3966                              int width);
3967 void ARGBToARGB1555Row_Any_MSA(const uint8_t* src_ptr,
3968                                uint8_t* dst_ptr,
3969                                int width);
3970 void ARGBToARGB4444Row_Any_MSA(const uint8_t* src_ptr,
3971                                uint8_t* dst_ptr,
3972                                int width);
3973 void ARGBToRGB565DitherRow_Any_MSA(const uint8_t* src_ptr,
3974                                    uint8_t* dst_ptr,
3975                                    const uint32_t param,
3976                                    int width);
3977 
3978 void ARGBToRGB24Row_Any_MMI(const uint8_t* src_ptr,
3979                             uint8_t* dst_ptr,
3980                             int width);
3981 void ARGBToRAWRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3982 void ARGBToRGB565Row_Any_MMI(const uint8_t* src_ptr,
3983                              uint8_t* dst_ptr,
3984                              int width);
3985 void ARGBToARGB1555Row_Any_MMI(const uint8_t* src_ptr,
3986                                uint8_t* dst_ptr,
3987                                int width);
3988 void ARGBToARGB4444Row_Any_MMI(const uint8_t* src_ptr,
3989                                uint8_t* dst_ptr,
3990                                int width);
3991 void ARGBToRGB565DitherRow_Any_MMI(const uint8_t* src_ptr,
3992                                    uint8_t* dst_ptr,
3993                                    const uint32_t param,
3994                                    int width);
3995 
3996 void I444ToARGBRow_Any_NEON(const uint8_t* y_buf,
3997                             const uint8_t* u_buf,
3998                             const uint8_t* v_buf,
3999                             uint8_t* dst_ptr,
4000                             const struct YuvConstants* yuvconstants,
4001                             int width);
4002 void I422ToARGBRow_Any_NEON(const uint8_t* y_buf,
4003                             const uint8_t* u_buf,
4004                             const uint8_t* v_buf,
4005                             uint8_t* dst_ptr,
4006                             const struct YuvConstants* yuvconstants,
4007                             int width);
4008 void I444AlphaToARGBRow_Any_NEON(const uint8_t* y_buf,
4009                                  const uint8_t* u_buf,
4010                                  const uint8_t* v_buf,
4011                                  const uint8_t* a_buf,
4012                                  uint8_t* dst_ptr,
4013                                  const struct YuvConstants* yuvconstants,
4014                                  int width);
4015 void I422AlphaToARGBRow_Any_NEON(const uint8_t* y_buf,
4016                                  const uint8_t* u_buf,
4017                                  const uint8_t* v_buf,
4018                                  const uint8_t* a_buf,
4019                                  uint8_t* dst_ptr,
4020                                  const struct YuvConstants* yuvconstants,
4021                                  int width);
4022 void I422ToRGBARow_Any_NEON(const uint8_t* y_buf,
4023                             const uint8_t* u_buf,
4024                             const uint8_t* v_buf,
4025                             uint8_t* dst_ptr,
4026                             const struct YuvConstants* yuvconstants,
4027                             int width);
4028 void I422ToRGB24Row_Any_NEON(const uint8_t* y_buf,
4029                              const uint8_t* u_buf,
4030                              const uint8_t* v_buf,
4031                              uint8_t* dst_ptr,
4032                              const struct YuvConstants* yuvconstants,
4033                              int width);
4034 void I422ToARGB4444Row_Any_NEON(const uint8_t* y_buf,
4035                                 const uint8_t* u_buf,
4036                                 const uint8_t* v_buf,
4037                                 uint8_t* dst_ptr,
4038                                 const struct YuvConstants* yuvconstants,
4039                                 int width);
4040 void I422ToARGB1555Row_Any_NEON(const uint8_t* y_buf,
4041                                 const uint8_t* u_buf,
4042                                 const uint8_t* v_buf,
4043                                 uint8_t* dst_ptr,
4044                                 const struct YuvConstants* yuvconstants,
4045                                 int width);
4046 void I422ToRGB565Row_Any_NEON(const uint8_t* y_buf,
4047                               const uint8_t* u_buf,
4048                               const uint8_t* v_buf,
4049                               uint8_t* dst_ptr,
4050                               const struct YuvConstants* yuvconstants,
4051                               int width);
4052 void NV12ToARGBRow_Any_NEON(const uint8_t* y_buf,
4053                             const uint8_t* uv_buf,
4054                             uint8_t* dst_ptr,
4055                             const struct YuvConstants* yuvconstants,
4056                             int width);
4057 void NV21ToARGBRow_Any_NEON(const uint8_t* y_buf,
4058                             const uint8_t* uv_buf,
4059                             uint8_t* dst_ptr,
4060                             const struct YuvConstants* yuvconstants,
4061                             int width);
4062 void NV12ToRGB24Row_Any_NEON(const uint8_t* y_buf,
4063                              const uint8_t* uv_buf,
4064                              uint8_t* dst_ptr,
4065                              const struct YuvConstants* yuvconstants,
4066                              int width);
4067 void NV21ToRGB24Row_Any_NEON(const uint8_t* y_buf,
4068                              const uint8_t* uv_buf,
4069                              uint8_t* dst_ptr,
4070                              const struct YuvConstants* yuvconstants,
4071                              int width);
4072 void NV21ToYUV24Row_Any_NEON(const uint8_t* y_buf,
4073                              const uint8_t* uv_buf,
4074                              uint8_t* dst_ptr,
4075                              int width);
4076 void NV12ToRGB565Row_Any_NEON(const uint8_t* y_buf,
4077                               const uint8_t* uv_buf,
4078                               uint8_t* dst_ptr,
4079                               const struct YuvConstants* yuvconstants,
4080                               int width);
4081 void YUY2ToARGBRow_Any_NEON(const uint8_t* src_ptr,
4082                             uint8_t* dst_ptr,
4083                             const struct YuvConstants* yuvconstants,
4084                             int width);
4085 void UYVYToARGBRow_Any_NEON(const uint8_t* src_ptr,
4086                             uint8_t* dst_ptr,
4087                             const struct YuvConstants* yuvconstants,
4088                             int width);
4089 void P210ToARGBRow_NEON(const uint16_t* y_buf,
4090                         const uint16_t* uv_buf,
4091                         uint8_t* dst_argb,
4092                         const struct YuvConstants* yuvconstants,
4093                         int width);
4094 void P410ToARGBRow_NEON(const uint16_t* y_buf,
4095                         const uint16_t* uv_buf,
4096                         uint8_t* dst_argb,
4097                         const struct YuvConstants* yuvconstants,
4098                         int width);
4099 void P210ToAR30Row_NEON(const uint16_t* y_buf,
4100                         const uint16_t* uv_buf,
4101                         uint8_t* dst_ar30,
4102                         const struct YuvConstants* yuvconstants,
4103                         int width);
4104 void P410ToAR30Row_NEON(const uint16_t* y_buf,
4105                         const uint16_t* uv_buf,
4106                         uint8_t* dst_ar30,
4107                         const struct YuvConstants* yuvconstants,
4108                         int width);
4109 void P210ToARGBRow_Any_NEON(const uint16_t* y_buf,
4110                             const uint16_t* uv_buf,
4111                             uint8_t* dst_argb,
4112                             const struct YuvConstants* yuvconstants,
4113                             int width);
4114 void P410ToARGBRow_Any_NEON(const uint16_t* y_buf,
4115                             const uint16_t* uv_buf,
4116                             uint8_t* dst_argb,
4117                             const struct YuvConstants* yuvconstants,
4118                             int width);
4119 void P210ToAR30Row_Any_NEON(const uint16_t* y_buf,
4120                             const uint16_t* uv_buf,
4121                             uint8_t* dst_ar30,
4122                             const struct YuvConstants* yuvconstants,
4123                             int width);
4124 void P410ToAR30Row_Any_NEON(const uint16_t* y_buf,
4125                             const uint16_t* uv_buf,
4126                             uint8_t* dst_ar30,
4127                             const struct YuvConstants* yuvconstants,
4128                             int width);
4129 void I444ToARGBRow_Any_MSA(const uint8_t* y_buf,
4130                            const uint8_t* u_buf,
4131                            const uint8_t* v_buf,
4132                            uint8_t* dst_ptr,
4133                            const struct YuvConstants* yuvconstants,
4134                            int width);
4135 void I444ToARGBRow_Any_MMI(const uint8_t* y_buf,
4136                            const uint8_t* u_buf,
4137                            const uint8_t* v_buf,
4138                            uint8_t* dst_ptr,
4139                            const struct YuvConstants* yuvconstants,
4140                            int width);
4141 void I422ToARGBRow_Any_MSA(const uint8_t* y_buf,
4142                            const uint8_t* u_buf,
4143                            const uint8_t* v_buf,
4144                            uint8_t* dst_ptr,
4145                            const struct YuvConstants* yuvconstants,
4146                            int width);
4147 void I422ToARGBRow_Any_MMI(const uint8_t* y_buf,
4148                            const uint8_t* u_buf,
4149                            const uint8_t* v_buf,
4150                            uint8_t* dst_ptr,
4151                            const struct YuvConstants* yuvconstants,
4152                            int width);
4153 void I422ToRGBARow_Any_MSA(const uint8_t* y_buf,
4154                            const uint8_t* u_buf,
4155                            const uint8_t* v_buf,
4156                            uint8_t* dst_ptr,
4157                            const struct YuvConstants* yuvconstants,
4158                            int width);
4159 void I422AlphaToARGBRow_Any_MSA(const uint8_t* y_buf,
4160                                 const uint8_t* u_buf,
4161                                 const uint8_t* v_buf,
4162                                 const uint8_t* a_buf,
4163                                 uint8_t* dst_ptr,
4164                                 const struct YuvConstants* yuvconstants,
4165                                 int width);
4166 void I422ToRGB24Row_Any_MSA(const uint8_t* y_buf,
4167                             const uint8_t* u_buf,
4168                             const uint8_t* v_buf,
4169                             uint8_t* dst_ptr,
4170                             const struct YuvConstants* yuvconstants,
4171                             int width);
4172 void I422ToRGB565Row_Any_MSA(const uint8_t* y_buf,
4173                              const uint8_t* u_buf,
4174                              const uint8_t* v_buf,
4175                              uint8_t* dst_ptr,
4176                              const struct YuvConstants* yuvconstants,
4177                              int width);
4178 void I422ToARGB4444Row_Any_MSA(const uint8_t* y_buf,
4179                                const uint8_t* u_buf,
4180                                const uint8_t* v_buf,
4181                                uint8_t* dst_ptr,
4182                                const struct YuvConstants* yuvconstants,
4183                                int width);
4184 void I422ToARGB1555Row_Any_MSA(const uint8_t* y_buf,
4185                                const uint8_t* u_buf,
4186                                const uint8_t* v_buf,
4187                                uint8_t* dst_ptr,
4188                                const struct YuvConstants* yuvconstants,
4189                                int width);
4190 void NV12ToARGBRow_Any_MSA(const uint8_t* y_buf,
4191                            const uint8_t* uv_buf,
4192                            uint8_t* dst_ptr,
4193                            const struct YuvConstants* yuvconstants,
4194                            int width);
4195 void NV12ToRGB565Row_Any_MSA(const uint8_t* y_buf,
4196                              const uint8_t* uv_buf,
4197                              uint8_t* dst_ptr,
4198                              const struct YuvConstants* yuvconstants,
4199                              int width);
4200 void NV21ToARGBRow_Any_MSA(const uint8_t* y_buf,
4201                            const uint8_t* uv_buf,
4202                            uint8_t* dst_ptr,
4203                            const struct YuvConstants* yuvconstants,
4204                            int width);
4205 void YUY2ToARGBRow_Any_MSA(const uint8_t* src_ptr,
4206                            uint8_t* dst_ptr,
4207                            const struct YuvConstants* yuvconstants,
4208                            int width);
4209 void UYVYToARGBRow_Any_MSA(const uint8_t* src_ptr,
4210                            uint8_t* dst_ptr,
4211                            const struct YuvConstants* yuvconstants,
4212                            int width);
4213 
4214 void YUY2ToYRow_AVX2(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
4215 void YUY2ToUVRow_AVX2(const uint8_t* src_yuy2,
4216                       int stride_yuy2,
4217                       uint8_t* dst_u,
4218                       uint8_t* dst_v,
4219                       int width);
4220 void YUY2ToUV422Row_AVX2(const uint8_t* src_yuy2,
4221                          uint8_t* dst_u,
4222                          uint8_t* dst_v,
4223                          int width);
4224 void YUY2ToYRow_SSE2(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
4225 void YUY2ToUVRow_SSE2(const uint8_t* src_yuy2,
4226                       int stride_yuy2,
4227                       uint8_t* dst_u,
4228                       uint8_t* dst_v,
4229                       int width);
4230 void YUY2ToUV422Row_SSE2(const uint8_t* src_yuy2,
4231                          uint8_t* dst_u,
4232                          uint8_t* dst_v,
4233                          int width);
4234 void YUY2ToYRow_NEON(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
4235 void YUY2ToUVRow_NEON(const uint8_t* src_yuy2,
4236                       int stride_yuy2,
4237                       uint8_t* dst_u,
4238                       uint8_t* dst_v,
4239                       int width);
4240 void YUY2ToUV422Row_NEON(const uint8_t* src_yuy2,
4241                          uint8_t* dst_u,
4242                          uint8_t* dst_v,
4243                          int width);
4244 void YUY2ToYRow_MSA(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
4245 void YUY2ToYRow_MMI(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
4246 void YUY2ToUVRow_MSA(const uint8_t* src_yuy2,
4247                      int src_stride_yuy2,
4248                      uint8_t* dst_u,
4249                      uint8_t* dst_v,
4250                      int width);
4251 void YUY2ToUVRow_MMI(const uint8_t* src_yuy2,
4252                      int src_stride_yuy2,
4253                      uint8_t* dst_u,
4254                      uint8_t* dst_v,
4255                      int width);
4256 void YUY2ToUV422Row_MSA(const uint8_t* src_yuy2,
4257                         uint8_t* dst_u,
4258                         uint8_t* dst_v,
4259                         int width);
4260 void YUY2ToUV422Row_MMI(const uint8_t* src_yuy2,
4261                         uint8_t* dst_u,
4262                         uint8_t* dst_v,
4263                         int width);
4264 void YUY2ToYRow_C(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
4265 void YUY2ToUVRow_C(const uint8_t* src_yuy2,
4266                    int src_stride_yuy2,
4267                    uint8_t* dst_u,
4268                    uint8_t* dst_v,
4269                    int width);
4270 void YUY2ToUV422Row_C(const uint8_t* src_yuy2,
4271                       uint8_t* dst_u,
4272                       uint8_t* dst_v,
4273                       int width);
4274 void YUY2ToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4275 void YUY2ToUVRow_Any_AVX2(const uint8_t* src_ptr,
4276                           int src_stride,
4277                           uint8_t* dst_u,
4278                           uint8_t* dst_v,
4279                           int width);
4280 void YUY2ToUV422Row_Any_AVX2(const uint8_t* src_ptr,
4281                              uint8_t* dst_u,
4282                              uint8_t* dst_v,
4283                              int width);
4284 void YUY2ToYRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4285 void YUY2ToUVRow_Any_SSE2(const uint8_t* src_ptr,
4286                           int src_stride,
4287                           uint8_t* dst_u,
4288                           uint8_t* dst_v,
4289                           int width);
4290 void YUY2ToUV422Row_Any_SSE2(const uint8_t* src_ptr,
4291                              uint8_t* dst_u,
4292                              uint8_t* dst_v,
4293                              int width);
4294 void YUY2ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4295 void YUY2ToUVRow_Any_NEON(const uint8_t* src_ptr,
4296                           int src_stride,
4297                           uint8_t* dst_u,
4298                           uint8_t* dst_v,
4299                           int width);
4300 void YUY2ToUV422Row_Any_NEON(const uint8_t* src_ptr,
4301                              uint8_t* dst_u,
4302                              uint8_t* dst_v,
4303                              int width);
4304 void YUY2ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4305 void YUY2ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4306 void YUY2ToUVRow_Any_MSA(const uint8_t* src_ptr,
4307                          int src_stride_ptr,
4308                          uint8_t* dst_u,
4309                          uint8_t* dst_v,
4310                          int width);
4311 void YUY2ToUVRow_Any_MMI(const uint8_t* src_ptr,
4312                          int src_stride_ptr,
4313                          uint8_t* dst_u,
4314                          uint8_t* dst_v,
4315                          int width);
4316 void YUY2ToUV422Row_Any_MSA(const uint8_t* src_ptr,
4317                             uint8_t* dst_u,
4318                             uint8_t* dst_v,
4319                             int width);
4320 void YUY2ToUV422Row_Any_MMI(const uint8_t* src_ptr,
4321                             uint8_t* dst_u,
4322                             uint8_t* dst_v,
4323                             int width);
4324 void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
4325 void UYVYToUVRow_AVX2(const uint8_t* src_uyvy,
4326                       int stride_uyvy,
4327                       uint8_t* dst_u,
4328                       uint8_t* dst_v,
4329                       int width);
4330 void UYVYToUV422Row_AVX2(const uint8_t* src_uyvy,
4331                          uint8_t* dst_u,
4332                          uint8_t* dst_v,
4333                          int width);
4334 void UYVYToYRow_SSE2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
4335 void UYVYToUVRow_SSE2(const uint8_t* src_uyvy,
4336                       int stride_uyvy,
4337                       uint8_t* dst_u,
4338                       uint8_t* dst_v,
4339                       int width);
4340 void UYVYToUV422Row_SSE2(const uint8_t* src_uyvy,
4341                          uint8_t* dst_u,
4342                          uint8_t* dst_v,
4343                          int width);
4344 void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
4345 void UYVYToUVRow_AVX2(const uint8_t* src_uyvy,
4346                       int stride_uyvy,
4347                       uint8_t* dst_u,
4348                       uint8_t* dst_v,
4349                       int width);
4350 void UYVYToUV422Row_AVX2(const uint8_t* src_uyvy,
4351                          uint8_t* dst_u,
4352                          uint8_t* dst_v,
4353                          int width);
4354 void UYVYToYRow_NEON(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
4355 void UYVYToUVRow_NEON(const uint8_t* src_uyvy,
4356                       int stride_uyvy,
4357                       uint8_t* dst_u,
4358                       uint8_t* dst_v,
4359                       int width);
4360 void UYVYToUV422Row_NEON(const uint8_t* src_uyvy,
4361                          uint8_t* dst_u,
4362                          uint8_t* dst_v,
4363                          int width);
4364 void UYVYToYRow_MSA(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
4365 void UYVYToYRow_MMI(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
4366 void UYVYToUVRow_MSA(const uint8_t* src_uyvy,
4367                      int src_stride_uyvy,
4368                      uint8_t* dst_u,
4369                      uint8_t* dst_v,
4370                      int width);
4371 void UYVYToUVRow_MMI(const uint8_t* src_uyvy,
4372                      int src_stride_uyvy,
4373                      uint8_t* dst_u,
4374                      uint8_t* dst_v,
4375                      int width);
4376 void UYVYToUV422Row_MSA(const uint8_t* src_uyvy,
4377                         uint8_t* dst_u,
4378                         uint8_t* dst_v,
4379                         int width);
4380 void UYVYToUV422Row_MMI(const uint8_t* src_uyvy,
4381                         uint8_t* dst_u,
4382                         uint8_t* dst_v,
4383                         int width);
4384 
4385 void UYVYToYRow_C(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
4386 void UYVYToUVRow_C(const uint8_t* src_uyvy,
4387                    int src_stride_uyvy,
4388                    uint8_t* dst_u,
4389                    uint8_t* dst_v,
4390                    int width);
4391 void UYVYToUV422Row_C(const uint8_t* src_uyvy,
4392                       uint8_t* dst_u,
4393                       uint8_t* dst_v,
4394                       int width);
4395 void UYVYToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4396 void UYVYToUVRow_Any_AVX2(const uint8_t* src_ptr,
4397                           int src_stride,
4398                           uint8_t* dst_u,
4399                           uint8_t* dst_v,
4400                           int width);
4401 void UYVYToUV422Row_Any_AVX2(const uint8_t* src_ptr,
4402                              uint8_t* dst_u,
4403                              uint8_t* dst_v,
4404                              int width);
4405 void UYVYToYRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4406 void UYVYToUVRow_Any_SSE2(const uint8_t* src_ptr,
4407                           int src_stride,
4408                           uint8_t* dst_u,
4409                           uint8_t* dst_v,
4410                           int width);
4411 void UYVYToUV422Row_Any_SSE2(const uint8_t* src_ptr,
4412                              uint8_t* dst_u,
4413                              uint8_t* dst_v,
4414                              int width);
4415 void UYVYToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4416 void UYVYToUVRow_Any_NEON(const uint8_t* src_ptr,
4417                           int src_stride,
4418                           uint8_t* dst_u,
4419                           uint8_t* dst_v,
4420                           int width);
4421 void UYVYToUV422Row_Any_NEON(const uint8_t* src_ptr,
4422                              uint8_t* dst_u,
4423                              uint8_t* dst_v,
4424                              int width);
4425 void UYVYToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4426 void UYVYToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4427 void UYVYToUVRow_Any_MSA(const uint8_t* src_ptr,
4428                          int src_stride_ptr,
4429                          uint8_t* dst_u,
4430                          uint8_t* dst_v,
4431                          int width);
4432 void UYVYToUVRow_Any_MMI(const uint8_t* src_ptr,
4433                          int src_stride_ptr,
4434                          uint8_t* dst_u,
4435                          uint8_t* dst_v,
4436                          int width);
4437 void UYVYToUV422Row_Any_MSA(const uint8_t* src_ptr,
4438                             uint8_t* dst_u,
4439                             uint8_t* dst_v,
4440                             int width);
4441 void UYVYToUV422Row_Any_MMI(const uint8_t* src_ptr,
4442                             uint8_t* dst_u,
4443                             uint8_t* dst_v,
4444                             int width);
4445 void SwapUVRow_C(const uint8_t* src_uv, uint8_t* dst_vu, int width);
4446 void SwapUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width);
4447 void SwapUVRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4448 void SwapUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_vu, int width);
4449 void SwapUVRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4450 void SwapUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_vu, int width);
4451 void SwapUVRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4452 void AYUVToYRow_C(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
4453 void AYUVToUVRow_C(const uint8_t* src_ayuv,
4454                    int src_stride_ayuv,
4455                    uint8_t* dst_uv,
4456                    int width);
4457 void AYUVToVURow_C(const uint8_t* src_ayuv,
4458                    int src_stride_ayuv,
4459                    uint8_t* dst_vu,
4460                    int width);
4461 void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
4462 void AYUVToUVRow_NEON(const uint8_t* src_ayuv,
4463                       int src_stride_ayuv,
4464                       uint8_t* dst_uv,
4465                       int width);
4466 void AYUVToVURow_NEON(const uint8_t* src_ayuv,
4467                       int src_stride_ayuv,
4468                       uint8_t* dst_vu,
4469                       int width);
4470 void AYUVToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4471 void AYUVToUVRow_Any_NEON(const uint8_t* src_ptr,
4472                           int src_stride,
4473                           uint8_t* dst_vu,
4474                           int width);
4475 void AYUVToVURow_Any_NEON(const uint8_t* src_ptr,
4476                           int src_stride,
4477                           uint8_t* dst_vu,
4478                           int width);
4479 
4480 void I422ToYUY2Row_C(const uint8_t* src_y,
4481                      const uint8_t* src_u,
4482                      const uint8_t* src_v,
4483                      uint8_t* dst_frame,
4484                      int width);
4485 void I422ToUYVYRow_C(const uint8_t* src_y,
4486                      const uint8_t* src_u,
4487                      const uint8_t* src_v,
4488                      uint8_t* dst_frame,
4489                      int width);
4490 void I422ToYUY2Row_SSE2(const uint8_t* src_y,
4491                         const uint8_t* src_u,
4492                         const uint8_t* src_v,
4493                         uint8_t* dst_yuy2,
4494                         int width);
4495 void I422ToUYVYRow_SSE2(const uint8_t* src_y,
4496                         const uint8_t* src_u,
4497                         const uint8_t* src_v,
4498                         uint8_t* dst_uyvy,
4499                         int width);
4500 void I422ToYUY2Row_Any_SSE2(const uint8_t* y_buf,
4501                             const uint8_t* u_buf,
4502                             const uint8_t* v_buf,
4503                             uint8_t* dst_ptr,
4504                             int width);
4505 void I422ToUYVYRow_Any_SSE2(const uint8_t* y_buf,
4506                             const uint8_t* u_buf,
4507                             const uint8_t* v_buf,
4508                             uint8_t* dst_ptr,
4509                             int width);
4510 void I422ToYUY2Row_AVX2(const uint8_t* src_y,
4511                         const uint8_t* src_u,
4512                         const uint8_t* src_v,
4513                         uint8_t* dst_yuy2,
4514                         int width);
4515 void I422ToUYVYRow_AVX2(const uint8_t* src_y,
4516                         const uint8_t* src_u,
4517                         const uint8_t* src_v,
4518                         uint8_t* dst_uyvy,
4519                         int width);
4520 void I422ToYUY2Row_Any_AVX2(const uint8_t* y_buf,
4521                             const uint8_t* u_buf,
4522                             const uint8_t* v_buf,
4523                             uint8_t* dst_ptr,
4524                             int width);
4525 void I422ToUYVYRow_Any_AVX2(const uint8_t* y_buf,
4526                             const uint8_t* u_buf,
4527                             const uint8_t* v_buf,
4528                             uint8_t* dst_ptr,
4529                             int width);
4530 void I422ToYUY2Row_NEON(const uint8_t* src_y,
4531                         const uint8_t* src_u,
4532                         const uint8_t* src_v,
4533                         uint8_t* dst_yuy2,
4534                         int width);
4535 void I422ToUYVYRow_NEON(const uint8_t* src_y,
4536                         const uint8_t* src_u,
4537                         const uint8_t* src_v,
4538                         uint8_t* dst_uyvy,
4539                         int width);
4540 void I422ToYUY2Row_Any_NEON(const uint8_t* y_buf,
4541                             const uint8_t* u_buf,
4542                             const uint8_t* v_buf,
4543                             uint8_t* dst_ptr,
4544                             int width);
4545 void I422ToUYVYRow_Any_NEON(const uint8_t* y_buf,
4546                             const uint8_t* u_buf,
4547                             const uint8_t* v_buf,
4548                             uint8_t* dst_ptr,
4549                             int width);
4550 void I422ToYUY2Row_MSA(const uint8_t* src_y,
4551                        const uint8_t* src_u,
4552                        const uint8_t* src_v,
4553                        uint8_t* dst_yuy2,
4554                        int width);
4555 void I422ToYUY2Row_MMI(const uint8_t* src_y,
4556                        const uint8_t* src_u,
4557                        const uint8_t* src_v,
4558                        uint8_t* dst_yuy2,
4559                        int width);
4560 void I422ToUYVYRow_MSA(const uint8_t* src_y,
4561                        const uint8_t* src_u,
4562                        const uint8_t* src_v,
4563                        uint8_t* dst_uyvy,
4564                        int width);
4565 void I422ToUYVYRow_MMI(const uint8_t* src_y,
4566                        const uint8_t* src_u,
4567                        const uint8_t* src_v,
4568                        uint8_t* dst_uyvy,
4569                        int width);
4570 void I422ToYUY2Row_Any_MSA(const uint8_t* y_buf,
4571                            const uint8_t* u_buf,
4572                            const uint8_t* v_buf,
4573                            uint8_t* dst_ptr,
4574                            int width);
4575 void I422ToYUY2Row_Any_MMI(const uint8_t* y_buf,
4576                            const uint8_t* u_buf,
4577                            const uint8_t* v_buf,
4578                            uint8_t* dst_ptr,
4579                            int width);
4580 void I422ToUYVYRow_Any_MSA(const uint8_t* y_buf,
4581                            const uint8_t* u_buf,
4582                            const uint8_t* v_buf,
4583                            uint8_t* dst_ptr,
4584                            int width);
4585 void I422ToUYVYRow_Any_MMI(const uint8_t* y_buf,
4586                            const uint8_t* u_buf,
4587                            const uint8_t* v_buf,
4588                            uint8_t* dst_ptr,
4589                            int width);
4590 
4591 // Effects related row functions.
4592 void ARGBAttenuateRow_C(const uint8_t* src_argb, uint8_t* dst_argb, int width);
4593 void ARGBAttenuateRow_SSSE3(const uint8_t* src_argb,
4594                             uint8_t* dst_argb,
4595                             int width);
4596 void ARGBAttenuateRow_AVX2(const uint8_t* src_argb,
4597                            uint8_t* dst_argb,
4598                            int width);
4599 void ARGBAttenuateRow_NEON(const uint8_t* src_argb,
4600                            uint8_t* dst_argb,
4601                            int width);
4602 void ARGBAttenuateRow_MSA(const uint8_t* src_argb,
4603                           uint8_t* dst_argb,
4604                           int width);
4605 void ARGBAttenuateRow_MMI(const uint8_t* src_argb,
4606                           uint8_t* dst_argb,
4607                           int width);
4608 void ARGBAttenuateRow_Any_SSSE3(const uint8_t* src_ptr,
4609                                 uint8_t* dst_ptr,
4610                                 int width);
4611 void ARGBAttenuateRow_Any_AVX2(const uint8_t* src_ptr,
4612                                uint8_t* dst_ptr,
4613                                int width);
4614 void ARGBAttenuateRow_Any_NEON(const uint8_t* src_ptr,
4615                                uint8_t* dst_ptr,
4616                                int width);
4617 void ARGBAttenuateRow_Any_MSA(const uint8_t* src_ptr,
4618                               uint8_t* dst_ptr,
4619                               int width);
4620 void ARGBAttenuateRow_Any_MMI(const uint8_t* src_ptr,
4621                               uint8_t* dst_ptr,
4622                               int width);
4623 
4624 // Inverse table for unattenuate, shared by C and SSE2.
4625 extern const uint32_t fixed_invtbl8[256];
4626 void ARGBUnattenuateRow_C(const uint8_t* src_argb,
4627                           uint8_t* dst_argb,
4628                           int width);
4629 void ARGBUnattenuateRow_SSE2(const uint8_t* src_argb,
4630                              uint8_t* dst_argb,
4631                              int width);
4632 void ARGBUnattenuateRow_AVX2(const uint8_t* src_argb,
4633                              uint8_t* dst_argb,
4634                              int width);
4635 void ARGBUnattenuateRow_Any_SSE2(const uint8_t* src_ptr,
4636                                  uint8_t* dst_ptr,
4637                                  int width);
4638 void ARGBUnattenuateRow_Any_AVX2(const uint8_t* src_ptr,
4639                                  uint8_t* dst_ptr,
4640                                  int width);
4641 
4642 void ARGBGrayRow_C(const uint8_t* src_argb, uint8_t* dst_argb, int width);
4643 void ARGBGrayRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_argb, int width);
4644 void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width);
4645 void ARGBGrayRow_MSA(const uint8_t* src_argb, uint8_t* dst_argb, int width);
4646 void ARGBGrayRow_MMI(const uint8_t* src_argb, uint8_t* dst_argb, int width);
4647 
4648 void ARGBSepiaRow_C(uint8_t* dst_argb, int width);
4649 void ARGBSepiaRow_SSSE3(uint8_t* dst_argb, int width);
4650 void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width);
4651 void ARGBSepiaRow_MSA(uint8_t* dst_argb, int width);
4652 void ARGBSepiaRow_MMI(uint8_t* dst_argb, int width);
4653 
4654 void ARGBColorMatrixRow_C(const uint8_t* src_argb,
4655                           uint8_t* dst_argb,
4656                           const int8_t* matrix_argb,
4657                           int width);
4658 void ARGBColorMatrixRow_SSSE3(const uint8_t* src_argb,
4659                               uint8_t* dst_argb,
4660                               const int8_t* matrix_argb,
4661                               int width);
4662 void ARGBColorMatrixRow_NEON(const uint8_t* src_argb,
4663                              uint8_t* dst_argb,
4664                              const int8_t* matrix_argb,
4665                              int width);
4666 void ARGBColorMatrixRow_MSA(const uint8_t* src_argb,
4667                             uint8_t* dst_argb,
4668                             const int8_t* matrix_argb,
4669                             int width);
4670 void ARGBColorMatrixRow_MMI(const uint8_t* src_argb,
4671                             uint8_t* dst_argb,
4672                             const int8_t* matrix_argb,
4673                             int width);
4674 
4675 void ARGBColorTableRow_C(uint8_t* dst_argb,
4676                          const uint8_t* table_argb,
4677                          int width);
4678 void ARGBColorTableRow_X86(uint8_t* dst_argb,
4679                            const uint8_t* table_argb,
4680                            int width);
4681 
4682 void RGBColorTableRow_C(uint8_t* dst_argb,
4683                         const uint8_t* table_argb,
4684                         int width);
4685 void RGBColorTableRow_X86(uint8_t* dst_argb,
4686                           const uint8_t* table_argb,
4687                           int width);
4688 
4689 void ARGBQuantizeRow_C(uint8_t* dst_argb,
4690                        int scale,
4691                        int interval_size,
4692                        int interval_offset,
4693                        int width);
4694 void ARGBQuantizeRow_SSE2(uint8_t* dst_argb,
4695                           int scale,
4696                           int interval_size,
4697                           int interval_offset,
4698                           int width);
4699 void ARGBQuantizeRow_NEON(uint8_t* dst_argb,
4700                           int scale,
4701                           int interval_size,
4702                           int interval_offset,
4703                           int width);
4704 void ARGBQuantizeRow_MSA(uint8_t* dst_argb,
4705                          int scale,
4706                          int interval_size,
4707                          int interval_offset,
4708                          int width);
4709 
4710 void ARGBShadeRow_C(const uint8_t* src_argb,
4711                     uint8_t* dst_argb,
4712                     int width,
4713                     uint32_t value);
4714 void ARGBShadeRow_SSE2(const uint8_t* src_argb,
4715                        uint8_t* dst_argb,
4716                        int width,
4717                        uint32_t value);
4718 void ARGBShadeRow_NEON(const uint8_t* src_argb,
4719                        uint8_t* dst_argb,
4720                        int width,
4721                        uint32_t value);
4722 void ARGBShadeRow_MSA(const uint8_t* src_argb,
4723                       uint8_t* dst_argb,
4724                       int width,
4725                       uint32_t value);
4726 void ARGBShadeRow_MMI(const uint8_t* src_argb,
4727                       uint8_t* dst_argb,
4728                       int width,
4729                       uint32_t value);
4730 
4731 // Used for blur.
4732 void CumulativeSumToAverageRow_SSE2(const int32_t* topleft,
4733                                     const int32_t* botleft,
4734                                     int width,
4735                                     int area,
4736                                     uint8_t* dst,
4737                                     int count);
4738 void ComputeCumulativeSumRow_SSE2(const uint8_t* row,
4739                                   int32_t* cumsum,
4740                                   const int32_t* previous_cumsum,
4741                                   int width);
4742 
4743 void ComputeCumulativeSumRow_MMI(const uint8_t* row,
4744                                  int32_t* cumsum,
4745                                  const int32_t* previous_cumsum,
4746                                  int width);
4747 
4748 void CumulativeSumToAverageRow_C(const int32_t* tl,
4749                                  const int32_t* bl,
4750                                  int w,
4751                                  int area,
4752                                  uint8_t* dst,
4753                                  int count);
4754 void ComputeCumulativeSumRow_C(const uint8_t* row,
4755                                int32_t* cumsum,
4756                                const int32_t* previous_cumsum,
4757                                int width);
4758 
4759 LIBYUV_API
4760 void ARGBAffineRow_C(const uint8_t* src_argb,
4761                      int src_argb_stride,
4762                      uint8_t* dst_argb,
4763                      const float* uv_dudv,
4764                      int width);
4765 LIBYUV_API
4766 void ARGBAffineRow_SSE2(const uint8_t* src_argb,
4767                         int src_argb_stride,
4768                         uint8_t* dst_argb,
4769                         const float* src_dudv,
4770                         int width);
4771 
4772 // Used for I420Scale, ARGBScale, and ARGBInterpolate.
4773 void InterpolateRow_C(uint8_t* dst_ptr,
4774                       const uint8_t* src_ptr,
4775                       ptrdiff_t src_stride,
4776                       int width,
4777                       int source_y_fraction);
4778 void InterpolateRow_SSSE3(uint8_t* dst_ptr,
4779                           const uint8_t* src_ptr,
4780                           ptrdiff_t src_stride,
4781                           int dst_width,
4782                           int source_y_fraction);
4783 void InterpolateRow_AVX2(uint8_t* dst_ptr,
4784                          const uint8_t* src_ptr,
4785                          ptrdiff_t src_stride,
4786                          int dst_width,
4787                          int source_y_fraction);
4788 void InterpolateRow_NEON(uint8_t* dst_ptr,
4789                          const uint8_t* src_ptr,
4790                          ptrdiff_t src_stride,
4791                          int dst_width,
4792                          int source_y_fraction);
4793 void InterpolateRow_MSA(uint8_t* dst_ptr,
4794                         const uint8_t* src_ptr,
4795                         ptrdiff_t src_stride,
4796                         int width,
4797                         int source_y_fraction);
4798 void InterpolateRow_MMI(uint8_t* dst_ptr,
4799                         const uint8_t* src_ptr,
4800                         ptrdiff_t src_stride,
4801                         int width,
4802                         int source_y_fraction);
4803 void InterpolateRow_Any_NEON(uint8_t* dst_ptr,
4804                              const uint8_t* src_ptr,
4805                              ptrdiff_t src_stride_ptr,
4806                              int width,
4807                              int source_y_fraction);
4808 void InterpolateRow_Any_SSSE3(uint8_t* dst_ptr,
4809                               const uint8_t* src_ptr,
4810                               ptrdiff_t src_stride_ptr,
4811                               int width,
4812                               int source_y_fraction);
4813 void InterpolateRow_Any_AVX2(uint8_t* dst_ptr,
4814                              const uint8_t* src_ptr,
4815                              ptrdiff_t src_stride_ptr,
4816                              int width,
4817                              int source_y_fraction);
4818 void InterpolateRow_Any_MSA(uint8_t* dst_ptr,
4819                             const uint8_t* src_ptr,
4820                             ptrdiff_t src_stride_ptr,
4821                             int width,
4822                             int source_y_fraction);
4823 void InterpolateRow_Any_MMI(uint8_t* dst_ptr,
4824                             const uint8_t* src_ptr,
4825                             ptrdiff_t src_stride_ptr,
4826                             int width,
4827                             int source_y_fraction);
4828 
4829 void InterpolateRow_16_C(uint16_t* dst_ptr,
4830                          const uint16_t* src_ptr,
4831                          ptrdiff_t src_stride,
4832                          int width,
4833                          int source_y_fraction);
4834 
4835 // Sobel images.
4836 void SobelXRow_C(const uint8_t* src_y0,
4837                  const uint8_t* src_y1,
4838                  const uint8_t* src_y2,
4839                  uint8_t* dst_sobelx,
4840                  int width);
4841 void SobelXRow_SSE2(const uint8_t* src_y0,
4842                     const uint8_t* src_y1,
4843                     const uint8_t* src_y2,
4844                     uint8_t* dst_sobelx,
4845                     int width);
4846 void SobelXRow_NEON(const uint8_t* src_y0,
4847                     const uint8_t* src_y1,
4848                     const uint8_t* src_y2,
4849                     uint8_t* dst_sobelx,
4850                     int width);
4851 void SobelXRow_MSA(const uint8_t* src_y0,
4852                    const uint8_t* src_y1,
4853                    const uint8_t* src_y2,
4854                    uint8_t* dst_sobelx,
4855                    int width);
4856 void SobelXRow_MMI(const uint8_t* src_y0,
4857                    const uint8_t* src_y1,
4858                    const uint8_t* src_y2,
4859                    uint8_t* dst_sobelx,
4860                    int width);
4861 void SobelYRow_C(const uint8_t* src_y0,
4862                  const uint8_t* src_y1,
4863                  uint8_t* dst_sobely,
4864                  int width);
4865 void SobelYRow_SSE2(const uint8_t* src_y0,
4866                     const uint8_t* src_y1,
4867                     uint8_t* dst_sobely,
4868                     int width);
4869 void SobelYRow_NEON(const uint8_t* src_y0,
4870                     const uint8_t* src_y1,
4871                     uint8_t* dst_sobely,
4872                     int width);
4873 void SobelYRow_MSA(const uint8_t* src_y0,
4874                    const uint8_t* src_y1,
4875                    uint8_t* dst_sobely,
4876                    int width);
4877 void SobelYRow_MMI(const uint8_t* src_y0,
4878                    const uint8_t* src_y1,
4879                    uint8_t* dst_sobely,
4880                    int width);
4881 void SobelRow_C(const uint8_t* src_sobelx,
4882                 const uint8_t* src_sobely,
4883                 uint8_t* dst_argb,
4884                 int width);
4885 void SobelRow_SSE2(const uint8_t* src_sobelx,
4886                    const uint8_t* src_sobely,
4887                    uint8_t* dst_argb,
4888                    int width);
4889 void SobelRow_NEON(const uint8_t* src_sobelx,
4890                    const uint8_t* src_sobely,
4891                    uint8_t* dst_argb,
4892                    int width);
4893 void SobelRow_MSA(const uint8_t* src_sobelx,
4894                   const uint8_t* src_sobely,
4895                   uint8_t* dst_argb,
4896                   int width);
4897 void SobelRow_MMI(const uint8_t* src_sobelx,
4898                   const uint8_t* src_sobely,
4899                   uint8_t* dst_argb,
4900                   int width);
4901 void SobelToPlaneRow_C(const uint8_t* src_sobelx,
4902                        const uint8_t* src_sobely,
4903                        uint8_t* dst_y,
4904                        int width);
4905 void SobelToPlaneRow_SSE2(const uint8_t* src_sobelx,
4906                           const uint8_t* src_sobely,
4907                           uint8_t* dst_y,
4908                           int width);
4909 void SobelToPlaneRow_NEON(const uint8_t* src_sobelx,
4910                           const uint8_t* src_sobely,
4911                           uint8_t* dst_y,
4912                           int width);
4913 void SobelToPlaneRow_MSA(const uint8_t* src_sobelx,
4914                          const uint8_t* src_sobely,
4915                          uint8_t* dst_y,
4916                          int width);
4917 void SobelToPlaneRow_MMI(const uint8_t* src_sobelx,
4918                          const uint8_t* src_sobely,
4919                          uint8_t* dst_y,
4920                          int width);
4921 void SobelXYRow_C(const uint8_t* src_sobelx,
4922                   const uint8_t* src_sobely,
4923                   uint8_t* dst_argb,
4924                   int width);
4925 void SobelXYRow_SSE2(const uint8_t* src_sobelx,
4926                      const uint8_t* src_sobely,
4927                      uint8_t* dst_argb,
4928                      int width);
4929 void SobelXYRow_NEON(const uint8_t* src_sobelx,
4930                      const uint8_t* src_sobely,
4931                      uint8_t* dst_argb,
4932                      int width);
4933 void SobelXYRow_MSA(const uint8_t* src_sobelx,
4934                     const uint8_t* src_sobely,
4935                     uint8_t* dst_argb,
4936                     int width);
4937 void SobelXYRow_MMI(const uint8_t* src_sobelx,
4938                     const uint8_t* src_sobely,
4939                     uint8_t* dst_argb,
4940                     int width);
4941 void SobelRow_Any_SSE2(const uint8_t* y_buf,
4942                        const uint8_t* uv_buf,
4943                        uint8_t* dst_ptr,
4944                        int width);
4945 void SobelRow_Any_NEON(const uint8_t* y_buf,
4946                        const uint8_t* uv_buf,
4947                        uint8_t* dst_ptr,
4948                        int width);
4949 void SobelRow_Any_MSA(const uint8_t* y_buf,
4950                       const uint8_t* uv_buf,
4951                       uint8_t* dst_ptr,
4952                       int width);
4953 void SobelRow_Any_MMI(const uint8_t* y_buf,
4954                       const uint8_t* uv_buf,
4955                       uint8_t* dst_ptr,
4956                       int width);
4957 void SobelToPlaneRow_Any_SSE2(const uint8_t* y_buf,
4958                               const uint8_t* uv_buf,
4959                               uint8_t* dst_ptr,
4960                               int width);
4961 void SobelToPlaneRow_Any_NEON(const uint8_t* y_buf,
4962                               const uint8_t* uv_buf,
4963                               uint8_t* dst_ptr,
4964                               int width);
4965 void SobelToPlaneRow_Any_MSA(const uint8_t* y_buf,
4966                              const uint8_t* uv_buf,
4967                              uint8_t* dst_ptr,
4968                              int width);
4969 void SobelToPlaneRow_Any_MMI(const uint8_t* y_buf,
4970                              const uint8_t* uv_buf,
4971                              uint8_t* dst_ptr,
4972                              int width);
4973 void SobelXYRow_Any_SSE2(const uint8_t* y_buf,
4974                          const uint8_t* uv_buf,
4975                          uint8_t* dst_ptr,
4976                          int width);
4977 void SobelXYRow_Any_NEON(const uint8_t* y_buf,
4978                          const uint8_t* uv_buf,
4979                          uint8_t* dst_ptr,
4980                          int width);
4981 void SobelXYRow_Any_MSA(const uint8_t* y_buf,
4982                         const uint8_t* uv_buf,
4983                         uint8_t* dst_ptr,
4984                         int width);
4985 void SobelXYRow_Any_MMI(const uint8_t* y_buf,
4986                         const uint8_t* uv_buf,
4987                         uint8_t* dst_ptr,
4988                         int width);
4989 
4990 void ARGBPolynomialRow_C(const uint8_t* src_argb,
4991                          uint8_t* dst_argb,
4992                          const float* poly,
4993                          int width);
4994 void ARGBPolynomialRow_SSE2(const uint8_t* src_argb,
4995                             uint8_t* dst_argb,
4996                             const float* poly,
4997                             int width);
4998 void ARGBPolynomialRow_AVX2(const uint8_t* src_argb,
4999                             uint8_t* dst_argb,
5000                             const float* poly,
5001                             int width);
5002 
5003 // Scale and convert to half float.
5004 void HalfFloatRow_C(const uint16_t* src, uint16_t* dst, float scale, int width);
5005 void HalfFloatRow_SSE2(const uint16_t* src,
5006                        uint16_t* dst,
5007                        float scale,
5008                        int width);
5009 void HalfFloatRow_Any_SSE2(const uint16_t* src_ptr,
5010                            uint16_t* dst_ptr,
5011                            float param,
5012                            int width);
5013 void HalfFloatRow_AVX2(const uint16_t* src,
5014                        uint16_t* dst,
5015                        float scale,
5016                        int width);
5017 void HalfFloatRow_Any_AVX2(const uint16_t* src_ptr,
5018                            uint16_t* dst_ptr,
5019                            float param,
5020                            int width);
5021 void HalfFloatRow_F16C(const uint16_t* src,
5022                        uint16_t* dst,
5023                        float scale,
5024                        int width);
5025 void HalfFloatRow_Any_F16C(const uint16_t* src,
5026                            uint16_t* dst,
5027                            float scale,
5028                            int width);
5029 void HalfFloat1Row_F16C(const uint16_t* src,
5030                         uint16_t* dst,
5031                         float scale,
5032                         int width);
5033 void HalfFloat1Row_Any_F16C(const uint16_t* src,
5034                             uint16_t* dst,
5035                             float scale,
5036                             int width);
5037 void HalfFloatRow_NEON(const uint16_t* src,
5038                        uint16_t* dst,
5039                        float scale,
5040                        int width);
5041 void HalfFloatRow_Any_NEON(const uint16_t* src_ptr,
5042                            uint16_t* dst_ptr,
5043                            float param,
5044                            int width);
5045 void HalfFloat1Row_NEON(const uint16_t* src,
5046                         uint16_t* dst,
5047                         float scale,
5048                         int width);
5049 void HalfFloat1Row_Any_NEON(const uint16_t* src_ptr,
5050                             uint16_t* dst_ptr,
5051                             float param,
5052                             int width);
5053 void HalfFloatRow_MSA(const uint16_t* src,
5054                       uint16_t* dst,
5055                       float scale,
5056                       int width);
5057 void HalfFloatRow_Any_MSA(const uint16_t* src_ptr,
5058                           uint16_t* dst_ptr,
5059                           float param,
5060                           int width);
5061 void ByteToFloatRow_C(const uint8_t* src, float* dst, float scale, int width);
5062 void ByteToFloatRow_NEON(const uint8_t* src,
5063                          float* dst,
5064                          float scale,
5065                          int width);
5066 void ByteToFloatRow_Any_NEON(const uint8_t* src_ptr,
5067                              float* dst_ptr,
5068                              float param,
5069                              int width);
5070 
5071 void ARGBLumaColorTableRow_C(const uint8_t* src_argb,
5072                              uint8_t* dst_argb,
5073                              int width,
5074                              const uint8_t* luma,
5075                              uint32_t lumacoeff);
5076 void ARGBLumaColorTableRow_SSSE3(const uint8_t* src_argb,
5077                                  uint8_t* dst_argb,
5078                                  int width,
5079                                  const uint8_t* luma,
5080                                  uint32_t lumacoeff);
5081 
5082 float ScaleMaxSamples_C(const float* src, float* dst, float scale, int width);
5083 float ScaleMaxSamples_NEON(const float* src,
5084                            float* dst,
5085                            float scale,
5086                            int width);
5087 float ScaleSumSamples_C(const float* src, float* dst, float scale, int width);
5088 float ScaleSumSamples_NEON(const float* src,
5089                            float* dst,
5090                            float scale,
5091                            int width);
5092 void ScaleSamples_C(const float* src, float* dst, float scale, int width);
5093 void ScaleSamples_NEON(const float* src, float* dst, float scale, int width);
5094 
5095 void I210ToARGBRow_MMI(const uint16_t* src_y,
5096                        const uint16_t* src_u,
5097                        const uint16_t* src_v,
5098                        uint8_t* rgb_buf,
5099                        const struct YuvConstants* yuvconstants,
5100                        int width);
5101 void I422ToRGBARow_MMI(const uint8_t* src_y,
5102                        const uint8_t* src_u,
5103                        const uint8_t* src_v,
5104                        uint8_t* dst_argb,
5105                        const struct YuvConstants* yuvconstants,
5106                        int width);
5107 void I422AlphaToARGBRow_MMI(const uint8_t* src_y,
5108                             const uint8_t* src_u,
5109                             const uint8_t* src_v,
5110                             const uint8_t* src_a,
5111                             uint8_t* dst_argb,
5112                             const struct YuvConstants* yuvconstants,
5113                             int width);
5114 void I422ToRGB24Row_MMI(const uint8_t* src_y,
5115                         const uint8_t* src_u,
5116                         const uint8_t* src_v,
5117                         uint8_t* dst_argb,
5118                         const struct YuvConstants* yuvconstants,
5119                         int width);
5120 void I422ToRGB565Row_MMI(const uint8_t* src_y,
5121                          const uint8_t* src_u,
5122                          const uint8_t* src_v,
5123                          uint8_t* dst_rgb565,
5124                          const struct YuvConstants* yuvconstants,
5125                          int width);
5126 void I422ToARGB4444Row_MMI(const uint8_t* src_y,
5127                            const uint8_t* src_u,
5128                            const uint8_t* src_v,
5129                            uint8_t* dst_argb4444,
5130                            const struct YuvConstants* yuvconstants,
5131                            int width);
5132 void I422ToARGB1555Row_MMI(const uint8_t* src_y,
5133                            const uint8_t* src_u,
5134                            const uint8_t* src_v,
5135                            uint8_t* dst_argb1555,
5136                            const struct YuvConstants* yuvconstants,
5137                            int width);
5138 void NV12ToARGBRow_MMI(const uint8_t* src_y,
5139                        const uint8_t* src_uv,
5140                        uint8_t* dst_argb,
5141                        const struct YuvConstants* yuvconstants,
5142                        int width);
5143 void NV12ToRGB565Row_MMI(const uint8_t* src_y,
5144                          const uint8_t* src_uv,
5145                          uint8_t* dst_rgb565,
5146                          const struct YuvConstants* yuvconstants,
5147                          int width);
5148 void NV21ToARGBRow_MMI(const uint8_t* src_y,
5149                        const uint8_t* src_vu,
5150                        uint8_t* dst_argb,
5151                        const struct YuvConstants* yuvconstants,
5152                        int width);
5153 void NV12ToRGB24Row_MMI(const uint8_t* src_y,
5154                         const uint8_t* src_uv,
5155                         uint8_t* dst_rgb24,
5156                         const struct YuvConstants* yuvconstants,
5157                         int width);
5158 void NV21ToRGB24Row_MMI(const uint8_t* src_y,
5159                         const uint8_t* src_vu,
5160                         uint8_t* dst_rgb24,
5161                         const struct YuvConstants* yuvconstants,
5162                         int width);
5163 void YUY2ToARGBRow_MMI(const uint8_t* src_yuy2,
5164                        uint8_t* dst_argb,
5165                        const struct YuvConstants* yuvconstants,
5166                        int width);
5167 void UYVYToARGBRow_MMI(const uint8_t* src_uyvy,
5168                        uint8_t* dst_argb,
5169                        const struct YuvConstants* yuvconstants,
5170                        int width);
5171 void I210ToARGBRow_Any_MMI(const uint16_t* y_buf,
5172                            const uint16_t* u_buf,
5173                            const uint16_t* v_buf,
5174                            uint8_t* dst_ptr,
5175                            const struct YuvConstants* yuvconstants,
5176                            int width);
5177 void I422ToRGBARow_Any_MMI(const uint8_t* y_buf,
5178                            const uint8_t* u_buf,
5179                            const uint8_t* v_buf,
5180                            uint8_t* dst_ptr,
5181                            const struct YuvConstants* yuvconstants,
5182                            int width);
5183 void I422AlphaToARGBRow_Any_MMI(const uint8_t* y_buf,
5184                                 const uint8_t* u_buf,
5185                                 const uint8_t* v_buf,
5186                                 const uint8_t* a_buf,
5187                                 uint8_t* dst_ptr,
5188                                 const struct YuvConstants* yuvconstants,
5189                                 int width);
5190 void I422ToRGB24Row_Any_MMI(const uint8_t* y_buf,
5191                             const uint8_t* u_buf,
5192                             const uint8_t* v_buf,
5193                             uint8_t* dst_ptr,
5194                             const struct YuvConstants* yuvconstants,
5195                             int width);
5196 void I422ToRGB565Row_Any_MMI(const uint8_t* y_buf,
5197                              const uint8_t* u_buf,
5198                              const uint8_t* v_buf,
5199                              uint8_t* dst_ptr,
5200                              const struct YuvConstants* yuvconstants,
5201                              int width);
5202 void I422ToARGB4444Row_Any_MMI(const uint8_t* y_buf,
5203                                const uint8_t* u_buf,
5204                                const uint8_t* v_buf,
5205                                uint8_t* dst_ptr,
5206                                const struct YuvConstants* yuvconstants,
5207                                int width);
5208 void I422ToARGB1555Row_Any_MMI(const uint8_t* y_buf,
5209                                const uint8_t* u_buf,
5210                                const uint8_t* v_buf,
5211                                uint8_t* dst_ptr,
5212                                const struct YuvConstants* yuvconstants,
5213                                int width);
5214 void NV12ToARGBRow_Any_MMI(const uint8_t* y_buf,
5215                            const uint8_t* uv_buf,
5216                            uint8_t* dst_ptr,
5217                            const struct YuvConstants* yuvconstants,
5218                            int width);
5219 void NV12ToRGB565Row_Any_MMI(const uint8_t* y_buf,
5220                              const uint8_t* uv_buf,
5221                              uint8_t* dst_ptr,
5222                              const struct YuvConstants* yuvconstants,
5223                              int width);
5224 void NV21ToARGBRow_Any_MMI(const uint8_t* y_buf,
5225                            const uint8_t* uv_buf,
5226                            uint8_t* dst_ptr,
5227                            const struct YuvConstants* yuvconstants,
5228                            int width);
5229 void NV12ToRGB24Row_Any_MMI(const uint8_t* y_buf,
5230                             const uint8_t* uv_buf,
5231                             uint8_t* dst_ptr,
5232                             const struct YuvConstants* yuvconstants,
5233                             int width);
5234 void NV21ToRGB24Row_Any_MMI(const uint8_t* y_buf,
5235                             const uint8_t* uv_buf,
5236                             uint8_t* dst_ptr,
5237                             const struct YuvConstants* yuvconstants,
5238                             int width);
5239 void YUY2ToARGBRow_Any_MMI(const uint8_t* src_ptr,
5240                            uint8_t* dst_ptr,
5241                            const struct YuvConstants* yuvconstants,
5242                            int width);
5243 void UYVYToARGBRow_Any_MMI(const uint8_t* src_ptr,
5244                            uint8_t* dst_ptr,
5245                            const struct YuvConstants* yuvconstants,
5246                            int width);
5247 
5248 void GaussRow_F32_NEON(const float* src, float* dst, int width);
5249 void GaussRow_F32_C(const float* src, float* dst, int width);
5250 
5251 void GaussCol_F32_NEON(const float* src0,
5252                        const float* src1,
5253                        const float* src2,
5254                        const float* src3,
5255                        const float* src4,
5256                        float* dst,
5257                        int width);
5258 
5259 void GaussCol_F32_C(const float* src0,
5260                     const float* src1,
5261                     const float* src2,
5262                     const float* src3,
5263                     const float* src4,
5264                     float* dst,
5265                     int width);
5266 
5267 #ifdef __cplusplus
5268 }  // extern "C"
5269 }  // namespace libyuv
5270 #endif
5271 
5272 #endif  // INCLUDE_LIBYUV_ROW_H_
5273