• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_I400TOARGBROW_SSE2
102 #define HAS_I422TOARGB1555ROW_SSSE3
103 #define HAS_I422TOARGB4444ROW_SSSE3
104 #define HAS_I422TOARGBROW_SSSE3
105 #define HAS_I422TORGB24ROW_SSSE3
106 #define HAS_I422TORGB565ROW_SSSE3
107 #define HAS_I422TORGBAROW_SSSE3
108 #define HAS_I422TOUYVYROW_SSE2
109 #define HAS_I422TOYUY2ROW_SSE2
110 #define HAS_I444TOARGBROW_SSSE3
111 #define HAS_J400TOARGBROW_SSE2
112 #define HAS_J422TOARGBROW_SSSE3
113 #define HAS_MERGEUVROW_SSE2
114 #define HAS_MIRRORROW_SSSE3
115 #define HAS_MIRRORUVROW_SSSE3
116 #define HAS_NV12TOARGBROW_SSSE3
117 #define HAS_NV12TORGB24ROW_SSSE3
118 #define HAS_NV12TORGB565ROW_SSSE3
119 #define HAS_NV21TOARGBROW_SSSE3
120 #define HAS_NV21TORGB24ROW_SSSE3
121 #define HAS_RAWTOARGBROW_SSSE3
122 #define HAS_RAWTORGB24ROW_SSSE3
123 #define HAS_RAWTOYROW_SSSE3
124 #define HAS_RGB24TOARGBROW_SSSE3
125 #define HAS_RGB24TOYROW_SSSE3
126 #define HAS_RGB565TOARGBROW_SSE2
127 #define HAS_RGBATOUVROW_SSSE3
128 #define HAS_RGBATOYROW_SSSE3
129 #define HAS_SETROW_ERMS
130 #define HAS_SETROW_X86
131 #define HAS_SPLITUVROW_SSE2
132 #define HAS_UYVYTOARGBROW_SSSE3
133 #define HAS_UYVYTOUV422ROW_SSE2
134 #define HAS_UYVYTOUVROW_SSE2
135 #define HAS_UYVYTOYROW_SSE2
136 #define HAS_YUY2TOARGBROW_SSSE3
137 #define HAS_YUY2TOUV422ROW_SSE2
138 #define HAS_YUY2TOUVROW_SSE2
139 #define HAS_YUY2TOYROW_SSE2
140 
141 // Effects:
142 #define HAS_ARGBADDROW_SSE2
143 #define HAS_ARGBAFFINEROW_SSE2
144 #define HAS_ARGBATTENUATEROW_SSSE3
145 #define HAS_ARGBBLENDROW_SSSE3
146 #define HAS_ARGBCOLORMATRIXROW_SSSE3
147 #define HAS_ARGBCOLORTABLEROW_X86
148 #define HAS_ARGBCOPYALPHAROW_SSE2
149 #define HAS_ARGBCOPYYTOALPHAROW_SSE2
150 #define HAS_ARGBGRAYROW_SSSE3
151 #define HAS_ARGBLUMACOLORTABLEROW_SSSE3
152 #define HAS_ARGBMIRRORROW_SSE2
153 #define HAS_ARGBMULTIPLYROW_SSE2
154 #define HAS_ARGBPOLYNOMIALROW_SSE2
155 #define HAS_ARGBQUANTIZEROW_SSE2
156 #define HAS_ARGBSEPIAROW_SSSE3
157 #define HAS_ARGBSHADEROW_SSE2
158 #define HAS_ARGBSUBTRACTROW_SSE2
159 #define HAS_ARGBUNATTENUATEROW_SSE2
160 #define HAS_BLENDPLANEROW_SSSE3
161 #define HAS_COMPUTECUMULATIVESUMROW_SSE2
162 #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
163 #define HAS_INTERPOLATEROW_SSSE3
164 #define HAS_RGBCOLORTABLEROW_X86
165 #define HAS_SOBELROW_SSE2
166 #define HAS_SOBELTOPLANEROW_SSE2
167 #define HAS_SOBELXROW_SSE2
168 #define HAS_SOBELXYROW_SSE2
169 #define HAS_SOBELYROW_SSE2
170 
171 // The following functions fail on gcc/clang 32 bit with fpic and framepointer.
172 // caveat: clangcl uses row_win.cc which works.
173 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
174     defined(_MSC_VER)
175 // TODO(fbarchard): fix build error on android_full_debug=1
176 // https://code.google.com/p/libyuv/issues/detail?id=517
177 #define HAS_I422ALPHATOARGBROW_SSSE3
178 #endif
179 #endif
180 
181 // The following are available on all x86 platforms, but
182 // require VS2012, clang 3.4 or gcc 4.7.
183 #if !defined(LIBYUV_DISABLE_X86) &&                          \
184     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \
185      defined(GCC_HAS_AVX2))
186 #define HAS_ARGBCOPYALPHAROW_AVX2
187 #define HAS_ARGBCOPYYTOALPHAROW_AVX2
188 #define HAS_ARGBEXTRACTALPHAROW_AVX2
189 #define HAS_ARGBMIRRORROW_AVX2
190 #define HAS_ARGBPOLYNOMIALROW_AVX2
191 #define HAS_ARGBSHUFFLEROW_AVX2
192 #define HAS_ARGBTORGB565DITHERROW_AVX2
193 #define HAS_ARGBTOUVJROW_AVX2
194 #define HAS_ARGBTOUVROW_AVX2
195 #define HAS_ARGBTOYJROW_AVX2
196 #define HAS_ARGBTOYROW_AVX2
197 #define HAS_COPYROW_AVX
198 #define HAS_H422TOARGBROW_AVX2
199 #define HAS_HALFFLOATROW_AVX2
200 //  #define HAS_HALFFLOATROW_F16C  // Enable to test halffloat cast
201 #define HAS_I400TOARGBROW_AVX2
202 #define HAS_I422TOARGB1555ROW_AVX2
203 #define HAS_I422TOARGB4444ROW_AVX2
204 #define HAS_I422TOARGBROW_AVX2
205 #define HAS_I422TORGB24ROW_AVX2
206 #define HAS_I422TORGB565ROW_AVX2
207 #define HAS_I422TORGBAROW_AVX2
208 #define HAS_I444TOARGBROW_AVX2
209 #define HAS_INTERPOLATEROW_AVX2
210 #define HAS_J422TOARGBROW_AVX2
211 #define HAS_MERGEUVROW_AVX2
212 #define HAS_MIRRORROW_AVX2
213 #define HAS_NV12TOARGBROW_AVX2
214 #define HAS_NV12TORGB24ROW_AVX2
215 #define HAS_NV12TORGB565ROW_AVX2
216 #define HAS_NV21TOARGBROW_AVX2
217 #define HAS_NV21TORGB24ROW_AVX2
218 #define HAS_SPLITUVROW_AVX2
219 #define HAS_UYVYTOARGBROW_AVX2
220 #define HAS_UYVYTOUV422ROW_AVX2
221 #define HAS_UYVYTOUVROW_AVX2
222 #define HAS_UYVYTOYROW_AVX2
223 #define HAS_YUY2TOARGBROW_AVX2
224 #define HAS_YUY2TOUV422ROW_AVX2
225 #define HAS_YUY2TOUVROW_AVX2
226 #define HAS_YUY2TOYROW_AVX2
227 
228 // Effects:
229 #define HAS_ARGBADDROW_AVX2
230 #define HAS_ARGBATTENUATEROW_AVX2
231 #define HAS_ARGBMULTIPLYROW_AVX2
232 #define HAS_ARGBSUBTRACTROW_AVX2
233 #define HAS_ARGBUNATTENUATEROW_AVX2
234 #define HAS_BLENDPLANEROW_AVX2
235 
236 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
237     defined(_MSC_VER)
238 // TODO(fbarchard): fix build error on android_full_debug=1
239 // https://code.google.com/p/libyuv/issues/detail?id=517
240 #define HAS_I422ALPHATOARGBROW_AVX2
241 #endif
242 #endif
243 
244 // The following are available for AVX2 Visual C and clangcl 32 bit:
245 // TODO(fbarchard): Port to gcc.
246 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
247     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
248 #define HAS_ARGB1555TOARGBROW_AVX2
249 #define HAS_ARGB4444TOARGBROW_AVX2
250 #define HAS_ARGBTOARGB1555ROW_AVX2
251 #define HAS_ARGBTOARGB4444ROW_AVX2
252 #define HAS_ARGBTORGB565ROW_AVX2
253 #define HAS_J400TOARGBROW_AVX2
254 #define HAS_RGB565TOARGBROW_AVX2
255 #endif
256 
257 // The following are also available on x64 Visual C.
258 #if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \
259     (!defined(__clang__) || defined(__SSSE3__))
260 #define HAS_I422ALPHATOARGBROW_SSSE3
261 #define HAS_I422TOARGBROW_SSSE3
262 #endif
263 
264 // The following are available for gcc/clang x86 platforms:
265 // TODO(fbarchard): Port to Visual C
266 #if !defined(LIBYUV_DISABLE_X86) && \
267     (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
268 #define HAS_ABGRTOAR30ROW_SSSE3
269 #define HAS_ARGBTOAR30ROW_SSSE3
270 #define HAS_CONVERT16TO8ROW_SSSE3
271 #define HAS_CONVERT8TO16ROW_SSE2
272 // I210 is for H010.  2 = 422.  I for 601 vs H for 709.
273 #define HAS_I210TOAR30ROW_SSSE3
274 #define HAS_I210TOARGBROW_SSSE3
275 #define HAS_I422TOAR30ROW_SSSE3
276 #define HAS_MERGERGBROW_SSSE3
277 #define HAS_SPLITRGBROW_SSSE3
278 #endif
279 
280 // The following are available for AVX2 gcc/clang x86 platforms:
281 // TODO(fbarchard): Port to Visual C
282 #if !defined(LIBYUV_DISABLE_X86) &&                                       \
283     (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \
284     (defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
285 #define HAS_ABGRTOAR30ROW_AVX2
286 #define HAS_ARGBTOAR30ROW_AVX2
287 #define HAS_ARGBTORAWROW_AVX2
288 #define HAS_ARGBTORGB24ROW_AVX2
289 #define HAS_CONVERT16TO8ROW_AVX2
290 #define HAS_CONVERT8TO16ROW_AVX2
291 #define HAS_I210TOAR30ROW_AVX2
292 #define HAS_I210TOARGBROW_AVX2
293 #define HAS_I422TOAR30ROW_AVX2
294 #define HAS_I422TOUYVYROW_AVX2
295 #define HAS_I422TOYUY2ROW_AVX2
296 #define HAS_MERGEUVROW_16_AVX2
297 #define HAS_MULTIPLYROW_16_AVX2
298 // TODO(fbarchard): Fix AVX2 version of YUV24
299 // #define HAS_NV21TOYUV24ROW_AVX2
300 #endif
301 
302 // The following are available for AVX512 clang x86 platforms:
303 // TODO(fbarchard): Port to GCC and Visual C
304 // TODO(fbarchard): re-enable HAS_ARGBTORGB24ROW_AVX512VBMI. Issue libyuv:789
305 #if !defined(LIBYUV_DISABLE_X86) &&                                       \
306     (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \
307     (defined(CLANG_HAS_AVX512))
308 #define HAS_ARGBTORGB24ROW_AVX512VBMI
309 #endif
310 
311 // The following are available on Neon platforms:
312 #if !defined(LIBYUV_DISABLE_NEON) && \
313     (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON))
314 #define HAS_ABGRTOUVROW_NEON
315 #define HAS_ABGRTOYROW_NEON
316 #define HAS_ARGB1555TOARGBROW_NEON
317 #define HAS_ARGB1555TOUVROW_NEON
318 #define HAS_ARGB1555TOYROW_NEON
319 #define HAS_ARGB4444TOARGBROW_NEON
320 #define HAS_ARGB4444TOUVROW_NEON
321 #define HAS_ARGB4444TOYROW_NEON
322 #define HAS_ARGBEXTRACTALPHAROW_NEON
323 #define HAS_ARGBSETROW_NEON
324 #define HAS_ARGBTOARGB1555ROW_NEON
325 #define HAS_ARGBTOARGB4444ROW_NEON
326 #define HAS_ARGBTORAWROW_NEON
327 #define HAS_ARGBTORGB24ROW_NEON
328 #define HAS_ARGBTORGB565DITHERROW_NEON
329 #define HAS_ARGBTORGB565ROW_NEON
330 #define HAS_ARGBTOUV444ROW_NEON
331 #define HAS_ARGBTOUVJROW_NEON
332 #define HAS_ARGBTOUVROW_NEON
333 #define HAS_ARGBTOYJROW_NEON
334 #define HAS_ARGBTOYROW_NEON
335 #define HAS_AYUVTOUVROW_NEON
336 #define HAS_AYUVTOVUROW_NEON
337 #define HAS_AYUVTOYROW_NEON
338 #define HAS_BGRATOUVROW_NEON
339 #define HAS_BGRATOYROW_NEON
340 #define HAS_BYTETOFLOATROW_NEON
341 #define HAS_COPYROW_NEON
342 #define HAS_HALFFLOATROW_NEON
343 #define HAS_I400TOARGBROW_NEON
344 #define HAS_I422ALPHATOARGBROW_NEON
345 #define HAS_I422TOARGB1555ROW_NEON
346 #define HAS_I422TOARGB4444ROW_NEON
347 #define HAS_I422TOARGBROW_NEON
348 #define HAS_I422TORGB24ROW_NEON
349 #define HAS_I422TORGB565ROW_NEON
350 #define HAS_I422TORGBAROW_NEON
351 #define HAS_I422TOUYVYROW_NEON
352 #define HAS_I422TOYUY2ROW_NEON
353 #define HAS_I444TOARGBROW_NEON
354 #define HAS_J400TOARGBROW_NEON
355 #define HAS_MERGEUVROW_NEON
356 #define HAS_MIRRORROW_NEON
357 #define HAS_MIRRORUVROW_NEON
358 #define HAS_NV12TOARGBROW_NEON
359 #define HAS_NV12TORGB24ROW_NEON
360 #define HAS_NV12TORGB565ROW_NEON
361 #define HAS_NV21TOARGBROW_NEON
362 #define HAS_NV21TORGB24ROW_NEON
363 #define HAS_NV21TOYUV24ROW_NEON
364 #define HAS_RAWTOARGBROW_NEON
365 #define HAS_RAWTORGB24ROW_NEON
366 #define HAS_RAWTOUVROW_NEON
367 #define HAS_RAWTOYROW_NEON
368 #define HAS_RGB24TOARGBROW_NEON
369 #define HAS_RGB24TOUVROW_NEON
370 #define HAS_RGB24TOYROW_NEON
371 #define HAS_RGB565TOARGBROW_NEON
372 #define HAS_RGB565TOUVROW_NEON
373 #define HAS_RGB565TOYROW_NEON
374 #define HAS_RGBATOUVROW_NEON
375 #define HAS_RGBATOYROW_NEON
376 #define HAS_SETROW_NEON
377 #define HAS_SPLITRGBROW_NEON
378 #define HAS_SPLITUVROW_NEON
379 #define HAS_UVToVUROW_NEON
380 #define HAS_UYVYTOARGBROW_NEON
381 #define HAS_UYVYTOUV422ROW_NEON
382 #define HAS_UYVYTOUVROW_NEON
383 #define HAS_UYVYTOYROW_NEON
384 #define HAS_YUY2TOARGBROW_NEON
385 #define HAS_YUY2TOUV422ROW_NEON
386 #define HAS_YUY2TOUVROW_NEON
387 #define HAS_YUY2TOYROW_NEON
388 
389 // Effects:
390 #define HAS_ARGBADDROW_NEON
391 #define HAS_ARGBATTENUATEROW_NEON
392 #define HAS_ARGBBLENDROW_NEON
393 #define HAS_ARGBCOLORMATRIXROW_NEON
394 #define HAS_ARGBGRAYROW_NEON
395 #define HAS_ARGBMIRRORROW_NEON
396 #define HAS_ARGBMULTIPLYROW_NEON
397 #define HAS_ARGBQUANTIZEROW_NEON
398 #define HAS_ARGBSEPIAROW_NEON
399 #define HAS_ARGBSHADEROW_NEON
400 #define HAS_ARGBSHUFFLEROW_NEON
401 #define HAS_ARGBSUBTRACTROW_NEON
402 #define HAS_INTERPOLATEROW_NEON
403 #define HAS_SOBELROW_NEON
404 #define HAS_SOBELTOPLANEROW_NEON
405 #define HAS_SOBELXROW_NEON
406 #define HAS_SOBELXYROW_NEON
407 #define HAS_SOBELYROW_NEON
408 #endif
409 
410 // The following are available on AArch64 platforms:
411 #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
412 #define HAS_FLOATDIVTOBYTEROW_NEON
413 #define HAS_SCALESUMSAMPLES_NEON
414 #endif
415 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
416 #define HAS_ABGRTOUVROW_MSA
417 #define HAS_ABGRTOYROW_MSA
418 #define HAS_ARGB1555TOARGBROW_MSA
419 #define HAS_ARGB1555TOUVROW_MSA
420 #define HAS_ARGB1555TOYROW_MSA
421 #define HAS_ARGB4444TOARGBROW_MSA
422 #define HAS_ARGBADDROW_MSA
423 #define HAS_ARGBATTENUATEROW_MSA
424 #define HAS_ARGBBLENDROW_MSA
425 #define HAS_ARGBCOLORMATRIXROW_MSA
426 #define HAS_ARGBEXTRACTALPHAROW_MSA
427 #define HAS_ARGBGRAYROW_MSA
428 #define HAS_ARGBMIRRORROW_MSA
429 #define HAS_ARGBMULTIPLYROW_MSA
430 #define HAS_ARGBQUANTIZEROW_MSA
431 #define HAS_ARGBSEPIAROW_MSA
432 #define HAS_ARGBSETROW_MSA
433 #define HAS_ARGBSHADEROW_MSA
434 #define HAS_ARGBSHUFFLEROW_MSA
435 #define HAS_ARGBSUBTRACTROW_MSA
436 #define HAS_ARGBTOARGB1555ROW_MSA
437 #define HAS_ARGBTOARGB4444ROW_MSA
438 #define HAS_ARGBTORAWROW_MSA
439 #define HAS_ARGBTORGB24ROW_MSA
440 #define HAS_ARGBTORGB565DITHERROW_MSA
441 #define HAS_ARGBTORGB565ROW_MSA
442 #define HAS_ARGBTOUV444ROW_MSA
443 #define HAS_ARGBTOUVJROW_MSA
444 #define HAS_ARGBTOUVROW_MSA
445 #define HAS_ARGBTOYJROW_MSA
446 #define HAS_ARGBTOYROW_MSA
447 #define HAS_BGRATOUVROW_MSA
448 #define HAS_BGRATOYROW_MSA
449 #define HAS_HALFFLOATROW_MSA
450 #define HAS_I400TOARGBROW_MSA
451 #define HAS_I422ALPHATOARGBROW_MSA
452 #define HAS_I422TOARGBROW_MSA
453 #define HAS_I422TORGB24ROW_MSA
454 #define HAS_I422TORGBAROW_MSA
455 #define HAS_I422TOUYVYROW_MSA
456 #define HAS_I422TOYUY2ROW_MSA
457 #define HAS_I444TOARGBROW_MSA
458 #define HAS_INTERPOLATEROW_MSA
459 #define HAS_J400TOARGBROW_MSA
460 #define HAS_MERGEUVROW_MSA
461 #define HAS_MIRRORROW_MSA
462 #define HAS_MIRRORUVROW_MSA
463 #define HAS_NV12TOARGBROW_MSA
464 #define HAS_NV12TORGB565ROW_MSA
465 #define HAS_NV21TOARGBROW_MSA
466 #define HAS_RAWTOARGBROW_MSA
467 #define HAS_RAWTORGB24ROW_MSA
468 #define HAS_RAWTOUVROW_MSA
469 #define HAS_RAWTOYROW_MSA
470 #define HAS_RGB24TOARGBROW_MSA
471 #define HAS_RGB24TOUVROW_MSA
472 #define HAS_RGB24TOYROW_MSA
473 #define HAS_RGB565TOARGBROW_MSA
474 #define HAS_RGB565TOUVROW_MSA
475 #define HAS_RGB565TOYROW_MSA
476 #define HAS_RGBATOUVROW_MSA
477 #define HAS_RGBATOYROW_MSA
478 #define HAS_SETROW_MSA
479 #define HAS_SOBELROW_MSA
480 #define HAS_SOBELTOPLANEROW_MSA
481 #define HAS_SOBELXROW_MSA
482 #define HAS_SOBELXYROW_MSA
483 #define HAS_SOBELYROW_MSA
484 #define HAS_SPLITUVROW_MSA
485 #define HAS_UYVYTOARGBROW_MSA
486 #define HAS_UYVYTOUVROW_MSA
487 #define HAS_UYVYTOYROW_MSA
488 #define HAS_YUY2TOARGBROW_MSA
489 #define HAS_YUY2TOUV422ROW_MSA
490 #define HAS_YUY2TOUVROW_MSA
491 #define HAS_YUY2TOYROW_MSA
492 #endif
493 
494 #if !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A)
495 #define HAS_ABGRTOUVROW_MMI
496 #define HAS_ABGRTOYROW_MMI
497 #define HAS_ARGB1555TOARGBROW_MMI
498 #define HAS_ARGB1555TOUVROW_MMI
499 #define HAS_ARGB1555TOYROW_MMI
500 #define HAS_ARGB4444TOARGBROW_MMI
501 #define HAS_ARGB4444TOUVROW_MMI
502 #define HAS_ARGB4444TOYROW_MMI
503 #define HAS_ARGBADDROW_MMI
504 #define HAS_ARGBATTENUATEROW_MMI
505 #define HAS_ARGBBLENDROW_MMI
506 #define HAS_ARGBCOLORMATRIXROW_MMI
507 #define HAS_ARGBCOPYALPHAROW_MMI
508 #define HAS_ARGBCOPYYTOALPHAROW_MMI
509 #define HAS_ARGBEXTRACTALPHAROW_MMI
510 #define HAS_ARGBGRAYROW_MMI
511 #define HAS_ARGBMIRRORROW_MMI
512 #define HAS_ARGBMULTIPLYROW_MMI
513 #define HAS_ARGBSEPIAROW_MMI
514 #define HAS_ARGBSHADEROW_MMI
515 #define HAS_ARGBSHUFFLEROW_MMI
516 #define HAS_ARGBSUBTRACTROW_MMI
517 #define HAS_ARGBTOARGB1555ROW_MMI
518 #define HAS_ARGBTOARGB4444ROW_MMI
519 #define HAS_ARGBTORAWROW_MMI
520 #define HAS_ARGBTORGB24ROW_MMI
521 #define HAS_ARGBTORGB565DITHERROW_MMI
522 #define HAS_ARGBTORGB565ROW_MMI
523 #define HAS_ARGBTOUV444ROW_MMI
524 #define HAS_ARGBTOUVJROW_MMI
525 #define HAS_ARGBTOUVROW_MMI
526 #define HAS_ARGBTOYJROW_MMI
527 #define HAS_ARGBTOYROW_MMI
528 #define HAS_BGRATOUVROW_MMI
529 #define HAS_BGRATOYROW_MMI
530 #define HAS_BLENDPLANEROW_MMI
531 #define HAS_COMPUTECUMULATIVESUMROW_MMI
532 #define HAS_CUMULATIVESUMTOAVERAGEROW_MMI
533 #define HAS_HALFFLOATROW_MMI
534 #define HAS_I400TOARGBROW_MMI
535 #define HAS_I422TOUYVYROW_MMI
536 #define HAS_I422TOYUY2ROW_MMI
537 #define HAS_INTERPOLATEROW_MMI
538 #define HAS_J400TOARGBROW_MMI
539 #define HAS_MERGERGBROW_MMI
540 #define HAS_MERGEUVROW_MMI
541 #define HAS_MIRRORROW_MMI
542 #define HAS_MIRRORUVROW_MMI
543 #define HAS_RAWTOARGBROW_MMI
544 #define HAS_RAWTORGB24ROW_MMI
545 #define HAS_RAWTOUVROW_MMI
546 #define HAS_RAWTOYROW_MMI
547 #define HAS_RGB24TOARGBROW_MMI
548 #define HAS_RGB24TOUVROW_MMI
549 #define HAS_RGB24TOYROW_MMI
550 #define HAS_RGB565TOARGBROW_MMI
551 #define HAS_RGB565TOUVROW_MMI
552 #define HAS_RGB565TOYROW_MMI
553 #define HAS_RGBATOUVROW_MMI
554 #define HAS_RGBATOYROW_MMI
555 #define HAS_SOBELROW_MMI
556 #define HAS_SOBELTOPLANEROW_MMI
557 #define HAS_SOBELXROW_MMI
558 #define HAS_SOBELXYROW_MMI
559 #define HAS_SOBELYROW_MMI
560 #define HAS_SPLITRGBROW_MMI
561 #define HAS_SPLITUVROW_MMI
562 #define HAS_UYVYTOUVROW_MMI
563 #define HAS_UYVYTOYROW_MMI
564 #define HAS_YUY2TOUV422ROW_MMI
565 #define HAS_YUY2TOUVROW_MMI
566 #define HAS_YUY2TOYROW_MMI
567 #endif
568 
569 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__)
570 #if defined(VISUALC_HAS_AVX2)
571 #define SIMD_ALIGNED(var) __declspec(align(32)) var
572 #else
573 #define SIMD_ALIGNED(var) __declspec(align(16)) var
574 #endif
575 typedef __declspec(align(16)) int16_t vec16[8];
576 typedef __declspec(align(16)) int32_t vec32[4];
577 typedef __declspec(align(16)) int8_t vec8[16];
578 typedef __declspec(align(16)) uint16_t uvec16[8];
579 typedef __declspec(align(16)) uint32_t uvec32[4];
580 typedef __declspec(align(16)) uint8_t uvec8[16];
581 typedef __declspec(align(32)) int16_t lvec16[16];
582 typedef __declspec(align(32)) int32_t lvec32[8];
583 typedef __declspec(align(32)) int8_t lvec8[32];
584 typedef __declspec(align(32)) uint16_t ulvec16[16];
585 typedef __declspec(align(32)) uint32_t ulvec32[8];
586 typedef __declspec(align(32)) uint8_t ulvec8[32];
587 #elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__))
588 // Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
589 #if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)
590 #define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
591 #else
592 #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
593 #endif
594 typedef int16_t __attribute__((vector_size(16))) vec16;
595 typedef int32_t __attribute__((vector_size(16))) vec32;
596 typedef int8_t __attribute__((vector_size(16))) vec8;
597 typedef uint16_t __attribute__((vector_size(16))) uvec16;
598 typedef uint32_t __attribute__((vector_size(16))) uvec32;
599 typedef uint8_t __attribute__((vector_size(16))) uvec8;
600 typedef int16_t __attribute__((vector_size(32))) lvec16;
601 typedef int32_t __attribute__((vector_size(32))) lvec32;
602 typedef int8_t __attribute__((vector_size(32))) lvec8;
603 typedef uint16_t __attribute__((vector_size(32))) ulvec16;
604 typedef uint32_t __attribute__((vector_size(32))) ulvec32;
605 typedef uint8_t __attribute__((vector_size(32))) ulvec8;
606 #else
607 #define SIMD_ALIGNED(var) var
608 typedef int16_t vec16[8];
609 typedef int32_t vec32[4];
610 typedef int8_t vec8[16];
611 typedef uint16_t uvec16[8];
612 typedef uint32_t uvec32[4];
613 typedef uint8_t uvec8[16];
614 typedef int16_t lvec16[16];
615 typedef int32_t lvec32[8];
616 typedef int8_t lvec8[32];
617 typedef uint16_t ulvec16[16];
618 typedef uint32_t ulvec32[8];
619 typedef uint8_t ulvec8[32];
620 #endif
621 
622 #if defined(__aarch64__)
623 // This struct is for Arm64 color conversion.
624 struct YuvConstants {
625   uvec16 kUVToRB;
626   uvec16 kUVToRB2;
627   uvec16 kUVToG;
628   uvec16 kUVToG2;
629   vec16 kUVBiasBGR;
630   vec32 kYToRgb;
631 };
632 #elif defined(__arm__)
633 // This struct is for ArmV7 color conversion.
634 struct YuvConstants {
635   uvec8 kUVToRB;
636   uvec8 kUVToG;
637   vec16 kUVBiasBGR;
638   vec32 kYToRgb;
639 };
640 #else
641 // This struct is for Intel color conversion.
642 struct YuvConstants {
643   int8_t kUVToB[32];
644   int8_t kUVToG[32];
645   int8_t kUVToR[32];
646   int16_t kUVBiasB[16];
647   int16_t kUVBiasG[16];
648   int16_t kUVBiasR[16];
649   int16_t kYToRgb[16];
650 };
651 
652 // Offsets into YuvConstants structure
653 #define KUVTOB 0
654 #define KUVTOG 32
655 #define KUVTOR 64
656 #define KUVBIASB 96
657 #define KUVBIASG 128
658 #define KUVBIASR 160
659 #define KYTORGB 192
660 #endif
661 
662 // Conversion matrix for YUV to RGB
663 extern const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants);  // BT.601
664 extern const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants);  // JPeg
665 extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants);  // BT.709
666 
667 // Conversion matrix for YVU to BGR
668 extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants);  // BT.601
669 extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants);  // JPeg
670 extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants);  // BT.709
671 
672 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
673 
674 #define align_buffer_64(var, size)                                           \
675   uint8_t* var##_mem = (uint8_t*)(malloc((size) + 63));         /* NOLINT */ \
676   uint8_t* var = (uint8_t*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */
677 
678 #define free_aligned_buffer_64(var) \
679   free(var##_mem);                  \
680   var = 0
681 
682 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__)
683 #define OMITFP
684 #else
685 #define OMITFP __attribute__((optimize("omit-frame-pointer")))
686 #endif
687 
688 // NaCL macros for GCC x86 and x64.
689 #if defined(__native_client__)
690 #define LABELALIGN ".p2align 5\n"
691 #else
692 #define LABELALIGN
693 #endif
694 
695 // Intel Code Analizer markers.  Insert IACA_START IACA_END around code to be
696 // measured and then run with iaca -64 libyuv_unittest.
697 // IACA_ASM_START amd IACA_ASM_END are equivalents that can be used within
698 // inline assembly blocks.
699 // example of iaca:
700 // ~/iaca-lin64/bin/iaca.sh -64 -analysis LATENCY out/Release/libyuv_unittest
701 
702 #if defined(__x86_64__) || defined(__i386__)
703 
704 #define IACA_ASM_START  \
705   ".byte 0x0F, 0x0B\n"  \
706   " movl $111, %%ebx\n" \
707   ".byte 0x64, 0x67, 0x90\n"
708 
709 #define IACA_ASM_END         \
710   " movl $222, %%ebx\n"      \
711   ".byte 0x64, 0x67, 0x90\n" \
712   ".byte 0x0F, 0x0B\n"
713 
714 #define IACA_SSC_MARK(MARK_ID)                        \
715   __asm__ __volatile__("\n\t  movl $" #MARK_ID        \
716                        ", %%ebx"                      \
717                        "\n\t  .byte 0x64, 0x67, 0x90" \
718                        :                              \
719                        :                              \
720                        : "memory");
721 
722 #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B");
723 
724 #else /* Visual C */
725 #define IACA_UD_BYTES \
726   { __asm _emit 0x0F __asm _emit 0x0B }
727 
728 #define IACA_SSC_MARK(x) \
729   { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 }
730 
731 #define IACA_VC64_START __writegsbyte(111, 111);
732 #define IACA_VC64_END __writegsbyte(222, 222);
733 #endif
734 
735 #define IACA_START     \
736   {                    \
737     IACA_UD_BYTES      \
738     IACA_SSC_MARK(111) \
739   }
740 #define IACA_END       \
741   {                    \
742     IACA_SSC_MARK(222) \
743     IACA_UD_BYTES      \
744   }
745 
746 void I444ToARGBRow_NEON(const uint8_t* src_y,
747                         const uint8_t* src_u,
748                         const uint8_t* src_v,
749                         uint8_t* dst_argb,
750                         const struct YuvConstants* yuvconstants,
751                         int width);
752 void I422ToARGBRow_NEON(const uint8_t* src_y,
753                         const uint8_t* src_u,
754                         const uint8_t* src_v,
755                         uint8_t* dst_argb,
756                         const struct YuvConstants* yuvconstants,
757                         int width);
758 void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
759                              const uint8_t* src_u,
760                              const uint8_t* src_v,
761                              const uint8_t* src_a,
762                              uint8_t* dst_argb,
763                              const struct YuvConstants* yuvconstants,
764                              int width);
765 void I422ToARGBRow_NEON(const uint8_t* src_y,
766                         const uint8_t* src_u,
767                         const uint8_t* src_v,
768                         uint8_t* dst_argb,
769                         const struct YuvConstants* yuvconstants,
770                         int width);
771 void I422ToRGBARow_NEON(const uint8_t* src_y,
772                         const uint8_t* src_u,
773                         const uint8_t* src_v,
774                         uint8_t* dst_rgba,
775                         const struct YuvConstants* yuvconstants,
776                         int width);
777 void I422ToRGB24Row_NEON(const uint8_t* src_y,
778                          const uint8_t* src_u,
779                          const uint8_t* src_v,
780                          uint8_t* dst_rgb24,
781                          const struct YuvConstants* yuvconstants,
782                          int width);
783 void I422ToRGB565Row_NEON(const uint8_t* src_y,
784                           const uint8_t* src_u,
785                           const uint8_t* src_v,
786                           uint8_t* dst_rgb565,
787                           const struct YuvConstants* yuvconstants,
788                           int width);
789 void I422ToARGB1555Row_NEON(const uint8_t* src_y,
790                             const uint8_t* src_u,
791                             const uint8_t* src_v,
792                             uint8_t* dst_argb1555,
793                             const struct YuvConstants* yuvconstants,
794                             int width);
795 void I422ToARGB4444Row_NEON(const uint8_t* src_y,
796                             const uint8_t* src_u,
797                             const uint8_t* src_v,
798                             uint8_t* dst_argb4444,
799                             const struct YuvConstants* yuvconstants,
800                             int width);
801 void NV12ToARGBRow_NEON(const uint8_t* src_y,
802                         const uint8_t* src_uv,
803                         uint8_t* dst_argb,
804                         const struct YuvConstants* yuvconstants,
805                         int width);
806 void NV12ToRGB565Row_NEON(const uint8_t* src_y,
807                           const uint8_t* src_uv,
808                           uint8_t* dst_rgb565,
809                           const struct YuvConstants* yuvconstants,
810                           int width);
811 void NV21ToARGBRow_NEON(const uint8_t* src_y,
812                         const uint8_t* src_vu,
813                         uint8_t* dst_argb,
814                         const struct YuvConstants* yuvconstants,
815                         int width);
816 void NV12ToRGB24Row_NEON(const uint8_t* src_y,
817                          const uint8_t* src_uv,
818                          uint8_t* dst_rgb24,
819                          const struct YuvConstants* yuvconstants,
820                          int width);
821 void NV21ToRGB24Row_NEON(const uint8_t* src_y,
822                          const uint8_t* src_vu,
823                          uint8_t* dst_rgb24,
824                          const struct YuvConstants* yuvconstants,
825                          int width);
826 void NV21ToYUV24Row_NEON(const uint8_t* src_y,
827                          const uint8_t* src_vu,
828                          uint8_t* dst_yuv24,
829                          int width);
830 void YUY2ToARGBRow_NEON(const uint8_t* src_yuy2,
831                         uint8_t* dst_argb,
832                         const struct YuvConstants* yuvconstants,
833                         int width);
834 void UYVYToARGBRow_NEON(const uint8_t* src_uyvy,
835                         uint8_t* dst_argb,
836                         const struct YuvConstants* yuvconstants,
837                         int width);
838 void I444ToARGBRow_MSA(const uint8_t* src_y,
839                        const uint8_t* src_u,
840                        const uint8_t* src_v,
841                        uint8_t* dst_argb,
842                        const struct YuvConstants* yuvconstants,
843                        int width);
844 
845 void I422ToARGBRow_MSA(const uint8_t* src_y,
846                        const uint8_t* src_u,
847                        const uint8_t* src_v,
848                        uint8_t* dst_argb,
849                        const struct YuvConstants* yuvconstants,
850                        int width);
851 void I422ToRGBARow_MSA(const uint8_t* src_y,
852                        const uint8_t* src_u,
853                        const uint8_t* src_v,
854                        uint8_t* dst_argb,
855                        const struct YuvConstants* yuvconstants,
856                        int width);
857 void I422AlphaToARGBRow_MSA(const uint8_t* src_y,
858                             const uint8_t* src_u,
859                             const uint8_t* src_v,
860                             const uint8_t* src_a,
861                             uint8_t* dst_argb,
862                             const struct YuvConstants* yuvconstants,
863                             int width);
864 void I422ToRGB24Row_MSA(const uint8_t* src_y,
865                         const uint8_t* src_u,
866                         const uint8_t* src_v,
867                         uint8_t* dst_argb,
868                         const struct YuvConstants* yuvconstants,
869                         int width);
870 void I422ToRGB565Row_MSA(const uint8_t* src_y,
871                          const uint8_t* src_u,
872                          const uint8_t* src_v,
873                          uint8_t* dst_rgb565,
874                          const struct YuvConstants* yuvconstants,
875                          int width);
876 void I422ToARGB4444Row_MSA(const uint8_t* src_y,
877                            const uint8_t* src_u,
878                            const uint8_t* src_v,
879                            uint8_t* dst_argb4444,
880                            const struct YuvConstants* yuvconstants,
881                            int width);
882 void I422ToARGB1555Row_MSA(const uint8_t* src_y,
883                            const uint8_t* src_u,
884                            const uint8_t* src_v,
885                            uint8_t* dst_argb1555,
886                            const struct YuvConstants* yuvconstants,
887                            int width);
888 void NV12ToARGBRow_MSA(const uint8_t* src_y,
889                        const uint8_t* src_uv,
890                        uint8_t* dst_argb,
891                        const struct YuvConstants* yuvconstants,
892                        int width);
893 void NV12ToRGB565Row_MSA(const uint8_t* src_y,
894                          const uint8_t* src_uv,
895                          uint8_t* dst_rgb565,
896                          const struct YuvConstants* yuvconstants,
897                          int width);
898 void NV21ToARGBRow_MSA(const uint8_t* src_y,
899                        const uint8_t* src_vu,
900                        uint8_t* dst_argb,
901                        const struct YuvConstants* yuvconstants,
902                        int width);
903 void YUY2ToARGBRow_MSA(const uint8_t* src_yuy2,
904                        uint8_t* dst_argb,
905                        const struct YuvConstants* yuvconstants,
906                        int width);
907 void UYVYToARGBRow_MSA(const uint8_t* src_uyvy,
908                        uint8_t* dst_argb,
909                        const struct YuvConstants* yuvconstants,
910                        int width);
911 
912 void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width);
913 void ARGBToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
914 void ARGBToYRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width);
915 void ARGBToYJRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width);
916 void ARGBToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
917 void ARGBToYJRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width);
918 void BGRAToYRow_SSSE3(const uint8_t* src_bgra, uint8_t* dst_y, int width);
919 void ABGRToYRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width);
920 void RGBAToYRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width);
921 void RGB24ToYRow_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
922 void RAWToYRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_y, int width);
923 void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width);
924 void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width);
925 void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
926 void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
927 void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
928 void ARGBToYJRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
929 void ARGBToUV444Row_NEON(const uint8_t* src_argb,
930                          uint8_t* dst_u,
931                          uint8_t* dst_v,
932                          int width);
933 void ARGBToUVRow_NEON(const uint8_t* src_argb,
934                       int src_stride_argb,
935                       uint8_t* dst_u,
936                       uint8_t* dst_v,
937                       int width);
938 void ARGBToUV444Row_MSA(const uint8_t* src_argb,
939                         uint8_t* dst_u,
940                         uint8_t* dst_v,
941                         int width);
942 void ARGBToUVRow_MSA(const uint8_t* src_argb0,
943                      int src_stride_argb,
944                      uint8_t* dst_u,
945                      uint8_t* dst_v,
946                      int width);
947 void ARGBToUV444Row_MMI(const uint8_t* src_argb,
948                         uint8_t* dst_u,
949                         uint8_t* dst_v,
950                         int width);
951 void ARGBToUVRow_MMI(const uint8_t* src_argb0,
952                      int src_stride_argb,
953                      uint8_t* dst_u,
954                      uint8_t* dst_v,
955                      int width);
956 void ARGBToUVJRow_NEON(const uint8_t* src_argb,
957                        int src_stride_argb,
958                        uint8_t* dst_u,
959                        uint8_t* dst_v,
960                        int width);
961 void BGRAToUVRow_NEON(const uint8_t* src_bgra,
962                       int src_stride_bgra,
963                       uint8_t* dst_u,
964                       uint8_t* dst_v,
965                       int width);
966 void ABGRToUVRow_NEON(const uint8_t* src_abgr,
967                       int src_stride_abgr,
968                       uint8_t* dst_u,
969                       uint8_t* dst_v,
970                       int width);
971 void RGBAToUVRow_NEON(const uint8_t* src_rgba,
972                       int src_stride_rgba,
973                       uint8_t* dst_u,
974                       uint8_t* dst_v,
975                       int width);
976 void RGB24ToUVRow_NEON(const uint8_t* src_rgb24,
977                        int src_stride_rgb24,
978                        uint8_t* dst_u,
979                        uint8_t* dst_v,
980                        int width);
981 void RAWToUVRow_NEON(const uint8_t* src_raw,
982                      int src_stride_raw,
983                      uint8_t* dst_u,
984                      uint8_t* dst_v,
985                      int width);
986 void RGB565ToUVRow_NEON(const uint8_t* src_rgb565,
987                         int src_stride_rgb565,
988                         uint8_t* dst_u,
989                         uint8_t* dst_v,
990                         int width);
991 void ARGB1555ToUVRow_NEON(const uint8_t* src_argb1555,
992                           int src_stride_argb1555,
993                           uint8_t* dst_u,
994                           uint8_t* dst_v,
995                           int width);
996 void ARGB4444ToUVRow_NEON(const uint8_t* src_argb4444,
997                           int src_stride_argb4444,
998                           uint8_t* dst_u,
999                           uint8_t* dst_v,
1000                           int width);
1001 void ARGBToUVJRow_MSA(const uint8_t* src_rgb0,
1002                       int src_stride_rgb,
1003                       uint8_t* dst_u,
1004                       uint8_t* dst_v,
1005                       int width);
1006 void BGRAToUVRow_MSA(const uint8_t* src_rgb0,
1007                      int src_stride_rgb,
1008                      uint8_t* dst_u,
1009                      uint8_t* dst_v,
1010                      int width);
1011 void ABGRToUVRow_MSA(const uint8_t* src_rgb0,
1012                      int src_stride_rgb,
1013                      uint8_t* dst_u,
1014                      uint8_t* dst_v,
1015                      int width);
1016 void RGBAToUVRow_MSA(const uint8_t* src_rgb0,
1017                      int src_stride_rgb,
1018                      uint8_t* dst_u,
1019                      uint8_t* dst_v,
1020                      int width);
1021 void RGB24ToUVRow_MSA(const uint8_t* src_rgb0,
1022                       int src_stride_rgb,
1023                       uint8_t* dst_u,
1024                       uint8_t* dst_v,
1025                       int width);
1026 void RAWToUVRow_MSA(const uint8_t* src_rgb0,
1027                     int src_stride_rgb,
1028                     uint8_t* dst_u,
1029                     uint8_t* dst_v,
1030                     int width);
1031 void RGB565ToUVRow_MSA(const uint8_t* src_rgb565,
1032                        int src_stride_rgb565,
1033                        uint8_t* dst_u,
1034                        uint8_t* dst_v,
1035                        int width);
1036 void ARGB1555ToUVRow_MSA(const uint8_t* src_argb1555,
1037                          int src_stride_argb1555,
1038                          uint8_t* dst_u,
1039                          uint8_t* dst_v,
1040                          int width);
1041 void ARGBToUVJRow_MMI(const uint8_t* src_rgb0,
1042                       int src_stride_rgb,
1043                       uint8_t* dst_u,
1044                       uint8_t* dst_v,
1045                       int width);
1046 void BGRAToUVRow_MMI(const uint8_t* src_rgb0,
1047                      int src_stride_rgb,
1048                      uint8_t* dst_u,
1049                      uint8_t* dst_v,
1050                      int width);
1051 void ABGRToUVRow_MMI(const uint8_t* src_rgb0,
1052                      int src_stride_rgb,
1053                      uint8_t* dst_u,
1054                      uint8_t* dst_v,
1055                      int width);
1056 void RGBAToUVRow_MMI(const uint8_t* src_rgb0,
1057                      int src_stride_rgb,
1058                      uint8_t* dst_u,
1059                      uint8_t* dst_v,
1060                      int width);
1061 void RGB24ToUVRow_MMI(const uint8_t* src_rgb0,
1062                       int src_stride_rgb,
1063                       uint8_t* dst_u,
1064                       uint8_t* dst_v,
1065                       int width);
1066 void RAWToUVRow_MMI(const uint8_t* src_rgb0,
1067                     int src_stride_rgb,
1068                     uint8_t* dst_u,
1069                     uint8_t* dst_v,
1070                     int width);
1071 void RGB565ToUVRow_MMI(const uint8_t* src_rgb565,
1072                        int src_stride_rgb565,
1073                        uint8_t* dst_u,
1074                        uint8_t* dst_v,
1075                        int width);
1076 void ARGB1555ToUVRow_MMI(const uint8_t* src_argb1555,
1077                          int src_stride_argb1555,
1078                          uint8_t* dst_u,
1079                          uint8_t* dst_v,
1080                          int width);
1081 void ARGB4444ToUVRow_MMI(const uint8_t* src_argb4444,
1082                          int src_stride_argb4444,
1083                          uint8_t* dst_u,
1084                          uint8_t* dst_v,
1085                          int width);
1086 void BGRAToYRow_NEON(const uint8_t* src_bgra, uint8_t* dst_y, int width);
1087 void ABGRToYRow_NEON(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1088 void RGBAToYRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1089 void RGB24ToYRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1090 void RAWToYRow_NEON(const uint8_t* src_raw, uint8_t* dst_y, int width);
1091 void RGB565ToYRow_NEON(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1092 void ARGB1555ToYRow_NEON(const uint8_t* src_argb1555,
1093                          uint8_t* dst_y,
1094                          int width);
1095 void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444,
1096                          uint8_t* dst_y,
1097                          int width);
1098 void BGRAToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1099 void ABGRToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1100 void RGBAToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1101 void RGB24ToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1102 void RAWToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1103 void RGB565ToYRow_MSA(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1104 void ARGB1555ToYRow_MSA(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1105 void BGRAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1106 void ABGRToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1107 void RGBAToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1108 void RGB24ToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1109 void RAWToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1110 void RGB565ToYRow_MMI(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1111 void ARGB1555ToYRow_MMI(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1112 void ARGB4444ToYRow_MMI(const uint8_t* src_argb4444, uint8_t* dst_y, int width);
1113 
1114 void ARGBToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1115 void ARGBToYJRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1116 void BGRAToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1117 void ABGRToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1118 void RGBAToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1119 void RGB24ToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1120 void RAWToYRow_C(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1121 void RGB565ToYRow_C(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1122 void ARGB1555ToYRow_C(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1123 void ARGB4444ToYRow_C(const uint8_t* src_argb4444, uint8_t* dst_y, int width);
1124 void ARGBToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1125 void ARGBToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1126 void BGRAToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1127 void ABGRToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1128 void RGBAToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1129 void RGB24ToYRow_Any_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1130 void RAWToYRow_Any_SSSE3(const uint8_t* src_raw, uint8_t* dst_y, int width);
1131 void ARGBToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1132 void ARGBToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1133 void BGRAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1134 void ABGRToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1135 void RGBAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1136 void RGB24ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1137 void RAWToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1138 void RGB565ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1139 void ARGB1555ToYRow_Any_NEON(const uint8_t* src_ptr,
1140                              uint8_t* dst_ptr,
1141                              int width);
1142 void ARGB4444ToYRow_Any_NEON(const uint8_t* src_ptr,
1143                              uint8_t* dst_ptr,
1144                              int width);
1145 void BGRAToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1146 void ABGRToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1147 void RGBAToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1148 void ARGBToYJRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1149 void ARGBToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1150 void RGB24ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1151 void RAWToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1152 void RGB565ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1153 void ARGB1555ToYRow_Any_MSA(const uint8_t* src_ptr,
1154                             uint8_t* dst_ptr,
1155                             int width);
1156 void BGRAToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1157 void ABGRToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1158 void RGBAToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1159 void ARGBToYJRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1160 void ARGBToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1161 void RGB24ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1162 void RAWToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1163 void RGB565ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1164 void ARGB1555ToYRow_Any_MMI(const uint8_t* src_ptr,
1165                             uint8_t* dst_ptr,
1166                             int width);
1167 void ARGB4444ToYRow_Any_MMI(const uint8_t* src_ptr,
1168                             uint8_t* dst_ptr,
1169                             int width);
1170 
1171 void ARGBToUVRow_AVX2(const uint8_t* src_argb0,
1172                       int src_stride_argb,
1173                       uint8_t* dst_u,
1174                       uint8_t* dst_v,
1175                       int width);
1176 void ARGBToUVJRow_AVX2(const uint8_t* src_argb0,
1177                        int src_stride_argb,
1178                        uint8_t* dst_u,
1179                        uint8_t* dst_v,
1180                        int width);
1181 void ARGBToUVRow_SSSE3(const uint8_t* src_argb0,
1182                        int src_stride_argb,
1183                        uint8_t* dst_u,
1184                        uint8_t* dst_v,
1185                        int width);
1186 void ARGBToUVJRow_SSSE3(const uint8_t* src_argb0,
1187                         int src_stride_argb,
1188                         uint8_t* dst_u,
1189                         uint8_t* dst_v,
1190                         int width);
1191 void BGRAToUVRow_SSSE3(const uint8_t* src_bgra0,
1192                        int src_stride_bgra,
1193                        uint8_t* dst_u,
1194                        uint8_t* dst_v,
1195                        int width);
1196 void ABGRToUVRow_SSSE3(const uint8_t* src_abgr0,
1197                        int src_stride_abgr,
1198                        uint8_t* dst_u,
1199                        uint8_t* dst_v,
1200                        int width);
1201 void RGBAToUVRow_SSSE3(const uint8_t* src_rgba0,
1202                        int src_stride_rgba,
1203                        uint8_t* dst_u,
1204                        uint8_t* dst_v,
1205                        int width);
1206 void ARGBToUVRow_Any_AVX2(const uint8_t* src_ptr,
1207                           int src_stride_ptr,
1208                           uint8_t* dst_u,
1209                           uint8_t* dst_v,
1210                           int width);
1211 void ARGBToUVJRow_Any_AVX2(const uint8_t* src_ptr,
1212                            int src_stride_ptr,
1213                            uint8_t* dst_u,
1214                            uint8_t* dst_v,
1215                            int width);
1216 void ARGBToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1217                            int src_stride_ptr,
1218                            uint8_t* dst_u,
1219                            uint8_t* dst_v,
1220                            int width);
1221 void ARGBToUVJRow_Any_SSSE3(const uint8_t* src_ptr,
1222                             int src_stride_ptr,
1223                             uint8_t* dst_u,
1224                             uint8_t* dst_v,
1225                             int width);
1226 void BGRAToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1227                            int src_stride_ptr,
1228                            uint8_t* dst_u,
1229                            uint8_t* dst_v,
1230                            int width);
1231 void ABGRToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1232                            int src_stride_ptr,
1233                            uint8_t* dst_u,
1234                            uint8_t* dst_v,
1235                            int width);
1236 void RGBAToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1237                            int src_stride_ptr,
1238                            uint8_t* dst_u,
1239                            uint8_t* dst_v,
1240                            int width);
1241 void ARGBToUV444Row_Any_NEON(const uint8_t* src_ptr,
1242                              uint8_t* dst_u,
1243                              uint8_t* dst_v,
1244                              int width);
1245 void ARGBToUVRow_Any_NEON(const uint8_t* src_ptr,
1246                           int src_stride_ptr,
1247                           uint8_t* dst_u,
1248                           uint8_t* dst_v,
1249                           int width);
1250 void ARGBToUV444Row_Any_MSA(const uint8_t* src_ptr,
1251                             uint8_t* dst_u,
1252                             uint8_t* dst_v,
1253                             int width);
1254 void ARGBToUVRow_Any_MSA(const uint8_t* src_ptr,
1255                          int src_stride_ptr,
1256                          uint8_t* dst_u,
1257                          uint8_t* dst_v,
1258                          int width);
1259 void ARGBToUV444Row_Any_MMI(const uint8_t* src_ptr,
1260                             uint8_t* dst_u,
1261                             uint8_t* dst_v,
1262                             int width);
1263 void ARGBToUVRow_Any_MMI(const uint8_t* src_ptr,
1264                          int src_stride_ptr,
1265                          uint8_t* dst_u,
1266                          uint8_t* dst_v,
1267                          int width);
1268 void ARGBToUVJRow_Any_NEON(const uint8_t* src_ptr,
1269                            int src_stride_ptr,
1270                            uint8_t* dst_u,
1271                            uint8_t* dst_v,
1272                            int width);
1273 void BGRAToUVRow_Any_NEON(const uint8_t* src_ptr,
1274                           int src_stride_ptr,
1275                           uint8_t* dst_u,
1276                           uint8_t* dst_v,
1277                           int width);
1278 void ABGRToUVRow_Any_NEON(const uint8_t* src_ptr,
1279                           int src_stride_ptr,
1280                           uint8_t* dst_u,
1281                           uint8_t* dst_v,
1282                           int width);
1283 void RGBAToUVRow_Any_NEON(const uint8_t* src_ptr,
1284                           int src_stride_ptr,
1285                           uint8_t* dst_u,
1286                           uint8_t* dst_v,
1287                           int width);
1288 void RGB24ToUVRow_Any_NEON(const uint8_t* src_ptr,
1289                            int src_stride_ptr,
1290                            uint8_t* dst_u,
1291                            uint8_t* dst_v,
1292                            int width);
1293 void RAWToUVRow_Any_NEON(const uint8_t* src_ptr,
1294                          int src_stride_ptr,
1295                          uint8_t* dst_u,
1296                          uint8_t* dst_v,
1297                          int width);
1298 void RGB565ToUVRow_Any_NEON(const uint8_t* src_ptr,
1299                             int src_stride_ptr,
1300                             uint8_t* dst_u,
1301                             uint8_t* dst_v,
1302                             int width);
1303 void ARGB1555ToUVRow_Any_NEON(const uint8_t* src_ptr,
1304                               int src_stride_ptr,
1305                               uint8_t* dst_u,
1306                               uint8_t* dst_v,
1307                               int width);
1308 void ARGB4444ToUVRow_Any_NEON(const uint8_t* src_ptr,
1309                               int src_stride_ptr,
1310                               uint8_t* dst_u,
1311                               uint8_t* dst_v,
1312                               int width);
1313 void ARGBToUVJRow_Any_MSA(const uint8_t* src_ptr,
1314                           int src_stride_ptr,
1315                           uint8_t* dst_u,
1316                           uint8_t* dst_v,
1317                           int width);
1318 void BGRAToUVRow_Any_MSA(const uint8_t* src_ptr,
1319                          int src_stride_ptr,
1320                          uint8_t* dst_u,
1321                          uint8_t* dst_v,
1322                          int width);
1323 void ABGRToUVRow_Any_MSA(const uint8_t* src_ptr,
1324                          int src_stride_ptr,
1325                          uint8_t* dst_u,
1326                          uint8_t* dst_v,
1327                          int width);
1328 void RGBAToUVRow_Any_MSA(const uint8_t* src_ptr,
1329                          int src_stride_ptr,
1330                          uint8_t* dst_u,
1331                          uint8_t* dst_v,
1332                          int width);
1333 void RGB24ToUVRow_Any_MSA(const uint8_t* src_ptr,
1334                           int src_stride_ptr,
1335                           uint8_t* dst_u,
1336                           uint8_t* dst_v,
1337                           int width);
1338 void RAWToUVRow_Any_MSA(const uint8_t* src_ptr,
1339                         int src_stride_ptr,
1340                         uint8_t* dst_u,
1341                         uint8_t* dst_v,
1342                         int width);
1343 void RGB565ToUVRow_Any_MSA(const uint8_t* src_ptr,
1344                            int src_stride_ptr,
1345                            uint8_t* dst_u,
1346                            uint8_t* dst_v,
1347                            int width);
1348 void ARGB1555ToUVRow_Any_MSA(const uint8_t* src_ptr,
1349                              int src_stride_ptr,
1350                              uint8_t* dst_u,
1351                              uint8_t* dst_v,
1352                              int width);
1353 void ARGBToUVJRow_Any_MMI(const uint8_t* src_ptr,
1354                           int src_stride_ptr,
1355                           uint8_t* dst_u,
1356                           uint8_t* dst_v,
1357                           int width);
1358 void BGRAToUVRow_Any_MMI(const uint8_t* src_ptr,
1359                          int src_stride_ptr,
1360                          uint8_t* dst_u,
1361                          uint8_t* dst_v,
1362                          int width);
1363 void ABGRToUVRow_Any_MMI(const uint8_t* src_ptr,
1364                          int src_stride_ptr,
1365                          uint8_t* dst_u,
1366                          uint8_t* dst_v,
1367                          int width);
1368 void RGBAToUVRow_Any_MMI(const uint8_t* src_ptr,
1369                          int src_stride_ptr,
1370                          uint8_t* dst_u,
1371                          uint8_t* dst_v,
1372                          int width);
1373 void RGB24ToUVRow_Any_MMI(const uint8_t* src_ptr,
1374                           int src_stride_ptr,
1375                           uint8_t* dst_u,
1376                           uint8_t* dst_v,
1377                           int width);
1378 void RAWToUVRow_Any_MMI(const uint8_t* src_ptr,
1379                         int src_stride_ptr,
1380                         uint8_t* dst_u,
1381                         uint8_t* dst_v,
1382                         int width);
1383 void RGB565ToUVRow_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 ARGB1555ToUVRow_Any_MMI(const uint8_t* src_ptr,
1389                              int src_stride_ptr,
1390                              uint8_t* dst_u,
1391                              uint8_t* dst_v,
1392                              int width);
1393 void ARGB4444ToUVRow_Any_MMI(const uint8_t* src_ptr,
1394                              int src_stride_ptr,
1395                              uint8_t* dst_u,
1396                              uint8_t* dst_v,
1397                              int width);
1398 void ARGBToUVRow_C(const uint8_t* src_rgb0,
1399                    int src_stride_rgb,
1400                    uint8_t* dst_u,
1401                    uint8_t* dst_v,
1402                    int width);
1403 void ARGBToUVJRow_C(const uint8_t* src_rgb0,
1404                     int src_stride_rgb,
1405                     uint8_t* dst_u,
1406                     uint8_t* dst_v,
1407                     int width);
1408 void ARGBToUVRow_C(const uint8_t* src_rgb0,
1409                    int src_stride_rgb,
1410                    uint8_t* dst_u,
1411                    uint8_t* dst_v,
1412                    int width);
1413 void ARGBToUVJRow_C(const uint8_t* src_rgb0,
1414                     int src_stride_rgb,
1415                     uint8_t* dst_u,
1416                     uint8_t* dst_v,
1417                     int width);
1418 void BGRAToUVRow_C(const uint8_t* src_rgb0,
1419                    int src_stride_rgb,
1420                    uint8_t* dst_u,
1421                    uint8_t* dst_v,
1422                    int width);
1423 void ABGRToUVRow_C(const uint8_t* src_rgb0,
1424                    int src_stride_rgb,
1425                    uint8_t* dst_u,
1426                    uint8_t* dst_v,
1427                    int width);
1428 void RGBAToUVRow_C(const uint8_t* src_rgb0,
1429                    int src_stride_rgb,
1430                    uint8_t* dst_u,
1431                    uint8_t* dst_v,
1432                    int width);
1433 void RGB24ToUVRow_C(const uint8_t* src_rgb0,
1434                     int src_stride_rgb,
1435                     uint8_t* dst_u,
1436                     uint8_t* dst_v,
1437                     int width);
1438 void RAWToUVRow_C(const uint8_t* src_rgb0,
1439                   int src_stride_rgb,
1440                   uint8_t* dst_u,
1441                   uint8_t* dst_v,
1442                   int width);
1443 void RGB565ToUVRow_C(const uint8_t* src_rgb565,
1444                      int src_stride_rgb565,
1445                      uint8_t* dst_u,
1446                      uint8_t* dst_v,
1447                      int width);
1448 void ARGB1555ToUVRow_C(const uint8_t* src_argb1555,
1449                        int src_stride_argb1555,
1450                        uint8_t* dst_u,
1451                        uint8_t* dst_v,
1452                        int width);
1453 void ARGB4444ToUVRow_C(const uint8_t* src_argb4444,
1454                        int src_stride_argb4444,
1455                        uint8_t* dst_u,
1456                        uint8_t* dst_v,
1457                        int width);
1458 
1459 void ARGBToUV444Row_SSSE3(const uint8_t* src_argb,
1460                           uint8_t* dst_u,
1461                           uint8_t* dst_v,
1462                           int width);
1463 void ARGBToUV444Row_Any_SSSE3(const uint8_t* src_ptr,
1464                               uint8_t* dst_u,
1465                               uint8_t* dst_v,
1466                               int width);
1467 
1468 void ARGBToUV444Row_C(const uint8_t* src_argb,
1469                       uint8_t* dst_u,
1470                       uint8_t* dst_v,
1471                       int width);
1472 
1473 void MirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
1474 void MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width);
1475 void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width);
1476 void MirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width);
1477 void MirrorRow_MMI(const uint8_t* src, uint8_t* dst, int width);
1478 void MirrorRow_C(const uint8_t* src, uint8_t* dst, int width);
1479 void MirrorRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1480 void MirrorRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1481 void MirrorRow_Any_SSE2(const uint8_t* src, uint8_t* dst, int width);
1482 void MirrorRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1483 void MirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1484 void MirrorRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1485 
1486 void MirrorUVRow_SSSE3(const uint8_t* src,
1487                        uint8_t* dst_u,
1488                        uint8_t* dst_v,
1489                        int width);
1490 void MirrorUVRow_NEON(const uint8_t* src_uv,
1491                       uint8_t* dst_u,
1492                       uint8_t* dst_v,
1493                       int width);
1494 void MirrorUVRow_MSA(const uint8_t* src_uv,
1495                      uint8_t* dst_u,
1496                      uint8_t* dst_v,
1497                      int width);
1498 void MirrorUVRow_MMI(const uint8_t* src_uv,
1499                      uint8_t* dst_u,
1500                      uint8_t* dst_v,
1501                      int width);
1502 void MirrorUVRow_C(const uint8_t* src_uv,
1503                    uint8_t* dst_u,
1504                    uint8_t* dst_v,
1505                    int width);
1506 
1507 void ARGBMirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
1508 void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
1509 void ARGBMirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width);
1510 void ARGBMirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width);
1511 void ARGBMirrorRow_MMI(const uint8_t* src, uint8_t* dst, int width);
1512 void ARGBMirrorRow_C(const uint8_t* src, uint8_t* dst, int width);
1513 void ARGBMirrorRow_Any_AVX2(const uint8_t* src_ptr,
1514                             uint8_t* dst_ptr,
1515                             int width);
1516 void ARGBMirrorRow_Any_SSE2(const uint8_t* src_ptr,
1517                             uint8_t* dst_ptr,
1518                             int width);
1519 void ARGBMirrorRow_Any_NEON(const uint8_t* src_ptr,
1520                             uint8_t* dst_ptr,
1521                             int width);
1522 void ARGBMirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1523 void ARGBMirrorRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1524 
1525 void SplitUVRow_C(const uint8_t* src_uv,
1526                   uint8_t* dst_u,
1527                   uint8_t* dst_v,
1528                   int width);
1529 void SplitUVRow_SSE2(const uint8_t* src_uv,
1530                      uint8_t* dst_u,
1531                      uint8_t* dst_v,
1532                      int width);
1533 void SplitUVRow_AVX2(const uint8_t* src_uv,
1534                      uint8_t* dst_u,
1535                      uint8_t* dst_v,
1536                      int width);
1537 void SplitUVRow_NEON(const uint8_t* src_uv,
1538                      uint8_t* dst_u,
1539                      uint8_t* dst_v,
1540                      int width);
1541 void SplitUVRow_MSA(const uint8_t* src_uv,
1542                     uint8_t* dst_u,
1543                     uint8_t* dst_v,
1544                     int width);
1545 void SplitUVRow_MMI(const uint8_t* src_uv,
1546                     uint8_t* dst_u,
1547                     uint8_t* dst_v,
1548                     int width);
1549 void SplitUVRow_Any_SSE2(const uint8_t* src_ptr,
1550                          uint8_t* dst_u,
1551                          uint8_t* dst_v,
1552                          int width);
1553 void SplitUVRow_Any_AVX2(const uint8_t* src_ptr,
1554                          uint8_t* dst_u,
1555                          uint8_t* dst_v,
1556                          int width);
1557 void SplitUVRow_Any_NEON(const uint8_t* src_ptr,
1558                          uint8_t* dst_u,
1559                          uint8_t* dst_v,
1560                          int width);
1561 void SplitUVRow_Any_MSA(const uint8_t* src_ptr,
1562                         uint8_t* dst_u,
1563                         uint8_t* dst_v,
1564                         int width);
1565 void SplitUVRow_Any_MMI(const uint8_t* src_ptr,
1566                         uint8_t* dst_u,
1567                         uint8_t* dst_v,
1568                         int width);
1569 
1570 void MergeUVRow_C(const uint8_t* src_u,
1571                   const uint8_t* src_v,
1572                   uint8_t* dst_uv,
1573                   int width);
1574 void MergeUVRow_SSE2(const uint8_t* src_u,
1575                      const uint8_t* src_v,
1576                      uint8_t* dst_uv,
1577                      int width);
1578 void MergeUVRow_AVX2(const uint8_t* src_u,
1579                      const uint8_t* src_v,
1580                      uint8_t* dst_uv,
1581                      int width);
1582 void MergeUVRow_NEON(const uint8_t* src_u,
1583                      const uint8_t* src_v,
1584                      uint8_t* dst_uv,
1585                      int width);
1586 void MergeUVRow_MSA(const uint8_t* src_u,
1587                     const uint8_t* src_v,
1588                     uint8_t* dst_uv,
1589                     int width);
1590 void MergeUVRow_MMI(const uint8_t* src_u,
1591                     const uint8_t* src_v,
1592                     uint8_t* dst_uv,
1593                     int width);
1594 void MergeUVRow_Any_SSE2(const uint8_t* y_buf,
1595                          const uint8_t* uv_buf,
1596                          uint8_t* dst_ptr,
1597                          int width);
1598 void MergeUVRow_Any_AVX2(const uint8_t* y_buf,
1599                          const uint8_t* uv_buf,
1600                          uint8_t* dst_ptr,
1601                          int width);
1602 void MergeUVRow_Any_NEON(const uint8_t* y_buf,
1603                          const uint8_t* uv_buf,
1604                          uint8_t* dst_ptr,
1605                          int width);
1606 void MergeUVRow_Any_MSA(const uint8_t* y_buf,
1607                         const uint8_t* uv_buf,
1608                         uint8_t* dst_ptr,
1609                         int width);
1610 void MergeUVRow_Any_MMI(const uint8_t* y_buf,
1611                         const uint8_t* uv_buf,
1612                         uint8_t* dst_ptr,
1613                         int width);
1614 
1615 void SplitRGBRow_C(const uint8_t* src_rgb,
1616                    uint8_t* dst_r,
1617                    uint8_t* dst_g,
1618                    uint8_t* dst_b,
1619                    int width);
1620 void SplitRGBRow_SSSE3(const uint8_t* src_rgb,
1621                        uint8_t* dst_r,
1622                        uint8_t* dst_g,
1623                        uint8_t* dst_b,
1624                        int width);
1625 void SplitRGBRow_NEON(const uint8_t* src_rgb,
1626                       uint8_t* dst_r,
1627                       uint8_t* dst_g,
1628                       uint8_t* dst_b,
1629                       int width);
1630 void SplitRGBRow_MMI(const uint8_t* src_rgb,
1631                      uint8_t* dst_r,
1632                      uint8_t* dst_g,
1633                      uint8_t* dst_b,
1634                      int width);
1635 void SplitRGBRow_Any_SSSE3(const uint8_t* src_ptr,
1636                            uint8_t* dst_r,
1637                            uint8_t* dst_g,
1638                            uint8_t* dst_b,
1639                            int width);
1640 void SplitRGBRow_Any_NEON(const uint8_t* src_ptr,
1641                           uint8_t* dst_r,
1642                           uint8_t* dst_g,
1643                           uint8_t* dst_b,
1644                           int width);
1645 void SplitRGBRow_Any_MMI(const uint8_t* src_ptr,
1646                          uint8_t* dst_r,
1647                          uint8_t* dst_g,
1648                          uint8_t* dst_b,
1649                          int width);
1650 
1651 void MergeRGBRow_C(const uint8_t* src_r,
1652                    const uint8_t* src_g,
1653                    const uint8_t* src_b,
1654                    uint8_t* dst_rgb,
1655                    int width);
1656 void MergeRGBRow_SSSE3(const uint8_t* src_r,
1657                        const uint8_t* src_g,
1658                        const uint8_t* src_b,
1659                        uint8_t* dst_rgb,
1660                        int width);
1661 void MergeRGBRow_NEON(const uint8_t* src_r,
1662                       const uint8_t* src_g,
1663                       const uint8_t* src_b,
1664                       uint8_t* dst_rgb,
1665                       int width);
1666 void MergeRGBRow_MMI(const uint8_t* src_r,
1667                      const uint8_t* src_g,
1668                      const uint8_t* src_b,
1669                      uint8_t* dst_rgb,
1670                      int width);
1671 void MergeRGBRow_Any_SSSE3(const uint8_t* y_buf,
1672                            const uint8_t* u_buf,
1673                            const uint8_t* v_buf,
1674                            uint8_t* dst_ptr,
1675                            int width);
1676 void MergeRGBRow_Any_NEON(const uint8_t* src_r,
1677                           const uint8_t* src_g,
1678                           const uint8_t* src_b,
1679                           uint8_t* dst_rgb,
1680                           int width);
1681 void MergeRGBRow_Any_MMI(const uint8_t* src_r,
1682                          const uint8_t* src_g,
1683                          const uint8_t* src_b,
1684                          uint8_t* dst_rgb,
1685                          int width);
1686 
1687 void MergeUVRow_16_C(const uint16_t* src_u,
1688                      const uint16_t* src_v,
1689                      uint16_t* dst_uv,
1690                      int scale, /* 64 for 10 bit */
1691                      int width);
1692 void MergeUVRow_16_AVX2(const uint16_t* src_u,
1693                         const uint16_t* src_v,
1694                         uint16_t* dst_uv,
1695                         int scale,
1696                         int width);
1697 
1698 void MultiplyRow_16_AVX2(const uint16_t* src_y,
1699                          uint16_t* dst_y,
1700                          int scale,
1701                          int width);
1702 void MultiplyRow_16_C(const uint16_t* src_y,
1703                       uint16_t* dst_y,
1704                       int scale,
1705                       int width);
1706 
1707 void Convert8To16Row_C(const uint8_t* src_y,
1708                        uint16_t* dst_y,
1709                        int scale,
1710                        int width);
1711 void Convert8To16Row_SSE2(const uint8_t* src_y,
1712                           uint16_t* dst_y,
1713                           int scale,
1714                           int width);
1715 void Convert8To16Row_AVX2(const uint8_t* src_y,
1716                           uint16_t* dst_y,
1717                           int scale,
1718                           int width);
1719 void Convert8To16Row_Any_SSE2(const uint8_t* src_ptr,
1720                               uint16_t* dst_ptr,
1721                               int scale,
1722                               int width);
1723 void Convert8To16Row_Any_AVX2(const uint8_t* src_ptr,
1724                               uint16_t* dst_ptr,
1725                               int scale,
1726                               int width);
1727 
1728 void Convert16To8Row_C(const uint16_t* src_y,
1729                        uint8_t* dst_y,
1730                        int scale,
1731                        int width);
1732 void Convert16To8Row_SSSE3(const uint16_t* src_y,
1733                            uint8_t* dst_y,
1734                            int scale,
1735                            int width);
1736 void Convert16To8Row_AVX2(const uint16_t* src_y,
1737                           uint8_t* dst_y,
1738                           int scale,
1739                           int width);
1740 void Convert16To8Row_Any_SSSE3(const uint16_t* src_ptr,
1741                                uint8_t* dst_ptr,
1742                                int scale,
1743                                int width);
1744 void Convert16To8Row_Any_AVX2(const uint16_t* src_ptr,
1745                               uint8_t* dst_ptr,
1746                               int scale,
1747                               int width);
1748 
1749 void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
1750 void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width);
1751 void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width);
1752 void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width);
1753 void CopyRow_MIPS(const uint8_t* src, uint8_t* dst, int count);
1754 void CopyRow_C(const uint8_t* src, uint8_t* dst, int count);
1755 void CopyRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1756 void CopyRow_Any_AVX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1757 void CopyRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1758 
1759 void CopyRow_16_C(const uint16_t* src, uint16_t* dst, int count);
1760 
1761 void ARGBCopyAlphaRow_C(const uint8_t* src, uint8_t* dst, int width);
1762 void ARGBCopyAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
1763 void ARGBCopyAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
1764 void ARGBCopyAlphaRow_MMI(const uint8_t* src, uint8_t* dst, int width);
1765 void ARGBCopyAlphaRow_Any_SSE2(const uint8_t* src_ptr,
1766                                uint8_t* dst_ptr,
1767                                int width);
1768 void ARGBCopyAlphaRow_Any_AVX2(const uint8_t* src_ptr,
1769                                uint8_t* dst_ptr,
1770                                int width);
1771 void ARGBCopyAlphaRow_Any_MMI(const uint8_t* src_ptr,
1772                               uint8_t* dst_ptr,
1773                               int width);
1774 
1775 void ARGBExtractAlphaRow_C(const uint8_t* src_argb, uint8_t* dst_a, int width);
1776 void ARGBExtractAlphaRow_SSE2(const uint8_t* src_argb,
1777                               uint8_t* dst_a,
1778                               int width);
1779 void ARGBExtractAlphaRow_AVX2(const uint8_t* src_argb,
1780                               uint8_t* dst_a,
1781                               int width);
1782 void ARGBExtractAlphaRow_NEON(const uint8_t* src_argb,
1783                               uint8_t* dst_a,
1784                               int width);
1785 void ARGBExtractAlphaRow_MSA(const uint8_t* src_argb,
1786                              uint8_t* dst_a,
1787                              int width);
1788 void ARGBExtractAlphaRow_MMI(const uint8_t* src_argb,
1789                              uint8_t* dst_a,
1790                              int width);
1791 void ARGBExtractAlphaRow_Any_SSE2(const uint8_t* src_ptr,
1792                                   uint8_t* dst_ptr,
1793                                   int width);
1794 void ARGBExtractAlphaRow_Any_AVX2(const uint8_t* src_ptr,
1795                                   uint8_t* dst_ptr,
1796                                   int width);
1797 void ARGBExtractAlphaRow_Any_NEON(const uint8_t* src_ptr,
1798                                   uint8_t* dst_ptr,
1799                                   int width);
1800 void ARGBExtractAlphaRow_Any_MSA(const uint8_t* src_ptr,
1801                                  uint8_t* dst_ptr,
1802                                  int width);
1803 void ARGBExtractAlphaRow_Any_MMI(const uint8_t* src_ptr,
1804                                  uint8_t* dst_ptr,
1805                                  int width);
1806 
1807 void ARGBCopyYToAlphaRow_C(const uint8_t* src, uint8_t* dst, int width);
1808 void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
1809 void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
1810 void ARGBCopyYToAlphaRow_MMI(const uint8_t* src, uint8_t* dst, int width);
1811 void ARGBCopyYToAlphaRow_Any_SSE2(const uint8_t* src_ptr,
1812                                   uint8_t* dst_ptr,
1813                                   int width);
1814 void ARGBCopyYToAlphaRow_Any_AVX2(const uint8_t* src_ptr,
1815                                   uint8_t* dst_ptr,
1816                                   int width);
1817 void ARGBCopyYToAlphaRow_Any_MMI(const uint8_t* src_ptr,
1818                                  uint8_t* dst_ptr,
1819                                  int width);
1820 
1821 void SetRow_C(uint8_t* dst, uint8_t v8, int width);
1822 void SetRow_MSA(uint8_t* dst, uint8_t v8, int width);
1823 void SetRow_X86(uint8_t* dst, uint8_t v8, int width);
1824 void SetRow_ERMS(uint8_t* dst, uint8_t v8, int width);
1825 void SetRow_NEON(uint8_t* dst, uint8_t v8, int width);
1826 void SetRow_Any_X86(uint8_t* dst_ptr, uint8_t v32, int width);
1827 void SetRow_Any_NEON(uint8_t* dst_ptr, uint8_t v32, int width);
1828 
1829 void ARGBSetRow_C(uint8_t* dst_argb, uint32_t v32, int width);
1830 void ARGBSetRow_X86(uint8_t* dst_argb, uint32_t v32, int width);
1831 void ARGBSetRow_NEON(uint8_t* dst, uint32_t v32, int width);
1832 void ARGBSetRow_Any_NEON(uint8_t* dst_ptr, uint32_t v32, int width);
1833 void ARGBSetRow_MSA(uint8_t* dst_argb, uint32_t v32, int width);
1834 void ARGBSetRow_Any_MSA(uint8_t* dst_ptr, uint32_t v32, int width);
1835 
1836 // ARGBShufflers for BGRAToARGB etc.
1837 void ARGBShuffleRow_C(const uint8_t* src_argb,
1838                       uint8_t* dst_argb,
1839                       const uint8_t* shuffler,
1840                       int width);
1841 void ARGBShuffleRow_SSSE3(const uint8_t* src_argb,
1842                           uint8_t* dst_argb,
1843                           const uint8_t* shuffler,
1844                           int width);
1845 void ARGBShuffleRow_AVX2(const uint8_t* src_argb,
1846                          uint8_t* dst_argb,
1847                          const uint8_t* shuffler,
1848                          int width);
1849 void ARGBShuffleRow_NEON(const uint8_t* src_argb,
1850                          uint8_t* dst_argb,
1851                          const uint8_t* shuffler,
1852                          int width);
1853 void ARGBShuffleRow_MSA(const uint8_t* src_argb,
1854                         uint8_t* dst_argb,
1855                         const uint8_t* shuffler,
1856                         int width);
1857 void ARGBShuffleRow_MMI(const uint8_t* src_argb,
1858                         uint8_t* dst_argb,
1859                         const uint8_t* shuffler,
1860                         int width);
1861 void ARGBShuffleRow_Any_SSSE3(const uint8_t* src_ptr,
1862                               uint8_t* dst_ptr,
1863                               const uint8_t* param,
1864                               int width);
1865 void ARGBShuffleRow_Any_AVX2(const uint8_t* src_ptr,
1866                              uint8_t* dst_ptr,
1867                              const uint8_t* param,
1868                              int width);
1869 void ARGBShuffleRow_Any_NEON(const uint8_t* src_ptr,
1870                              uint8_t* dst_ptr,
1871                              const uint8_t* param,
1872                              int width);
1873 void ARGBShuffleRow_Any_MSA(const uint8_t* src_ptr,
1874                             uint8_t* dst_ptr,
1875                             const uint8_t* param,
1876                             int width);
1877 void ARGBShuffleRow_Any_MMI(const uint8_t* src_ptr,
1878                             uint8_t* dst_ptr,
1879                             const uint8_t* param,
1880                             int width);
1881 
1882 void RGB24ToARGBRow_SSSE3(const uint8_t* src_rgb24,
1883                           uint8_t* dst_argb,
1884                           int width);
1885 void RAWToARGBRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_argb, int width);
1886 void RAWToRGB24Row_SSSE3(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
1887 void RGB565ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
1888 void ARGB1555ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
1889 void ARGB4444ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
1890 void RGB565ToARGBRow_AVX2(const uint8_t* src_rgb565,
1891                           uint8_t* dst_argb,
1892                           int width);
1893 void ARGB1555ToARGBRow_AVX2(const uint8_t* src_argb1555,
1894                             uint8_t* dst_argb,
1895                             int width);
1896 void ARGB4444ToARGBRow_AVX2(const uint8_t* src_argb4444,
1897                             uint8_t* dst_argb,
1898                             int width);
1899 
1900 void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24,
1901                          uint8_t* dst_argb,
1902                          int width);
1903 void RGB24ToARGBRow_MSA(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
1904 void RGB24ToARGBRow_MMI(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
1905 void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width);
1906 void RAWToARGBRow_MSA(const uint8_t* src_raw, uint8_t* dst_argb, int width);
1907 void RAWToARGBRow_MMI(const uint8_t* src_raw, uint8_t* dst_argb, int width);
1908 void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
1909 void RAWToRGB24Row_MSA(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
1910 void RAWToRGB24Row_MMI(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
1911 void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565,
1912                           uint8_t* dst_argb,
1913                           int width);
1914 void RGB565ToARGBRow_MSA(const uint8_t* src_rgb565,
1915                          uint8_t* dst_argb,
1916                          int width);
1917 void RGB565ToARGBRow_MMI(const uint8_t* src_rgb565,
1918                          uint8_t* dst_argb,
1919                          int width);
1920 void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555,
1921                             uint8_t* dst_argb,
1922                             int width);
1923 void ARGB1555ToARGBRow_MSA(const uint8_t* src_argb1555,
1924                            uint8_t* dst_argb,
1925                            int width);
1926 void ARGB1555ToARGBRow_MMI(const uint8_t* src_argb1555,
1927                            uint8_t* dst_argb,
1928                            int width);
1929 void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444,
1930                             uint8_t* dst_argb,
1931                             int width);
1932 void ARGB4444ToARGBRow_MSA(const uint8_t* src_argb4444,
1933                            uint8_t* dst_argb,
1934                            int width);
1935 void ARGB4444ToARGBRow_MMI(const uint8_t* src_argb4444,
1936                            uint8_t* dst_argb,
1937                            int width);
1938 void RGB24ToARGBRow_C(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
1939 void RAWToARGBRow_C(const uint8_t* src_raw, uint8_t* dst_argb, int width);
1940 void RAWToRGB24Row_C(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
1941 void RGB565ToARGBRow_C(const uint8_t* src_rgb565, uint8_t* dst_argb, int width);
1942 void ARGB1555ToARGBRow_C(const uint8_t* src_argb1555,
1943                          uint8_t* dst_argb,
1944                          int width);
1945 void ARGB4444ToARGBRow_C(const uint8_t* src_argb4444,
1946                          uint8_t* dst_argb,
1947                          int width);
1948 void AR30ToARGBRow_C(const uint8_t* src_ar30, uint8_t* dst_argb, int width);
1949 void AR30ToABGRRow_C(const uint8_t* src_ar30, uint8_t* dst_abgr, int width);
1950 void ARGBToAR30Row_C(const uint8_t* src_argb, uint8_t* dst_ar30, int width);
1951 void AR30ToAB30Row_C(const uint8_t* src_ar30, uint8_t* dst_ab30, int width);
1952 
1953 void RGB24ToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
1954                               uint8_t* dst_ptr,
1955                               int width);
1956 void RAWToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
1957                             uint8_t* dst_ptr,
1958                             int width);
1959 void RAWToRGB24Row_Any_SSSE3(const uint8_t* src_ptr,
1960                              uint8_t* dst_ptr,
1961                              int width);
1962 
1963 void RGB565ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
1964                               uint8_t* dst_ptr,
1965                               int width);
1966 void ARGB1555ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
1967                                 uint8_t* dst_ptr,
1968                                 int width);
1969 void ARGB4444ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
1970                                 uint8_t* dst_ptr,
1971                                 int width);
1972 void RGB565ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
1973                               uint8_t* dst_ptr,
1974                               int width);
1975 void ARGB1555ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
1976                                 uint8_t* dst_ptr,
1977                                 int width);
1978 void ARGB4444ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
1979                                 uint8_t* dst_ptr,
1980                                 int width);
1981 
1982 void RGB24ToARGBRow_Any_NEON(const uint8_t* src_ptr,
1983                              uint8_t* dst_ptr,
1984                              int width);
1985 void RGB24ToARGBRow_Any_MSA(const uint8_t* src_ptr,
1986                             uint8_t* dst_ptr,
1987                             int width);
1988 void RGB24ToARGBRow_Any_MMI(const uint8_t* src_ptr,
1989                             uint8_t* dst_ptr,
1990                             int width);
1991 void RAWToARGBRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1992 void RAWToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1993 void RAWToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1994 void RAWToRGB24Row_Any_NEON(const uint8_t* src_ptr,
1995                             uint8_t* dst_ptr,
1996                             int width);
1997 void RAWToRGB24Row_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1998 void RAWToRGB24Row_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1999 void RGB565ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2000                               uint8_t* dst_ptr,
2001                               int width);
2002 void RGB565ToARGBRow_Any_MSA(const uint8_t* src_ptr,
2003                              uint8_t* dst_ptr,
2004                              int width);
2005 void RGB565ToARGBRow_Any_MMI(const uint8_t* src_ptr,
2006                              uint8_t* dst_ptr,
2007                              int width);
2008 void ARGB1555ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2009                                 uint8_t* dst_ptr,
2010                                 int width);
2011 void ARGB1555ToARGBRow_Any_MSA(const uint8_t* src_ptr,
2012                                uint8_t* dst_ptr,
2013                                int width);
2014 void ARGB1555ToARGBRow_Any_MMI(const uint8_t* src_ptr,
2015                                uint8_t* dst_ptr,
2016                                int width);
2017 void ARGB4444ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2018                                 uint8_t* dst_ptr,
2019                                 int width);
2020 
2021 void ARGB4444ToARGBRow_Any_MSA(const uint8_t* src_ptr,
2022                                uint8_t* dst_ptr,
2023                                int width);
2024 void ARGB4444ToARGBRow_Any_MMI(const uint8_t* src_ptr,
2025                                uint8_t* dst_ptr,
2026                                int width);
2027 
2028 void ARGBToRGB24Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2029 void ARGBToRAWRow_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2030 void ARGBToRGB565Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
2031 void ARGBToARGB1555Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
2032 void ARGBToARGB4444Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
2033 void ABGRToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2034 void ARGBToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2035 
2036 void ARGBToRAWRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
2037 void ARGBToRGB24Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
2038 
2039 void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width);
2040 
2041 void ARGBToRGB565DitherRow_C(const uint8_t* src_argb,
2042                              uint8_t* dst_rgb,
2043                              const uint32_t dither4,
2044                              int width);
2045 void ARGBToRGB565DitherRow_SSE2(const uint8_t* src,
2046                                 uint8_t* dst,
2047                                 const uint32_t dither4,
2048                                 int width);
2049 void ARGBToRGB565DitherRow_AVX2(const uint8_t* src,
2050                                 uint8_t* dst,
2051                                 const uint32_t dither4,
2052                                 int width);
2053 
2054 void ARGBToRGB565Row_AVX2(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2055 void ARGBToARGB1555Row_AVX2(const uint8_t* src_argb,
2056                             uint8_t* dst_rgb,
2057                             int width);
2058 void ARGBToARGB4444Row_AVX2(const uint8_t* src_argb,
2059                             uint8_t* dst_rgb,
2060                             int width);
2061 void ABGRToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
2062 void ARGBToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
2063 
2064 void ARGBToRGB24Row_NEON(const uint8_t* src_argb,
2065                          uint8_t* dst_rgb24,
2066                          int width);
2067 void ARGBToRAWRow_NEON(const uint8_t* src_argb, uint8_t* dst_raw, int width);
2068 void ARGBToRGB565Row_NEON(const uint8_t* src_argb,
2069                           uint8_t* dst_rgb565,
2070                           int width);
2071 void ARGBToARGB1555Row_NEON(const uint8_t* src_argb,
2072                             uint8_t* dst_argb1555,
2073                             int width);
2074 void ARGBToARGB4444Row_NEON(const uint8_t* src_argb,
2075                             uint8_t* dst_argb4444,
2076                             int width);
2077 void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb,
2078                                 uint8_t* dst_rgb,
2079                                 const uint32_t dither4,
2080                                 int width);
2081 void ARGBToRGB24Row_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2082 void ARGBToRAWRow_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2083 void ARGBToRGB565Row_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2084 void ARGBToARGB1555Row_MSA(const uint8_t* src_argb,
2085                            uint8_t* dst_rgb,
2086                            int width);
2087 void ARGBToARGB4444Row_MSA(const uint8_t* src_argb,
2088                            uint8_t* dst_rgb,
2089                            int width);
2090 void ARGBToRGB565DitherRow_MSA(const uint8_t* src_argb,
2091                                uint8_t* dst_rgb,
2092                                const uint32_t dither4,
2093                                int width);
2094 
2095 void ARGBToRGB24Row_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2096 void ARGBToRAWRow_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2097 void ARGBToRGB565Row_MMI(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2098 void ARGBToARGB1555Row_MMI(const uint8_t* src_argb,
2099                            uint8_t* dst_rgb,
2100                            int width);
2101 void ARGBToARGB4444Row_MMI(const uint8_t* src_argb,
2102                            uint8_t* dst_rgb,
2103                            int width);
2104 void ARGBToRGB565DitherRow_MMI(const uint8_t* src_argb,
2105                                uint8_t* dst_rgb,
2106                                const uint32_t dither4,
2107                                int width);
2108 
2109 void ARGBToRGBARow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2110 void ARGBToRGB24Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2111 void ARGBToRAWRow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2112 void ARGBToRGB565Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2113 void ARGBToARGB1555Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2114 void ARGBToARGB4444Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
2115 void ABGRToAR30Row_C(const uint8_t* src_abgr, uint8_t* dst_ar30, int width);
2116 void ARGBToAR30Row_C(const uint8_t* src_argb, uint8_t* dst_ar30, int width);
2117 
2118 void J400ToARGBRow_SSE2(const uint8_t* src_y, uint8_t* dst_argb, int width);
2119 void J400ToARGBRow_AVX2(const uint8_t* src_y, uint8_t* dst_argb, int width);
2120 void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width);
2121 void J400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width);
2122 void J400ToARGBRow_MMI(const uint8_t* src_y, uint8_t* dst_argb, int width);
2123 void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width);
2124 void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
2125                             uint8_t* dst_ptr,
2126                             int width);
2127 void J400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
2128                             uint8_t* dst_ptr,
2129                             int width);
2130 void J400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2131                             uint8_t* dst_ptr,
2132                             int width);
2133 void J400ToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2134 void J400ToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2135 
2136 void I444ToARGBRow_C(const uint8_t* src_y,
2137                      const uint8_t* src_u,
2138                      const uint8_t* src_v,
2139                      uint8_t* rgb_buf,
2140                      const struct YuvConstants* yuvconstants,
2141                      int width);
2142 void I422ToARGBRow_C(const uint8_t* src_y,
2143                      const uint8_t* src_u,
2144                      const uint8_t* src_v,
2145                      uint8_t* rgb_buf,
2146                      const struct YuvConstants* yuvconstants,
2147                      int width);
2148 void I422ToAR30Row_C(const uint8_t* src_y,
2149                      const uint8_t* src_u,
2150                      const uint8_t* src_v,
2151                      uint8_t* rgb_buf,
2152                      const struct YuvConstants* yuvconstants,
2153                      int width);
2154 void I210ToAR30Row_C(const uint16_t* src_y,
2155                      const uint16_t* src_u,
2156                      const uint16_t* src_v,
2157                      uint8_t* rgb_buf,
2158                      const struct YuvConstants* yuvconstants,
2159                      int width);
2160 void I210ToARGBRow_C(const uint16_t* src_y,
2161                      const uint16_t* src_u,
2162                      const uint16_t* src_v,
2163                      uint8_t* rgb_buf,
2164                      const struct YuvConstants* yuvconstants,
2165                      int width);
2166 void I422AlphaToARGBRow_C(const uint8_t* src_y,
2167                           const uint8_t* src_u,
2168                           const uint8_t* src_v,
2169                           const uint8_t* src_a,
2170                           uint8_t* rgb_buf,
2171                           const struct YuvConstants* yuvconstants,
2172                           int width);
2173 void NV12ToARGBRow_C(const uint8_t* src_y,
2174                      const uint8_t* src_uv,
2175                      uint8_t* rgb_buf,
2176                      const struct YuvConstants* yuvconstants,
2177                      int width);
2178 void NV12ToRGB565Row_C(const uint8_t* src_y,
2179                        const uint8_t* src_uv,
2180                        uint8_t* dst_rgb565,
2181                        const struct YuvConstants* yuvconstants,
2182                        int width);
2183 void NV21ToARGBRow_C(const uint8_t* src_y,
2184                      const uint8_t* src_vu,
2185                      uint8_t* rgb_buf,
2186                      const struct YuvConstants* yuvconstants,
2187                      int width);
2188 void NV12ToRGB24Row_C(const uint8_t* src_y,
2189                       const uint8_t* src_uv,
2190                       uint8_t* rgb_buf,
2191                       const struct YuvConstants* yuvconstants,
2192                       int width);
2193 void NV21ToRGB24Row_C(const uint8_t* src_y,
2194                       const uint8_t* src_vu,
2195                       uint8_t* rgb_buf,
2196                       const struct YuvConstants* yuvconstants,
2197                       int width);
2198 void NV21ToYUV24Row_C(const uint8_t* src_y,
2199                       const uint8_t* src_vu,
2200                       uint8_t* dst_yuv24,
2201                       int width);
2202 void YUY2ToARGBRow_C(const uint8_t* src_yuy2,
2203                      uint8_t* rgb_buf,
2204                      const struct YuvConstants* yuvconstants,
2205                      int width);
2206 void UYVYToARGBRow_C(const uint8_t* src_uyvy,
2207                      uint8_t* rgb_buf,
2208                      const struct YuvConstants* yuvconstants,
2209                      int width);
2210 void I422ToRGBARow_C(const uint8_t* src_y,
2211                      const uint8_t* src_u,
2212                      const uint8_t* src_v,
2213                      uint8_t* rgb_buf,
2214                      const struct YuvConstants* yuvconstants,
2215                      int width);
2216 void I422ToRGB24Row_C(const uint8_t* src_y,
2217                       const uint8_t* src_u,
2218                       const uint8_t* src_v,
2219                       uint8_t* rgb_buf,
2220                       const struct YuvConstants* yuvconstants,
2221                       int width);
2222 void I422ToARGB4444Row_C(const uint8_t* src_y,
2223                          const uint8_t* src_u,
2224                          const uint8_t* src_v,
2225                          uint8_t* dst_argb4444,
2226                          const struct YuvConstants* yuvconstants,
2227                          int width);
2228 void I422ToARGB1555Row_C(const uint8_t* src_y,
2229                          const uint8_t* src_u,
2230                          const uint8_t* src_v,
2231                          uint8_t* dst_argb1555,
2232                          const struct YuvConstants* yuvconstants,
2233                          int width);
2234 void I422ToRGB565Row_C(const uint8_t* src_y,
2235                        const uint8_t* src_u,
2236                        const uint8_t* src_v,
2237                        uint8_t* dst_rgb565,
2238                        const struct YuvConstants* yuvconstants,
2239                        int width);
2240 void I422ToARGBRow_AVX2(const uint8_t* y_buf,
2241                         const uint8_t* u_buf,
2242                         const uint8_t* v_buf,
2243                         uint8_t* dst_argb,
2244                         const struct YuvConstants* yuvconstants,
2245                         int width);
2246 void I422ToRGBARow_AVX2(const uint8_t* y_buf,
2247                         const uint8_t* u_buf,
2248                         const uint8_t* v_buf,
2249                         uint8_t* dst_argb,
2250                         const struct YuvConstants* yuvconstants,
2251                         int width);
2252 void I444ToARGBRow_SSSE3(const uint8_t* y_buf,
2253                          const uint8_t* u_buf,
2254                          const uint8_t* v_buf,
2255                          uint8_t* dst_argb,
2256                          const struct YuvConstants* yuvconstants,
2257                          int width);
2258 void I444ToARGBRow_AVX2(const uint8_t* y_buf,
2259                         const uint8_t* u_buf,
2260                         const uint8_t* v_buf,
2261                         uint8_t* dst_argb,
2262                         const struct YuvConstants* yuvconstants,
2263                         int width);
2264 void I444ToARGBRow_SSSE3(const uint8_t* y_buf,
2265                          const uint8_t* u_buf,
2266                          const uint8_t* v_buf,
2267                          uint8_t* dst_argb,
2268                          const struct YuvConstants* yuvconstants,
2269                          int width);
2270 void I444ToARGBRow_AVX2(const uint8_t* y_buf,
2271                         const uint8_t* u_buf,
2272                         const uint8_t* v_buf,
2273                         uint8_t* dst_argb,
2274                         const struct YuvConstants* yuvconstants,
2275                         int width);
2276 void I422ToARGBRow_SSSE3(const uint8_t* y_buf,
2277                          const uint8_t* u_buf,
2278                          const uint8_t* v_buf,
2279                          uint8_t* dst_argb,
2280                          const struct YuvConstants* yuvconstants,
2281                          int width);
2282 
2283 void I422ToAR30Row_SSSE3(const uint8_t* y_buf,
2284                          const uint8_t* u_buf,
2285                          const uint8_t* v_buf,
2286                          uint8_t* dst_ar30,
2287                          const struct YuvConstants* yuvconstants,
2288                          int width);
2289 void I210ToAR30Row_SSSE3(const uint16_t* y_buf,
2290                          const uint16_t* u_buf,
2291                          const uint16_t* v_buf,
2292                          uint8_t* dst_ar30,
2293                          const struct YuvConstants* yuvconstants,
2294                          int width);
2295 void I210ToARGBRow_SSSE3(const uint16_t* y_buf,
2296                          const uint16_t* u_buf,
2297                          const uint16_t* v_buf,
2298                          uint8_t* dst_argb,
2299                          const struct YuvConstants* yuvconstants,
2300                          int width);
2301 void I422ToAR30Row_AVX2(const uint8_t* y_buf,
2302                         const uint8_t* u_buf,
2303                         const uint8_t* v_buf,
2304                         uint8_t* dst_ar30,
2305                         const struct YuvConstants* yuvconstants,
2306                         int width);
2307 void I210ToARGBRow_AVX2(const uint16_t* y_buf,
2308                         const uint16_t* u_buf,
2309                         const uint16_t* v_buf,
2310                         uint8_t* dst_argb,
2311                         const struct YuvConstants* yuvconstants,
2312                         int width);
2313 void I210ToAR30Row_AVX2(const uint16_t* y_buf,
2314                         const uint16_t* u_buf,
2315                         const uint16_t* v_buf,
2316                         uint8_t* dst_ar30,
2317                         const struct YuvConstants* yuvconstants,
2318                         int width);
2319 void I422AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
2320                               const uint8_t* u_buf,
2321                               const uint8_t* v_buf,
2322                               const uint8_t* a_buf,
2323                               uint8_t* dst_argb,
2324                               const struct YuvConstants* yuvconstants,
2325                               int width);
2326 void I422AlphaToARGBRow_AVX2(const uint8_t* y_buf,
2327                              const uint8_t* u_buf,
2328                              const uint8_t* v_buf,
2329                              const uint8_t* a_buf,
2330                              uint8_t* dst_argb,
2331                              const struct YuvConstants* yuvconstants,
2332                              int width);
2333 void NV12ToARGBRow_SSSE3(const uint8_t* y_buf,
2334                          const uint8_t* uv_buf,
2335                          uint8_t* dst_argb,
2336                          const struct YuvConstants* yuvconstants,
2337                          int width);
2338 void NV12ToARGBRow_AVX2(const uint8_t* y_buf,
2339                         const uint8_t* uv_buf,
2340                         uint8_t* dst_argb,
2341                         const struct YuvConstants* yuvconstants,
2342                         int width);
2343 void NV12ToRGB24Row_SSSE3(const uint8_t* src_y,
2344                           const uint8_t* src_uv,
2345                           uint8_t* dst_rgb24,
2346                           const struct YuvConstants* yuvconstants,
2347                           int width);
2348 void NV21ToRGB24Row_SSSE3(const uint8_t* src_y,
2349                           const uint8_t* src_vu,
2350                           uint8_t* dst_rgb24,
2351                           const struct YuvConstants* yuvconstants,
2352                           int width);
2353 void NV12ToRGB565Row_SSSE3(const uint8_t* src_y,
2354                            const uint8_t* src_uv,
2355                            uint8_t* dst_rgb565,
2356                            const struct YuvConstants* yuvconstants,
2357                            int width);
2358 void NV12ToRGB24Row_AVX2(const uint8_t* src_y,
2359                          const uint8_t* src_uv,
2360                          uint8_t* dst_rgb24,
2361                          const struct YuvConstants* yuvconstants,
2362                          int width);
2363 void NV21ToRGB24Row_AVX2(const uint8_t* src_y,
2364                          const uint8_t* src_vu,
2365                          uint8_t* dst_rgb24,
2366                          const struct YuvConstants* yuvconstants,
2367                          int width);
2368 void NV21ToYUV24Row_AVX2(const uint8_t* src_y,
2369                          const uint8_t* src_vu,
2370                          uint8_t* dst_yuv24,
2371                          int width);
2372 void NV12ToRGB565Row_AVX2(const uint8_t* src_y,
2373                           const uint8_t* src_uv,
2374                           uint8_t* dst_rgb565,
2375                           const struct YuvConstants* yuvconstants,
2376                           int width);
2377 void NV21ToARGBRow_SSSE3(const uint8_t* y_buf,
2378                          const uint8_t* vu_buf,
2379                          uint8_t* dst_argb,
2380                          const struct YuvConstants* yuvconstants,
2381                          int width);
2382 void NV21ToARGBRow_AVX2(const uint8_t* y_buf,
2383                         const uint8_t* vu_buf,
2384                         uint8_t* dst_argb,
2385                         const struct YuvConstants* yuvconstants,
2386                         int width);
2387 void YUY2ToARGBRow_SSSE3(const uint8_t* yuy2_buf,
2388                          uint8_t* dst_argb,
2389                          const struct YuvConstants* yuvconstants,
2390                          int width);
2391 void UYVYToARGBRow_SSSE3(const uint8_t* uyvy_buf,
2392                          uint8_t* dst_argb,
2393                          const struct YuvConstants* yuvconstants,
2394                          int width);
2395 void YUY2ToARGBRow_AVX2(const uint8_t* yuy2_buf,
2396                         uint8_t* dst_argb,
2397                         const struct YuvConstants* yuvconstants,
2398                         int width);
2399 void UYVYToARGBRow_AVX2(const uint8_t* uyvy_buf,
2400                         uint8_t* dst_argb,
2401                         const struct YuvConstants* yuvconstants,
2402                         int width);
2403 void I422ToRGBARow_SSSE3(const uint8_t* y_buf,
2404                          const uint8_t* u_buf,
2405                          const uint8_t* v_buf,
2406                          uint8_t* dst_rgba,
2407                          const struct YuvConstants* yuvconstants,
2408                          int width);
2409 void I422ToARGB4444Row_SSSE3(const uint8_t* src_y,
2410                              const uint8_t* src_u,
2411                              const uint8_t* src_v,
2412                              uint8_t* dst_argb4444,
2413                              const struct YuvConstants* yuvconstants,
2414                              int width);
2415 void I422ToARGB4444Row_AVX2(const uint8_t* src_y,
2416                             const uint8_t* src_u,
2417                             const uint8_t* src_v,
2418                             uint8_t* dst_argb4444,
2419                             const struct YuvConstants* yuvconstants,
2420                             int width);
2421 void I422ToARGB1555Row_SSSE3(const uint8_t* src_y,
2422                              const uint8_t* src_u,
2423                              const uint8_t* src_v,
2424                              uint8_t* dst_argb1555,
2425                              const struct YuvConstants* yuvconstants,
2426                              int width);
2427 void I422ToARGB1555Row_AVX2(const uint8_t* src_y,
2428                             const uint8_t* src_u,
2429                             const uint8_t* src_v,
2430                             uint8_t* dst_argb1555,
2431                             const struct YuvConstants* yuvconstants,
2432                             int width);
2433 void I422ToRGB565Row_SSSE3(const uint8_t* src_y,
2434                            const uint8_t* src_u,
2435                            const uint8_t* src_v,
2436                            uint8_t* dst_rgb565,
2437                            const struct YuvConstants* yuvconstants,
2438                            int width);
2439 void I422ToRGB565Row_AVX2(const uint8_t* src_y,
2440                           const uint8_t* src_u,
2441                           const uint8_t* src_v,
2442                           uint8_t* dst_rgb565,
2443                           const struct YuvConstants* yuvconstants,
2444                           int width);
2445 void I422ToRGB24Row_SSSE3(const uint8_t* y_buf,
2446                           const uint8_t* u_buf,
2447                           const uint8_t* v_buf,
2448                           uint8_t* dst_rgb24,
2449                           const struct YuvConstants* yuvconstants,
2450                           int width);
2451 void I422ToRGB24Row_AVX2(const uint8_t* src_y,
2452                          const uint8_t* src_u,
2453                          const uint8_t* src_v,
2454                          uint8_t* dst_rgb24,
2455                          const struct YuvConstants* yuvconstants,
2456                          int width);
2457 void I422ToARGBRow_Any_AVX2(const uint8_t* y_buf,
2458                             const uint8_t* u_buf,
2459                             const uint8_t* v_buf,
2460                             uint8_t* dst_ptr,
2461                             const struct YuvConstants* yuvconstants,
2462                             int width);
2463 void I422ToRGBARow_Any_AVX2(const uint8_t* y_buf,
2464                             const uint8_t* u_buf,
2465                             const uint8_t* v_buf,
2466                             uint8_t* dst_ptr,
2467                             const struct YuvConstants* yuvconstants,
2468                             int width);
2469 void I444ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
2470                              const uint8_t* u_buf,
2471                              const uint8_t* v_buf,
2472                              uint8_t* dst_ptr,
2473                              const struct YuvConstants* yuvconstants,
2474                              int width);
2475 void I444ToARGBRow_Any_AVX2(const uint8_t* y_buf,
2476                             const uint8_t* u_buf,
2477                             const uint8_t* v_buf,
2478                             uint8_t* dst_ptr,
2479                             const struct YuvConstants* yuvconstants,
2480                             int width);
2481 void I422ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
2482                              const uint8_t* u_buf,
2483                              const uint8_t* v_buf,
2484                              uint8_t* dst_ptr,
2485                              const struct YuvConstants* yuvconstants,
2486                              int width);
2487 void I422ToAR30Row_Any_SSSE3(const uint8_t* y_buf,
2488                              const uint8_t* u_buf,
2489                              const uint8_t* v_buf,
2490                              uint8_t* dst_ptr,
2491                              const struct YuvConstants* yuvconstants,
2492                              int width);
2493 void I210ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
2494                              const uint16_t* u_buf,
2495                              const uint16_t* v_buf,
2496                              uint8_t* dst_ptr,
2497                              const struct YuvConstants* yuvconstants,
2498                              int width);
2499 void I210ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
2500                              const uint16_t* u_buf,
2501                              const uint16_t* v_buf,
2502                              uint8_t* dst_ptr,
2503                              const struct YuvConstants* yuvconstants,
2504                              int width);
2505 void I422ToAR30Row_Any_AVX2(const uint8_t* y_buf,
2506                             const uint8_t* u_buf,
2507                             const uint8_t* v_buf,
2508                             uint8_t* dst_ptr,
2509                             const struct YuvConstants* yuvconstants,
2510                             int width);
2511 void I210ToARGBRow_Any_AVX2(const uint16_t* y_buf,
2512                             const uint16_t* u_buf,
2513                             const uint16_t* v_buf,
2514                             uint8_t* dst_ptr,
2515                             const struct YuvConstants* yuvconstants,
2516                             int width);
2517 void I210ToAR30Row_Any_AVX2(const uint16_t* y_buf,
2518                             const uint16_t* u_buf,
2519                             const uint16_t* v_buf,
2520                             uint8_t* dst_ptr,
2521                             const struct YuvConstants* yuvconstants,
2522                             int width);
2523 void I422AlphaToARGBRow_Any_SSSE3(const uint8_t* y_buf,
2524                                   const uint8_t* u_buf,
2525                                   const uint8_t* v_buf,
2526                                   const uint8_t* a_buf,
2527                                   uint8_t* dst_ptr,
2528                                   const struct YuvConstants* yuvconstants,
2529                                   int width);
2530 void I422AlphaToARGBRow_Any_AVX2(const uint8_t* y_buf,
2531                                  const uint8_t* u_buf,
2532                                  const uint8_t* v_buf,
2533                                  const uint8_t* a_buf,
2534                                  uint8_t* dst_ptr,
2535                                  const struct YuvConstants* yuvconstants,
2536                                  int width);
2537 void NV12ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
2538                              const uint8_t* uv_buf,
2539                              uint8_t* dst_ptr,
2540                              const struct YuvConstants* yuvconstants,
2541                              int width);
2542 void NV12ToARGBRow_Any_AVX2(const uint8_t* y_buf,
2543                             const uint8_t* uv_buf,
2544                             uint8_t* dst_ptr,
2545                             const struct YuvConstants* yuvconstants,
2546                             int width);
2547 void NV21ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
2548                              const uint8_t* uv_buf,
2549                              uint8_t* dst_ptr,
2550                              const struct YuvConstants* yuvconstants,
2551                              int width);
2552 void NV21ToARGBRow_Any_AVX2(const uint8_t* y_buf,
2553                             const uint8_t* uv_buf,
2554                             uint8_t* dst_ptr,
2555                             const struct YuvConstants* yuvconstants,
2556                             int width);
2557 void NV12ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
2558                               const uint8_t* uv_buf,
2559                               uint8_t* dst_ptr,
2560                               const struct YuvConstants* yuvconstants,
2561                               int width);
2562 void NV21ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
2563                               const uint8_t* uv_buf,
2564                               uint8_t* dst_ptr,
2565                               const struct YuvConstants* yuvconstants,
2566                               int width);
2567 void NV12ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
2568                              const uint8_t* uv_buf,
2569                              uint8_t* dst_ptr,
2570                              const struct YuvConstants* yuvconstants,
2571                              int width);
2572 void NV21ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
2573                              const uint8_t* uv_buf,
2574                              uint8_t* dst_ptr,
2575                              const struct YuvConstants* yuvconstants,
2576                              int width);
2577 void NV21ToYUV24Row_Any_AVX2(const uint8_t* src_y,
2578                              const uint8_t* src_vu,
2579                              uint8_t* dst_yuv24,
2580                              int width);
2581 void NV12ToRGB565Row_Any_SSSE3(const uint8_t* y_buf,
2582                                const uint8_t* uv_buf,
2583                                uint8_t* dst_ptr,
2584                                const struct YuvConstants* yuvconstants,
2585                                int width);
2586 void NV12ToRGB565Row_Any_AVX2(const uint8_t* y_buf,
2587                               const uint8_t* uv_buf,
2588                               uint8_t* dst_ptr,
2589                               const struct YuvConstants* yuvconstants,
2590                               int width);
2591 void YUY2ToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
2592                              uint8_t* dst_ptr,
2593                              const struct YuvConstants* yuvconstants,
2594                              int width);
2595 void UYVYToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
2596                              uint8_t* dst_ptr,
2597                              const struct YuvConstants* yuvconstants,
2598                              int width);
2599 void YUY2ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
2600                             uint8_t* dst_ptr,
2601                             const struct YuvConstants* yuvconstants,
2602                             int width);
2603 void UYVYToARGBRow_Any_AVX2(const uint8_t* src_ptr,
2604                             uint8_t* dst_ptr,
2605                             const struct YuvConstants* yuvconstants,
2606                             int width);
2607 void I422ToRGBARow_Any_SSSE3(const uint8_t* y_buf,
2608                              const uint8_t* u_buf,
2609                              const uint8_t* v_buf,
2610                              uint8_t* dst_ptr,
2611                              const struct YuvConstants* yuvconstants,
2612                              int width);
2613 void I422ToARGB4444Row_Any_SSSE3(const uint8_t* y_buf,
2614                                  const uint8_t* u_buf,
2615                                  const uint8_t* v_buf,
2616                                  uint8_t* dst_ptr,
2617                                  const struct YuvConstants* yuvconstants,
2618                                  int width);
2619 void I422ToARGB4444Row_Any_AVX2(const uint8_t* y_buf,
2620                                 const uint8_t* u_buf,
2621                                 const uint8_t* v_buf,
2622                                 uint8_t* dst_ptr,
2623                                 const struct YuvConstants* yuvconstants,
2624                                 int width);
2625 void I422ToARGB1555Row_Any_SSSE3(const uint8_t* y_buf,
2626                                  const uint8_t* u_buf,
2627                                  const uint8_t* v_buf,
2628                                  uint8_t* dst_ptr,
2629                                  const struct YuvConstants* yuvconstants,
2630                                  int width);
2631 void I422ToARGB1555Row_Any_AVX2(const uint8_t* y_buf,
2632                                 const uint8_t* u_buf,
2633                                 const uint8_t* v_buf,
2634                                 uint8_t* dst_ptr,
2635                                 const struct YuvConstants* yuvconstants,
2636                                 int width);
2637 void I422ToRGB565Row_Any_SSSE3(const uint8_t* y_buf,
2638                                const uint8_t* u_buf,
2639                                const uint8_t* v_buf,
2640                                uint8_t* dst_ptr,
2641                                const struct YuvConstants* yuvconstants,
2642                                int width);
2643 void I422ToRGB565Row_Any_AVX2(const uint8_t* y_buf,
2644                               const uint8_t* u_buf,
2645                               const uint8_t* v_buf,
2646                               uint8_t* dst_ptr,
2647                               const struct YuvConstants* yuvconstants,
2648                               int width);
2649 void I422ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
2650                               const uint8_t* u_buf,
2651                               const uint8_t* v_buf,
2652                               uint8_t* dst_ptr,
2653                               const struct YuvConstants* yuvconstants,
2654                               int width);
2655 void I422ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
2656                              const uint8_t* u_buf,
2657                              const uint8_t* v_buf,
2658                              uint8_t* dst_ptr,
2659                              const struct YuvConstants* yuvconstants,
2660                              int width);
2661 
2662 void I400ToARGBRow_C(const uint8_t* src_y, uint8_t* rgb_buf, int width);
2663 void I400ToARGBRow_SSE2(const uint8_t* y_buf, uint8_t* dst_argb, int width);
2664 void I400ToARGBRow_AVX2(const uint8_t* y_buf, uint8_t* dst_argb, int width);
2665 void I400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width);
2666 void I400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width);
2667 void I400ToARGBRow_MMI(const uint8_t* src_y, uint8_t* dst_argb, int width);
2668 void I400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
2669                             uint8_t* dst_ptr,
2670                             int width);
2671 void I400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
2672                             uint8_t* dst_ptr,
2673                             int width);
2674 void I400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
2675                             uint8_t* dst_ptr,
2676                             int width);
2677 void I400ToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2678 void I400ToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2679 
2680 // ARGB preattenuated alpha blend.
2681 void ARGBBlendRow_SSSE3(const uint8_t* src_argb0,
2682                         const uint8_t* src_argb1,
2683                         uint8_t* dst_argb,
2684                         int width);
2685 void ARGBBlendRow_NEON(const uint8_t* src_argb0,
2686                        const uint8_t* src_argb1,
2687                        uint8_t* dst_argb,
2688                        int width);
2689 void ARGBBlendRow_MSA(const uint8_t* src_argb0,
2690                       const uint8_t* src_argb1,
2691                       uint8_t* dst_argb,
2692                       int width);
2693 void ARGBBlendRow_MMI(const uint8_t* src_argb0,
2694                       const uint8_t* src_argb1,
2695                       uint8_t* dst_argb,
2696                       int width);
2697 void ARGBBlendRow_C(const uint8_t* src_argb0,
2698                     const uint8_t* src_argb1,
2699                     uint8_t* dst_argb,
2700                     int width);
2701 
2702 // Unattenuated planar alpha blend.
2703 void BlendPlaneRow_SSSE3(const uint8_t* src0,
2704                          const uint8_t* src1,
2705                          const uint8_t* alpha,
2706                          uint8_t* dst,
2707                          int width);
2708 void BlendPlaneRow_Any_SSSE3(const uint8_t* y_buf,
2709                              const uint8_t* u_buf,
2710                              const uint8_t* v_buf,
2711                              uint8_t* dst_ptr,
2712                              int width);
2713 void BlendPlaneRow_AVX2(const uint8_t* src0,
2714                         const uint8_t* src1,
2715                         const uint8_t* alpha,
2716                         uint8_t* dst,
2717                         int width);
2718 void BlendPlaneRow_Any_AVX2(const uint8_t* y_buf,
2719                             const uint8_t* u_buf,
2720                             const uint8_t* v_buf,
2721                             uint8_t* dst_ptr,
2722                             int width);
2723 void BlendPlaneRow_MMI(const uint8_t* src0,
2724                        const uint8_t* src1,
2725                        const uint8_t* alpha,
2726                        uint8_t* dst,
2727                        int width);
2728 void BlendPlaneRow_Any_MMI(const uint8_t* y_buf,
2729                            const uint8_t* u_buf,
2730                            const uint8_t* v_buf,
2731                            uint8_t* dst_ptr,
2732                            int width);
2733 void BlendPlaneRow_C(const uint8_t* src0,
2734                      const uint8_t* src1,
2735                      const uint8_t* alpha,
2736                      uint8_t* dst,
2737                      int width);
2738 
2739 // ARGB multiply images. Same API as Blend, but these require
2740 // pointer and width alignment for SSE2.
2741 void ARGBMultiplyRow_C(const uint8_t* src_argb0,
2742                        const uint8_t* src_argb1,
2743                        uint8_t* dst_argb,
2744                        int width);
2745 void ARGBMultiplyRow_SSE2(const uint8_t* src_argb0,
2746                           const uint8_t* src_argb1,
2747                           uint8_t* dst_argb,
2748                           int width);
2749 void ARGBMultiplyRow_Any_SSE2(const uint8_t* y_buf,
2750                               const uint8_t* uv_buf,
2751                               uint8_t* dst_ptr,
2752                               int width);
2753 void ARGBMultiplyRow_AVX2(const uint8_t* src_argb0,
2754                           const uint8_t* src_argb1,
2755                           uint8_t* dst_argb,
2756                           int width);
2757 void ARGBMultiplyRow_Any_AVX2(const uint8_t* y_buf,
2758                               const uint8_t* uv_buf,
2759                               uint8_t* dst_ptr,
2760                               int width);
2761 void ARGBMultiplyRow_NEON(const uint8_t* src_argb0,
2762                           const uint8_t* src_argb1,
2763                           uint8_t* dst_argb,
2764                           int width);
2765 void ARGBMultiplyRow_Any_NEON(const uint8_t* y_buf,
2766                               const uint8_t* uv_buf,
2767                               uint8_t* dst_ptr,
2768                               int width);
2769 void ARGBMultiplyRow_MSA(const uint8_t* src_argb0,
2770                          const uint8_t* src_argb1,
2771                          uint8_t* dst_argb,
2772                          int width);
2773 void ARGBMultiplyRow_Any_MSA(const uint8_t* y_buf,
2774                              const uint8_t* uv_buf,
2775                              uint8_t* dst_ptr,
2776                              int width);
2777 void ARGBMultiplyRow_MMI(const uint8_t* src_argb0,
2778                          const uint8_t* src_argb1,
2779                          uint8_t* dst_argb,
2780                          int width);
2781 void ARGBMultiplyRow_Any_MMI(const uint8_t* y_buf,
2782                              const uint8_t* uv_buf,
2783                              uint8_t* dst_ptr,
2784                              int width);
2785 
2786 // ARGB add images.
2787 void ARGBAddRow_C(const uint8_t* src_argb0,
2788                   const uint8_t* src_argb1,
2789                   uint8_t* dst_argb,
2790                   int width);
2791 void ARGBAddRow_SSE2(const uint8_t* src_argb0,
2792                      const uint8_t* src_argb1,
2793                      uint8_t* dst_argb,
2794                      int width);
2795 void ARGBAddRow_Any_SSE2(const uint8_t* y_buf,
2796                          const uint8_t* uv_buf,
2797                          uint8_t* dst_ptr,
2798                          int width);
2799 void ARGBAddRow_AVX2(const uint8_t* src_argb0,
2800                      const uint8_t* src_argb1,
2801                      uint8_t* dst_argb,
2802                      int width);
2803 void ARGBAddRow_Any_AVX2(const uint8_t* y_buf,
2804                          const uint8_t* uv_buf,
2805                          uint8_t* dst_ptr,
2806                          int width);
2807 void ARGBAddRow_NEON(const uint8_t* src_argb0,
2808                      const uint8_t* src_argb1,
2809                      uint8_t* dst_argb,
2810                      int width);
2811 void ARGBAddRow_Any_NEON(const uint8_t* y_buf,
2812                          const uint8_t* uv_buf,
2813                          uint8_t* dst_ptr,
2814                          int width);
2815 void ARGBAddRow_MSA(const uint8_t* src_argb0,
2816                     const uint8_t* src_argb1,
2817                     uint8_t* dst_argb,
2818                     int width);
2819 void ARGBAddRow_Any_MSA(const uint8_t* y_buf,
2820                         const uint8_t* uv_buf,
2821                         uint8_t* dst_ptr,
2822                         int width);
2823 void ARGBAddRow_MMI(const uint8_t* src_argb0,
2824                     const uint8_t* src_argb1,
2825                     uint8_t* dst_argb,
2826                     int width);
2827 void ARGBAddRow_Any_MMI(const uint8_t* y_buf,
2828                         const uint8_t* uv_buf,
2829                         uint8_t* dst_ptr,
2830                         int width);
2831 
2832 // ARGB subtract images. Same API as Blend, but these require
2833 // pointer and width alignment for SSE2.
2834 void ARGBSubtractRow_C(const uint8_t* src_argb0,
2835                        const uint8_t* src_argb1,
2836                        uint8_t* dst_argb,
2837                        int width);
2838 void ARGBSubtractRow_SSE2(const uint8_t* src_argb0,
2839                           const uint8_t* src_argb1,
2840                           uint8_t* dst_argb,
2841                           int width);
2842 void ARGBSubtractRow_Any_SSE2(const uint8_t* y_buf,
2843                               const uint8_t* uv_buf,
2844                               uint8_t* dst_ptr,
2845                               int width);
2846 void ARGBSubtractRow_AVX2(const uint8_t* src_argb0,
2847                           const uint8_t* src_argb1,
2848                           uint8_t* dst_argb,
2849                           int width);
2850 void ARGBSubtractRow_Any_AVX2(const uint8_t* y_buf,
2851                               const uint8_t* uv_buf,
2852                               uint8_t* dst_ptr,
2853                               int width);
2854 void ARGBSubtractRow_NEON(const uint8_t* src_argb0,
2855                           const uint8_t* src_argb1,
2856                           uint8_t* dst_argb,
2857                           int width);
2858 void ARGBSubtractRow_Any_NEON(const uint8_t* y_buf,
2859                               const uint8_t* uv_buf,
2860                               uint8_t* dst_ptr,
2861                               int width);
2862 void ARGBSubtractRow_MSA(const uint8_t* src_argb0,
2863                          const uint8_t* src_argb1,
2864                          uint8_t* dst_argb,
2865                          int width);
2866 void ARGBSubtractRow_Any_MSA(const uint8_t* y_buf,
2867                              const uint8_t* uv_buf,
2868                              uint8_t* dst_ptr,
2869                              int width);
2870 void ARGBSubtractRow_MMI(const uint8_t* src_argb0,
2871                          const uint8_t* src_argb1,
2872                          uint8_t* dst_argb,
2873                          int width);
2874 void ARGBSubtractRow_Any_MMI(const uint8_t* y_buf,
2875                              const uint8_t* uv_buf,
2876                              uint8_t* dst_ptr,
2877                              int width);
2878 
2879 void ARGBToRGB24Row_Any_SSSE3(const uint8_t* src_ptr,
2880                               uint8_t* dst_ptr,
2881                               int width);
2882 void ARGBToRAWRow_Any_SSSE3(const uint8_t* src_ptr,
2883                             uint8_t* dst_ptr,
2884                             int width);
2885 void ARGBToRGB565Row_Any_SSE2(const uint8_t* src_ptr,
2886                               uint8_t* dst_ptr,
2887                               int width);
2888 void ARGBToARGB1555Row_Any_SSE2(const uint8_t* src_ptr,
2889                                 uint8_t* dst_ptr,
2890                                 int width);
2891 void ARGBToARGB4444Row_Any_SSE2(const uint8_t* src_ptr,
2892                                 uint8_t* dst_ptr,
2893                                 int width);
2894 void ABGRToAR30Row_Any_SSSE3(const uint8_t* src_ptr,
2895                              uint8_t* dst_ptr,
2896                              int width);
2897 void ARGBToAR30Row_Any_SSSE3(const uint8_t* src_ptr,
2898                              uint8_t* dst_ptr,
2899                              int width);
2900 void ARGBToRAWRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2901 void ARGBToRGB24Row_Any_AVX2(const uint8_t* src_ptr,
2902                              uint8_t* dst_ptr,
2903                              int width);
2904 void ARGBToRGB24Row_Any_AVX512VBMI(const uint8_t* src_ptr,
2905                                    uint8_t* dst_ptr,
2906                                    int width);
2907 void ARGBToRGB565DitherRow_Any_SSE2(const uint8_t* src_ptr,
2908                                     uint8_t* dst_ptr,
2909                                     const uint32_t param,
2910                                     int width);
2911 void ARGBToRGB565DitherRow_Any_AVX2(const uint8_t* src_ptr,
2912                                     uint8_t* dst_ptr,
2913                                     const uint32_t param,
2914                                     int width);
2915 
2916 void ARGBToRGB565Row_Any_AVX2(const uint8_t* src_ptr,
2917                               uint8_t* dst_ptr,
2918                               int width);
2919 void ARGBToARGB1555Row_Any_AVX2(const uint8_t* src_ptr,
2920                                 uint8_t* dst_ptr,
2921                                 int width);
2922 void ARGBToARGB4444Row_Any_AVX2(const uint8_t* src_ptr,
2923                                 uint8_t* dst_ptr,
2924                                 int width);
2925 void ABGRToAR30Row_Any_AVX2(const uint8_t* src_ptr,
2926                             uint8_t* dst_ptr,
2927                             int width);
2928 void ARGBToAR30Row_Any_AVX2(const uint8_t* src_ptr,
2929                             uint8_t* dst_ptr,
2930                             int width);
2931 
2932 void ARGBToRGB24Row_Any_NEON(const uint8_t* src_ptr,
2933                              uint8_t* dst_ptr,
2934                              int width);
2935 void ARGBToRAWRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2936 void ARGBToRGB565Row_Any_NEON(const uint8_t* src_ptr,
2937                               uint8_t* dst_ptr,
2938                               int width);
2939 void ARGBToARGB1555Row_Any_NEON(const uint8_t* src_ptr,
2940                                 uint8_t* dst_ptr,
2941                                 int width);
2942 void ARGBToARGB4444Row_Any_NEON(const uint8_t* src_ptr,
2943                                 uint8_t* dst_ptr,
2944                                 int width);
2945 void ARGBToRGB565DitherRow_Any_NEON(const uint8_t* src_ptr,
2946                                     uint8_t* dst_ptr,
2947                                     const uint32_t param,
2948                                     int width);
2949 void ARGBToRGB24Row_Any_MSA(const uint8_t* src_ptr,
2950                             uint8_t* dst_ptr,
2951                             int width);
2952 void ARGBToRAWRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2953 void ARGBToRGB565Row_Any_MSA(const uint8_t* src_ptr,
2954                              uint8_t* dst_ptr,
2955                              int width);
2956 void ARGBToARGB1555Row_Any_MSA(const uint8_t* src_ptr,
2957                                uint8_t* dst_ptr,
2958                                int width);
2959 void ARGBToARGB4444Row_Any_MSA(const uint8_t* src_ptr,
2960                                uint8_t* dst_ptr,
2961                                int width);
2962 void ARGBToRGB565DitherRow_Any_MSA(const uint8_t* src_ptr,
2963                                    uint8_t* dst_ptr,
2964                                    const uint32_t param,
2965                                    int width);
2966 
2967 void ARGBToRGB24Row_Any_MMI(const uint8_t* src_ptr,
2968                             uint8_t* dst_ptr,
2969                             int width);
2970 void ARGBToRAWRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2971 void ARGBToRGB565Row_Any_MMI(const uint8_t* src_ptr,
2972                              uint8_t* dst_ptr,
2973                              int width);
2974 void ARGBToARGB1555Row_Any_MMI(const uint8_t* src_ptr,
2975                                uint8_t* dst_ptr,
2976                                int width);
2977 void ARGBToARGB4444Row_Any_MMI(const uint8_t* src_ptr,
2978                                uint8_t* dst_ptr,
2979                                int width);
2980 void ARGBToRGB565DitherRow_Any_MMI(const uint8_t* src_ptr,
2981                                    uint8_t* dst_ptr,
2982                                    const uint32_t param,
2983                                    int width);
2984 
2985 void I444ToARGBRow_Any_NEON(const uint8_t* y_buf,
2986                             const uint8_t* u_buf,
2987                             const uint8_t* v_buf,
2988                             uint8_t* dst_ptr,
2989                             const struct YuvConstants* yuvconstants,
2990                             int width);
2991 void I422ToARGBRow_Any_NEON(const uint8_t* y_buf,
2992                             const uint8_t* u_buf,
2993                             const uint8_t* v_buf,
2994                             uint8_t* dst_ptr,
2995                             const struct YuvConstants* yuvconstants,
2996                             int width);
2997 void I422AlphaToARGBRow_Any_NEON(const uint8_t* y_buf,
2998                                  const uint8_t* u_buf,
2999                                  const uint8_t* v_buf,
3000                                  const uint8_t* a_buf,
3001                                  uint8_t* dst_ptr,
3002                                  const struct YuvConstants* yuvconstants,
3003                                  int width);
3004 void I422ToRGBARow_Any_NEON(const uint8_t* y_buf,
3005                             const uint8_t* u_buf,
3006                             const uint8_t* v_buf,
3007                             uint8_t* dst_ptr,
3008                             const struct YuvConstants* yuvconstants,
3009                             int width);
3010 void I422ToRGB24Row_Any_NEON(const uint8_t* y_buf,
3011                              const uint8_t* u_buf,
3012                              const uint8_t* v_buf,
3013                              uint8_t* dst_ptr,
3014                              const struct YuvConstants* yuvconstants,
3015                              int width);
3016 void I422ToARGB4444Row_Any_NEON(const uint8_t* y_buf,
3017                                 const uint8_t* u_buf,
3018                                 const uint8_t* v_buf,
3019                                 uint8_t* dst_ptr,
3020                                 const struct YuvConstants* yuvconstants,
3021                                 int width);
3022 void I422ToARGB1555Row_Any_NEON(const uint8_t* y_buf,
3023                                 const uint8_t* u_buf,
3024                                 const uint8_t* v_buf,
3025                                 uint8_t* dst_ptr,
3026                                 const struct YuvConstants* yuvconstants,
3027                                 int width);
3028 void I422ToRGB565Row_Any_NEON(const uint8_t* y_buf,
3029                               const uint8_t* u_buf,
3030                               const uint8_t* v_buf,
3031                               uint8_t* dst_ptr,
3032                               const struct YuvConstants* yuvconstants,
3033                               int width);
3034 void NV12ToARGBRow_Any_NEON(const uint8_t* y_buf,
3035                             const uint8_t* uv_buf,
3036                             uint8_t* dst_ptr,
3037                             const struct YuvConstants* yuvconstants,
3038                             int width);
3039 void NV21ToARGBRow_Any_NEON(const uint8_t* y_buf,
3040                             const uint8_t* uv_buf,
3041                             uint8_t* dst_ptr,
3042                             const struct YuvConstants* yuvconstants,
3043                             int width);
3044 void NV12ToRGB24Row_Any_NEON(const uint8_t* y_buf,
3045                              const uint8_t* uv_buf,
3046                              uint8_t* dst_ptr,
3047                              const struct YuvConstants* yuvconstants,
3048                              int width);
3049 void NV21ToRGB24Row_Any_NEON(const uint8_t* y_buf,
3050                              const uint8_t* uv_buf,
3051                              uint8_t* dst_ptr,
3052                              const struct YuvConstants* yuvconstants,
3053                              int width);
3054 void NV21ToYUV24Row_Any_NEON(const uint8_t* src_y,
3055                              const uint8_t* src_vu,
3056                              uint8_t* dst_yuv24,
3057                              int width);
3058 void NV12ToRGB565Row_Any_NEON(const uint8_t* y_buf,
3059                               const uint8_t* uv_buf,
3060                               uint8_t* dst_ptr,
3061                               const struct YuvConstants* yuvconstants,
3062                               int width);
3063 void YUY2ToARGBRow_Any_NEON(const uint8_t* src_ptr,
3064                             uint8_t* dst_ptr,
3065                             const struct YuvConstants* yuvconstants,
3066                             int width);
3067 void UYVYToARGBRow_Any_NEON(const uint8_t* src_ptr,
3068                             uint8_t* dst_ptr,
3069                             const struct YuvConstants* yuvconstants,
3070                             int width);
3071 void I444ToARGBRow_Any_MSA(const uint8_t* y_buf,
3072                            const uint8_t* u_buf,
3073                            const uint8_t* v_buf,
3074                            uint8_t* dst_ptr,
3075                            const struct YuvConstants* yuvconstants,
3076                            int width);
3077 void I422ToARGBRow_Any_MSA(const uint8_t* y_buf,
3078                            const uint8_t* u_buf,
3079                            const uint8_t* v_buf,
3080                            uint8_t* dst_ptr,
3081                            const struct YuvConstants* yuvconstants,
3082                            int width);
3083 void I422ToRGBARow_Any_MSA(const uint8_t* y_buf,
3084                            const uint8_t* u_buf,
3085                            const uint8_t* v_buf,
3086                            uint8_t* dst_ptr,
3087                            const struct YuvConstants* yuvconstants,
3088                            int width);
3089 void I422AlphaToARGBRow_Any_MSA(const uint8_t* y_buf,
3090                                 const uint8_t* u_buf,
3091                                 const uint8_t* v_buf,
3092                                 const uint8_t* a_buf,
3093                                 uint8_t* dst_ptr,
3094                                 const struct YuvConstants* yuvconstants,
3095                                 int width);
3096 void I422ToRGB24Row_Any_MSA(const uint8_t* y_buf,
3097                             const uint8_t* u_buf,
3098                             const uint8_t* v_buf,
3099                             uint8_t* dst_ptr,
3100                             const struct YuvConstants* yuvconstants,
3101                             int width);
3102 void I422ToRGB565Row_Any_MSA(const uint8_t* y_buf,
3103                              const uint8_t* u_buf,
3104                              const uint8_t* v_buf,
3105                              uint8_t* dst_ptr,
3106                              const struct YuvConstants* yuvconstants,
3107                              int width);
3108 void I422ToARGB4444Row_Any_MSA(const uint8_t* y_buf,
3109                                const uint8_t* u_buf,
3110                                const uint8_t* v_buf,
3111                                uint8_t* dst_ptr,
3112                                const struct YuvConstants* yuvconstants,
3113                                int width);
3114 void I422ToARGB1555Row_Any_MSA(const uint8_t* y_buf,
3115                                const uint8_t* u_buf,
3116                                const uint8_t* v_buf,
3117                                uint8_t* dst_ptr,
3118                                const struct YuvConstants* yuvconstants,
3119                                int width);
3120 void NV12ToARGBRow_Any_MSA(const uint8_t* y_buf,
3121                            const uint8_t* uv_buf,
3122                            uint8_t* dst_ptr,
3123                            const struct YuvConstants* yuvconstants,
3124                            int width);
3125 void NV12ToRGB565Row_Any_MSA(const uint8_t* y_buf,
3126                              const uint8_t* uv_buf,
3127                              uint8_t* dst_ptr,
3128                              const struct YuvConstants* yuvconstants,
3129                              int width);
3130 void NV21ToARGBRow_Any_MSA(const uint8_t* y_buf,
3131                            const uint8_t* uv_buf,
3132                            uint8_t* dst_ptr,
3133                            const struct YuvConstants* yuvconstants,
3134                            int width);
3135 void YUY2ToARGBRow_Any_MSA(const uint8_t* src_ptr,
3136                            uint8_t* dst_ptr,
3137                            const struct YuvConstants* yuvconstants,
3138                            int width);
3139 void UYVYToARGBRow_Any_MSA(const uint8_t* src_ptr,
3140                            uint8_t* dst_ptr,
3141                            const struct YuvConstants* yuvconstants,
3142                            int width);
3143 
3144 void YUY2ToYRow_AVX2(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
3145 void YUY2ToUVRow_AVX2(const uint8_t* src_yuy2,
3146                       int stride_yuy2,
3147                       uint8_t* dst_u,
3148                       uint8_t* dst_v,
3149                       int width);
3150 void YUY2ToUV422Row_AVX2(const uint8_t* src_yuy2,
3151                          uint8_t* dst_u,
3152                          uint8_t* dst_v,
3153                          int width);
3154 void YUY2ToYRow_SSE2(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
3155 void YUY2ToUVRow_SSE2(const uint8_t* src_yuy2,
3156                       int stride_yuy2,
3157                       uint8_t* dst_u,
3158                       uint8_t* dst_v,
3159                       int width);
3160 void YUY2ToUV422Row_SSE2(const uint8_t* src_yuy2,
3161                          uint8_t* dst_u,
3162                          uint8_t* dst_v,
3163                          int width);
3164 void YUY2ToYRow_NEON(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
3165 void YUY2ToUVRow_NEON(const uint8_t* src_yuy2,
3166                       int stride_yuy2,
3167                       uint8_t* dst_u,
3168                       uint8_t* dst_v,
3169                       int width);
3170 void YUY2ToUV422Row_NEON(const uint8_t* src_yuy2,
3171                          uint8_t* dst_u,
3172                          uint8_t* dst_v,
3173                          int width);
3174 void YUY2ToYRow_MSA(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
3175 void YUY2ToYRow_MMI(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
3176 void YUY2ToUVRow_MSA(const uint8_t* src_yuy2,
3177                      int src_stride_yuy2,
3178                      uint8_t* dst_u,
3179                      uint8_t* dst_v,
3180                      int width);
3181 void YUY2ToUVRow_MMI(const uint8_t* src_yuy2,
3182                      int src_stride_yuy2,
3183                      uint8_t* dst_u,
3184                      uint8_t* dst_v,
3185                      int width);
3186 void YUY2ToUV422Row_MSA(const uint8_t* src_yuy2,
3187                         uint8_t* dst_u,
3188                         uint8_t* dst_v,
3189                         int width);
3190 void YUY2ToUV422Row_MMI(const uint8_t* src_yuy2,
3191                         uint8_t* dst_u,
3192                         uint8_t* dst_v,
3193                         int width);
3194 void YUY2ToYRow_C(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
3195 void YUY2ToUVRow_C(const uint8_t* src_yuy2,
3196                    int src_stride_yuy2,
3197                    uint8_t* dst_u,
3198                    uint8_t* dst_v,
3199                    int width);
3200 void YUY2ToUV422Row_C(const uint8_t* src_yuy2,
3201                       uint8_t* dst_u,
3202                       uint8_t* dst_v,
3203                       int width);
3204 void YUY2ToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3205 void YUY2ToUVRow_Any_AVX2(const uint8_t* src_ptr,
3206                           int src_stride_ptr,
3207                           uint8_t* dst_u,
3208                           uint8_t* dst_v,
3209                           int width);
3210 void YUY2ToUV422Row_Any_AVX2(const uint8_t* src_ptr,
3211                              uint8_t* dst_u,
3212                              uint8_t* dst_v,
3213                              int width);
3214 void YUY2ToYRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3215 void YUY2ToUVRow_Any_SSE2(const uint8_t* src_ptr,
3216                           int src_stride_ptr,
3217                           uint8_t* dst_u,
3218                           uint8_t* dst_v,
3219                           int width);
3220 void YUY2ToUV422Row_Any_SSE2(const uint8_t* src_ptr,
3221                              uint8_t* dst_u,
3222                              uint8_t* dst_v,
3223                              int width);
3224 void YUY2ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3225 void YUY2ToUVRow_Any_NEON(const uint8_t* src_ptr,
3226                           int src_stride_ptr,
3227                           uint8_t* dst_u,
3228                           uint8_t* dst_v,
3229                           int width);
3230 void YUY2ToUV422Row_Any_NEON(const uint8_t* src_ptr,
3231                              uint8_t* dst_u,
3232                              uint8_t* dst_v,
3233                              int width);
3234 void YUY2ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3235 void YUY2ToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3236 void YUY2ToUVRow_Any_MSA(const uint8_t* src_ptr,
3237                          int src_stride_ptr,
3238                          uint8_t* dst_u,
3239                          uint8_t* dst_v,
3240                          int width);
3241 void YUY2ToUVRow_Any_MMI(const uint8_t* src_ptr,
3242                          int src_stride_ptr,
3243                          uint8_t* dst_u,
3244                          uint8_t* dst_v,
3245                          int width);
3246 void YUY2ToUV422Row_Any_MSA(const uint8_t* src_ptr,
3247                             uint8_t* dst_u,
3248                             uint8_t* dst_v,
3249                             int width);
3250 void YUY2ToUV422Row_Any_MMI(const uint8_t* src_ptr,
3251                             uint8_t* dst_u,
3252                             uint8_t* dst_v,
3253                             int width);
3254 void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
3255 void UYVYToUVRow_AVX2(const uint8_t* src_uyvy,
3256                       int stride_uyvy,
3257                       uint8_t* dst_u,
3258                       uint8_t* dst_v,
3259                       int width);
3260 void UYVYToUV422Row_AVX2(const uint8_t* src_uyvy,
3261                          uint8_t* dst_u,
3262                          uint8_t* dst_v,
3263                          int width);
3264 void UYVYToYRow_SSE2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
3265 void UYVYToUVRow_SSE2(const uint8_t* src_uyvy,
3266                       int stride_uyvy,
3267                       uint8_t* dst_u,
3268                       uint8_t* dst_v,
3269                       int width);
3270 void UYVYToUV422Row_SSE2(const uint8_t* src_uyvy,
3271                          uint8_t* dst_u,
3272                          uint8_t* dst_v,
3273                          int width);
3274 void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
3275 void UYVYToUVRow_AVX2(const uint8_t* src_uyvy,
3276                       int stride_uyvy,
3277                       uint8_t* dst_u,
3278                       uint8_t* dst_v,
3279                       int width);
3280 void UYVYToUV422Row_AVX2(const uint8_t* src_uyvy,
3281                          uint8_t* dst_u,
3282                          uint8_t* dst_v,
3283                          int width);
3284 void UYVYToYRow_NEON(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
3285 void UYVYToUVRow_NEON(const uint8_t* src_uyvy,
3286                       int stride_uyvy,
3287                       uint8_t* dst_u,
3288                       uint8_t* dst_v,
3289                       int width);
3290 void UYVYToUV422Row_NEON(const uint8_t* src_uyvy,
3291                          uint8_t* dst_u,
3292                          uint8_t* dst_v,
3293                          int width);
3294 void UYVYToYRow_MSA(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
3295 void UYVYToYRow_MMI(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
3296 void UYVYToUVRow_MSA(const uint8_t* src_uyvy,
3297                      int src_stride_uyvy,
3298                      uint8_t* dst_u,
3299                      uint8_t* dst_v,
3300                      int width);
3301 void UYVYToUVRow_MMI(const uint8_t* src_uyvy,
3302                      int src_stride_uyvy,
3303                      uint8_t* dst_u,
3304                      uint8_t* dst_v,
3305                      int width);
3306 void UYVYToUV422Row_MSA(const uint8_t* src_uyvy,
3307                         uint8_t* dst_u,
3308                         uint8_t* dst_v,
3309                         int width);
3310 void UYVYToUV422Row_MMI(const uint8_t* src_uyvy,
3311                         uint8_t* dst_u,
3312                         uint8_t* dst_v,
3313                         int width);
3314 
3315 void UYVYToYRow_C(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
3316 void UYVYToUVRow_C(const uint8_t* src_uyvy,
3317                    int src_stride_uyvy,
3318                    uint8_t* dst_u,
3319                    uint8_t* dst_v,
3320                    int width);
3321 void UYVYToUV422Row_C(const uint8_t* src_uyvy,
3322                       uint8_t* dst_u,
3323                       uint8_t* dst_v,
3324                       int width);
3325 void UYVYToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3326 void UYVYToUVRow_Any_AVX2(const uint8_t* src_ptr,
3327                           int src_stride_ptr,
3328                           uint8_t* dst_u,
3329                           uint8_t* dst_v,
3330                           int width);
3331 void UYVYToUV422Row_Any_AVX2(const uint8_t* src_ptr,
3332                              uint8_t* dst_u,
3333                              uint8_t* dst_v,
3334                              int width);
3335 void UYVYToYRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3336 void UYVYToUVRow_Any_SSE2(const uint8_t* src_ptr,
3337                           int src_stride_ptr,
3338                           uint8_t* dst_u,
3339                           uint8_t* dst_v,
3340                           int width);
3341 void UYVYToUV422Row_Any_SSE2(const uint8_t* src_ptr,
3342                              uint8_t* dst_u,
3343                              uint8_t* dst_v,
3344                              int width);
3345 void UYVYToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3346 void UYVYToUVRow_Any_NEON(const uint8_t* src_ptr,
3347                           int src_stride_ptr,
3348                           uint8_t* dst_u,
3349                           uint8_t* dst_v,
3350                           int width);
3351 void UYVYToUV422Row_Any_NEON(const uint8_t* src_ptr,
3352                              uint8_t* dst_u,
3353                              uint8_t* dst_v,
3354                              int width);
3355 void UYVYToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3356 void UYVYToYRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3357 void UYVYToUVRow_Any_MSA(const uint8_t* src_ptr,
3358                          int src_stride_ptr,
3359                          uint8_t* dst_u,
3360                          uint8_t* dst_v,
3361                          int width);
3362 void UYVYToUVRow_Any_MMI(const uint8_t* src_ptr,
3363                          int src_stride_ptr,
3364                          uint8_t* dst_u,
3365                          uint8_t* dst_v,
3366                          int width);
3367 void UYVYToUV422Row_Any_MSA(const uint8_t* src_ptr,
3368                             uint8_t* dst_u,
3369                             uint8_t* dst_v,
3370                             int width);
3371 void UYVYToUV422Row_Any_MMI(const uint8_t* src_ptr,
3372                             uint8_t* dst_u,
3373                             uint8_t* dst_v,
3374                             int width);
3375 void UVToVURow_C(const uint8_t* src_uv, uint8_t* dst_vu, int width);
3376 void UVToVURow_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width);
3377 void UVToVURow_Any_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width);
3378 void AYUVToYRow_C(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
3379 void AYUVToUVRow_C(const uint8_t* src_ayuv,
3380                    int stride_ayuv,
3381                    uint8_t* dst_uv,
3382                    int width);
3383 void AYUVToVURow_C(const uint8_t* src_ayuv,
3384                    int stride_ayuv,
3385                    uint8_t* dst_vu,
3386                    int width);
3387 void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
3388 void AYUVToUVRow_NEON(const uint8_t* src_ayuv,
3389                       int stride_ayuv,
3390                       uint8_t* dst_uv,
3391                       int width);
3392 void AYUVToVURow_NEON(const uint8_t* src_ayuv,
3393                       int stride_ayuv,
3394                       uint8_t* dst_vu,
3395                       int width);
3396 void AYUVToYRow_Any_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
3397 void AYUVToUVRow_Any_NEON(const uint8_t* src_ayuv,
3398                           int stride_ayuv,
3399                           uint8_t* dst_uv,
3400                           int width);
3401 void AYUVToVURow_Any_NEON(const uint8_t* src_ayuv,
3402                           int stride_ayuv,
3403                           uint8_t* dst_vu,
3404                           int width);
3405 
3406 void I422ToYUY2Row_C(const uint8_t* src_y,
3407                      const uint8_t* src_u,
3408                      const uint8_t* src_v,
3409                      uint8_t* dst_frame,
3410                      int width);
3411 void I422ToUYVYRow_C(const uint8_t* src_y,
3412                      const uint8_t* src_u,
3413                      const uint8_t* src_v,
3414                      uint8_t* dst_frame,
3415                      int width);
3416 void I422ToYUY2Row_SSE2(const uint8_t* src_y,
3417                         const uint8_t* src_u,
3418                         const uint8_t* src_v,
3419                         uint8_t* dst_yuy2,
3420                         int width);
3421 void I422ToUYVYRow_SSE2(const uint8_t* src_y,
3422                         const uint8_t* src_u,
3423                         const uint8_t* src_v,
3424                         uint8_t* dst_uyvy,
3425                         int width);
3426 void I422ToYUY2Row_Any_SSE2(const uint8_t* y_buf,
3427                             const uint8_t* u_buf,
3428                             const uint8_t* v_buf,
3429                             uint8_t* dst_ptr,
3430                             int width);
3431 void I422ToUYVYRow_Any_SSE2(const uint8_t* y_buf,
3432                             const uint8_t* u_buf,
3433                             const uint8_t* v_buf,
3434                             uint8_t* dst_ptr,
3435                             int width);
3436 void I422ToYUY2Row_AVX2(const uint8_t* src_y,
3437                         const uint8_t* src_u,
3438                         const uint8_t* src_v,
3439                         uint8_t* dst_yuy2,
3440                         int width);
3441 void I422ToUYVYRow_AVX2(const uint8_t* src_y,
3442                         const uint8_t* src_u,
3443                         const uint8_t* src_v,
3444                         uint8_t* dst_uyvy,
3445                         int width);
3446 void I422ToYUY2Row_Any_AVX2(const uint8_t* y_buf,
3447                             const uint8_t* u_buf,
3448                             const uint8_t* v_buf,
3449                             uint8_t* dst_ptr,
3450                             int width);
3451 void I422ToUYVYRow_Any_AVX2(const uint8_t* y_buf,
3452                             const uint8_t* u_buf,
3453                             const uint8_t* v_buf,
3454                             uint8_t* dst_ptr,
3455                             int width);
3456 void I422ToYUY2Row_NEON(const uint8_t* src_y,
3457                         const uint8_t* src_u,
3458                         const uint8_t* src_v,
3459                         uint8_t* dst_yuy2,
3460                         int width);
3461 void I422ToUYVYRow_NEON(const uint8_t* src_y,
3462                         const uint8_t* src_u,
3463                         const uint8_t* src_v,
3464                         uint8_t* dst_uyvy,
3465                         int width);
3466 void I422ToYUY2Row_Any_NEON(const uint8_t* y_buf,
3467                             const uint8_t* u_buf,
3468                             const uint8_t* v_buf,
3469                             uint8_t* dst_ptr,
3470                             int width);
3471 void I422ToUYVYRow_Any_NEON(const uint8_t* y_buf,
3472                             const uint8_t* u_buf,
3473                             const uint8_t* v_buf,
3474                             uint8_t* dst_ptr,
3475                             int width);
3476 void I422ToYUY2Row_MSA(const uint8_t* src_y,
3477                        const uint8_t* src_u,
3478                        const uint8_t* src_v,
3479                        uint8_t* dst_yuy2,
3480                        int width);
3481 void I422ToYUY2Row_MMI(const uint8_t* src_y,
3482                        const uint8_t* src_u,
3483                        const uint8_t* src_v,
3484                        uint8_t* dst_yuy2,
3485                        int width);
3486 void I422ToUYVYRow_MSA(const uint8_t* src_y,
3487                        const uint8_t* src_u,
3488                        const uint8_t* src_v,
3489                        uint8_t* dst_uyvy,
3490                        int width);
3491 void I422ToUYVYRow_MMI(const uint8_t* src_y,
3492                        const uint8_t* src_u,
3493                        const uint8_t* src_v,
3494                        uint8_t* dst_uyvy,
3495                        int width);
3496 void I422ToYUY2Row_Any_MSA(const uint8_t* y_buf,
3497                            const uint8_t* u_buf,
3498                            const uint8_t* v_buf,
3499                            uint8_t* dst_ptr,
3500                            int width);
3501 void I422ToYUY2Row_Any_MMI(const uint8_t* y_buf,
3502                            const uint8_t* u_buf,
3503                            const uint8_t* v_buf,
3504                            uint8_t* dst_ptr,
3505                            int width);
3506 void I422ToUYVYRow_Any_MSA(const uint8_t* y_buf,
3507                            const uint8_t* u_buf,
3508                            const uint8_t* v_buf,
3509                            uint8_t* dst_ptr,
3510                            int width);
3511 void I422ToUYVYRow_Any_MMI(const uint8_t* y_buf,
3512                            const uint8_t* u_buf,
3513                            const uint8_t* v_buf,
3514                            uint8_t* dst_ptr,
3515                            int width);
3516 
3517 // Effects related row functions.
3518 void ARGBAttenuateRow_C(const uint8_t* src_argb, uint8_t* dst_argb, int width);
3519 void ARGBAttenuateRow_SSSE3(const uint8_t* src_argb,
3520                             uint8_t* dst_argb,
3521                             int width);
3522 void ARGBAttenuateRow_AVX2(const uint8_t* src_argb,
3523                            uint8_t* dst_argb,
3524                            int width);
3525 void ARGBAttenuateRow_NEON(const uint8_t* src_argb,
3526                            uint8_t* dst_argb,
3527                            int width);
3528 void ARGBAttenuateRow_MSA(const uint8_t* src_argb,
3529                           uint8_t* dst_argb,
3530                           int width);
3531 void ARGBAttenuateRow_MMI(const uint8_t* src_argb,
3532                           uint8_t* dst_argb,
3533                           int width);
3534 void ARGBAttenuateRow_Any_SSSE3(const uint8_t* src_ptr,
3535                                 uint8_t* dst_ptr,
3536                                 int width);
3537 void ARGBAttenuateRow_Any_AVX2(const uint8_t* src_ptr,
3538                                uint8_t* dst_ptr,
3539                                int width);
3540 void ARGBAttenuateRow_Any_NEON(const uint8_t* src_ptr,
3541                                uint8_t* dst_ptr,
3542                                int width);
3543 void ARGBAttenuateRow_Any_MSA(const uint8_t* src_ptr,
3544                               uint8_t* dst_ptr,
3545                               int width);
3546 void ARGBAttenuateRow_Any_MMI(const uint8_t* src_ptr,
3547                               uint8_t* dst_ptr,
3548                               int width);
3549 
3550 // Inverse table for unattenuate, shared by C and SSE2.
3551 extern const uint32_t fixed_invtbl8[256];
3552 void ARGBUnattenuateRow_C(const uint8_t* src_argb,
3553                           uint8_t* dst_argb,
3554                           int width);
3555 void ARGBUnattenuateRow_SSE2(const uint8_t* src_argb,
3556                              uint8_t* dst_argb,
3557                              int width);
3558 void ARGBUnattenuateRow_AVX2(const uint8_t* src_argb,
3559                              uint8_t* dst_argb,
3560                              int width);
3561 void ARGBUnattenuateRow_Any_SSE2(const uint8_t* src_ptr,
3562                                  uint8_t* dst_ptr,
3563                                  int width);
3564 void ARGBUnattenuateRow_Any_AVX2(const uint8_t* src_ptr,
3565                                  uint8_t* dst_ptr,
3566                                  int width);
3567 
3568 void ARGBGrayRow_C(const uint8_t* src_argb, uint8_t* dst_argb, int width);
3569 void ARGBGrayRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_argb, int width);
3570 void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width);
3571 void ARGBGrayRow_MSA(const uint8_t* src_argb, uint8_t* dst_argb, int width);
3572 void ARGBGrayRow_MMI(const uint8_t* src_argb, uint8_t* dst_argb, int width);
3573 
3574 void ARGBSepiaRow_C(uint8_t* dst_argb, int width);
3575 void ARGBSepiaRow_SSSE3(uint8_t* dst_argb, int width);
3576 void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width);
3577 void ARGBSepiaRow_MSA(uint8_t* dst_argb, int width);
3578 void ARGBSepiaRow_MMI(uint8_t* dst_argb, int width);
3579 
3580 void ARGBColorMatrixRow_C(const uint8_t* src_argb,
3581                           uint8_t* dst_argb,
3582                           const int8_t* matrix_argb,
3583                           int width);
3584 void ARGBColorMatrixRow_SSSE3(const uint8_t* src_argb,
3585                               uint8_t* dst_argb,
3586                               const int8_t* matrix_argb,
3587                               int width);
3588 void ARGBColorMatrixRow_NEON(const uint8_t* src_argb,
3589                              uint8_t* dst_argb,
3590                              const int8_t* matrix_argb,
3591                              int width);
3592 void ARGBColorMatrixRow_MSA(const uint8_t* src_argb,
3593                             uint8_t* dst_argb,
3594                             const int8_t* matrix_argb,
3595                             int width);
3596 void ARGBColorMatrixRow_MMI(const uint8_t* src_argb,
3597                             uint8_t* dst_argb,
3598                             const int8_t* matrix_argb,
3599                             int width);
3600 
3601 void ARGBColorTableRow_C(uint8_t* dst_argb,
3602                          const uint8_t* table_argb,
3603                          int width);
3604 void ARGBColorTableRow_X86(uint8_t* dst_argb,
3605                            const uint8_t* table_argb,
3606                            int width);
3607 
3608 void RGBColorTableRow_C(uint8_t* dst_argb,
3609                         const uint8_t* table_argb,
3610                         int width);
3611 void RGBColorTableRow_X86(uint8_t* dst_argb,
3612                           const uint8_t* table_argb,
3613                           int width);
3614 
3615 void ARGBQuantizeRow_C(uint8_t* dst_argb,
3616                        int scale,
3617                        int interval_size,
3618                        int interval_offset,
3619                        int width);
3620 void ARGBQuantizeRow_SSE2(uint8_t* dst_argb,
3621                           int scale,
3622                           int interval_size,
3623                           int interval_offset,
3624                           int width);
3625 void ARGBQuantizeRow_NEON(uint8_t* dst_argb,
3626                           int scale,
3627                           int interval_size,
3628                           int interval_offset,
3629                           int width);
3630 void ARGBQuantizeRow_MSA(uint8_t* dst_argb,
3631                          int scale,
3632                          int interval_size,
3633                          int interval_offset,
3634                          int width);
3635 
3636 void ARGBShadeRow_C(const uint8_t* src_argb,
3637                     uint8_t* dst_argb,
3638                     int width,
3639                     uint32_t value);
3640 void ARGBShadeRow_SSE2(const uint8_t* src_argb,
3641                        uint8_t* dst_argb,
3642                        int width,
3643                        uint32_t value);
3644 void ARGBShadeRow_NEON(const uint8_t* src_argb,
3645                        uint8_t* dst_argb,
3646                        int width,
3647                        uint32_t value);
3648 void ARGBShadeRow_MSA(const uint8_t* src_argb,
3649                       uint8_t* dst_argb,
3650                       int width,
3651                       uint32_t value);
3652 void ARGBShadeRow_MMI(const uint8_t* src_argb,
3653                       uint8_t* dst_argb,
3654                       int width,
3655                       uint32_t value);
3656 
3657 // Used for blur.
3658 void CumulativeSumToAverageRow_SSE2(const int32_t* topleft,
3659                                     const int32_t* botleft,
3660                                     int width,
3661                                     int area,
3662                                     uint8_t* dst,
3663                                     int count);
3664 void ComputeCumulativeSumRow_SSE2(const uint8_t* row,
3665                                   int32_t* cumsum,
3666                                   const int32_t* previous_cumsum,
3667                                   int width);
3668 
3669 void ComputeCumulativeSumRow_MMI(const uint8_t* row,
3670                                  int32_t* cumsum,
3671                                  const int32_t* previous_cumsum,
3672                                  int width);
3673 
3674 void CumulativeSumToAverageRow_C(const int32_t* tl,
3675                                  const int32_t* bl,
3676                                  int w,
3677                                  int area,
3678                                  uint8_t* dst,
3679                                  int count);
3680 void ComputeCumulativeSumRow_C(const uint8_t* row,
3681                                int32_t* cumsum,
3682                                const int32_t* previous_cumsum,
3683                                int width);
3684 
3685 LIBYUV_API
3686 void ARGBAffineRow_C(const uint8_t* src_argb,
3687                      int src_argb_stride,
3688                      uint8_t* dst_argb,
3689                      const float* uv_dudv,
3690                      int width);
3691 LIBYUV_API
3692 void ARGBAffineRow_SSE2(const uint8_t* src_argb,
3693                         int src_argb_stride,
3694                         uint8_t* dst_argb,
3695                         const float* src_dudv,
3696                         int width);
3697 
3698 // Used for I420Scale, ARGBScale, and ARGBInterpolate.
3699 void InterpolateRow_C(uint8_t* dst_ptr,
3700                       const uint8_t* src_ptr,
3701                       ptrdiff_t src_stride,
3702                       int width,
3703                       int source_y_fraction);
3704 void InterpolateRow_SSSE3(uint8_t* dst_ptr,
3705                           const uint8_t* src_ptr,
3706                           ptrdiff_t src_stride,
3707                           int dst_width,
3708                           int source_y_fraction);
3709 void InterpolateRow_AVX2(uint8_t* dst_ptr,
3710                          const uint8_t* src_ptr,
3711                          ptrdiff_t src_stride,
3712                          int dst_width,
3713                          int source_y_fraction);
3714 void InterpolateRow_NEON(uint8_t* dst_ptr,
3715                          const uint8_t* src_ptr,
3716                          ptrdiff_t src_stride,
3717                          int dst_width,
3718                          int source_y_fraction);
3719 void InterpolateRow_MSA(uint8_t* dst_ptr,
3720                         const uint8_t* src_ptr,
3721                         ptrdiff_t src_stride,
3722                         int width,
3723                         int source_y_fraction);
3724 void InterpolateRow_MMI(uint8_t* dst_ptr,
3725                         const uint8_t* src_ptr,
3726                         ptrdiff_t src_stride,
3727                         int width,
3728                         int source_y_fraction);
3729 void InterpolateRow_Any_NEON(uint8_t* dst_ptr,
3730                              const uint8_t* src_ptr,
3731                              ptrdiff_t src_stride_ptr,
3732                              int width,
3733                              int source_y_fraction);
3734 void InterpolateRow_Any_SSSE3(uint8_t* dst_ptr,
3735                               const uint8_t* src_ptr,
3736                               ptrdiff_t src_stride_ptr,
3737                               int width,
3738                               int source_y_fraction);
3739 void InterpolateRow_Any_AVX2(uint8_t* dst_ptr,
3740                              const uint8_t* src_ptr,
3741                              ptrdiff_t src_stride_ptr,
3742                              int width,
3743                              int source_y_fraction);
3744 void InterpolateRow_Any_MSA(uint8_t* dst_ptr,
3745                             const uint8_t* src_ptr,
3746                             ptrdiff_t src_stride_ptr,
3747                             int width,
3748                             int source_y_fraction);
3749 void InterpolateRow_Any_MMI(uint8_t* dst_ptr,
3750                             const uint8_t* src_ptr,
3751                             ptrdiff_t src_stride_ptr,
3752                             int width,
3753                             int source_y_fraction);
3754 
3755 void InterpolateRow_16_C(uint16_t* dst_ptr,
3756                          const uint16_t* src_ptr,
3757                          ptrdiff_t src_stride,
3758                          int width,
3759                          int source_y_fraction);
3760 
3761 // Sobel images.
3762 void SobelXRow_C(const uint8_t* src_y0,
3763                  const uint8_t* src_y1,
3764                  const uint8_t* src_y2,
3765                  uint8_t* dst_sobelx,
3766                  int width);
3767 void SobelXRow_SSE2(const uint8_t* src_y0,
3768                     const uint8_t* src_y1,
3769                     const uint8_t* src_y2,
3770                     uint8_t* dst_sobelx,
3771                     int width);
3772 void SobelXRow_NEON(const uint8_t* src_y0,
3773                     const uint8_t* src_y1,
3774                     const uint8_t* src_y2,
3775                     uint8_t* dst_sobelx,
3776                     int width);
3777 void SobelXRow_MSA(const uint8_t* src_y0,
3778                    const uint8_t* src_y1,
3779                    const uint8_t* src_y2,
3780                    uint8_t* dst_sobelx,
3781                    int width);
3782 void SobelXRow_MMI(const uint8_t* src_y0,
3783                    const uint8_t* src_y1,
3784                    const uint8_t* src_y2,
3785                    uint8_t* dst_sobelx,
3786                    int width);
3787 void SobelYRow_C(const uint8_t* src_y0,
3788                  const uint8_t* src_y1,
3789                  uint8_t* dst_sobely,
3790                  int width);
3791 void SobelYRow_SSE2(const uint8_t* src_y0,
3792                     const uint8_t* src_y1,
3793                     uint8_t* dst_sobely,
3794                     int width);
3795 void SobelYRow_NEON(const uint8_t* src_y0,
3796                     const uint8_t* src_y1,
3797                     uint8_t* dst_sobely,
3798                     int width);
3799 void SobelYRow_MSA(const uint8_t* src_y0,
3800                    const uint8_t* src_y1,
3801                    uint8_t* dst_sobely,
3802                    int width);
3803 void SobelYRow_MMI(const uint8_t* src_y0,
3804                    const uint8_t* src_y1,
3805                    uint8_t* dst_sobely,
3806                    int width);
3807 void SobelRow_C(const uint8_t* src_sobelx,
3808                 const uint8_t* src_sobely,
3809                 uint8_t* dst_argb,
3810                 int width);
3811 void SobelRow_SSE2(const uint8_t* src_sobelx,
3812                    const uint8_t* src_sobely,
3813                    uint8_t* dst_argb,
3814                    int width);
3815 void SobelRow_NEON(const uint8_t* src_sobelx,
3816                    const uint8_t* src_sobely,
3817                    uint8_t* dst_argb,
3818                    int width);
3819 void SobelRow_MSA(const uint8_t* src_sobelx,
3820                   const uint8_t* src_sobely,
3821                   uint8_t* dst_argb,
3822                   int width);
3823 void SobelRow_MMI(const uint8_t* src_sobelx,
3824                   const uint8_t* src_sobely,
3825                   uint8_t* dst_argb,
3826                   int width);
3827 void SobelToPlaneRow_C(const uint8_t* src_sobelx,
3828                        const uint8_t* src_sobely,
3829                        uint8_t* dst_y,
3830                        int width);
3831 void SobelToPlaneRow_SSE2(const uint8_t* src_sobelx,
3832                           const uint8_t* src_sobely,
3833                           uint8_t* dst_y,
3834                           int width);
3835 void SobelToPlaneRow_NEON(const uint8_t* src_sobelx,
3836                           const uint8_t* src_sobely,
3837                           uint8_t* dst_y,
3838                           int width);
3839 void SobelToPlaneRow_MSA(const uint8_t* src_sobelx,
3840                          const uint8_t* src_sobely,
3841                          uint8_t* dst_y,
3842                          int width);
3843 void SobelToPlaneRow_MMI(const uint8_t* src_sobelx,
3844                          const uint8_t* src_sobely,
3845                          uint8_t* dst_y,
3846                          int width);
3847 void SobelXYRow_C(const uint8_t* src_sobelx,
3848                   const uint8_t* src_sobely,
3849                   uint8_t* dst_argb,
3850                   int width);
3851 void SobelXYRow_SSE2(const uint8_t* src_sobelx,
3852                      const uint8_t* src_sobely,
3853                      uint8_t* dst_argb,
3854                      int width);
3855 void SobelXYRow_NEON(const uint8_t* src_sobelx,
3856                      const uint8_t* src_sobely,
3857                      uint8_t* dst_argb,
3858                      int width);
3859 void SobelXYRow_MSA(const uint8_t* src_sobelx,
3860                     const uint8_t* src_sobely,
3861                     uint8_t* dst_argb,
3862                     int width);
3863 void SobelXYRow_MMI(const uint8_t* src_sobelx,
3864                     const uint8_t* src_sobely,
3865                     uint8_t* dst_argb,
3866                     int width);
3867 void SobelRow_Any_SSE2(const uint8_t* y_buf,
3868                        const uint8_t* uv_buf,
3869                        uint8_t* dst_ptr,
3870                        int width);
3871 void SobelRow_Any_NEON(const uint8_t* y_buf,
3872                        const uint8_t* uv_buf,
3873                        uint8_t* dst_ptr,
3874                        int width);
3875 void SobelRow_Any_MSA(const uint8_t* y_buf,
3876                       const uint8_t* uv_buf,
3877                       uint8_t* dst_ptr,
3878                       int width);
3879 void SobelRow_Any_MMI(const uint8_t* y_buf,
3880                       const uint8_t* uv_buf,
3881                       uint8_t* dst_ptr,
3882                       int width);
3883 void SobelToPlaneRow_Any_SSE2(const uint8_t* y_buf,
3884                               const uint8_t* uv_buf,
3885                               uint8_t* dst_ptr,
3886                               int width);
3887 void SobelToPlaneRow_Any_NEON(const uint8_t* y_buf,
3888                               const uint8_t* uv_buf,
3889                               uint8_t* dst_ptr,
3890                               int width);
3891 void SobelToPlaneRow_Any_MSA(const uint8_t* y_buf,
3892                              const uint8_t* uv_buf,
3893                              uint8_t* dst_ptr,
3894                              int width);
3895 void SobelToPlaneRow_Any_MMI(const uint8_t* y_buf,
3896                              const uint8_t* uv_buf,
3897                              uint8_t* dst_ptr,
3898                              int width);
3899 void SobelXYRow_Any_SSE2(const uint8_t* y_buf,
3900                          const uint8_t* uv_buf,
3901                          uint8_t* dst_ptr,
3902                          int width);
3903 void SobelXYRow_Any_NEON(const uint8_t* y_buf,
3904                          const uint8_t* uv_buf,
3905                          uint8_t* dst_ptr,
3906                          int width);
3907 void SobelXYRow_Any_MSA(const uint8_t* y_buf,
3908                         const uint8_t* uv_buf,
3909                         uint8_t* dst_ptr,
3910                         int width);
3911 void SobelXYRow_Any_MMI(const uint8_t* y_buf,
3912                         const uint8_t* uv_buf,
3913                         uint8_t* dst_ptr,
3914                         int width);
3915 
3916 void ARGBPolynomialRow_C(const uint8_t* src_argb,
3917                          uint8_t* dst_argb,
3918                          const float* poly,
3919                          int width);
3920 void ARGBPolynomialRow_SSE2(const uint8_t* src_argb,
3921                             uint8_t* dst_argb,
3922                             const float* poly,
3923                             int width);
3924 void ARGBPolynomialRow_AVX2(const uint8_t* src_argb,
3925                             uint8_t* dst_argb,
3926                             const float* poly,
3927                             int width);
3928 
3929 // Scale and convert to half float.
3930 void HalfFloatRow_C(const uint16_t* src, uint16_t* dst, float scale, int width);
3931 void HalfFloatRow_SSE2(const uint16_t* src,
3932                        uint16_t* dst,
3933                        float scale,
3934                        int width);
3935 void HalfFloatRow_Any_SSE2(const uint16_t* src_ptr,
3936                            uint16_t* dst_ptr,
3937                            float param,
3938                            int width);
3939 void HalfFloatRow_AVX2(const uint16_t* src,
3940                        uint16_t* dst,
3941                        float scale,
3942                        int width);
3943 void HalfFloatRow_Any_AVX2(const uint16_t* src_ptr,
3944                            uint16_t* dst_ptr,
3945                            float param,
3946                            int width);
3947 void HalfFloatRow_F16C(const uint16_t* src,
3948                        uint16_t* dst,
3949                        float scale,
3950                        int width);
3951 void HalfFloatRow_Any_F16C(const uint16_t* src,
3952                            uint16_t* dst,
3953                            float scale,
3954                            int width);
3955 void HalfFloat1Row_F16C(const uint16_t* src,
3956                         uint16_t* dst,
3957                         float scale,
3958                         int width);
3959 void HalfFloat1Row_Any_F16C(const uint16_t* src,
3960                             uint16_t* dst,
3961                             float scale,
3962                             int width);
3963 void HalfFloatRow_NEON(const uint16_t* src,
3964                        uint16_t* dst,
3965                        float scale,
3966                        int width);
3967 void HalfFloatRow_Any_NEON(const uint16_t* src_ptr,
3968                            uint16_t* dst_ptr,
3969                            float param,
3970                            int width);
3971 void HalfFloat1Row_NEON(const uint16_t* src,
3972                         uint16_t* dst,
3973                         float scale,
3974                         int width);
3975 void HalfFloat1Row_Any_NEON(const uint16_t* src_ptr,
3976                             uint16_t* dst_ptr,
3977                             float param,
3978                             int width);
3979 void HalfFloatRow_MSA(const uint16_t* src,
3980                       uint16_t* dst,
3981                       float scale,
3982                       int width);
3983 void HalfFloatRow_Any_MSA(const uint16_t* src_ptr,
3984                           uint16_t* dst_ptr,
3985                           float param,
3986                           int width);
3987 void ByteToFloatRow_C(const uint8_t* src, float* dst, float scale, int width);
3988 void ByteToFloatRow_NEON(const uint8_t* src,
3989                          float* dst,
3990                          float scale,
3991                          int width);
3992 void ByteToFloatRow_Any_NEON(const uint8_t* src_ptr,
3993                              float* dst_ptr,
3994                              float param,
3995                              int width);
3996 
3997 void ARGBLumaColorTableRow_C(const uint8_t* src_argb,
3998                              uint8_t* dst_argb,
3999                              int width,
4000                              const uint8_t* luma,
4001                              uint32_t lumacoeff);
4002 void ARGBLumaColorTableRow_SSSE3(const uint8_t* src_argb,
4003                                  uint8_t* dst_argb,
4004                                  int width,
4005                                  const uint8_t* luma,
4006                                  uint32_t lumacoeff);
4007 
4008 float ScaleMaxSamples_C(const float* src, float* dst, float scale, int width);
4009 float ScaleMaxSamples_NEON(const float* src,
4010                            float* dst,
4011                            float scale,
4012                            int width);
4013 float ScaleSumSamples_C(const float* src, float* dst, float scale, int width);
4014 float ScaleSumSamples_NEON(const float* src,
4015                            float* dst,
4016                            float scale,
4017                            int width);
4018 void ScaleSamples_C(const float* src, float* dst, float scale, int width);
4019 void ScaleSamples_NEON(const float* src, float* dst, float scale, int width);
4020 
4021 void FloatDivToByteRow_C(const float* src_weights,
4022                          const float* src_values,
4023                          uint8_t* dst_out,
4024                          uint8_t* dst_mask,
4025                          int width);
4026 void FloatDivToByteRow_NEON(const float* src_weights,
4027                             const float* src_values,
4028                             uint8_t* dst_out,
4029                             uint8_t* dst_mask,
4030                             int width);
4031 
4032 #ifdef __cplusplus
4033 }  // extern "C"
4034 }  // namespace libyuv
4035 #endif
4036 
4037 #endif  // INCLUDE_LIBYUV_ROW_H_
4038