• 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 <stddef.h>  // For NULL
15 #include <stdlib.h>  // For malloc
16 
17 #include "libyuv/basic_types.h"
18 
19 #ifdef __cplusplus
20 namespace libyuv {
21 extern "C" {
22 #endif
23 
24 #if defined(__pnacl__) || defined(__CLR_VER) ||            \
25     (defined(__native_client__) && defined(__x86_64__)) || \
26     (defined(__i386__) && !defined(__SSE__) && !defined(__clang__))
27 #define LIBYUV_DISABLE_X86
28 #endif
29 #if defined(__native_client__)
30 #define LIBYUV_DISABLE_NEON
31 #endif
32 // MemorySanitizer does not support assembly code yet. http://crbug.com/344505
33 #if defined(__has_feature)
34 #if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON)
35 #define LIBYUV_DISABLE_NEON
36 #endif
37 #if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86)
38 #define LIBYUV_DISABLE_X86
39 #endif
40 #endif
41 // clang >= 3.5.0 required for Arm64.
42 #if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON)
43 #if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5))
44 #define LIBYUV_DISABLE_NEON
45 #endif  // clang >= 3.5
46 #endif  // __clang__
47 
48 // GCC >= 4.7.0 required for AVX2.
49 #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
50 #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
51 #define GCC_HAS_AVX2 1
52 #endif  // GNUC >= 4.7
53 #endif  // __GNUC__
54 
55 // clang >= 3.4.0 required for AVX2.
56 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
57 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
58 #define CLANG_HAS_AVX2 1
59 #endif  // clang >= 3.4
60 #endif  // __clang__
61 
62 // clang >= 6.0.0 required for AVX512.
63 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
64 // clang in xcode follows a different versioning scheme.
65 // TODO(fbarchard): fix xcode 9 ios b/789.
66 #if (__clang_major__ >= 7) && !defined(__APPLE__)
67 #define CLANG_HAS_AVX512 1
68 #endif  // clang >= 7
69 #endif  // __clang__
70 
71 // Visual C 2012 required for AVX2.
72 #if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \
73     _MSC_VER >= 1700
74 #define VISUALC_HAS_AVX2 1
75 #endif  // VisualStudio >= 2012
76 
77 // The following are available on all x86 platforms:
78 #if !defined(LIBYUV_DISABLE_X86) && \
79     (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
80 // Conversions:
81 #define HAS_ABGRTOYROW_SSSE3
82 #define HAS_ARGB1555TOARGBROW_SSE2
83 #define HAS_ARGB4444TOARGBROW_SSE2
84 #define HAS_ARGBEXTRACTALPHAROW_SSE2
85 #define HAS_ARGBSETROW_X86
86 #define HAS_ARGBSHUFFLEROW_SSSE3
87 #define HAS_ARGBTOARGB1555ROW_SSE2
88 #define HAS_ARGBTOARGB4444ROW_SSE2
89 #define HAS_ARGBTORAWROW_SSSE3
90 #define HAS_ARGBTORGB24ROW_SSSE3
91 #define HAS_ARGBTORGB565DITHERROW_SSE2
92 #define HAS_ARGBTORGB565ROW_SSE2
93 #define HAS_ARGBTOYJROW_SSSE3
94 #define HAS_ARGBTOYROW_SSSE3
95 #define HAS_BGRATOYROW_SSSE3
96 #define HAS_COPYROW_ERMS
97 #define HAS_COPYROW_SSE2
98 #define HAS_H422TOARGBROW_SSSE3
99 #define HAS_HALFFLOATROW_SSE2
100 #define HAS_I422TOARGB1555ROW_SSSE3
101 #define HAS_I422TOARGB4444ROW_SSSE3
102 #define HAS_I422TOARGBROW_SSSE3
103 #define HAS_I422TORGB24ROW_SSSE3
104 #define HAS_I422TORGB565ROW_SSSE3
105 #define HAS_I422TORGBAROW_SSSE3
106 #define HAS_I422TOUYVYROW_SSE2
107 #define HAS_I422TOYUY2ROW_SSE2
108 #define HAS_I444TOARGBROW_SSSE3
109 #define HAS_I444TORGB24ROW_SSSE3
110 #define HAS_INTERPOLATEROW_SSSE3
111 #define HAS_J400TOARGBROW_SSE2
112 #define HAS_J422TOARGBROW_SSSE3
113 #define HAS_MERGEUVROW_SSE2
114 #define HAS_MIRRORROW_SSSE3
115 #define HAS_MIRRORSPLITUVROW_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_RAWTOYJROW_SSSE3
124 #define HAS_RAWTOYROW_SSSE3
125 #define HAS_RGB24TOARGBROW_SSSE3
126 #define HAS_RGB24TOYJROW_SSSE3
127 #define HAS_RGB24TOYROW_SSSE3
128 #define HAS_RGB565TOARGBROW_SSE2
129 #define HAS_RGBATOYROW_SSSE3
130 #define HAS_SETROW_ERMS
131 #define HAS_SETROW_X86
132 #define HAS_SPLITUVROW_SSE2
133 #define HAS_UYVYTOARGBROW_SSSE3
134 #define HAS_UYVYTOUV422ROW_SSE2
135 #define HAS_UYVYTOUVROW_SSE2
136 #define HAS_UYVYTOYROW_SSE2
137 #define HAS_YUY2TOARGBROW_SSSE3
138 #define HAS_YUY2TOUV422ROW_SSE2
139 #define HAS_YUY2TOUVROW_SSE2
140 #define HAS_YUY2TOYROW_SSE2
141 #if !defined(LIBYUV_BIT_EXACT)
142 #define HAS_ABGRTOUVROW_SSSE3
143 #define HAS_ARGBTOUV444ROW_SSSE3
144 #define HAS_ARGBTOUVJROW_SSSE3
145 #define HAS_ARGBTOUVROW_SSSE3
146 #define HAS_BGRATOUVROW_SSSE3
147 #define HAS_RGBATOUVROW_SSSE3
148 #endif
149 
150 // Effects:
151 #define HAS_ARGBADDROW_SSE2
152 #define HAS_ARGBAFFINEROW_SSE2
153 #define HAS_ARGBBLENDROW_SSSE3
154 #define HAS_ARGBCOLORMATRIXROW_SSSE3
155 #define HAS_ARGBCOLORTABLEROW_X86
156 #define HAS_ARGBCOPYALPHAROW_SSE2
157 #define HAS_ARGBCOPYYTOALPHAROW_SSE2
158 #define HAS_ARGBGRAYROW_SSSE3
159 #define HAS_ARGBLUMACOLORTABLEROW_SSSE3
160 #define HAS_ARGBMIRRORROW_SSE2
161 #define HAS_ARGBMULTIPLYROW_SSE2
162 #define HAS_ARGBPOLYNOMIALROW_SSE2
163 #define HAS_ARGBQUANTIZEROW_SSE2
164 #define HAS_ARGBSEPIAROW_SSSE3
165 #define HAS_ARGBSHADEROW_SSE2
166 #define HAS_ARGBSUBTRACTROW_SSE2
167 #define HAS_BLENDPLANEROW_SSSE3
168 #define HAS_COMPUTECUMULATIVESUMROW_SSE2
169 #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
170 #define HAS_RGBCOLORTABLEROW_X86
171 #define HAS_SOBELROW_SSE2
172 #define HAS_SOBELTOPLANEROW_SSE2
173 #define HAS_SOBELXROW_SSE2
174 #define HAS_SOBELXYROW_SSE2
175 #define HAS_SOBELYROW_SSE2
176 
177 // The following functions fail on gcc/clang 32 bit with fpic and framepointer.
178 // caveat: clangcl uses row_win.cc which works.
179 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
180     defined(_MSC_VER)
181 // TODO(fbarchard): fix build error on android_full_debug=1
182 // https://code.google.com/p/libyuv/issues/detail?id=517
183 #define HAS_I422ALPHATOARGBROW_SSSE3
184 #define HAS_I444ALPHATOARGBROW_SSSE3
185 #endif
186 #endif
187 
188 // The following are available on all x86 platforms, but
189 // require VS2012, clang 3.4 or gcc 4.7.
190 #if !defined(LIBYUV_DISABLE_X86) &&                          \
191     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \
192      defined(GCC_HAS_AVX2))
193 #define HAS_ARGBCOPYALPHAROW_AVX2
194 #define HAS_ARGBCOPYYTOALPHAROW_AVX2
195 #define HAS_ARGBEXTRACTALPHAROW_AVX2
196 #define HAS_ARGBMIRRORROW_AVX2
197 #define HAS_ARGBPOLYNOMIALROW_AVX2
198 #define HAS_ARGBSHUFFLEROW_AVX2
199 #define HAS_ARGBTORGB565DITHERROW_AVX2
200 #define HAS_ARGBTOYJROW_AVX2
201 #define HAS_ARGBTOYROW_AVX2
202 #define HAS_COPYROW_AVX
203 #define HAS_H422TOARGBROW_AVX2
204 #define HAS_HALFFLOATROW_AVX2
205 #define HAS_I422TOARGB1555ROW_AVX2
206 #define HAS_I422TOARGB4444ROW_AVX2
207 #define HAS_I422TOARGBROW_AVX2
208 #define HAS_I422TORGB24ROW_AVX2
209 #define HAS_I422TORGB565ROW_AVX2
210 #define HAS_I422TORGBAROW_AVX2
211 #define HAS_I444TOARGBROW_AVX2
212 #define HAS_I444TORGB24ROW_AVX2
213 #define HAS_INTERPOLATEROW_AVX2
214 #define HAS_J422TOARGBROW_AVX2
215 #define HAS_MERGEUVROW_AVX2
216 #define HAS_MIRRORROW_AVX2
217 #define HAS_NV12TOARGBROW_AVX2
218 #define HAS_NV12TORGB24ROW_AVX2
219 #define HAS_NV12TORGB565ROW_AVX2
220 #define HAS_NV21TOARGBROW_AVX2
221 #define HAS_NV21TORGB24ROW_AVX2
222 #define HAS_RAWTOYJROW_AVX2
223 #define HAS_RGB24TOYJROW_AVX2
224 #define HAS_SPLITUVROW_AVX2
225 #define HAS_UYVYTOARGBROW_AVX2
226 #define HAS_UYVYTOUV422ROW_AVX2
227 #define HAS_UYVYTOUVROW_AVX2
228 #define HAS_UYVYTOYROW_AVX2
229 #define HAS_YUY2TOARGBROW_AVX2
230 #define HAS_YUY2TOUV422ROW_AVX2
231 #define HAS_YUY2TOUVROW_AVX2
232 #define HAS_YUY2TOYROW_AVX2
233 //  #define HAS_HALFFLOATROW_F16C  // Enable to test half float cast
234 #if !defined(LIBYUV_BIT_EXACT)
235 #define HAS_ARGBTOUVJROW_AVX2
236 #define HAS_ARGBTOUVROW_AVX2
237 #endif
238 
239 // Effects:
240 #define HAS_ARGBADDROW_AVX2
241 #define HAS_ARGBMULTIPLYROW_AVX2
242 #define HAS_ARGBSUBTRACTROW_AVX2
243 #define HAS_BLENDPLANEROW_AVX2
244 
245 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
246     defined(_MSC_VER)
247 // TODO(fbarchard): fix build error on android_full_debug=1
248 // https://code.google.com/p/libyuv/issues/detail?id=517
249 #define HAS_I422ALPHATOARGBROW_AVX2
250 #define HAS_I444ALPHATOARGBROW_AVX2
251 #endif
252 #endif
253 
254 // The following are available for AVX2 Visual C 32 bit:
255 // TODO(fbarchard): Port to gcc.
256 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
257     !defined(__clang__) && defined(VISUALC_HAS_AVX2)
258 #define HAS_ARGB1555TOARGBROW_AVX2
259 #define HAS_ARGB4444TOARGBROW_AVX2
260 #define HAS_ARGBTOARGB1555ROW_AVX2
261 #define HAS_ARGBTOARGB4444ROW_AVX2
262 #define HAS_ARGBTORGB565ROW_AVX2
263 #define HAS_J400TOARGBROW_AVX2
264 #define HAS_RGB565TOARGBROW_AVX2
265 #endif
266 
267 // The following are also available on x64 Visual C.
268 #if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \
269     (!defined(__clang__) || defined(__SSSE3__))
270 #define HAS_I444ALPHATOARGBROW_SSSE3
271 #define HAS_I444TOARGBROW_SSSE3
272 #define HAS_I422ALPHATOARGBROW_SSSE3
273 #define HAS_I422TOARGBROW_SSSE3
274 #endif
275 
276 // The following are available for gcc/clang x86 platforms:
277 // TODO(fbarchard): Port to Visual C
278 #if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
279 #define HAS_AB64TOARGBROW_SSSE3
280 #define HAS_ABGRTOAR30ROW_SSSE3
281 #define HAS_ABGRTOYJROW_SSSE3
282 #define HAS_AR64TOARGBROW_SSSE3
283 #define HAS_ARGBATTENUATEROW_SSSE3
284 #define HAS_ARGBTOAB64ROW_SSSE3
285 #define HAS_ARGBTOAR30ROW_SSSE3
286 #define HAS_ARGBTOAR64ROW_SSSE3
287 #define HAS_ARGBUNATTENUATEROW_SSE2
288 #define HAS_CONVERT16TO8ROW_SSSE3
289 #define HAS_CONVERT8TO16ROW_SSE2
290 #define HAS_DETILEROW_16_SSE2
291 #define HAS_DETILEROW_SSE2
292 #define HAS_DETILESPLITUVROW_SSSE3
293 #define HAS_DETILETOYUY2_SSE2
294 #define HAS_HALFMERGEUVROW_SSSE3
295 #define HAS_I210TOAR30ROW_SSSE3
296 #define HAS_I210TOARGBROW_SSSE3
297 #define HAS_I212TOAR30ROW_SSSE3
298 #define HAS_I212TOARGBROW_SSSE3
299 #define HAS_I400TOARGBROW_SSE2
300 #define HAS_I410TOAR30ROW_SSSE3
301 #define HAS_I410TOARGBROW_SSSE3
302 #define HAS_I422TOAR30ROW_SSSE3
303 #define HAS_MERGEARGBROW_SSE2
304 #define HAS_MERGERGBROW_SSSE3
305 #define HAS_MERGEXRGBROW_SSE2
306 #define HAS_MIRRORUVROW_SSSE3
307 #define HAS_NV21TOYUV24ROW_SSSE3
308 #define HAS_P210TOAR30ROW_SSSE3
309 #define HAS_P210TOARGBROW_SSSE3
310 #define HAS_P410TOAR30ROW_SSSE3
311 #define HAS_P410TOARGBROW_SSSE3
312 #define HAS_RAWTORGBAROW_SSSE3
313 #define HAS_RGB24MIRRORROW_SSSE3
314 #define HAS_RGBATOYJROW_SSSE3
315 #define HAS_SPLITARGBROW_SSE2
316 #define HAS_SPLITARGBROW_SSSE3
317 #define HAS_SPLITRGBROW_SSSE3
318 #define HAS_SPLITXRGBROW_SSE2
319 #define HAS_SPLITXRGBROW_SSSE3
320 #define HAS_SWAPUVROW_SSSE3
321 #define HAS_YUY2TONVUVROW_SSE2
322 #if !defined(LIBYUV_BIT_EXACT)
323 #define HAS_ABGRTOUVJROW_SSSE3
324 #endif
325 
326 #if defined(__x86_64__) || !defined(__pic__)
327 // TODO(fbarchard): fix build error on android_full_debug=1
328 // https://code.google.com/p/libyuv/issues/detail?id=517
329 #define HAS_I210ALPHATOARGBROW_SSSE3
330 #define HAS_I410ALPHATOARGBROW_SSSE3
331 #endif
332 #endif
333 
334 // The following are available for AVX2 gcc/clang x86 platforms:
335 // TODO(fbarchard): Port to Visual C
336 #if !defined(LIBYUV_DISABLE_X86) &&               \
337     (defined(__x86_64__) || defined(__i386__)) && \
338     (defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
339 #define HAS_AB64TOARGBROW_AVX2
340 #define HAS_ABGRTOAR30ROW_AVX2
341 #define HAS_ABGRTOYJROW_AVX2
342 #define HAS_ABGRTOYROW_AVX2
343 #define HAS_AR64TOARGBROW_AVX2
344 #define HAS_ARGBATTENUATEROW_AVX2
345 #define HAS_ARGBTOAB64ROW_AVX2
346 #define HAS_ARGBTOAR30ROW_AVX2
347 #define HAS_ARGBTOAR64ROW_AVX2
348 #define HAS_ARGBTORAWROW_AVX2
349 #define HAS_ARGBTORGB24ROW_AVX2
350 #define HAS_ARGBUNATTENUATEROW_AVX2
351 #define HAS_CONVERT16TO8ROW_AVX2
352 #define HAS_CONVERT8TO16ROW_AVX2
353 #define HAS_DETILEROW_16_AVX
354 #define HAS_DIVIDEROW_16_AVX2
355 #define HAS_HALFMERGEUVROW_AVX2
356 #define HAS_I210TOAR30ROW_AVX2
357 #define HAS_I210TOARGBROW_AVX2
358 #define HAS_I212TOAR30ROW_AVX2
359 #define HAS_I212TOARGBROW_AVX2
360 #define HAS_I400TOARGBROW_AVX2
361 #define HAS_I410TOAR30ROW_AVX2
362 #define HAS_I410TOARGBROW_AVX2
363 #define HAS_I422TOAR30ROW_AVX2
364 #define HAS_I422TOUYVYROW_AVX2
365 #define HAS_I422TOYUY2ROW_AVX2
366 #define HAS_INTERPOLATEROW_16TO8_AVX2
367 #define HAS_MERGEAR64ROW_AVX2
368 #define HAS_MERGEARGB16TO8ROW_AVX2
369 #define HAS_MERGEARGBROW_AVX2
370 #define HAS_MERGEUVROW_16_AVX2
371 #define HAS_MERGEXR30ROW_AVX2
372 #define HAS_MERGEXR64ROW_AVX2
373 #define HAS_MERGEXRGB16TO8ROW_AVX2
374 #define HAS_MERGEXRGBROW_AVX2
375 #define HAS_MIRRORUVROW_AVX2
376 #define HAS_MULTIPLYROW_16_AVX2
377 #define HAS_NV21TOYUV24ROW_AVX2
378 #define HAS_P210TOAR30ROW_AVX2
379 #define HAS_P210TOARGBROW_AVX2
380 #define HAS_P410TOAR30ROW_AVX2
381 #define HAS_P410TOARGBROW_AVX2
382 #define HAS_RGBATOYJROW_AVX2
383 #define HAS_SPLITARGBROW_AVX2
384 #define HAS_SPLITUVROW_16_AVX2
385 #define HAS_SPLITXRGBROW_AVX2
386 #define HAS_SWAPUVROW_AVX2
387 #define HAS_YUY2TONVUVROW_AVX2
388 #if !defined(LIBYUV_BIT_EXACT)
389 #define HAS_ABGRTOUVJROW_AVX2
390 #define HAS_ABGRTOUVROW_AVX2
391 #endif
392 
393 #if defined(__x86_64__) || !defined(__pic__)
394 // TODO(fbarchard): fix build error on android_full_debug=1
395 // https://code.google.com/p/libyuv/issues/detail?id=517
396 #define HAS_I210ALPHATOARGBROW_AVX2
397 #define HAS_I410ALPHATOARGBROW_AVX2
398 #endif
399 #endif
400 
401 // The following are available for AVX512 clang x86 platforms:
402 // TODO(fbarchard): Port to GCC and Visual C
403 // TODO(fbarchard): re-enable HAS_ARGBTORGB24ROW_AVX512VBMI. Issue libyuv:789
404 #if !defined(LIBYUV_DISABLE_X86) && \
405     (defined(__x86_64__) || defined(__i386__)) && defined(CLANG_HAS_AVX512)
406 #define HAS_ARGBTORGB24ROW_AVX512VBMI
407 #define HAS_MERGEUVROW_AVX512BW
408 #endif
409 
410 // The following are available for AVX512 clang x64 platforms:
411 // TODO(fbarchard): Port to x86
412 #if !defined(LIBYUV_DISABLE_X86) && defined(__x86_64__) && \
413     (defined(CLANG_HAS_AVX512))
414 #define HAS_I422TOARGBROW_AVX512BW
415 #endif
416 
417 // The following are available on Neon platforms:
418 #if !defined(LIBYUV_DISABLE_NEON) && \
419     (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON))
420 #define HAS_AB64TOARGBROW_NEON
421 #define HAS_ABGRTOUVJROW_NEON
422 #define HAS_ABGRTOUVROW_NEON
423 #define HAS_ABGRTOYJROW_NEON
424 #define HAS_ABGRTOYROW_NEON
425 #define HAS_AR64TOARGBROW_NEON
426 #define HAS_ARGB1555TOARGBROW_NEON
427 #define HAS_ARGB1555TOUVROW_NEON
428 #define HAS_ARGB1555TOYROW_NEON
429 #define HAS_ARGB4444TOARGBROW_NEON
430 #define HAS_ARGB4444TOUVROW_NEON
431 #define HAS_ARGB4444TOYROW_NEON
432 #define HAS_ARGBEXTRACTALPHAROW_NEON
433 #define HAS_ARGBSETROW_NEON
434 #define HAS_ARGBTOAB64ROW_NEON
435 #define HAS_ARGBTOAR64ROW_NEON
436 #define HAS_ARGBTOARGB1555ROW_NEON
437 #define HAS_ARGBTOARGB4444ROW_NEON
438 #define HAS_ARGBTORAWROW_NEON
439 #define HAS_ARGBTORGB24ROW_NEON
440 #define HAS_ARGBTORGB565DITHERROW_NEON
441 #define HAS_ARGBTORGB565ROW_NEON
442 #define HAS_ARGBTOUV444ROW_NEON
443 #define HAS_ARGBTOUVJROW_NEON
444 #define HAS_ARGBTOUVROW_NEON
445 #define HAS_ARGBTOYJROW_NEON
446 #define HAS_ARGBTOYROW_NEON
447 #define HAS_AYUVTOUVROW_NEON
448 #define HAS_AYUVTOVUROW_NEON
449 #define HAS_AYUVTOYROW_NEON
450 #define HAS_BGRATOUVROW_NEON
451 #define HAS_BGRATOYROW_NEON
452 #define HAS_BYTETOFLOATROW_NEON
453 #define HAS_CONVERT16TO8ROW_NEON
454 #define HAS_COPYROW_NEON
455 #define HAS_DETILEROW_16_NEON
456 #define HAS_DETILEROW_NEON
457 #define HAS_DETILESPLITUVROW_NEON
458 #define HAS_DETILETOYUY2_NEON
459 #define HAS_UNPACKMT2T_NEON
460 #define HAS_DIVIDEROW_16_NEON
461 #define HAS_HALFFLOATROW_NEON
462 #define HAS_HALFMERGEUVROW_NEON
463 #define HAS_I400TOARGBROW_NEON
464 #define HAS_I422ALPHATOARGBROW_NEON
465 #define HAS_I422TOARGB1555ROW_NEON
466 #define HAS_I422TOARGB4444ROW_NEON
467 #define HAS_I422TOARGBROW_NEON
468 #define HAS_I422TORGB24ROW_NEON
469 #define HAS_I422TORGB565ROW_NEON
470 #define HAS_I422TORGBAROW_NEON
471 #define HAS_I422TOUYVYROW_NEON
472 #define HAS_I422TOYUY2ROW_NEON
473 #define HAS_I444ALPHATOARGBROW_NEON
474 #define HAS_I444TOARGBROW_NEON
475 #define HAS_I444TORGB24ROW_NEON
476 #define HAS_INTERPOLATEROW_16_NEON
477 #define HAS_INTERPOLATEROW_NEON
478 #define HAS_J400TOARGBROW_NEON
479 #define HAS_MERGEAR64ROW_NEON
480 #define HAS_MERGEARGB16TO8ROW_NEON
481 #define HAS_MERGEARGBROW_NEON
482 #define HAS_MERGEUVROW_16_NEON
483 #define HAS_MERGEUVROW_NEON
484 #define HAS_MERGEXR30ROW_NEON
485 #define HAS_MERGEXR64ROW_NEON
486 #define HAS_MERGEXRGB16TO8ROW_NEON
487 #define HAS_MERGEXRGBROW_NEON
488 #define HAS_MIRRORROW_NEON
489 #define HAS_MIRRORSPLITUVROW_NEON
490 #define HAS_MIRRORUVROW_NEON
491 #define HAS_MULTIPLYROW_16_NEON
492 #define HAS_NV12TOARGBROW_NEON
493 #define HAS_NV12TORGB24ROW_NEON
494 #define HAS_NV12TORGB565ROW_NEON
495 #define HAS_NV21TOARGBROW_NEON
496 #define HAS_NV21TORGB24ROW_NEON
497 #define HAS_NV21TOYUV24ROW_NEON
498 #define HAS_RAWTOARGBROW_NEON
499 #define HAS_RAWTORGB24ROW_NEON
500 #define HAS_RAWTORGBAROW_NEON
501 #define HAS_RAWTOUVJROW_NEON
502 #define HAS_RAWTOUVROW_NEON
503 #define HAS_RAWTOYJROW_NEON
504 #define HAS_RAWTOYROW_NEON
505 #define HAS_RGB24TOARGBROW_NEON
506 #define HAS_RGB24TOUVJROW_NEON
507 #define HAS_RGB24TOUVROW_NEON
508 #define HAS_RGB24TOYJROW_NEON
509 #define HAS_RGB24TOYROW_NEON
510 #define HAS_RGB565TOARGBROW_NEON
511 #define HAS_RGB565TOUVROW_NEON
512 #define HAS_RGB565TOYROW_NEON
513 #define HAS_RGBATOUVROW_NEON
514 #define HAS_RGBATOYJROW_NEON
515 #define HAS_RGBATOYROW_NEON
516 #define HAS_SETROW_NEON
517 #define HAS_SPLITARGBROW_NEON
518 #define HAS_SPLITRGBROW_NEON
519 #define HAS_SPLITUVROW_16_NEON
520 #define HAS_SPLITUVROW_NEON
521 #define HAS_SPLITXRGBROW_NEON
522 #define HAS_SWAPUVROW_NEON
523 #define HAS_UYVYTOARGBROW_NEON
524 #define HAS_UYVYTOUV422ROW_NEON
525 #define HAS_UYVYTOUVROW_NEON
526 #define HAS_UYVYTOYROW_NEON
527 #define HAS_YUY2TOARGBROW_NEON
528 #define HAS_YUY2TONVUVROW_NEON
529 #define HAS_YUY2TOUV422ROW_NEON
530 #define HAS_YUY2TOUVROW_NEON
531 #define HAS_YUY2TOYROW_NEON
532 
533 // Effects:
534 #define HAS_ARGBADDROW_NEON
535 #define HAS_ARGBATTENUATEROW_NEON
536 #define HAS_ARGBBLENDROW_NEON
537 #define HAS_ARGBCOLORMATRIXROW_NEON
538 #define HAS_ARGBGRAYROW_NEON
539 #define HAS_ARGBMIRRORROW_NEON
540 #define HAS_ARGBMULTIPLYROW_NEON
541 #define HAS_ARGBQUANTIZEROW_NEON
542 #define HAS_ARGBSEPIAROW_NEON
543 #define HAS_ARGBSHADEROW_NEON
544 #define HAS_ARGBSHUFFLEROW_NEON
545 #define HAS_ARGBSUBTRACTROW_NEON
546 #define HAS_RGB24MIRRORROW_NEON
547 #define HAS_SOBELROW_NEON
548 #define HAS_SOBELTOPLANEROW_NEON
549 #define HAS_SOBELXROW_NEON
550 #define HAS_SOBELXYROW_NEON
551 #define HAS_SOBELYROW_NEON
552 #endif
553 
554 // The following are available on AArch64 platforms:
555 #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
556 #define HAS_GAUSSCOL_F32_NEON
557 #define HAS_GAUSSROW_F32_NEON
558 #define HAS_INTERPOLATEROW_16TO8_NEON
559 #define HAS_SCALESUMSAMPLES_NEON
560 #endif
561 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
562 #define HAS_ABGRTOUVJROW_MSA
563 #define HAS_ABGRTOUVROW_MSA
564 #define HAS_ABGRTOYROW_MSA
565 #define HAS_ARGB1555TOARGBROW_MSA
566 #define HAS_ARGB1555TOUVROW_MSA
567 #define HAS_ARGB1555TOYROW_MSA
568 #define HAS_ARGB4444TOARGBROW_MSA
569 #define HAS_ARGBADDROW_MSA
570 #define HAS_ARGBATTENUATEROW_MSA
571 #define HAS_ARGBBLENDROW_MSA
572 #define HAS_ARGBCOLORMATRIXROW_MSA
573 #define HAS_ARGBEXTRACTALPHAROW_MSA
574 #define HAS_ARGBGRAYROW_MSA
575 #define HAS_ARGBMIRRORROW_MSA
576 #define HAS_ARGBMULTIPLYROW_MSA
577 #define HAS_ARGBQUANTIZEROW_MSA
578 #define HAS_ARGBSEPIAROW_MSA
579 #define HAS_ARGBSETROW_MSA
580 #define HAS_ARGBSHADEROW_MSA
581 #define HAS_ARGBSHUFFLEROW_MSA
582 #define HAS_ARGBSUBTRACTROW_MSA
583 #define HAS_ARGBTOARGB1555ROW_MSA
584 #define HAS_ARGBTOARGB4444ROW_MSA
585 #define HAS_ARGBTORAWROW_MSA
586 #define HAS_ARGBTORGB24ROW_MSA
587 #define HAS_ARGBTORGB565DITHERROW_MSA
588 #define HAS_ARGBTORGB565ROW_MSA
589 #define HAS_ARGBTOUV444ROW_MSA
590 #define HAS_ARGBTOUVJROW_MSA
591 #define HAS_ARGBTOUVROW_MSA
592 #define HAS_ARGBTOYJROW_MSA
593 #define HAS_ARGBTOYROW_MSA
594 #define HAS_BGRATOUVROW_MSA
595 #define HAS_BGRATOYROW_MSA
596 #define HAS_HALFFLOATROW_MSA
597 #define HAS_I400TOARGBROW_MSA
598 #define HAS_I422ALPHATOARGBROW_MSA
599 #define HAS_I422TOARGB1555ROW_MSA
600 #define HAS_I422TOARGB4444ROW_MSA
601 #define HAS_I422TOARGBROW_MSA
602 #define HAS_I422TORGB24ROW_MSA
603 #define HAS_I422TORGB565ROW_MSA
604 #define HAS_I422TORGBAROW_MSA
605 #define HAS_I422TOUYVYROW_MSA
606 #define HAS_I422TOYUY2ROW_MSA
607 #define HAS_I444TOARGBROW_MSA
608 #define HAS_INTERPOLATEROW_MSA
609 #define HAS_J400TOARGBROW_MSA
610 #define HAS_MERGEUVROW_MSA
611 #define HAS_MIRRORROW_MSA
612 #define HAS_MIRRORSPLITUVROW_MSA
613 #define HAS_MIRRORUVROW_MSA
614 #define HAS_NV12TOARGBROW_MSA
615 #define HAS_NV12TORGB565ROW_MSA
616 #define HAS_NV21TOARGBROW_MSA
617 #define HAS_RAWTOARGBROW_MSA
618 #define HAS_RAWTORGB24ROW_MSA
619 #define HAS_RAWTOUVROW_MSA
620 #define HAS_RAWTOYROW_MSA
621 #define HAS_RGB24TOARGBROW_MSA
622 #define HAS_RGB24TOUVROW_MSA
623 #define HAS_RGB24TOYROW_MSA
624 #define HAS_RGB565TOARGBROW_MSA
625 #define HAS_RGB565TOUVROW_MSA
626 #define HAS_RGB565TOYROW_MSA
627 #define HAS_RGBATOUVROW_MSA
628 #define HAS_RGBATOYROW_MSA
629 #define HAS_SETROW_MSA
630 #define HAS_SOBELROW_MSA
631 #define HAS_SOBELTOPLANEROW_MSA
632 #define HAS_SOBELXROW_MSA
633 #define HAS_SOBELXYROW_MSA
634 #define HAS_SOBELYROW_MSA
635 #define HAS_SPLITUVROW_MSA
636 #define HAS_UYVYTOARGBROW_MSA
637 #define HAS_UYVYTOUVROW_MSA
638 #define HAS_UYVYTOYROW_MSA
639 #define HAS_YUY2TOARGBROW_MSA
640 #define HAS_YUY2TOUV422ROW_MSA
641 #define HAS_YUY2TOUVROW_MSA
642 #define HAS_YUY2TOYROW_MSA
643 #endif
644 
645 #if !defined(LIBYUV_DISABLE_LSX) && defined(__loongarch_sx)
646 #define HAS_ABGRTOUVROW_LSX
647 #define HAS_ABGRTOYROW_LSX
648 #define HAS_ARGB1555TOARGBROW_LSX
649 #define HAS_ARGB1555TOUVROW_LSX
650 #define HAS_ARGB1555TOYROW_LSX
651 #define HAS_ARGB4444TOARGBROW_LSX
652 #define HAS_ARGBADDROW_LSX
653 #define HAS_ARGBATTENUATEROW_LSX
654 #define HAS_ARGBBLENDROW_LSX
655 #define HAS_ARGBCOLORMATRIXROW_LSX
656 #define HAS_ARGBEXTRACTALPHAROW_LSX
657 #define HAS_ARGBGRAYROW_LSX
658 #define HAS_ARGBSEPIAROW_LSX
659 #define HAS_ARGBSHADEROW_LSX
660 #define HAS_ARGBSHUFFLEROW_LSX
661 #define HAS_ARGBSUBTRACTROW_LSX
662 #define HAS_ARGBQUANTIZEROW_LSX
663 #define HAS_ARGBSETROW_LSX
664 #define HAS_ARGBTOARGB1555ROW_LSX
665 #define HAS_ARGBTOARGB4444ROW_LSX
666 #define HAS_ARGBTORAWROW_LSX
667 #define HAS_ARGBTORGB24ROW_LSX
668 #define HAS_ARGBTORGB565ROW_LSX
669 #define HAS_ARGBTORGB565DITHERROW_LSX
670 #define HAS_ARGBTOUVJROW_LSX
671 #define HAS_ARGBTOUV444ROW_LSX
672 #define HAS_ARGBTOUVROW_LSX
673 #define HAS_ARGBTOYJROW_LSX
674 #define HAS_ARGBMIRRORROW_LSX
675 #define HAS_ARGBMULTIPLYROW_LSX
676 #define HAS_BGRATOUVROW_LSX
677 #define HAS_BGRATOYROW_LSX
678 #define HAS_I400TOARGBROW_LSX
679 #define HAS_I444TOARGBROW_LSX
680 #define HAS_INTERPOLATEROW_LSX
681 #define HAS_I422ALPHATOARGBROW_LSX
682 #define HAS_I422TOARGB1555ROW_LSX
683 #define HAS_I422TOARGB4444ROW_LSX
684 #define HAS_I422TORGB24ROW_LSX
685 #define HAS_I422TORGB565ROW_LSX
686 #define HAS_I422TORGBAROW_LSX
687 #define HAS_I422TOUYVYROW_LSX
688 #define HAS_I422TOYUY2ROW_LSX
689 #define HAS_J400TOARGBROW_LSX
690 #define HAS_MERGEUVROW_LSX
691 #define HAS_MIRRORROW_LSX
692 #define HAS_MIRRORUVROW_LSX
693 #define HAS_MIRRORSPLITUVROW_LSX
694 #define HAS_NV12TOARGBROW_LSX
695 #define HAS_NV12TORGB565ROW_LSX
696 #define HAS_NV21TOARGBROW_LSX
697 #define HAS_RAWTOARGBROW_LSX
698 #define HAS_RAWTORGB24ROW_LSX
699 #define HAS_RAWTOUVROW_LSX
700 #define HAS_RAWTOYROW_LSX
701 #define HAS_RGB24TOARGBROW_LSX
702 #define HAS_RGB24TOUVROW_LSX
703 #define HAS_RGB24TOYROW_LSX
704 #define HAS_RGB565TOARGBROW_LSX
705 #define HAS_RGB565TOUVROW_LSX
706 #define HAS_RGB565TOYROW_LSX
707 #define HAS_RGBATOUVROW_LSX
708 #define HAS_RGBATOYROW_LSX
709 #define HAS_SETROW_LSX
710 #define HAS_SOBELROW_LSX
711 #define HAS_SOBELTOPLANEROW_LSX
712 #define HAS_SOBELXYROW_LSX
713 #define HAS_SPLITUVROW_LSX
714 #define HAS_UYVYTOARGBROW_LSX
715 #define HAS_UYVYTOUV422ROW_LSX
716 #define HAS_UYVYTOUVROW_LSX
717 #define HAS_UYVYTOYROW_LSX
718 #define HAS_YUY2TOARGBROW_LSX
719 #define HAS_YUY2TOUVROW_LSX
720 #define HAS_YUY2TOUV422ROW_LSX
721 #define HAS_YUY2TOYROW_LSX
722 #define HAS_ARGBTOYROW_LSX
723 #define HAS_ABGRTOYJROW_LSX
724 #define HAS_RGBATOYJROW_LSX
725 #define HAS_RGB24TOYJROW_LSX
726 #define HAS_RAWTOYJROW_LSX
727 #endif
728 
729 #if !defined(LIBYUV_DISABLE_LSX) && defined(__loongarch_sx)
730 #define HAS_I422TOARGBROW_LSX
731 #endif
732 
733 #if !defined(LIBYUV_DISABLE_LASX) && defined(__loongarch_asx)
734 #define HAS_ARGB1555TOARGBROW_LASX
735 #define HAS_ARGB1555TOUVROW_LASX
736 #define HAS_ARGB1555TOYROW_LASX
737 #define HAS_ARGB4444TOARGBROW_LASX
738 #define HAS_ARGBADDROW_LASX
739 #define HAS_ARGBATTENUATEROW_LASX
740 #define HAS_ARGBGRAYROW_LASX
741 #define HAS_ARGBMIRRORROW_LASX
742 #define HAS_ARGBMULTIPLYROW_LASX
743 #define HAS_ARGBSEPIAROW_LASX
744 #define HAS_ARGBSHADEROW_LASX
745 #define HAS_ARGBSHUFFLEROW_LASX
746 #define HAS_ARGBSUBTRACTROW_LASX
747 #define HAS_ARGBTOARGB1555ROW_LASX
748 #define HAS_ARGBTOARGB4444ROW_LASX
749 #define HAS_ARGBTORAWROW_LASX
750 #define HAS_ARGBTORGB24ROW_LASX
751 #define HAS_ARGBTORGB565DITHERROW_LASX
752 #define HAS_ARGBTORGB565ROW_LASX
753 #define HAS_ARGBTOUV444ROW_LASX
754 #define HAS_ARGBTOUVJROW_LASX
755 #define HAS_ARGBTOUVROW_LASX
756 #define HAS_ARGBTOYJROW_LASX
757 #define HAS_ARGBTOYROW_LASX
758 #define HAS_ABGRTOYJROW_LASX
759 #define HAS_ABGRTOYROW_LASX
760 #define HAS_I422ALPHATOARGBROW_LASX
761 #define HAS_I422TOARGB1555ROW_LASX
762 #define HAS_I422TOARGB4444ROW_LASX
763 #define HAS_I422TOARGBROW_LASX
764 #define HAS_I422TORGB24ROW_LASX
765 #define HAS_I422TORGB565ROW_LASX
766 #define HAS_I422TORGBAROW_LASX
767 #define HAS_I422TOUYVYROW_LASX
768 #define HAS_I422TOYUY2ROW_LASX
769 #define HAS_MIRRORROW_LASX
770 #define HAS_MIRRORUVROW_LASX
771 #define HAS_NV12TOARGBROW_LASX
772 #define HAS_NV12TORGB565ROW_LASX
773 #define HAS_NV21TOARGBROW_LASX
774 #define HAS_RAWTOARGBROW_LASX
775 #define HAS_RAWTOUVROW_LASX
776 #define HAS_RAWTOYROW_LASX
777 #define HAS_RGB24TOARGBROW_LASX
778 #define HAS_RGB24TOUVROW_LASX
779 #define HAS_RGB24TOYROW_LASX
780 #define HAS_RGB565TOARGBROW_LASX
781 #define HAS_RGB565TOUVROW_LASX
782 #define HAS_RGB565TOYROW_LASX
783 #define HAS_UYVYTOUV422ROW_LASX
784 #define HAS_UYVYTOUVROW_LASX
785 #define HAS_UYVYTOYROW_LASX
786 #define HAS_YUY2TOUV422ROW_LASX
787 #define HAS_YUY2TOUVROW_LASX
788 #define HAS_YUY2TOYROW_LASX
789 #define HAS_RGBATOYROW_LASX
790 #define HAS_RGBATOYJROW_LASX
791 #define HAS_BGRATOYROW_LASX
792 #define HAS_RGB24TOYJROW_LASX
793 #define HAS_RAWTOYJROW_LASX
794 #endif
795 
796 #if !defined(LIBYUV_DISABLE_RVV) && defined(__riscv_vector)
797 #define HAS_COPYROW_RVV
798 #if __riscv_v_intrinsic == 11000
799 #define HAS_AB64TOARGBROW_RVV
800 #define HAS_ABGRTOYJROW_RVV
801 #define HAS_ABGRTOYROW_RVV
802 #define HAS_AR64TOARGBROW_RVV
803 #define HAS_AR64TOAB64ROW_RVV
804 #define HAS_ARGBATTENUATEROW_RVV
805 #define HAS_ARGBBLENDROW_RVV
806 #define HAS_ARGBCOPYYTOALPHAROW_RVV
807 #define HAS_ARGBEXTRACTALPHAROW_RVV
808 #define HAS_ARGBTOAB64ROW_RVV
809 #define HAS_ARGBTOABGRROW_RVV
810 #define HAS_ARGBTOAR64ROW_RVV
811 #define HAS_ARGBTOBGRAROW_RVV
812 #define HAS_ARGBTORAWROW_RVV
813 #define HAS_ARGBTORGB24ROW_RVV
814 #define HAS_ARGBTORGBAROW_RVV
815 #define HAS_ARGBTOYJROW_RVV
816 #define HAS_ARGBTOYMATRIXROW_RVV
817 #define HAS_ARGBTOYROW_RVV
818 #define HAS_BGRATOYROW_RVV
819 #define HAS_BLENDPLANEROW_RVV
820 #define HAS_I400TOARGBROW_RVV
821 #define HAS_I422ALPHATOARGBROW_RVV
822 #define HAS_I422TOARGBROW_RVV
823 #define HAS_I422TORGB24ROW_RVV
824 #define HAS_I422TORGBAROW_RVV
825 #define HAS_I444ALPHATOARGBROW_RVV
826 #define HAS_I444TOARGBROW_RVV
827 #define HAS_I444TORGB24ROW_RVV
828 #define HAS_INTERPOLATEROW_RVV
829 #define HAS_J400TOARGBROW_RVV
830 #define HAS_MERGEARGBROW_RVV
831 #define HAS_MERGERGBROW_RVV
832 #define HAS_MERGEUVROW_RVV
833 #define HAS_MERGEXRGBROW_RVV
834 #define HAS_NV12TOARGBROW_RVV
835 #define HAS_NV12TORGB24ROW_RVV
836 #define HAS_NV21TOARGBROW_RVV
837 #define HAS_NV21TORGB24ROW_RVV
838 #define HAS_RAWTOARGBROW_RVV
839 #define HAS_RAWTORGB24ROW_RVV
840 #define HAS_RAWTORGBAROW_RVV
841 #define HAS_RAWTOYJROW_RVV
842 #define HAS_RAWTOYROW_RVV
843 #define HAS_RGB24TOARGBROW_RVV
844 #define HAS_RGB24TOYJROW_RVV
845 #define HAS_RGB24TOYROW_RVV
846 #define HAS_RGBATOARGBROW_RVV
847 #define HAS_RGBATOYJROW_RVV
848 #define HAS_RGBATOYMATRIXROW_RVV
849 #define HAS_RGBATOYROW_RVV
850 #define HAS_RGBTOYMATRIXROW_RVV
851 #define HAS_SPLITARGBROW_RVV
852 #define HAS_SPLITRGBROW_RVV
853 #define HAS_SPLITUVROW_RVV
854 #define HAS_SPLITXRGBROW_RVV
855 #endif
856 #endif
857 
858 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__)
859 #if defined(VISUALC_HAS_AVX2)
860 #define SIMD_ALIGNED(var) __declspec(align(32)) var
861 #else
862 #define SIMD_ALIGNED(var) __declspec(align(16)) var
863 #endif
864 #define LIBYUV_NOINLINE __declspec(noinline)
865 typedef __declspec(align(16)) int16_t vec16[8];
866 typedef __declspec(align(16)) int32_t vec32[4];
867 typedef __declspec(align(16)) float vecf32[4];
868 typedef __declspec(align(16)) int8_t vec8[16];
869 typedef __declspec(align(16)) uint16_t uvec16[8];
870 typedef __declspec(align(16)) uint32_t uvec32[4];
871 typedef __declspec(align(16)) uint8_t uvec8[16];
872 typedef __declspec(align(32)) int16_t lvec16[16];
873 typedef __declspec(align(32)) int32_t lvec32[8];
874 typedef __declspec(align(32)) int8_t lvec8[32];
875 typedef __declspec(align(32)) uint16_t ulvec16[16];
876 typedef __declspec(align(32)) uint32_t ulvec32[8];
877 typedef __declspec(align(32)) uint8_t ulvec8[32];
878 #elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__))
879 // Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
880 #if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)
881 #define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
882 #else
883 #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
884 #endif
885 #define LIBYUV_NOINLINE __attribute__((noinline))
886 typedef int16_t __attribute__((vector_size(16))) vec16;
887 typedef int32_t __attribute__((vector_size(16))) vec32;
888 typedef float __attribute__((vector_size(16))) vecf32;
889 typedef int8_t __attribute__((vector_size(16))) vec8;
890 typedef uint16_t __attribute__((vector_size(16))) uvec16;
891 typedef uint32_t __attribute__((vector_size(16))) uvec32;
892 typedef uint8_t __attribute__((vector_size(16))) uvec8;
893 typedef int16_t __attribute__((vector_size(32))) lvec16;
894 typedef int32_t __attribute__((vector_size(32))) lvec32;
895 typedef int8_t __attribute__((vector_size(32))) lvec8;
896 typedef uint16_t __attribute__((vector_size(32))) ulvec16;
897 typedef uint32_t __attribute__((vector_size(32))) ulvec32;
898 typedef uint8_t __attribute__((vector_size(32))) ulvec8;
899 #else
900 #define SIMD_ALIGNED(var) var
901 #define LIBYUV_NOINLINE
902 typedef int16_t vec16[8];
903 typedef int32_t vec32[4];
904 typedef float vecf32[4];
905 typedef int8_t vec8[16];
906 typedef uint16_t uvec16[8];
907 typedef uint32_t uvec32[4];
908 typedef uint8_t uvec8[16];
909 typedef int16_t lvec16[16];
910 typedef int32_t lvec32[8];
911 typedef int8_t lvec8[32];
912 typedef uint16_t ulvec16[16];
913 typedef uint32_t ulvec32[8];
914 typedef uint8_t ulvec8[32];
915 #endif
916 
917 #if defined(__aarch64__) || defined(__arm__) || defined(__riscv)
918 // This struct is for ARM and RISC-V color conversion.
919 struct YuvConstants {
920   uvec8 kUVCoeff;
921   vec16 kRGBCoeffBias;
922 };
923 #else
924 // This struct is for Intel color conversion.
925 struct YuvConstants {
926   uint8_t kUVToB[32];
927   uint8_t kUVToG[32];
928   uint8_t kUVToR[32];
929   int16_t kYToRgb[16];
930   int16_t kYBiasToRgb[16];
931 };
932 
933 // Offsets into YuvConstants structure
934 #define KUVTOB 0
935 #define KUVTOG 32
936 #define KUVTOR 64
937 #define KYTORGB 96
938 #define KYBIASTORGB 128
939 
940 #endif
941 
942 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
943 
944 #define align_buffer_64(var, size)                                         \
945   void* var##_mem = malloc((size) + 63);                      /* NOLINT */ \
946   uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
947 
948 #define free_aligned_buffer_64(var) \
949   free(var##_mem);                  \
950   var = NULL
951 
952 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__)
953 #define OMITFP
954 #else
955 #define OMITFP __attribute__((optimize("omit-frame-pointer")))
956 #endif
957 
958 // NaCL macros for GCC x86 and x64.
959 #if defined(__native_client__)
960 #define LABELALIGN ".p2align 5\n"
961 #else
962 #define LABELALIGN
963 #endif
964 
965 // Intel Code Analizer markers.  Insert IACA_START IACA_END around code to be
966 // measured and then run with iaca -64 libyuv_unittest.
967 // IACA_ASM_START amd IACA_ASM_END are equivalents that can be used within
968 // inline assembly blocks.
969 // example of iaca:
970 // ~/iaca-lin64/bin/iaca.sh -64 -analysis LATENCY out/Release/libyuv_unittest
971 
972 #if defined(__x86_64__) || defined(__i386__)
973 
974 #define IACA_ASM_START  \
975   ".byte 0x0F, 0x0B\n"  \
976   " movl $111, %%ebx\n" \
977   ".byte 0x64, 0x67, 0x90\n"
978 
979 #define IACA_ASM_END         \
980   " movl $222, %%ebx\n"      \
981   ".byte 0x64, 0x67, 0x90\n" \
982   ".byte 0x0F, 0x0B\n"
983 
984 #define IACA_SSC_MARK(MARK_ID)                        \
985   __asm__ __volatile__("\n\t  movl $" #MARK_ID        \
986                        ", %%ebx"                      \
987                        "\n\t  .byte 0x64, 0x67, 0x90" \
988                        :                              \
989                        :                              \
990                        : "memory");
991 
992 #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B");
993 
994 #else /* Visual C */
995 #define IACA_UD_BYTES \
996   { __asm _emit 0x0F __asm _emit 0x0B }
997 
998 #define IACA_SSC_MARK(x) \
999   { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 }
1000 
1001 #define IACA_VC64_START __writegsbyte(111, 111);
1002 #define IACA_VC64_END __writegsbyte(222, 222);
1003 #endif
1004 
1005 #define IACA_START     \
1006   {                    \
1007     IACA_UD_BYTES      \
1008     IACA_SSC_MARK(111) \
1009   }
1010 #define IACA_END       \
1011   {                    \
1012     IACA_SSC_MARK(222) \
1013     IACA_UD_BYTES      \
1014   }
1015 
1016 void I444ToARGBRow_NEON(const uint8_t* src_y,
1017                         const uint8_t* src_u,
1018                         const uint8_t* src_v,
1019                         uint8_t* dst_argb,
1020                         const struct YuvConstants* yuvconstants,
1021                         int width);
1022 void I444ToRGB24Row_NEON(const uint8_t* src_y,
1023                          const uint8_t* src_u,
1024                          const uint8_t* src_v,
1025                          uint8_t* dst_rgb24,
1026                          const struct YuvConstants* yuvconstants,
1027                          int width);
1028 void I422ToARGBRow_NEON(const uint8_t* src_y,
1029                         const uint8_t* src_u,
1030                         const uint8_t* src_v,
1031                         uint8_t* dst_argb,
1032                         const struct YuvConstants* yuvconstants,
1033                         int width);
1034 void I444AlphaToARGBRow_NEON(const uint8_t* src_y,
1035                              const uint8_t* src_u,
1036                              const uint8_t* src_v,
1037                              const uint8_t* src_a,
1038                              uint8_t* dst_argb,
1039                              const struct YuvConstants* yuvconstants,
1040                              int width);
1041 void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
1042                              const uint8_t* src_u,
1043                              const uint8_t* src_v,
1044                              const uint8_t* src_a,
1045                              uint8_t* dst_argb,
1046                              const struct YuvConstants* yuvconstants,
1047                              int width);
1048 void I422ToRGBARow_NEON(const uint8_t* src_y,
1049                         const uint8_t* src_u,
1050                         const uint8_t* src_v,
1051                         uint8_t* dst_rgba,
1052                         const struct YuvConstants* yuvconstants,
1053                         int width);
1054 void I422ToRGB24Row_NEON(const uint8_t* src_y,
1055                          const uint8_t* src_u,
1056                          const uint8_t* src_v,
1057                          uint8_t* dst_rgb24,
1058                          const struct YuvConstants* yuvconstants,
1059                          int width);
1060 void I422ToRGB565Row_NEON(const uint8_t* src_y,
1061                           const uint8_t* src_u,
1062                           const uint8_t* src_v,
1063                           uint8_t* dst_rgb565,
1064                           const struct YuvConstants* yuvconstants,
1065                           int width);
1066 void I422ToARGB1555Row_NEON(const uint8_t* src_y,
1067                             const uint8_t* src_u,
1068                             const uint8_t* src_v,
1069                             uint8_t* dst_argb1555,
1070                             const struct YuvConstants* yuvconstants,
1071                             int width);
1072 void I422ToARGB4444Row_NEON(const uint8_t* src_y,
1073                             const uint8_t* src_u,
1074                             const uint8_t* src_v,
1075                             uint8_t* dst_argb4444,
1076                             const struct YuvConstants* yuvconstants,
1077                             int width);
1078 void NV12ToARGBRow_NEON(const uint8_t* src_y,
1079                         const uint8_t* src_uv,
1080                         uint8_t* dst_argb,
1081                         const struct YuvConstants* yuvconstants,
1082                         int width);
1083 void NV12ToRGB565Row_NEON(const uint8_t* src_y,
1084                           const uint8_t* src_uv,
1085                           uint8_t* dst_rgb565,
1086                           const struct YuvConstants* yuvconstants,
1087                           int width);
1088 void NV21ToARGBRow_NEON(const uint8_t* src_y,
1089                         const uint8_t* src_vu,
1090                         uint8_t* dst_argb,
1091                         const struct YuvConstants* yuvconstants,
1092                         int width);
1093 void NV12ToRGB24Row_NEON(const uint8_t* src_y,
1094                          const uint8_t* src_uv,
1095                          uint8_t* dst_rgb24,
1096                          const struct YuvConstants* yuvconstants,
1097                          int width);
1098 void NV21ToRGB24Row_NEON(const uint8_t* src_y,
1099                          const uint8_t* src_vu,
1100                          uint8_t* dst_rgb24,
1101                          const struct YuvConstants* yuvconstants,
1102                          int width);
1103 void NV21ToYUV24Row_NEON(const uint8_t* src_y,
1104                          const uint8_t* src_vu,
1105                          uint8_t* dst_yuv24,
1106                          int width);
1107 void YUY2ToARGBRow_NEON(const uint8_t* src_yuy2,
1108                         uint8_t* dst_argb,
1109                         const struct YuvConstants* yuvconstants,
1110                         int width);
1111 void UYVYToARGBRow_NEON(const uint8_t* src_uyvy,
1112                         uint8_t* dst_argb,
1113                         const struct YuvConstants* yuvconstants,
1114                         int width);
1115 void I444ToARGBRow_RVV(const uint8_t* src_y,
1116                        const uint8_t* src_u,
1117                        const uint8_t* src_v,
1118                        uint8_t* dst_argb,
1119                        const struct YuvConstants* yuvconstants,
1120                        int width);
1121 void I444AlphaToARGBRow_RVV(const uint8_t* src_y,
1122                             const uint8_t* src_u,
1123                             const uint8_t* src_v,
1124                             const uint8_t* src_a,
1125                             uint8_t* dst_argb,
1126                             const struct YuvConstants* yuvconstants,
1127                             int width);
1128 void I444ToRGB24Row_RVV(const uint8_t* src_y,
1129                         const uint8_t* src_u,
1130                         const uint8_t* src_v,
1131                         uint8_t* dst_rgb24,
1132                         const struct YuvConstants* yuvconstants,
1133                         int width);
1134 void I422ToARGBRow_RVV(const uint8_t* src_y,
1135                        const uint8_t* src_u,
1136                        const uint8_t* src_v,
1137                        uint8_t* dst_argb,
1138                        const struct YuvConstants* yuvconstants,
1139                        int width);
1140 void I422AlphaToARGBRow_RVV(const uint8_t* src_y,
1141                             const uint8_t* src_u,
1142                             const uint8_t* src_v,
1143                             const uint8_t* src_a,
1144                             uint8_t* dst_argb,
1145                             const struct YuvConstants* yuvconstants,
1146                             int width);
1147 void I422ToRGBARow_RVV(const uint8_t* src_y,
1148                        const uint8_t* src_u,
1149                        const uint8_t* src_v,
1150                        uint8_t* dst_rgba,
1151                        const struct YuvConstants* yuvconstants,
1152                        int width);
1153 void I422ToRGB24Row_RVV(const uint8_t* src_y,
1154                         const uint8_t* src_u,
1155                         const uint8_t* src_v,
1156                         uint8_t* dst_rgb24,
1157                         const struct YuvConstants* yuvconstants,
1158                         int width);
1159 void I444ToARGBRow_MSA(const uint8_t* src_y,
1160                        const uint8_t* src_u,
1161                        const uint8_t* src_v,
1162                        uint8_t* dst_argb,
1163                        const struct YuvConstants* yuvconstants,
1164                        int width);
1165 void I444ToARGBRow_LSX(const uint8_t* src_y,
1166                        const uint8_t* src_u,
1167                        const uint8_t* src_v,
1168                        uint8_t* dst_argb,
1169                        const struct YuvConstants* yuvconstants,
1170                        int width);
1171 
1172 void I422ToARGBRow_MSA(const uint8_t* src_y,
1173                        const uint8_t* src_u,
1174                        const uint8_t* src_v,
1175                        uint8_t* dst_argb,
1176                        const struct YuvConstants* yuvconstants,
1177                        int width);
1178 void I422ToARGBRow_LSX(const uint8_t* src_y,
1179                        const uint8_t* src_u,
1180                        const uint8_t* src_v,
1181                        uint8_t* dst_argb,
1182                        const struct YuvConstants* yuvconstants,
1183                        int width);
1184 void I422ToARGBRow_LASX(const uint8_t* src_y,
1185                         const uint8_t* src_u,
1186                         const uint8_t* src_v,
1187                         uint8_t* dst_argb,
1188                         const struct YuvConstants* yuvconstants,
1189                         int width);
1190 void I422ToRGBARow_MSA(const uint8_t* src_y,
1191                        const uint8_t* src_u,
1192                        const uint8_t* src_v,
1193                        uint8_t* dst_argb,
1194                        const struct YuvConstants* yuvconstants,
1195                        int width);
1196 void I422ToRGBARow_LSX(const uint8_t* src_y,
1197                        const uint8_t* src_u,
1198                        const uint8_t* src_v,
1199                        uint8_t* dst_argb,
1200                        const struct YuvConstants* yuvconstants,
1201                        int width);
1202 void I422ToRGBARow_LASX(const uint8_t* src_y,
1203                         const uint8_t* src_u,
1204                         const uint8_t* src_v,
1205                         uint8_t* dst_argb,
1206                         const struct YuvConstants* yuvconstants,
1207                         int width);
1208 void I422AlphaToARGBRow_MSA(const uint8_t* src_y,
1209                             const uint8_t* src_u,
1210                             const uint8_t* src_v,
1211                             const uint8_t* src_a,
1212                             uint8_t* dst_argb,
1213                             const struct YuvConstants* yuvconstants,
1214                             int width);
1215 void I422AlphaToARGBRow_LSX(const uint8_t* src_y,
1216                             const uint8_t* src_u,
1217                             const uint8_t* src_v,
1218                             const uint8_t* src_a,
1219                             uint8_t* dst_argb,
1220                             const struct YuvConstants* yuvconstants,
1221                             int width);
1222 void I422AlphaToARGBRow_LASX(const uint8_t* src_y,
1223                              const uint8_t* src_u,
1224                              const uint8_t* src_v,
1225                              const uint8_t* src_a,
1226                              uint8_t* dst_argb,
1227                              const struct YuvConstants* yuvconstants,
1228                              int width);
1229 void I422ToRGB24Row_MSA(const uint8_t* src_y,
1230                         const uint8_t* src_u,
1231                         const uint8_t* src_v,
1232                         uint8_t* dst_argb,
1233                         const struct YuvConstants* yuvconstants,
1234                         int width);
1235 void I422ToRGB24Row_LSX(const uint8_t* src_y,
1236                         const uint8_t* src_u,
1237                         const uint8_t* src_v,
1238                         uint8_t* dst_argb,
1239                         const struct YuvConstants* yuvconstants,
1240                         int width);
1241 void I422ToRGB24Row_LASX(const uint8_t* src_y,
1242                          const uint8_t* src_u,
1243                          const uint8_t* src_v,
1244                          uint8_t* dst_argb,
1245                          const struct YuvConstants* yuvconstants,
1246                          int width);
1247 void I422ToRGB565Row_MSA(const uint8_t* src_y,
1248                          const uint8_t* src_u,
1249                          const uint8_t* src_v,
1250                          uint8_t* dst_rgb565,
1251                          const struct YuvConstants* yuvconstants,
1252                          int width);
1253 void I422ToRGB565Row_LSX(const uint8_t* src_y,
1254                          const uint8_t* src_u,
1255                          const uint8_t* src_v,
1256                          uint8_t* dst_rgb565,
1257                          const struct YuvConstants* yuvconstants,
1258                          int width);
1259 void I422ToRGB565Row_LASX(const uint8_t* src_y,
1260                           const uint8_t* src_u,
1261                           const uint8_t* src_v,
1262                           uint8_t* dst_rgb565,
1263                           const struct YuvConstants* yuvconstants,
1264                           int width);
1265 void I422ToARGB4444Row_MSA(const uint8_t* src_y,
1266                            const uint8_t* src_u,
1267                            const uint8_t* src_v,
1268                            uint8_t* dst_argb4444,
1269                            const struct YuvConstants* yuvconstants,
1270                            int width);
1271 void I422ToARGB4444Row_LSX(const uint8_t* src_y,
1272                            const uint8_t* src_u,
1273                            const uint8_t* src_v,
1274                            uint8_t* dst_argb4444,
1275                            const struct YuvConstants* yuvconstants,
1276                            int width);
1277 void I422ToARGB4444Row_LASX(const uint8_t* src_y,
1278                             const uint8_t* src_u,
1279                             const uint8_t* src_v,
1280                             uint8_t* dst_argb4444,
1281                             const struct YuvConstants* yuvconstants,
1282                             int width);
1283 void I422ToARGB1555Row_MSA(const uint8_t* src_y,
1284                            const uint8_t* src_u,
1285                            const uint8_t* src_v,
1286                            uint8_t* dst_argb1555,
1287                            const struct YuvConstants* yuvconstants,
1288                            int width);
1289 void I422ToARGB1555Row_LSX(const uint8_t* src_y,
1290                            const uint8_t* src_u,
1291                            const uint8_t* src_v,
1292                            uint8_t* dst_argb1555,
1293                            const struct YuvConstants* yuvconstants,
1294                            int width);
1295 void I422ToARGB1555Row_LASX(const uint8_t* src_y,
1296                             const uint8_t* src_u,
1297                             const uint8_t* src_v,
1298                             uint8_t* dst_argb1555,
1299                             const struct YuvConstants* yuvconstants,
1300                             int width);
1301 void NV12ToARGBRow_MSA(const uint8_t* src_y,
1302                        const uint8_t* src_uv,
1303                        uint8_t* dst_argb,
1304                        const struct YuvConstants* yuvconstants,
1305                        int width);
1306 void NV12ToRGB565Row_MSA(const uint8_t* src_y,
1307                          const uint8_t* src_uv,
1308                          uint8_t* dst_rgb565,
1309                          const struct YuvConstants* yuvconstants,
1310                          int width);
1311 void NV21ToARGBRow_MSA(const uint8_t* src_y,
1312                        const uint8_t* src_vu,
1313                        uint8_t* dst_argb,
1314                        const struct YuvConstants* yuvconstants,
1315                        int width);
1316 void YUY2ToARGBRow_MSA(const uint8_t* src_yuy2,
1317                        uint8_t* dst_argb,
1318                        const struct YuvConstants* yuvconstants,
1319                        int width);
1320 void UYVYToARGBRow_MSA(const uint8_t* src_uyvy,
1321                        uint8_t* dst_argb,
1322                        const struct YuvConstants* yuvconstants,
1323                        int width);
1324 
1325 void NV12ToARGBRow_LSX(const uint8_t* src_y,
1326                        const uint8_t* src_uv,
1327                        uint8_t* dst_argb,
1328                        const struct YuvConstants* yuvconstants,
1329                        int width);
1330 void NV12ToARGBRow_LASX(const uint8_t* src_y,
1331                         const uint8_t* src_uv,
1332                         uint8_t* dst_argb,
1333                         const struct YuvConstants* yuvconstants,
1334                         int width);
1335 void NV12ToRGB565Row_LSX(const uint8_t* src_y,
1336                          const uint8_t* src_uv,
1337                          uint8_t* dst_rgb565,
1338                          const struct YuvConstants* yuvconstants,
1339                          int width);
1340 void NV12ToRGB565Row_LASX(const uint8_t* src_y,
1341                           const uint8_t* src_uv,
1342                           uint8_t* dst_rgb565,
1343                           const struct YuvConstants* yuvconstants,
1344                           int width);
1345 void NV21ToARGBRow_LSX(const uint8_t* src_y,
1346                        const uint8_t* src_vu,
1347                        uint8_t* dst_argb,
1348                        const struct YuvConstants* yuvconstants,
1349                        int width);
1350 void NV21ToARGBRow_LASX(const uint8_t* src_y,
1351                         const uint8_t* src_vu,
1352                         uint8_t* dst_argb,
1353                         const struct YuvConstants* yuvconstants,
1354                         int width);
1355 void YUY2ToARGBRow_LSX(const uint8_t* src_yuy2,
1356                        uint8_t* dst_argb,
1357                        const struct YuvConstants* yuvconstants,
1358                        int width);
1359 void UYVYToARGBRow_LSX(const uint8_t* src_uyvy,
1360                        uint8_t* dst_argb,
1361                        const struct YuvConstants* yuvconstants,
1362                        int width);
1363 void NV12ToARGBRow_RVV(const uint8_t* src_y,
1364                        const uint8_t* src_uv,
1365                        uint8_t* dst_argb,
1366                        const struct YuvConstants* yuvconstants,
1367                        int width);
1368 void NV21ToARGBRow_RVV(const uint8_t* src_y,
1369                        const uint8_t* src_vu,
1370                        uint8_t* dst_argb,
1371                        const struct YuvConstants* yuvconstants,
1372                        int width);
1373 void NV12ToRGB24Row_RVV(const uint8_t* src_y,
1374                         const uint8_t* src_uv,
1375                         uint8_t* dst_rgb24,
1376                         const struct YuvConstants* yuvconstants,
1377                         int width);
1378 void NV21ToRGB24Row_RVV(const uint8_t* src_y,
1379                         const uint8_t* src_vu,
1380                         uint8_t* dst_rgb24,
1381                         const struct YuvConstants* yuvconstants,
1382                         int width);
1383 
1384 void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width);
1385 void ARGBToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1386 void ABGRToYRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1387 void ABGRToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1388 void ARGBToYRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width);
1389 void ARGBToYJRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width);
1390 void ARGBToYJRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width);
1391 void ARGBToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1392 void ABGRToYRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1393 void ABGRToYJRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1394 void ABGRToYJRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1395 void ABGRToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1396 void RGBAToYJRow_AVX2(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1397 void RGBAToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1398 void RGBAToYJRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1399 void BGRAToYRow_SSSE3(const uint8_t* src_bgra, uint8_t* dst_y, int width);
1400 void ABGRToYRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1401 void RGBAToYRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1402 void RGB24ToYRow_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1403 void RGB24ToYJRow_SSSE3(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1404 void RAWToYRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_y, int width);
1405 void RAWToYJRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1406 void RGB24ToYJRow_AVX2(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1407 void RAWToYJRow_AVX2(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1408 void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width);
1409 void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_yj, int width);
1410 void ABGRToYJRow_NEON(const uint8_t* src_abgr, uint8_t* dst_yj, int width);
1411 void RGBAToYJRow_NEON(const uint8_t* src_rgba, uint8_t* dst_yj, int width);
1412 void ARGBToYRow_RVV(const uint8_t* src_argb, uint8_t* dst_y, int width);
1413 void ARGBToYJRow_RVV(const uint8_t* src_argb, uint8_t* dst_yj, int width);
1414 void ABGRToYJRow_RVV(const uint8_t* src_rgba, uint8_t* dst_yj, int width);
1415 void RGBAToYJRow_RVV(const uint8_t* src_rgba, uint8_t* dst_yj, int width);
1416 void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1417 void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1418 void ARGBToYRow_LSX(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1419 void ARGBToYRow_LASX(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1420 void ARGBToYJRow_LSX(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1421 void ABGRToYJRow_LSX(const uint8_t* src_abgr, uint8_t* dst_yj, int width);
1422 void RGBAToYJRow_LSX(const uint8_t* src_rgba, uint8_t* dst_yj, int width);
1423 void ARGBToYJRow_LASX(const uint8_t* src_argb0, uint8_t* dst_y, int width);
1424 void ABGRToYJRow_LASX(const uint8_t* src_abgr, uint8_t* dst_yj, int width);
1425 void RGBAToYJRow_LASX(const uint8_t* src_rgba, uint8_t* dst_yj, int width);
1426 void ARGBToUV444Row_NEON(const uint8_t* src_argb,
1427                          uint8_t* dst_u,
1428                          uint8_t* dst_v,
1429                          int width);
1430 void ARGBToUVRow_NEON(const uint8_t* src_argb,
1431                       int src_stride_argb,
1432                       uint8_t* dst_u,
1433                       uint8_t* dst_v,
1434                       int width);
1435 void ARGBToUV444Row_MSA(const uint8_t* src_argb,
1436                         uint8_t* dst_u,
1437                         uint8_t* dst_v,
1438                         int width);
1439 void ARGBToUVRow_MSA(const uint8_t* src_argb,
1440                      int src_stride_argb,
1441                      uint8_t* dst_u,
1442                      uint8_t* dst_v,
1443                      int width);
1444 void ARGBToUVRow_LSX(const uint8_t* src_argb,
1445                      int src_stride_argb,
1446                      uint8_t* dst_u,
1447                      uint8_t* dst_v,
1448                      int width);
1449 void ARGBToUVRow_LASX(const uint8_t* src_argb,
1450                       int src_stride_argb,
1451                       uint8_t* dst_u,
1452                       uint8_t* dst_v,
1453                       int width);
1454 void ARGBToUV444Row_LSX(const uint8_t* src_argb,
1455                         uint8_t* dst_u,
1456                         uint8_t* dst_v,
1457                         int width);
1458 void ARGBToUV444Row_LASX(const uint8_t* src_argb,
1459                          uint8_t* dst_u,
1460                          uint8_t* dst_v,
1461                          int width);
1462 void ARGBToUVJRow_NEON(const uint8_t* src_argb,
1463                        int src_stride_argb,
1464                        uint8_t* dst_u,
1465                        uint8_t* dst_v,
1466                        int width);
1467 void ABGRToUVJRow_NEON(const uint8_t* src_abgr,
1468                        int src_stride_abgr,
1469                        uint8_t* dst_uj,
1470                        uint8_t* dst_vj,
1471                        int width);
1472 void BGRAToUVRow_NEON(const uint8_t* src_bgra,
1473                       int src_stride_bgra,
1474                       uint8_t* dst_u,
1475                       uint8_t* dst_v,
1476                       int width);
1477 void ABGRToUVRow_NEON(const uint8_t* src_abgr,
1478                       int src_stride_abgr,
1479                       uint8_t* dst_u,
1480                       uint8_t* dst_v,
1481                       int width);
1482 void RGBAToUVRow_NEON(const uint8_t* src_rgba,
1483                       int src_stride_rgba,
1484                       uint8_t* dst_u,
1485                       uint8_t* dst_v,
1486                       int width);
1487 void RGB24ToUVRow_NEON(const uint8_t* src_rgb24,
1488                        int src_stride_rgb24,
1489                        uint8_t* dst_u,
1490                        uint8_t* dst_v,
1491                        int width);
1492 void RAWToUVRow_NEON(const uint8_t* src_raw,
1493                      int src_stride_raw,
1494                      uint8_t* dst_u,
1495                      uint8_t* dst_v,
1496                      int width);
1497 void RGB24ToUVJRow_NEON(const uint8_t* src_rgb24,
1498                         int src_stride_rgb24,
1499                         uint8_t* dst_u,
1500                         uint8_t* dst_v,
1501                         int width);
1502 void RAWToUVJRow_NEON(const uint8_t* src_raw,
1503                       int src_stride_raw,
1504                       uint8_t* dst_u,
1505                       uint8_t* dst_v,
1506                       int width);
1507 void RGB565ToUVRow_NEON(const uint8_t* src_rgb565,
1508                         int src_stride_rgb565,
1509                         uint8_t* dst_u,
1510                         uint8_t* dst_v,
1511                         int width);
1512 void ARGB1555ToUVRow_NEON(const uint8_t* src_argb1555,
1513                           int src_stride_argb1555,
1514                           uint8_t* dst_u,
1515                           uint8_t* dst_v,
1516                           int width);
1517 void ARGB4444ToUVRow_NEON(const uint8_t* src_argb4444,
1518                           int src_stride_argb4444,
1519                           uint8_t* dst_u,
1520                           uint8_t* dst_v,
1521                           int width);
1522 void ARGBToUVJRow_MSA(const uint8_t* src_rgb,
1523                       int src_stride_rgb,
1524                       uint8_t* dst_u,
1525                       uint8_t* dst_v,
1526                       int width);
1527 void ABGRToUVJRow_MSA(const uint8_t* src_rgb,
1528                       int src_stride_rgb,
1529                       uint8_t* dst_u,
1530                       uint8_t* dst_v,
1531                       int width);
1532 void BGRAToUVRow_MSA(const uint8_t* src_rgb,
1533                      int src_stride_rgb,
1534                      uint8_t* dst_u,
1535                      uint8_t* dst_v,
1536                      int width);
1537 void ABGRToUVRow_MSA(const uint8_t* src_rgb,
1538                      int src_stride_rgb,
1539                      uint8_t* dst_u,
1540                      uint8_t* dst_v,
1541                      int width);
1542 void RGBAToUVRow_MSA(const uint8_t* src_rgb,
1543                      int src_stride_rgb,
1544                      uint8_t* dst_u,
1545                      uint8_t* dst_v,
1546                      int width);
1547 void RGB24ToUVRow_MSA(const uint8_t* src_rgb,
1548                       int src_stride_rgb,
1549                       uint8_t* dst_u,
1550                       uint8_t* dst_v,
1551                       int width);
1552 void RAWToUVRow_MSA(const uint8_t* src_rgb,
1553                     int src_stride_rgb,
1554                     uint8_t* dst_u,
1555                     uint8_t* dst_v,
1556                     int width);
1557 void RGB565ToUVRow_MSA(const uint8_t* src_rgb565,
1558                        int src_stride_rgb565,
1559                        uint8_t* dst_u,
1560                        uint8_t* dst_v,
1561                        int width);
1562 void ARGB1555ToUVRow_MSA(const uint8_t* src_argb1555,
1563                          int src_stride_argb1555,
1564                          uint8_t* dst_u,
1565                          uint8_t* dst_v,
1566                          int width);
1567 void BGRAToUVRow_LSX(const uint8_t* src_bgra,
1568                      int src_stride_bgra,
1569                      uint8_t* dst_u,
1570                      uint8_t* dst_v,
1571                      int width);
1572 void ABGRToUVRow_LSX(const uint8_t* src_abgr,
1573                      int src_stride_abgr,
1574                      uint8_t* dst_u,
1575                      uint8_t* dst_v,
1576                      int width);
1577 void RGBAToUVRow_LSX(const uint8_t* src_rgba,
1578                      int src_stride_rgba,
1579                      uint8_t* dst_u,
1580                      uint8_t* dst_v,
1581                      int width);
1582 void ARGBToUVJRow_LSX(const uint8_t* src_argb,
1583                       int src_stride_argb,
1584                       uint8_t* dst_u,
1585                       uint8_t* dst_v,
1586                       int width);
1587 void ARGBToUVJRow_LASX(const uint8_t* src_argb,
1588                        int src_stride_argb,
1589                        uint8_t* dst_u,
1590                        uint8_t* dst_v,
1591                        int width);
1592 void ARGB1555ToUVRow_LSX(const uint8_t* src_argb1555,
1593                          int src_stride_argb1555,
1594                          uint8_t* dst_u,
1595                          uint8_t* dst_v,
1596                          int width);
1597 void ARGB1555ToUVRow_LASX(const uint8_t* src_argb1555,
1598                           int src_stride_argb1555,
1599                           uint8_t* dst_u,
1600                           uint8_t* dst_v,
1601                           int width);
1602 void RGB565ToUVRow_LSX(const uint8_t* src_rgb565,
1603                        int src_stride_rgb565,
1604                        uint8_t* dst_u,
1605                        uint8_t* dst_v,
1606                        int width);
1607 void RGB565ToUVRow_LASX(const uint8_t* src_rgb565,
1608                         int src_stride_rgb565,
1609                         uint8_t* dst_u,
1610                         uint8_t* dst_v,
1611                         int width);
1612 void RGB24ToUVRow_LSX(const uint8_t* src_rgb24,
1613                       int src_stride_rgb24,
1614                       uint8_t* dst_u,
1615                       uint8_t* dst_v,
1616                       int width);
1617 void RGB24ToUVRow_LASX(const uint8_t* src_rgb24,
1618                        int src_stride_rgb24,
1619                        uint8_t* dst_u,
1620                        uint8_t* dst_v,
1621                        int width);
1622 void RAWToUVRow_LSX(const uint8_t* src_raw,
1623                     int src_stride_raw,
1624                     uint8_t* dst_u,
1625                     uint8_t* dst_v,
1626                     int width);
1627 void RAWToUVRow_LASX(const uint8_t* src_raw,
1628                      int src_stride_raw,
1629                      uint8_t* dst_u,
1630                      uint8_t* dst_v,
1631                      int width);
1632 void BGRAToYRow_NEON(const uint8_t* src_bgra, uint8_t* dst_y, int width);
1633 void ABGRToYRow_NEON(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1634 void RGBAToYRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1635 void RGB24ToYRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1636 void RGB24ToYJRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1637 void RAWToYRow_NEON(const uint8_t* src_raw, uint8_t* dst_y, int width);
1638 void RAWToYJRow_NEON(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1639 void RGB565ToYRow_NEON(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1640 void ARGB1555ToYRow_NEON(const uint8_t* src_argb1555,
1641                          uint8_t* dst_y,
1642                          int width);
1643 void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444,
1644                          uint8_t* dst_y,
1645                          int width);
1646 void BGRAToYRow_RVV(const uint8_t* src_bgra, uint8_t* dst_y, int width);
1647 void ABGRToYRow_RVV(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1648 void RGBAToYRow_RVV(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1649 void RGB24ToYRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1650 void RGB24ToYJRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1651 void RAWToYRow_RVV(const uint8_t* src_raw, uint8_t* dst_y, int width);
1652 void RAWToYJRow_RVV(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1653 void BGRAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1654 void ABGRToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1655 void RGBAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1656 void RGB24ToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1657 void RAWToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width);
1658 void RGB565ToYRow_MSA(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1659 void ARGB1555ToYRow_MSA(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1660 
1661 void BGRAToYRow_LSX(const uint8_t* src_bgra, uint8_t* dst_y, int width);
1662 void ABGRToYRow_LSX(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1663 void RGBAToYRow_LSX(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1664 void ARGB1555ToYRow_LSX(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1665 void RGB24ToYJRow_LSX(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1666 void ABGRToYRow_LASX(const uint8_t* src_abgr, uint8_t* dst_y, int width);
1667 void ARGB1555ToYRow_LASX(const uint8_t* src_argb1555,
1668                          uint8_t* dst_y,
1669                          int width);
1670 void RGB565ToYRow_LSX(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1671 void RGB565ToYRow_LASX(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1672 void RGB24ToYRow_LSX(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1673 void RGB24ToYRow_LASX(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
1674 void RAWToYRow_LSX(const uint8_t* src_raw, uint8_t* dst_y, int width);
1675 void RAWToYRow_LASX(const uint8_t* src_raw, uint8_t* dst_y, int width);
1676 void RGBAToYRow_LASX(const uint8_t* src_rgba, uint8_t* dst_y, int width);
1677 void BGRAToYRow_LASX(const uint8_t* src_bgra, uint8_t* dst_y, int width);
1678 void RGB24ToYJRow_LASX(const uint8_t* src_rgb24, uint8_t* dst_yj, int width);
1679 void RAWToYJRow_LSX(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1680 void RAWToYJRow_LASX(const uint8_t* src_raw, uint8_t* dst_yj, int width);
1681 
1682 void ARGBToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1683 void ARGBToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1684 void ABGRToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1685 void RGBAToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1686 void BGRAToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1687 void ABGRToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1688 void RGBAToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1689 void RGB24ToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1690 void RGB24ToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1691 void RAWToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1692 void RAWToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
1693 void RGB565ToYRow_C(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
1694 void ARGB1555ToYRow_C(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
1695 void ARGB4444ToYRow_C(const uint8_t* src_argb4444, uint8_t* dst_y, int width);
1696 void ARGBToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1697 void ARGBToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1698 void ABGRToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1699 void RGBAToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1700 void BGRAToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1701 void ABGRToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1702 void RGBAToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1703 void RGB24ToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1704 void RGB24ToYJRow_Any_SSSE3(const uint8_t* src_ptr,
1705                             uint8_t* dst_ptr,
1706                             int width);
1707 void RAWToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1708 void RAWToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1709 void RGB24ToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1710 void RAWToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1711 void ARGBToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1712 void ARGBToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1713 void ABGRToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1714 void RGBAToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1715 void BGRAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1716 void ABGRToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1717 void RGBAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1718 void RGB24ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1719 void RGB24ToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1720 void RAWToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1721 void RAWToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1722 void RGB565ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1723 void ARGB1555ToYRow_Any_NEON(const uint8_t* src_ptr,
1724                              uint8_t* dst_ptr,
1725                              int width);
1726 void ARGB4444ToYRow_Any_NEON(const uint8_t* src_ptr,
1727                              uint8_t* dst_ptr,
1728                              int width);
1729 void BGRAToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1730 void ABGRToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1731 void RGBAToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1732 void ARGBToYJRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1733 void ARGBToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1734 void RGB24ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1735 void RAWToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1736 void RGB565ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1737 void ARGB1555ToYRow_Any_MSA(const uint8_t* src_ptr,
1738                             uint8_t* dst_ptr,
1739                             int width);
1740 
1741 void BGRAToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1742 void ABGRToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1743 void RGBAToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1744 void ARGBToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1745 void ARGBToYJRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1746 void RGB24ToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1747 void RGB565ToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1748 void ABGRToYJRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1749 void RAWToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1750 void RGBAToYJRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1751 void RGB24ToYJRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1752 void RAWToYJRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1753 void ARGB1555ToYRow_Any_LSX(const uint8_t* src_ptr,
1754                             uint8_t* dst_ptr,
1755                             int width);
1756 
1757 void RGB565ToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1758 void RGB24ToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1759 void ARGBToYJRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1760 void ARGBToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1761 void ABGRToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1762 void ABGRToYJRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1763 void RAWToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1764 void RGBAToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1765 void RGBAToYJRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1766 void BGRAToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1767 void RGB24ToYJRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1768 void RAWToYJRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
1769 void ARGB1555ToYRow_Any_LASX(const uint8_t* src_ptr,
1770                              uint8_t* dst_ptr,
1771                              int width);
1772 
1773 void ARGBToUVRow_AVX2(const uint8_t* src_argb,
1774                       int src_stride_argb,
1775                       uint8_t* dst_u,
1776                       uint8_t* dst_v,
1777                       int width);
1778 void ABGRToUVRow_AVX2(const uint8_t* src_abgr,
1779                       int src_stride_abgr,
1780                       uint8_t* dst_u,
1781                       uint8_t* dst_v,
1782                       int width);
1783 void ARGBToUVJRow_AVX2(const uint8_t* src_argb,
1784                        int src_stride_argb,
1785                        uint8_t* dst_u,
1786                        uint8_t* dst_v,
1787                        int width);
1788 void ABGRToUVJRow_AVX2(const uint8_t* src_abgr,
1789                        int src_stride_abgr,
1790                        uint8_t* dst_u,
1791                        uint8_t* dst_v,
1792                        int width);
1793 void ARGBToUVRow_SSSE3(const uint8_t* src_argb,
1794                        int src_stride_argb,
1795                        uint8_t* dst_u,
1796                        uint8_t* dst_v,
1797                        int width);
1798 void ARGBToUVJRow_SSSE3(const uint8_t* src_argb,
1799                         int src_stride_argb,
1800                         uint8_t* dst_u,
1801                         uint8_t* dst_v,
1802                         int width);
1803 void ABGRToUVJRow_SSSE3(const uint8_t* src_abgr,
1804                         int src_stride_abgr,
1805                         uint8_t* dst_u,
1806                         uint8_t* dst_v,
1807                         int width);
1808 void BGRAToUVRow_SSSE3(const uint8_t* src_bgra,
1809                        int src_stride_bgra,
1810                        uint8_t* dst_u,
1811                        uint8_t* dst_v,
1812                        int width);
1813 void ABGRToUVRow_SSSE3(const uint8_t* src_abgr,
1814                        int src_stride_abgr,
1815                        uint8_t* dst_u,
1816                        uint8_t* dst_v,
1817                        int width);
1818 void RGBAToUVRow_SSSE3(const uint8_t* src_rgba,
1819                        int src_stride_rgba,
1820                        uint8_t* dst_u,
1821                        uint8_t* dst_v,
1822                        int width);
1823 void ARGBToUVRow_Any_AVX2(const uint8_t* src_ptr,
1824                           int src_stride,
1825                           uint8_t* dst_u,
1826                           uint8_t* dst_v,
1827                           int width);
1828 void ABGRToUVRow_Any_AVX2(const uint8_t* src_ptr,
1829                           int src_stride,
1830                           uint8_t* dst_u,
1831                           uint8_t* dst_v,
1832                           int width);
1833 void ARGBToUVJRow_Any_AVX2(const uint8_t* src_ptr,
1834                            int src_stride,
1835                            uint8_t* dst_u,
1836                            uint8_t* dst_v,
1837                            int width);
1838 void ABGRToUVJRow_Any_AVX2(const uint8_t* src_ptr,
1839                            int src_stride,
1840                            uint8_t* dst_u,
1841                            uint8_t* dst_v,
1842                            int width);
1843 void ARGBToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1844                            int src_stride,
1845                            uint8_t* dst_u,
1846                            uint8_t* dst_v,
1847                            int width);
1848 void ARGBToUVJRow_Any_SSSE3(const uint8_t* src_ptr,
1849                             int src_stride,
1850                             uint8_t* dst_u,
1851                             uint8_t* dst_v,
1852                             int width);
1853 void ABGRToUVJRow_Any_SSSE3(const uint8_t* src_ptr,
1854                             int src_stride,
1855                             uint8_t* dst_u,
1856                             uint8_t* dst_v,
1857                             int width);
1858 void BGRAToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1859                            int src_stride,
1860                            uint8_t* dst_u,
1861                            uint8_t* dst_v,
1862                            int width);
1863 void ABGRToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1864                            int src_stride,
1865                            uint8_t* dst_u,
1866                            uint8_t* dst_v,
1867                            int width);
1868 void RGBAToUVRow_Any_SSSE3(const uint8_t* src_ptr,
1869                            int src_stride,
1870                            uint8_t* dst_u,
1871                            uint8_t* dst_v,
1872                            int width);
1873 void ARGBToUV444Row_Any_NEON(const uint8_t* src_ptr,
1874                              uint8_t* dst_u,
1875                              uint8_t* dst_v,
1876                              int width);
1877 void ARGBToUVRow_Any_NEON(const uint8_t* src_ptr,
1878                           int src_stride,
1879                           uint8_t* dst_u,
1880                           uint8_t* dst_v,
1881                           int width);
1882 void ARGBToUV444Row_Any_MSA(const uint8_t* src_ptr,
1883                             uint8_t* dst_u,
1884                             uint8_t* dst_v,
1885                             int width);
1886 void ARGBToUVRow_Any_MSA(const uint8_t* src_ptr,
1887                          int src_stride_ptr,
1888                          uint8_t* dst_u,
1889                          uint8_t* dst_v,
1890                          int width);
1891 void ARGBToUVRow_Any_LSX(const uint8_t* src_ptr,
1892                          int src_stride_ptr,
1893                          uint8_t* dst_u,
1894                          uint8_t* dst_v,
1895                          int width);
1896 void ARGBToUVRow_Any_LASX(const uint8_t* src_ptr,
1897                           int src_stride_ptr,
1898                           uint8_t* dst_u,
1899                           uint8_t* dst_v,
1900                           int width);
1901 void ARGBToUV444Row_Any_LSX(const uint8_t* src_ptr,
1902                             uint8_t* dst_u,
1903                             uint8_t* dst_v,
1904                             int width);
1905 void ARGBToUV444Row_Any_LASX(const uint8_t* src_ptr,
1906                              uint8_t* dst_u,
1907                              uint8_t* dst_v,
1908                              int width);
1909 void ARGBToUVJRow_Any_NEON(const uint8_t* src_ptr,
1910                            int src_stride,
1911                            uint8_t* dst_u,
1912                            uint8_t* dst_v,
1913                            int width);
1914 void ABGRToUVJRow_Any_NEON(const uint8_t* src_ptr,
1915                            int src_stride,
1916                            uint8_t* dst_u,
1917                            uint8_t* dst_v,
1918                            int width);
1919 void BGRAToUVRow_Any_NEON(const uint8_t* src_ptr,
1920                           int src_stride,
1921                           uint8_t* dst_u,
1922                           uint8_t* dst_v,
1923                           int width);
1924 void ABGRToUVRow_Any_NEON(const uint8_t* src_ptr,
1925                           int src_stride,
1926                           uint8_t* dst_u,
1927                           uint8_t* dst_v,
1928                           int width);
1929 void RGBAToUVRow_Any_NEON(const uint8_t* src_ptr,
1930                           int src_stride,
1931                           uint8_t* dst_u,
1932                           uint8_t* dst_v,
1933                           int width);
1934 void RGB24ToUVRow_Any_NEON(const uint8_t* src_ptr,
1935                            int src_stride,
1936                            uint8_t* dst_u,
1937                            uint8_t* dst_v,
1938                            int width);
1939 void RAWToUVRow_Any_NEON(const uint8_t* src_ptr,
1940                          int src_stride,
1941                          uint8_t* dst_u,
1942                          uint8_t* dst_v,
1943                          int width);
1944 void RGB24ToUVJRow_Any_NEON(const uint8_t* src_ptr,
1945                             int src_stride,
1946                             uint8_t* dst_u,
1947                             uint8_t* dst_v,
1948                             int width);
1949 void RAWToUVJRow_Any_NEON(const uint8_t* src_ptr,
1950                           int src_stride,
1951                           uint8_t* dst_u,
1952                           uint8_t* dst_v,
1953                           int width);
1954 void RGB565ToUVRow_Any_NEON(const uint8_t* src_ptr,
1955                             int src_stride,
1956                             uint8_t* dst_u,
1957                             uint8_t* dst_v,
1958                             int width);
1959 void ARGB1555ToUVRow_Any_NEON(const uint8_t* src_ptr,
1960                               int src_stride,
1961                               uint8_t* dst_u,
1962                               uint8_t* dst_v,
1963                               int width);
1964 void ARGB4444ToUVRow_Any_NEON(const uint8_t* src_ptr,
1965                               int src_stride,
1966                               uint8_t* dst_u,
1967                               uint8_t* dst_v,
1968                               int width);
1969 void ARGBToUVJRow_Any_MSA(const uint8_t* src_ptr,
1970                           int src_stride_ptr,
1971                           uint8_t* dst_u,
1972                           uint8_t* dst_v,
1973                           int width);
1974 void BGRAToUVRow_Any_MSA(const uint8_t* src_ptr,
1975                          int src_stride_ptr,
1976                          uint8_t* dst_u,
1977                          uint8_t* dst_v,
1978                          int width);
1979 void ABGRToUVRow_Any_MSA(const uint8_t* src_ptr,
1980                          int src_stride_ptr,
1981                          uint8_t* dst_u,
1982                          uint8_t* dst_v,
1983                          int width);
1984 void RGBAToUVRow_Any_MSA(const uint8_t* src_ptr,
1985                          int src_stride_ptr,
1986                          uint8_t* dst_u,
1987                          uint8_t* dst_v,
1988                          int width);
1989 void RGB24ToUVRow_Any_MSA(const uint8_t* src_ptr,
1990                           int src_stride_ptr,
1991                           uint8_t* dst_u,
1992                           uint8_t* dst_v,
1993                           int width);
1994 void RAWToUVRow_Any_MSA(const uint8_t* src_ptr,
1995                         int src_stride_ptr,
1996                         uint8_t* dst_u,
1997                         uint8_t* dst_v,
1998                         int width);
1999 void RGB565ToUVRow_Any_MSA(const uint8_t* src_ptr,
2000                            int src_stride_ptr,
2001                            uint8_t* dst_u,
2002                            uint8_t* dst_v,
2003                            int width);
2004 void ARGB1555ToUVRow_Any_MSA(const uint8_t* src_ptr,
2005                              int src_stride_ptr,
2006                              uint8_t* dst_u,
2007                              uint8_t* dst_v,
2008                              int width);
2009 void ABGRToUVRow_Any_LSX(const uint8_t* src_ptr,
2010                          int src_stride_ptr,
2011                          uint8_t* dst_u,
2012                          uint8_t* dst_v,
2013                          int width);
2014 void BGRAToUVRow_Any_LSX(const uint8_t* src_ptr,
2015                          int src_stride_ptr,
2016                          uint8_t* dst_u,
2017                          uint8_t* dst_v,
2018                          int width);
2019 void RGBAToUVRow_Any_LSX(const uint8_t* src_ptr,
2020                          int src_stride_ptr,
2021                          uint8_t* dst_u,
2022                          uint8_t* dst_v,
2023                          int width);
2024 void ARGBToUVJRow_Any_LSX(const uint8_t* src_ptr,
2025                           int src_stride_ptr,
2026                           uint8_t* dst_u,
2027                           uint8_t* dst_v,
2028                           int width);
2029 void ARGBToUVJRow_Any_LASX(const uint8_t* src_ptr,
2030                            int src_stride_ptr,
2031                            uint8_t* dst_u,
2032                            uint8_t* dst_v,
2033                            int width);
2034 void ARGB1555ToUVRow_Any_LSX(const uint8_t* src_ptr,
2035                              int src_stride_ptr,
2036                              uint8_t* dst_u,
2037                              uint8_t* dst_v,
2038                              int width);
2039 void ARGB1555ToUVRow_Any_LASX(const uint8_t* src_ptr,
2040                               int src_stride_ptr,
2041                               uint8_t* dst_u,
2042                               uint8_t* dst_v,
2043                               int width);
2044 void RGB565ToUVRow_Any_LSX(const uint8_t* src_ptr,
2045                            int src_stride_ptr,
2046                            uint8_t* dst_u,
2047                            uint8_t* dst_v,
2048                            int width);
2049 void RGB565ToUVRow_Any_LASX(const uint8_t* src_ptr,
2050                             int src_stride_ptr,
2051                             uint8_t* dst_u,
2052                             uint8_t* dst_v,
2053                             int width);
2054 void RGB24ToUVRow_Any_LSX(const uint8_t* src_ptr,
2055                           int src_stride_ptr,
2056                           uint8_t* dst_u,
2057                           uint8_t* dst_v,
2058                           int width);
2059 void RGB24ToUVRow_Any_LASX(const uint8_t* src_ptr,
2060                            int src_stride_ptr,
2061                            uint8_t* dst_u,
2062                            uint8_t* dst_v,
2063                            int width);
2064 void RAWToUVRow_Any_LSX(const uint8_t* src_ptr,
2065                         int src_stride_ptr,
2066                         uint8_t* dst_u,
2067                         uint8_t* dst_v,
2068                         int width);
2069 void RAWToUVRow_Any_LASX(const uint8_t* src_ptr,
2070                          int src_stride_ptr,
2071                          uint8_t* dst_u,
2072                          uint8_t* dst_v,
2073                          int width);
2074 void ARGBToUVRow_C(const uint8_t* src_rgb,
2075                    int src_stride_rgb,
2076                    uint8_t* dst_u,
2077                    uint8_t* dst_v,
2078                    int width);
2079 void ARGBToUVJRow_C(const uint8_t* src_rgb,
2080                     int src_stride_rgb,
2081                     uint8_t* dst_u,
2082                     uint8_t* dst_v,
2083                     int width);
2084 void ABGRToUVJRow_C(const uint8_t* src_rgb,
2085                     int src_stride_rgb,
2086                     uint8_t* dst_u,
2087                     uint8_t* dst_v,
2088                     int width);
2089 void ARGBToUVRow_C(const uint8_t* src_rgb,
2090                    int src_stride_rgb,
2091                    uint8_t* dst_u,
2092                    uint8_t* dst_v,
2093                    int width);
2094 void BGRAToUVRow_C(const uint8_t* src_rgb,
2095                    int src_stride_rgb,
2096                    uint8_t* dst_u,
2097                    uint8_t* dst_v,
2098                    int width);
2099 void ABGRToUVRow_C(const uint8_t* src_rgb,
2100                    int src_stride_rgb,
2101                    uint8_t* dst_u,
2102                    uint8_t* dst_v,
2103                    int width);
2104 void RGBAToUVRow_C(const uint8_t* src_rgb,
2105                    int src_stride_rgb,
2106                    uint8_t* dst_u,
2107                    uint8_t* dst_v,
2108                    int width);
2109 void RGBAToUVJRow_C(const uint8_t* src_rgb,
2110                     int src_stride_rgb,
2111                     uint8_t* dst_u,
2112                     uint8_t* dst_v,
2113                     int width);
2114 void RGB24ToUVRow_C(const uint8_t* src_rgb,
2115                     int src_stride_rgb,
2116                     uint8_t* dst_u,
2117                     uint8_t* dst_v,
2118                     int width);
2119 void RAWToUVRow_C(const uint8_t* src_rgb,
2120                   int src_stride_rgb,
2121                   uint8_t* dst_u,
2122                   uint8_t* dst_v,
2123                   int width);
2124 void RGB24ToUVJRow_C(const uint8_t* src_rgb,
2125                      int src_stride_rgb,
2126                      uint8_t* dst_u,
2127                      uint8_t* dst_v,
2128                      int width);
2129 void RAWToUVJRow_C(const uint8_t* src_rgb,
2130                    int src_stride_rgb,
2131                    uint8_t* dst_u,
2132                    uint8_t* dst_v,
2133                    int width);
2134 void RGB565ToUVRow_C(const uint8_t* src_rgb565,
2135                      int src_stride_rgb565,
2136                      uint8_t* dst_u,
2137                      uint8_t* dst_v,
2138                      int width);
2139 void ARGB1555ToUVRow_C(const uint8_t* src_argb1555,
2140                        int src_stride_argb1555,
2141                        uint8_t* dst_u,
2142                        uint8_t* dst_v,
2143                        int width);
2144 void ARGB4444ToUVRow_C(const uint8_t* src_argb4444,
2145                        int src_stride_argb4444,
2146                        uint8_t* dst_u,
2147                        uint8_t* dst_v,
2148                        int width);
2149 
2150 void ARGBToUV444Row_SSSE3(const uint8_t* src_argb,
2151                           uint8_t* dst_u,
2152                           uint8_t* dst_v,
2153                           int width);
2154 void ARGBToUV444Row_Any_SSSE3(const uint8_t* src_ptr,
2155                               uint8_t* dst_u,
2156                               uint8_t* dst_v,
2157                               int width);
2158 
2159 void ARGBToUV444Row_C(const uint8_t* src_argb,
2160                       uint8_t* dst_u,
2161                       uint8_t* dst_v,
2162                       int width);
2163 
2164 void MirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
2165 void MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width);
2166 void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width);
2167 void MirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width);
2168 void MirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width);
2169 void MirrorRow_LASX(const uint8_t* src, uint8_t* dst, int width);
2170 void MirrorRow_C(const uint8_t* src, uint8_t* dst, int width);
2171 void MirrorRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2172 void MirrorRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2173 void MirrorRow_Any_SSE2(const uint8_t* src, uint8_t* dst, int width);
2174 void MirrorRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2175 void MirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2176 void MirrorRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2177 void MirrorRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2178 void MirrorUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_uv, int width);
2179 void MirrorUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_uv, int width);
2180 void MirrorUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_uv, int width);
2181 void MirrorUVRow_MSA(const uint8_t* src_uv, uint8_t* dst_uv, int width);
2182 void MirrorUVRow_LSX(const uint8_t* src_uv, uint8_t* dst_uv, int width);
2183 void MirrorUVRow_LASX(const uint8_t* src_uv, uint8_t* dst_uv, int width);
2184 void MirrorUVRow_C(const uint8_t* src_uv, uint8_t* dst_uv, int width);
2185 void MirrorUVRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2186 void MirrorUVRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2187 void MirrorUVRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2188 void MirrorUVRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2189 void MirrorUVRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2190 void MirrorUVRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2191 
2192 void MirrorSplitUVRow_SSSE3(const uint8_t* src,
2193                             uint8_t* dst_u,
2194                             uint8_t* dst_v,
2195                             int width);
2196 void MirrorSplitUVRow_NEON(const uint8_t* src_uv,
2197                            uint8_t* dst_u,
2198                            uint8_t* dst_v,
2199                            int width);
2200 void MirrorSplitUVRow_MSA(const uint8_t* src_uv,
2201                           uint8_t* dst_u,
2202                           uint8_t* dst_v,
2203                           int width);
2204 void MirrorSplitUVRow_LSX(const uint8_t* src_uv,
2205                           uint8_t* dst_u,
2206                           uint8_t* dst_v,
2207                           int width);
2208 void MirrorSplitUVRow_C(const uint8_t* src_uv,
2209                         uint8_t* dst_u,
2210                         uint8_t* dst_v,
2211                         int width);
2212 
2213 void MirrorRow_16_C(const uint16_t* src, uint16_t* dst, int width);
2214 
2215 void ARGBMirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
2216 void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
2217 void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width);
2218 void ARGBMirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width);
2219 void ARGBMirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width);
2220 void ARGBMirrorRow_LASX(const uint8_t* src, uint8_t* dst, int width);
2221 void ARGBMirrorRow_C(const uint8_t* src, uint8_t* dst, int width);
2222 void ARGBMirrorRow_Any_AVX2(const uint8_t* src_ptr,
2223                             uint8_t* dst_ptr,
2224                             int width);
2225 void ARGBMirrorRow_Any_SSE2(const uint8_t* src_ptr,
2226                             uint8_t* dst_ptr,
2227                             int width);
2228 void ARGBMirrorRow_Any_NEON(const uint8_t* src_ptr,
2229                             uint8_t* dst_ptr,
2230                             int width);
2231 void ARGBMirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2232 void ARGBMirrorRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
2233 void ARGBMirrorRow_Any_LASX(const uint8_t* src_ptr,
2234                             uint8_t* dst_ptr,
2235                             int width);
2236 
2237 void RGB24MirrorRow_SSSE3(const uint8_t* src_rgb24,
2238                           uint8_t* dst_rgb24,
2239                           int width);
2240 void RGB24MirrorRow_NEON(const uint8_t* src_rgb24,
2241                          uint8_t* dst_rgb24,
2242                          int width);
2243 void RGB24MirrorRow_C(const uint8_t* src_rgb24, uint8_t* dst_rgb24, int width);
2244 void RGB24MirrorRow_Any_SSSE3(const uint8_t* src_ptr,
2245                               uint8_t* dst_ptr,
2246                               int width);
2247 void RGB24MirrorRow_Any_NEON(const uint8_t* src_ptr,
2248                              uint8_t* dst_ptr,
2249                              int width);
2250 
2251 void SplitUVRow_C(const uint8_t* src_uv,
2252                   uint8_t* dst_u,
2253                   uint8_t* dst_v,
2254                   int width);
2255 void SplitUVRow_SSE2(const uint8_t* src_uv,
2256                      uint8_t* dst_u,
2257                      uint8_t* dst_v,
2258                      int width);
2259 void SplitUVRow_AVX2(const uint8_t* src_uv,
2260                      uint8_t* dst_u,
2261                      uint8_t* dst_v,
2262                      int width);
2263 void SplitUVRow_NEON(const uint8_t* src_uv,
2264                      uint8_t* dst_u,
2265                      uint8_t* dst_v,
2266                      int width);
2267 void SplitUVRow_MSA(const uint8_t* src_uv,
2268                     uint8_t* dst_u,
2269                     uint8_t* dst_v,
2270                     int width);
2271 void SplitUVRow_LSX(const uint8_t* src_uv,
2272                     uint8_t* dst_u,
2273                     uint8_t* dst_v,
2274                     int width);
2275 void SplitUVRow_RVV(const uint8_t* src_uv,
2276                     uint8_t* dst_u,
2277                     uint8_t* dst_v,
2278                     int width);
2279 void SplitUVRow_Any_SSE2(const uint8_t* src_ptr,
2280                          uint8_t* dst_u,
2281                          uint8_t* dst_v,
2282                          int width);
2283 void SplitUVRow_Any_AVX2(const uint8_t* src_ptr,
2284                          uint8_t* dst_u,
2285                          uint8_t* dst_v,
2286                          int width);
2287 void SplitUVRow_Any_NEON(const uint8_t* src_ptr,
2288                          uint8_t* dst_u,
2289                          uint8_t* dst_v,
2290                          int width);
2291 void SplitUVRow_Any_MSA(const uint8_t* src_ptr,
2292                         uint8_t* dst_u,
2293                         uint8_t* dst_v,
2294                         int width);
2295 void SplitUVRow_Any_LSX(const uint8_t* src_ptr,
2296                         uint8_t* dst_u,
2297                         uint8_t* dst_v,
2298                         int width);
2299 void DetileRow_C(const uint8_t* src,
2300                  ptrdiff_t src_tile_stride,
2301                  uint8_t* dst,
2302                  int width);
2303 void DetileRow_NEON(const uint8_t* src,
2304                     ptrdiff_t src_tile_stride,
2305                     uint8_t* dst,
2306                     int width);
2307 void DetileRow_Any_NEON(const uint8_t* src,
2308                         ptrdiff_t src_tile_stride,
2309                         uint8_t* dst,
2310                         int width);
2311 void DetileRow_SSE2(const uint8_t* src,
2312                     ptrdiff_t src_tile_stride,
2313                     uint8_t* dst,
2314                     int width);
2315 void DetileRow_Any_SSE2(const uint8_t* src,
2316                         ptrdiff_t src_tile_stride,
2317                         uint8_t* dst,
2318                         int width);
2319 void DetileRow_AVX(const uint8_t* src,
2320                    ptrdiff_t src_tile_stride,
2321                    uint8_t* dst,
2322                    int width);
2323 void DetileRow_Any_AVX(const uint8_t* src,
2324                        ptrdiff_t src_tile_stride,
2325                        uint8_t* dst,
2326                        int width);
2327 void DetileRow_16_C(const uint16_t* src,
2328                     ptrdiff_t src_tile_stride,
2329                     uint16_t* dst,
2330                     int width);
2331 void DetileRow_16_NEON(const uint16_t* src,
2332                        ptrdiff_t src_tile_stride,
2333                        uint16_t* dst,
2334                        int width);
2335 void DetileRow_16_Any_NEON(const uint16_t* src,
2336                            ptrdiff_t src_tile_stride,
2337                            uint16_t* dst,
2338                            int width);
2339 void DetileRow_16_SSE2(const uint16_t* src,
2340                        ptrdiff_t src_tile_stride,
2341                        uint16_t* dst,
2342                        int width);
2343 void DetileRow_16_Any_SSE2(const uint16_t* src,
2344                            ptrdiff_t src_tile_stride,
2345                            uint16_t* dst,
2346                            int width);
2347 void DetileRow_16_AVX(const uint16_t* src,
2348                       ptrdiff_t src_tile_stride,
2349                       uint16_t* dst,
2350                       int width);
2351 void DetileRow_16_Any_AVX(const uint16_t* src,
2352                           ptrdiff_t src_tile_stride,
2353                           uint16_t* dst,
2354                           int width);
2355 void DetileSplitUVRow_C(const uint8_t* src_uv,
2356                         ptrdiff_t src_tile_stride,
2357                         uint8_t* dst_u,
2358                         uint8_t* dst_v,
2359                         int width);
2360 void DetileSplitUVRow_SSSE3(const uint8_t* src_uv,
2361                             ptrdiff_t src_tile_stride,
2362                             uint8_t* dst_u,
2363                             uint8_t* dst_v,
2364                             int width);
2365 void DetileSplitUVRow_Any_SSSE3(const uint8_t* src_uv,
2366                                 ptrdiff_t src_tile_stride,
2367                                 uint8_t* dst_u,
2368                                 uint8_t* dst_v,
2369                                 int width);
2370 void DetileSplitUVRow_NEON(const uint8_t* src_uv,
2371                            ptrdiff_t src_tile_stride,
2372                            uint8_t* dst_u,
2373                            uint8_t* dst_v,
2374                            int width);
2375 void DetileSplitUVRow_Any_NEON(const uint8_t* src_uv,
2376                                ptrdiff_t src_tile_stride,
2377                                uint8_t* dst_u,
2378                                uint8_t* dst_v,
2379                                int width);
2380 void DetileToYUY2_C(const uint8_t* src_y,
2381                     ptrdiff_t src_y_tile_stride,
2382                     const uint8_t* src_uv,
2383                     ptrdiff_t src_uv_tile_stride,
2384                     uint8_t* dst_yuy2,
2385                     int width);
2386 void DetileToYUY2_SSE2(const uint8_t* src_y,
2387                        ptrdiff_t src_y_tile_stride,
2388                        const uint8_t* src_uv,
2389                        ptrdiff_t src_uv_tile_stride,
2390                        uint8_t* dst_yuy2,
2391                        int width);
2392 void DetileToYUY2_Any_SSE2(const uint8_t* src_y,
2393                            ptrdiff_t src_y_tile_stride,
2394                            const uint8_t* src_uv,
2395                            ptrdiff_t src_uv_tile_stride,
2396                            uint8_t* dst_yuy2,
2397                            int width);
2398 void DetileToYUY2_NEON(const uint8_t* src_y,
2399                        ptrdiff_t src_y_tile_stride,
2400                        const uint8_t* src_uv,
2401                        ptrdiff_t src_uv_tile_stride,
2402                        uint8_t* dst_yuy2,
2403                        int width);
2404 void DetileToYUY2_Any_NEON(const uint8_t* src_y,
2405                            ptrdiff_t src_y_tile_stride,
2406                            const uint8_t* src_uv,
2407                            ptrdiff_t src_uv_tile_stride,
2408                            uint8_t* dst_yuy2,
2409                            int width);
2410 void UnpackMT2T_C(const uint8_t* src, uint16_t* dst, size_t size);
2411 void UnpackMT2T_NEON(const uint8_t* src, uint16_t* dst, size_t size);
2412 void MergeUVRow_C(const uint8_t* src_u,
2413                   const uint8_t* src_v,
2414                   uint8_t* dst_uv,
2415                   int width);
2416 void MergeUVRow_SSE2(const uint8_t* src_u,
2417                      const uint8_t* src_v,
2418                      uint8_t* dst_uv,
2419                      int width);
2420 void MergeUVRow_AVX2(const uint8_t* src_u,
2421                      const uint8_t* src_v,
2422                      uint8_t* dst_uv,
2423                      int width);
2424 void MergeUVRow_AVX512BW(const uint8_t* src_u,
2425                          const uint8_t* src_v,
2426                          uint8_t* dst_uv,
2427                          int width);
2428 void MergeUVRow_NEON(const uint8_t* src_u,
2429                      const uint8_t* src_v,
2430                      uint8_t* dst_uv,
2431                      int width);
2432 void MergeUVRow_MSA(const uint8_t* src_u,
2433                     const uint8_t* src_v,
2434                     uint8_t* dst_uv,
2435                     int width);
2436 void MergeUVRow_LSX(const uint8_t* src_u,
2437                     const uint8_t* src_v,
2438                     uint8_t* dst_uv,
2439                     int width);
2440 void MergeUVRow_RVV(const uint8_t* src_u,
2441                     const uint8_t* src_v,
2442                     uint8_t* dst_uv,
2443                     int width);
2444 void MergeUVRow_Any_SSE2(const uint8_t* y_buf,
2445                          const uint8_t* uv_buf,
2446                          uint8_t* dst_ptr,
2447                          int width);
2448 void MergeUVRow_Any_AVX2(const uint8_t* y_buf,
2449                          const uint8_t* uv_buf,
2450                          uint8_t* dst_ptr,
2451                          int width);
2452 void MergeUVRow_Any_AVX512BW(const uint8_t* y_buf,
2453                              const uint8_t* uv_buf,
2454                              uint8_t* dst_ptr,
2455                              int width);
2456 void MergeUVRow_Any_NEON(const uint8_t* y_buf,
2457                          const uint8_t* uv_buf,
2458                          uint8_t* dst_ptr,
2459                          int width);
2460 void MergeUVRow_Any_MSA(const uint8_t* y_buf,
2461                         const uint8_t* uv_buf,
2462                         uint8_t* dst_ptr,
2463                         int width);
2464 void MergeUVRow_Any_LSX(const uint8_t* y_buf,
2465                         const uint8_t* uv_buf,
2466                         uint8_t* dst_ptr,
2467                         int width);
2468 
2469 void HalfMergeUVRow_C(const uint8_t* src_u,
2470                       int src_stride_u,
2471                       const uint8_t* src_v,
2472                       int src_stride_v,
2473                       uint8_t* dst_uv,
2474                       int width);
2475 
2476 void HalfMergeUVRow_NEON(const uint8_t* src_u,
2477                          int src_stride_u,
2478                          const uint8_t* src_v,
2479                          int src_stride_v,
2480                          uint8_t* dst_uv,
2481                          int width);
2482 
2483 void HalfMergeUVRow_SSSE3(const uint8_t* src_u,
2484                           int src_stride_u,
2485                           const uint8_t* src_v,
2486                           int src_stride_v,
2487                           uint8_t* dst_uv,
2488                           int width);
2489 
2490 void HalfMergeUVRow_AVX2(const uint8_t* src_u,
2491                          int src_stride_u,
2492                          const uint8_t* src_v,
2493                          int src_stride_v,
2494                          uint8_t* dst_uv,
2495                          int width);
2496 
2497 void SplitRGBRow_C(const uint8_t* src_rgb,
2498                    uint8_t* dst_r,
2499                    uint8_t* dst_g,
2500                    uint8_t* dst_b,
2501                    int width);
2502 void SplitRGBRow_SSSE3(const uint8_t* src_rgb,
2503                        uint8_t* dst_r,
2504                        uint8_t* dst_g,
2505                        uint8_t* dst_b,
2506                        int width);
2507 void SplitRGBRow_NEON(const uint8_t* src_rgb,
2508                       uint8_t* dst_r,
2509                       uint8_t* dst_g,
2510                       uint8_t* dst_b,
2511                       int width);
2512 void SplitRGBRow_RVV(const uint8_t* src_rgb,
2513                      uint8_t* dst_r,
2514                      uint8_t* dst_g,
2515                      uint8_t* dst_b,
2516                      int width);
2517 void SplitRGBRow_Any_SSSE3(const uint8_t* src_ptr,
2518                            uint8_t* dst_r,
2519                            uint8_t* dst_g,
2520                            uint8_t* dst_b,
2521                            int width);
2522 void SplitRGBRow_Any_NEON(const uint8_t* src_ptr,
2523                           uint8_t* dst_r,
2524                           uint8_t* dst_g,
2525                           uint8_t* dst_b,
2526                           int width);
2527 
2528 void MergeRGBRow_C(const uint8_t* src_r,
2529                    const uint8_t* src_g,
2530                    const uint8_t* src_b,
2531                    uint8_t* dst_rgb,
2532                    int width);
2533 void MergeRGBRow_SSSE3(const uint8_t* src_r,
2534                        const uint8_t* src_g,
2535                        const uint8_t* src_b,
2536                        uint8_t* dst_rgb,
2537                        int width);
2538 void MergeRGBRow_NEON(const uint8_t* src_r,
2539                       const uint8_t* src_g,
2540                       const uint8_t* src_b,
2541                       uint8_t* dst_rgb,
2542                       int width);
2543 void MergeRGBRow_RVV(const uint8_t* src_r,
2544                      const uint8_t* src_g,
2545                      const uint8_t* src_b,
2546                      uint8_t* dst_rgb,
2547                      int width);
2548 void MergeRGBRow_Any_SSSE3(const uint8_t* y_buf,
2549                            const uint8_t* u_buf,
2550                            const uint8_t* v_buf,
2551                            uint8_t* dst_ptr,
2552                            int width);
2553 void MergeRGBRow_Any_NEON(const uint8_t* src_r,
2554                           const uint8_t* src_g,
2555                           const uint8_t* src_b,
2556                           uint8_t* dst_rgb,
2557                           int width);
2558 void MergeARGBRow_C(const uint8_t* src_r,
2559                     const uint8_t* src_g,
2560                     const uint8_t* src_b,
2561                     const uint8_t* src_a,
2562                     uint8_t* dst_argb,
2563                     int width);
2564 void MergeARGBRow_SSE2(const uint8_t* src_r,
2565                        const uint8_t* src_g,
2566                        const uint8_t* src_b,
2567                        const uint8_t* src_a,
2568                        uint8_t* dst_argb,
2569                        int width);
2570 void MergeARGBRow_AVX2(const uint8_t* src_r,
2571                        const uint8_t* src_g,
2572                        const uint8_t* src_b,
2573                        const uint8_t* src_a,
2574                        uint8_t* dst_argb,
2575                        int width);
2576 void MergeARGBRow_NEON(const uint8_t* src_r,
2577                        const uint8_t* src_g,
2578                        const uint8_t* src_b,
2579                        const uint8_t* src_a,
2580                        uint8_t* dst_argb,
2581                        int width);
2582 void MergeARGBRow_RVV(const uint8_t* src_r,
2583                       const uint8_t* src_g,
2584                       const uint8_t* src_b,
2585                       const uint8_t* src_a,
2586                       uint8_t* dst_argb,
2587                       int width);
2588 void MergeARGBRow_Any_SSE2(const uint8_t* y_buf,
2589                            const uint8_t* u_buf,
2590                            const uint8_t* v_buf,
2591                            const uint8_t* a_buf,
2592                            uint8_t* dst_ptr,
2593                            int width);
2594 void MergeARGBRow_Any_AVX2(const uint8_t* y_buf,
2595                            const uint8_t* u_buf,
2596                            const uint8_t* v_buf,
2597                            const uint8_t* a_buf,
2598                            uint8_t* dst_ptr,
2599                            int width);
2600 void MergeARGBRow_Any_NEON(const uint8_t* y_buf,
2601                            const uint8_t* u_buf,
2602                            const uint8_t* v_buf,
2603                            const uint8_t* a_buf,
2604                            uint8_t* dst_ptr,
2605                            int width);
2606 void SplitARGBRow_C(const uint8_t* src_argb,
2607                     uint8_t* dst_r,
2608                     uint8_t* dst_g,
2609                     uint8_t* dst_b,
2610                     uint8_t* dst_a,
2611                     int width);
2612 void SplitARGBRow_SSE2(const uint8_t* src_argb,
2613                        uint8_t* dst_r,
2614                        uint8_t* dst_g,
2615                        uint8_t* dst_b,
2616                        uint8_t* dst_a,
2617                        int width);
2618 void SplitARGBRow_SSSE3(const uint8_t* src_argb,
2619                         uint8_t* dst_r,
2620                         uint8_t* dst_g,
2621                         uint8_t* dst_b,
2622                         uint8_t* dst_a,
2623                         int width);
2624 void SplitARGBRow_AVX2(const uint8_t* src_argb,
2625                        uint8_t* dst_r,
2626                        uint8_t* dst_g,
2627                        uint8_t* dst_b,
2628                        uint8_t* dst_a,
2629                        int width);
2630 void SplitARGBRow_NEON(const uint8_t* src_rgba,
2631                        uint8_t* dst_r,
2632                        uint8_t* dst_g,
2633                        uint8_t* dst_b,
2634                        uint8_t* dst_a,
2635                        int width);
2636 void SplitARGBRow_RVV(const uint8_t* src_rgba,
2637                       uint8_t* dst_r,
2638                       uint8_t* dst_g,
2639                       uint8_t* dst_b,
2640                       uint8_t* dst_a,
2641                       int width);
2642 void SplitARGBRow_Any_SSE2(const uint8_t* src_ptr,
2643                            uint8_t* dst_r,
2644                            uint8_t* dst_g,
2645                            uint8_t* dst_b,
2646                            uint8_t* dst_a,
2647                            int width);
2648 void SplitARGBRow_Any_SSSE3(const uint8_t* src_ptr,
2649                             uint8_t* dst_r,
2650                             uint8_t* dst_g,
2651                             uint8_t* dst_b,
2652                             uint8_t* dst_a,
2653                             int width);
2654 void SplitARGBRow_Any_AVX2(const uint8_t* src_ptr,
2655                            uint8_t* dst_r,
2656                            uint8_t* dst_g,
2657                            uint8_t* dst_b,
2658                            uint8_t* dst_a,
2659                            int width);
2660 void SplitARGBRow_Any_NEON(const uint8_t* src_ptr,
2661                            uint8_t* dst_r,
2662                            uint8_t* dst_g,
2663                            uint8_t* dst_b,
2664                            uint8_t* dst_a,
2665                            int width);
2666 void MergeXRGBRow_C(const uint8_t* src_r,
2667                     const uint8_t* src_g,
2668                     const uint8_t* src_b,
2669                     uint8_t* dst_argb,
2670                     int width);
2671 void MergeXRGBRow_SSE2(const uint8_t* src_r,
2672                        const uint8_t* src_g,
2673                        const uint8_t* src_b,
2674                        uint8_t* dst_argb,
2675                        int width);
2676 void MergeXRGBRow_AVX2(const uint8_t* src_r,
2677                        const uint8_t* src_g,
2678                        const uint8_t* src_b,
2679                        uint8_t* dst_argb,
2680                        int width);
2681 void MergeXRGBRow_NEON(const uint8_t* src_r,
2682                        const uint8_t* src_g,
2683                        const uint8_t* src_b,
2684                        uint8_t* dst_argb,
2685                        int width);
2686 void MergeXRGBRow_RVV(const uint8_t* src_r,
2687                       const uint8_t* src_g,
2688                       const uint8_t* src_b,
2689                       uint8_t* dst_argb,
2690                       int width);
2691 void MergeXRGBRow_Any_SSE2(const uint8_t* y_buf,
2692                            const uint8_t* u_buf,
2693                            const uint8_t* v_buf,
2694                            uint8_t* dst_ptr,
2695                            int width);
2696 void MergeXRGBRow_Any_AVX2(const uint8_t* y_buf,
2697                            const uint8_t* u_buf,
2698                            const uint8_t* v_buf,
2699                            uint8_t* dst_ptr,
2700                            int width);
2701 void MergeXRGBRow_Any_NEON(const uint8_t* y_buf,
2702                            const uint8_t* u_buf,
2703                            const uint8_t* v_buf,
2704                            uint8_t* dst_ptr,
2705                            int width);
2706 void SplitXRGBRow_C(const uint8_t* src_argb,
2707                     uint8_t* dst_r,
2708                     uint8_t* dst_g,
2709                     uint8_t* dst_b,
2710                     int width);
2711 void SplitXRGBRow_SSE2(const uint8_t* src_argb,
2712                        uint8_t* dst_r,
2713                        uint8_t* dst_g,
2714                        uint8_t* dst_b,
2715                        int width);
2716 void SplitXRGBRow_SSSE3(const uint8_t* src_argb,
2717                         uint8_t* dst_r,
2718                         uint8_t* dst_g,
2719                         uint8_t* dst_b,
2720                         int width);
2721 void SplitXRGBRow_AVX2(const uint8_t* src_argb,
2722                        uint8_t* dst_r,
2723                        uint8_t* dst_g,
2724                        uint8_t* dst_b,
2725                        int width);
2726 void SplitXRGBRow_NEON(const uint8_t* src_rgba,
2727                        uint8_t* dst_r,
2728                        uint8_t* dst_g,
2729                        uint8_t* dst_b,
2730                        int width);
2731 void SplitXRGBRow_RVV(const uint8_t* src_rgba,
2732                       uint8_t* dst_r,
2733                       uint8_t* dst_g,
2734                       uint8_t* dst_b,
2735                       int width);
2736 void SplitXRGBRow_Any_SSE2(const uint8_t* src_ptr,
2737                            uint8_t* dst_r,
2738                            uint8_t* dst_g,
2739                            uint8_t* dst_b,
2740                            int width);
2741 void SplitXRGBRow_Any_SSSE3(const uint8_t* src_ptr,
2742                             uint8_t* dst_r,
2743                             uint8_t* dst_g,
2744                             uint8_t* dst_b,
2745                             int width);
2746 void SplitXRGBRow_Any_AVX2(const uint8_t* src_ptr,
2747                            uint8_t* dst_r,
2748                            uint8_t* dst_g,
2749                            uint8_t* dst_b,
2750                            int width);
2751 void SplitXRGBRow_Any_NEON(const uint8_t* src_ptr,
2752                            uint8_t* dst_r,
2753                            uint8_t* dst_g,
2754                            uint8_t* dst_b,
2755                            int width);
2756 
2757 void MergeXR30Row_C(const uint16_t* src_r,
2758                     const uint16_t* src_g,
2759                     const uint16_t* src_b,
2760                     uint8_t* dst_ar30,
2761                     int depth,
2762                     int width);
2763 void MergeAR64Row_C(const uint16_t* src_r,
2764                     const uint16_t* src_g,
2765                     const uint16_t* src_b,
2766                     const uint16_t* src_a,
2767                     uint16_t* dst_ar64,
2768                     int depth,
2769                     int width);
2770 void MergeARGB16To8Row_C(const uint16_t* src_r,
2771                          const uint16_t* src_g,
2772                          const uint16_t* src_b,
2773                          const uint16_t* src_a,
2774                          uint8_t* dst_argb,
2775                          int depth,
2776                          int width);
2777 void MergeXR64Row_C(const uint16_t* src_r,
2778                     const uint16_t* src_g,
2779                     const uint16_t* src_b,
2780                     uint16_t* dst_ar64,
2781                     int depth,
2782                     int width);
2783 void MergeXRGB16To8Row_C(const uint16_t* src_r,
2784                          const uint16_t* src_g,
2785                          const uint16_t* src_b,
2786                          uint8_t* dst_argb,
2787                          int depth,
2788                          int width);
2789 void MergeXR30Row_AVX2(const uint16_t* src_r,
2790                        const uint16_t* src_g,
2791                        const uint16_t* src_b,
2792                        uint8_t* dst_ar30,
2793                        int depth,
2794                        int width);
2795 void MergeAR64Row_AVX2(const uint16_t* src_r,
2796                        const uint16_t* src_g,
2797                        const uint16_t* src_b,
2798                        const uint16_t* src_a,
2799                        uint16_t* dst_ar64,
2800                        int depth,
2801                        int width);
2802 void MergeARGB16To8Row_AVX2(const uint16_t* src_r,
2803                             const uint16_t* src_g,
2804                             const uint16_t* src_b,
2805                             const uint16_t* src_a,
2806                             uint8_t* dst_argb,
2807                             int depth,
2808                             int width);
2809 void MergeXR64Row_AVX2(const uint16_t* src_r,
2810                        const uint16_t* src_g,
2811                        const uint16_t* src_b,
2812                        uint16_t* dst_ar64,
2813                        int depth,
2814                        int width);
2815 void MergeXRGB16To8Row_AVX2(const uint16_t* src_r,
2816                             const uint16_t* src_g,
2817                             const uint16_t* src_b,
2818                             uint8_t* dst_argb,
2819                             int depth,
2820                             int width);
2821 void MergeXR30Row_NEON(const uint16_t* src_r,
2822                        const uint16_t* src_g,
2823                        const uint16_t* src_b,
2824                        uint8_t* dst_ar30,
2825                        int depth,
2826                        int width);
2827 void MergeXR30Row_10_NEON(const uint16_t* src_r,
2828                           const uint16_t* src_g,
2829                           const uint16_t* src_b,
2830                           uint8_t* dst_ar30,
2831                           int /* depth */,
2832                           int width);
2833 void MergeAR64Row_NEON(const uint16_t* src_r,
2834                        const uint16_t* src_g,
2835                        const uint16_t* src_b,
2836                        const uint16_t* src_a,
2837                        uint16_t* dst_ar64,
2838                        int depth,
2839                        int width);
2840 void MergeARGB16To8Row_NEON(const uint16_t* src_r,
2841                             const uint16_t* src_g,
2842                             const uint16_t* src_b,
2843                             const uint16_t* src_a,
2844                             uint8_t* dst_argb,
2845                             int depth,
2846                             int width);
2847 void MergeXR64Row_NEON(const uint16_t* src_r,
2848                        const uint16_t* src_g,
2849                        const uint16_t* src_b,
2850                        uint16_t* dst_ar64,
2851                        int depth,
2852                        int width);
2853 void MergeXRGB16To8Row_NEON(const uint16_t* src_r,
2854                             const uint16_t* src_g,
2855                             const uint16_t* src_b,
2856                             uint8_t* dst_argb,
2857                             int depth,
2858                             int width);
2859 void MergeXR30Row_Any_AVX2(const uint16_t* r_buf,
2860                            const uint16_t* g_buf,
2861                            const uint16_t* b_buf,
2862                            uint8_t* dst_ptr,
2863                            int depth,
2864                            int width);
2865 void MergeAR64Row_Any_AVX2(const uint16_t* r_buf,
2866                            const uint16_t* g_buf,
2867                            const uint16_t* b_buf,
2868                            const uint16_t* a_buf,
2869                            uint16_t* dst_ptr,
2870                            int depth,
2871                            int width);
2872 void MergeXR64Row_Any_AVX2(const uint16_t* r_buf,
2873                            const uint16_t* g_buf,
2874                            const uint16_t* b_buf,
2875                            uint16_t* dst_ptr,
2876                            int depth,
2877                            int width);
2878 void MergeARGB16To8Row_Any_AVX2(const uint16_t* r_buf,
2879                                 const uint16_t* g_buf,
2880                                 const uint16_t* b_buf,
2881                                 const uint16_t* a_buf,
2882                                 uint8_t* dst_ptr,
2883                                 int depth,
2884                                 int width);
2885 void MergeXRGB16To8Row_Any_AVX2(const uint16_t* r_buf,
2886                                 const uint16_t* g_buf,
2887                                 const uint16_t* b_buf,
2888                                 uint8_t* dst_ptr,
2889                                 int depth,
2890                                 int width);
2891 void MergeXR30Row_Any_NEON(const uint16_t* r_buf,
2892                            const uint16_t* g_buf,
2893                            const uint16_t* b_buf,
2894                            uint8_t* dst_ptr,
2895                            int depth,
2896                            int width);
2897 void MergeXR30Row_10_Any_NEON(const uint16_t* r_buf,
2898                               const uint16_t* g_buf,
2899                               const uint16_t* b_buf,
2900                               uint8_t* dst_ptr,
2901                               int depth,
2902                               int width);
2903 void MergeAR64Row_Any_NEON(const uint16_t* r_buf,
2904                            const uint16_t* g_buf,
2905                            const uint16_t* b_buf,
2906                            const uint16_t* a_buf,
2907                            uint16_t* dst_ptr,
2908                            int depth,
2909                            int width);
2910 void MergeARGB16To8Row_Any_NEON(const uint16_t* r_buf,
2911                                 const uint16_t* g_buf,
2912                                 const uint16_t* b_buf,
2913                                 const uint16_t* a_buf,
2914                                 uint8_t* dst_ptr,
2915                                 int depth,
2916                                 int width);
2917 void MergeXR64Row_Any_NEON(const uint16_t* r_buf,
2918                            const uint16_t* g_buf,
2919                            const uint16_t* b_buf,
2920                            uint16_t* dst_ptr,
2921                            int depth,
2922                            int width);
2923 void MergeXRGB16To8Row_Any_NEON(const uint16_t* r_buf,
2924                                 const uint16_t* g_buf,
2925                                 const uint16_t* b_buf,
2926                                 uint8_t* dst_ptr,
2927                                 int depth,
2928                                 int width);
2929 
2930 void MergeUVRow_16_C(const uint16_t* src_u,
2931                      const uint16_t* src_v,
2932                      uint16_t* dst_uv,
2933                      int depth,
2934                      int width);
2935 void MergeUVRow_16_AVX2(const uint16_t* src_u,
2936                         const uint16_t* src_v,
2937                         uint16_t* dst_uv,
2938                         int depth,
2939                         int width);
2940 void MergeUVRow_16_Any_AVX2(const uint16_t* src_u,
2941                             const uint16_t* src_v,
2942                             uint16_t* dst_uv,
2943                             int depth,
2944                             int width);
2945 void MergeUVRow_16_NEON(const uint16_t* src_u,
2946                         const uint16_t* src_v,
2947                         uint16_t* dst_uv,
2948                         int depth,
2949                         int width);
2950 void MergeUVRow_16_Any_NEON(const uint16_t* src_u,
2951                             const uint16_t* src_v,
2952                             uint16_t* dst_uv,
2953                             int depth,
2954                             int width);
2955 
2956 void SplitUVRow_16_C(const uint16_t* src_uv,
2957                      uint16_t* dst_u,
2958                      uint16_t* dst_v,
2959                      int depth,
2960                      int width);
2961 void SplitUVRow_16_AVX2(const uint16_t* src_uv,
2962                         uint16_t* dst_u,
2963                         uint16_t* dst_v,
2964                         int depth,
2965                         int width);
2966 void SplitUVRow_16_Any_AVX2(const uint16_t* src_uv,
2967                             uint16_t* dst_u,
2968                             uint16_t* dst_v,
2969                             int depth,
2970                             int width);
2971 void SplitUVRow_16_NEON(const uint16_t* src_uv,
2972                         uint16_t* dst_u,
2973                         uint16_t* dst_v,
2974                         int depth,
2975                         int width);
2976 void SplitUVRow_16_Any_NEON(const uint16_t* src_uv,
2977                             uint16_t* dst_u,
2978                             uint16_t* dst_v,
2979                             int depth,
2980                             int width);
2981 
2982 void MultiplyRow_16_C(const uint16_t* src_y,
2983                       uint16_t* dst_y,
2984                       int scale,
2985                       int width);
2986 void MultiplyRow_16_AVX2(const uint16_t* src_y,
2987                          uint16_t* dst_y,
2988                          int scale,
2989                          int width);
2990 void MultiplyRow_16_Any_AVX2(const uint16_t* src_ptr,
2991                              uint16_t* dst_ptr,
2992                              int scale,
2993                              int width);
2994 void MultiplyRow_16_NEON(const uint16_t* src_y,
2995                          uint16_t* dst_y,
2996                          int scale,
2997                          int width);
2998 void MultiplyRow_16_Any_NEON(const uint16_t* src_ptr,
2999                              uint16_t* dst_ptr,
3000                              int scale,
3001                              int width);
3002 
3003 void DivideRow_16_C(const uint16_t* src_y,
3004                     uint16_t* dst_y,
3005                     int scale,
3006                     int width);
3007 void DivideRow_16_AVX2(const uint16_t* src_y,
3008                        uint16_t* dst_y,
3009                        int scale,
3010                        int width);
3011 void DivideRow_16_Any_AVX2(const uint16_t* src_ptr,
3012                            uint16_t* dst_ptr,
3013                            int scale,
3014                            int width);
3015 void DivideRow_16_NEON(const uint16_t* src_y,
3016                        uint16_t* dst_y,
3017                        int scale,
3018                        int width);
3019 void DivideRow_16_Any_NEON(const uint16_t* src_ptr,
3020                            uint16_t* dst_ptr,
3021                            int scale,
3022                            int width);
3023 
3024 void Convert8To16Row_C(const uint8_t* src_y,
3025                        uint16_t* dst_y,
3026                        int scale,
3027                        int width);
3028 void Convert8To16Row_SSE2(const uint8_t* src_y,
3029                           uint16_t* dst_y,
3030                           int scale,
3031                           int width);
3032 void Convert8To16Row_AVX2(const uint8_t* src_y,
3033                           uint16_t* dst_y,
3034                           int scale,
3035                           int width);
3036 void Convert8To16Row_Any_SSE2(const uint8_t* src_ptr,
3037                               uint16_t* dst_ptr,
3038                               int scale,
3039                               int width);
3040 void Convert8To16Row_Any_AVX2(const uint8_t* src_ptr,
3041                               uint16_t* dst_ptr,
3042                               int scale,
3043                               int width);
3044 
3045 void Convert16To8Row_C(const uint16_t* src_y,
3046                        uint8_t* dst_y,
3047                        int scale,
3048                        int width);
3049 void Convert16To8Row_SSSE3(const uint16_t* src_y,
3050                            uint8_t* dst_y,
3051                            int scale,
3052                            int width);
3053 void Convert16To8Row_AVX2(const uint16_t* src_y,
3054                           uint8_t* dst_y,
3055                           int scale,
3056                           int width);
3057 void Convert16To8Row_Any_SSSE3(const uint16_t* src_ptr,
3058                                uint8_t* dst_ptr,
3059                                int scale,
3060                                int width);
3061 void Convert16To8Row_Any_AVX2(const uint16_t* src_ptr,
3062                               uint8_t* dst_ptr,
3063                               int scale,
3064                               int width);
3065 void Convert16To8Row_NEON(const uint16_t* src_y,
3066                           uint8_t* dst_y,
3067                           int scale,
3068                           int width);
3069 void Convert16To8Row_Any_NEON(const uint16_t* src_ptr,
3070                               uint8_t* dst_ptr,
3071                               int scale,
3072                               int width);
3073 
3074 void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
3075 void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width);
3076 void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width);
3077 void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width);
3078 void CopyRow_MIPS(const uint8_t* src, uint8_t* dst, int count);
3079 void CopyRow_RVV(const uint8_t* src, uint8_t* dst, int count);
3080 void CopyRow_C(const uint8_t* src, uint8_t* dst, int count);
3081 void CopyRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3082 void CopyRow_Any_AVX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3083 void CopyRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3084 
3085 void CopyRow_16_C(const uint16_t* src, uint16_t* dst, int count);
3086 
3087 void ARGBCopyAlphaRow_C(const uint8_t* src, uint8_t* dst, int width);
3088 void ARGBCopyAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
3089 void ARGBCopyAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
3090 void ARGBCopyAlphaRow_Any_SSE2(const uint8_t* src_ptr,
3091                                uint8_t* dst_ptr,
3092                                int width);
3093 void ARGBCopyAlphaRow_Any_AVX2(const uint8_t* src_ptr,
3094                                uint8_t* dst_ptr,
3095                                int width);
3096 
3097 void ARGBExtractAlphaRow_C(const uint8_t* src_argb, uint8_t* dst_a, int width);
3098 void ARGBExtractAlphaRow_SSE2(const uint8_t* src_argb,
3099                               uint8_t* dst_a,
3100                               int width);
3101 void ARGBExtractAlphaRow_AVX2(const uint8_t* src_argb,
3102                               uint8_t* dst_a,
3103                               int width);
3104 void ARGBExtractAlphaRow_NEON(const uint8_t* src_argb,
3105                               uint8_t* dst_a,
3106                               int width);
3107 void ARGBExtractAlphaRow_MSA(const uint8_t* src_argb,
3108                              uint8_t* dst_a,
3109                              int width);
3110 void ARGBExtractAlphaRow_LSX(const uint8_t* src_argb,
3111                              uint8_t* dst_a,
3112                              int width);
3113 void ARGBExtractAlphaRow_RVV(const uint8_t* src_argb,
3114                              uint8_t* dst_a,
3115                              int width);
3116 void ARGBExtractAlphaRow_Any_SSE2(const uint8_t* src_ptr,
3117                                   uint8_t* dst_ptr,
3118                                   int width);
3119 void ARGBExtractAlphaRow_Any_AVX2(const uint8_t* src_ptr,
3120                                   uint8_t* dst_ptr,
3121                                   int width);
3122 void ARGBExtractAlphaRow_Any_NEON(const uint8_t* src_ptr,
3123                                   uint8_t* dst_ptr,
3124                                   int width);
3125 void ARGBExtractAlphaRow_Any_MSA(const uint8_t* src_ptr,
3126                                  uint8_t* dst_ptr,
3127                                  int width);
3128 void ARGBExtractAlphaRow_Any_LSX(const uint8_t* src_ptr,
3129                                  uint8_t* dst_ptr,
3130                                  int width);
3131 
3132 void ARGBCopyYToAlphaRow_C(const uint8_t* src, uint8_t* dst, int width);
3133 void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
3134 void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
3135 void ARGBCopyYToAlphaRow_RVV(const uint8_t* src, uint8_t* dst, int width);
3136 void ARGBCopyYToAlphaRow_Any_SSE2(const uint8_t* src_ptr,
3137                                   uint8_t* dst_ptr,
3138                                   int width);
3139 void ARGBCopyYToAlphaRow_Any_AVX2(const uint8_t* src_ptr,
3140                                   uint8_t* dst_ptr,
3141                                   int width);
3142 
3143 void SetRow_C(uint8_t* dst, uint8_t v8, int width);
3144 void SetRow_MSA(uint8_t* dst, uint8_t v8, int width);
3145 void SetRow_X86(uint8_t* dst, uint8_t v8, int width);
3146 void SetRow_ERMS(uint8_t* dst, uint8_t v8, int width);
3147 void SetRow_NEON(uint8_t* dst, uint8_t v8, int width);
3148 void SetRow_LSX(uint8_t* dst, uint8_t v8, int width);
3149 void SetRow_Any_X86(uint8_t* dst_ptr, uint8_t v32, int width);
3150 void SetRow_Any_NEON(uint8_t* dst_ptr, uint8_t v32, int width);
3151 void SetRow_Any_LSX(uint8_t* dst_ptr, uint8_t v32, int width);
3152 
3153 void ARGBSetRow_C(uint8_t* dst_argb, uint32_t v32, int width);
3154 void ARGBSetRow_X86(uint8_t* dst_argb, uint32_t v32, int width);
3155 void ARGBSetRow_NEON(uint8_t* dst, uint32_t v32, int width);
3156 void ARGBSetRow_Any_NEON(uint8_t* dst_ptr, uint32_t v32, int width);
3157 void ARGBSetRow_MSA(uint8_t* dst_argb, uint32_t v32, int width);
3158 void ARGBSetRow_Any_MSA(uint8_t* dst_ptr, uint32_t v32, int width);
3159 void ARGBSetRow_LSX(uint8_t* dst_argb, uint32_t v32, int width);
3160 void ARGBSetRow_Any_LSX(uint8_t* dst_ptr, uint32_t v32, int width);
3161 
3162 // ARGBShufflers for BGRAToARGB etc.
3163 void ARGBShuffleRow_C(const uint8_t* src_argb,
3164                       uint8_t* dst_argb,
3165                       const uint8_t* shuffler,
3166                       int width);
3167 void ARGBShuffleRow_SSSE3(const uint8_t* src_argb,
3168                           uint8_t* dst_argb,
3169                           const uint8_t* shuffler,
3170                           int width);
3171 void ARGBShuffleRow_AVX2(const uint8_t* src_argb,
3172                          uint8_t* dst_argb,
3173                          const uint8_t* shuffler,
3174                          int width);
3175 void ARGBShuffleRow_NEON(const uint8_t* src_argb,
3176                          uint8_t* dst_argb,
3177                          const uint8_t* shuffler,
3178                          int width);
3179 void ARGBShuffleRow_MSA(const uint8_t* src_argb,
3180                         uint8_t* dst_argb,
3181                         const uint8_t* shuffler,
3182                         int width);
3183 void ARGBShuffleRow_LSX(const uint8_t* src_argb,
3184                         uint8_t* dst_argb,
3185                         const uint8_t* shuffler,
3186                         int width);
3187 void ARGBShuffleRow_LASX(const uint8_t* src_argb,
3188                          uint8_t* dst_argb,
3189                          const uint8_t* shuffler,
3190                          int width);
3191 void ARGBShuffleRow_Any_SSSE3(const uint8_t* src_ptr,
3192                               uint8_t* dst_ptr,
3193                               const uint8_t* param,
3194                               int width);
3195 void ARGBShuffleRow_Any_AVX2(const uint8_t* src_ptr,
3196                              uint8_t* dst_ptr,
3197                              const uint8_t* param,
3198                              int width);
3199 void ARGBShuffleRow_Any_NEON(const uint8_t* src_ptr,
3200                              uint8_t* dst_ptr,
3201                              const uint8_t* param,
3202                              int width);
3203 void ARGBShuffleRow_Any_MSA(const uint8_t* src_ptr,
3204                             uint8_t* dst_ptr,
3205                             const uint8_t* param,
3206                             int width);
3207 void ARGBShuffleRow_Any_LSX(const uint8_t* src_ptr,
3208                             uint8_t* dst_ptr,
3209                             const uint8_t* param,
3210                             int width);
3211 void ARGBShuffleRow_Any_LASX(const uint8_t* src_ptr,
3212                              uint8_t* dst_ptr,
3213                              const uint8_t* param,
3214                              int width);
3215 
3216 void RGB24ToARGBRow_SSSE3(const uint8_t* src_rgb24,
3217                           uint8_t* dst_argb,
3218                           int width);
3219 void RAWToARGBRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_argb, int width);
3220 void RAWToRGBARow_SSSE3(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
3221 void RAWToRGB24Row_SSSE3(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
3222 void RGB565ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
3223 void ARGB1555ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
3224 void ARGB4444ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
3225 void RGB565ToARGBRow_AVX2(const uint8_t* src_rgb565,
3226                           uint8_t* dst_argb,
3227                           int width);
3228 void ARGB1555ToARGBRow_AVX2(const uint8_t* src_argb1555,
3229                             uint8_t* dst_argb,
3230                             int width);
3231 void ARGB4444ToARGBRow_AVX2(const uint8_t* src_argb4444,
3232                             uint8_t* dst_argb,
3233                             int width);
3234 
3235 void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24,
3236                          uint8_t* dst_argb,
3237                          int width);
3238 void RGB24ToARGBRow_MSA(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
3239 void RGB24ToARGBRow_LSX(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
3240 void RGB24ToARGBRow_LASX(const uint8_t* src_rgb24,
3241                          uint8_t* dst_argb,
3242                          int width);
3243 void RGB24ToARGBRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
3244 void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width);
3245 void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
3246 void RAWToARGBRow_MSA(const uint8_t* src_raw, uint8_t* dst_argb, int width);
3247 void RAWToARGBRow_LSX(const uint8_t* src_raw, uint8_t* dst_argb, int width);
3248 void RAWToARGBRow_LASX(const uint8_t* src_raw, uint8_t* dst_argb, int width);
3249 void RAWToARGBRow_RVV(const uint8_t* src_raw, uint8_t* dst_argb, int width);
3250 void RAWToRGBARow_RVV(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
3251 void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
3252 void RAWToRGB24Row_MSA(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
3253 void RAWToRGB24Row_LSX(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
3254 void RAWToRGB24Row_RVV(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
3255 void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565,
3256                           uint8_t* dst_argb,
3257                           int width);
3258 void RGB565ToARGBRow_MSA(const uint8_t* src_rgb565,
3259                          uint8_t* dst_argb,
3260                          int width);
3261 void RGB565ToARGBRow_LSX(const uint8_t* src_rgb565,
3262                          uint8_t* dst_argb,
3263                          int width);
3264 void RGB565ToARGBRow_LASX(const uint8_t* src_rgb565,
3265                           uint8_t* dst_argb,
3266                           int width);
3267 void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555,
3268                             uint8_t* dst_argb,
3269                             int width);
3270 void ARGB1555ToARGBRow_MSA(const uint8_t* src_argb1555,
3271                            uint8_t* dst_argb,
3272                            int width);
3273 void ARGB1555ToARGBRow_LSX(const uint8_t* src_argb1555,
3274                            uint8_t* dst_argb,
3275                            int width);
3276 void ARGB1555ToARGBRow_LASX(const uint8_t* src_argb1555,
3277                             uint8_t* dst_argb,
3278                             int width);
3279 void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444,
3280                             uint8_t* dst_argb,
3281                             int width);
3282 void ARGB4444ToARGBRow_MSA(const uint8_t* src_argb4444,
3283                            uint8_t* dst_argb,
3284                            int width);
3285 void ARGB4444ToARGBRow_LSX(const uint8_t* src_argb4444,
3286                            uint8_t* dst_argb,
3287                            int width);
3288 void ARGB4444ToARGBRow_LASX(const uint8_t* src_argb4444,
3289                             uint8_t* dst_argb,
3290                             int width);
3291 void RGB24ToARGBRow_C(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
3292 void RAWToARGBRow_C(const uint8_t* src_raw, uint8_t* dst_argb, int width);
3293 void RAWToRGBARow_C(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
3294 void RAWToRGB24Row_C(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
3295 void RGB565ToARGBRow_C(const uint8_t* src_rgb565, uint8_t* dst_argb, int width);
3296 void ARGB1555ToARGBRow_C(const uint8_t* src_argb1555,
3297                          uint8_t* dst_argb,
3298                          int width);
3299 void ARGB4444ToARGBRow_C(const uint8_t* src_argb4444,
3300                          uint8_t* dst_argb,
3301                          int width);
3302 void AR30ToARGBRow_C(const uint8_t* src_ar30, uint8_t* dst_argb, int width);
3303 void AR30ToABGRRow_C(const uint8_t* src_ar30, uint8_t* dst_abgr, int width);
3304 void ARGBToAR30Row_C(const uint8_t* src_argb, uint8_t* dst_ar30, int width);
3305 void AR30ToAB30Row_C(const uint8_t* src_ar30, uint8_t* dst_ab30, int width);
3306 
3307 void RGB24ToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
3308                               uint8_t* dst_ptr,
3309                               int width);
3310 void RAWToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
3311                             uint8_t* dst_ptr,
3312                             int width);
3313 void RAWToRGBARow_Any_SSSE3(const uint8_t* src_ptr,
3314                             uint8_t* dst_ptr,
3315                             int width);
3316 void RAWToRGB24Row_Any_SSSE3(const uint8_t* src_ptr,
3317                              uint8_t* dst_ptr,
3318                              int width);
3319 
3320 void RGB565ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
3321                               uint8_t* dst_ptr,
3322                               int width);
3323 void ARGB1555ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
3324                                 uint8_t* dst_ptr,
3325                                 int width);
3326 void ARGB4444ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
3327                                 uint8_t* dst_ptr,
3328                                 int width);
3329 void RGB565ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
3330                               uint8_t* dst_ptr,
3331                               int width);
3332 void ARGB1555ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
3333                                 uint8_t* dst_ptr,
3334                                 int width);
3335 void ARGB4444ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
3336                                 uint8_t* dst_ptr,
3337                                 int width);
3338 
3339 void RGB24ToARGBRow_Any_NEON(const uint8_t* src_ptr,
3340                              uint8_t* dst_ptr,
3341                              int width);
3342 void RGB24ToARGBRow_Any_MSA(const uint8_t* src_ptr,
3343                             uint8_t* dst_ptr,
3344                             int width);
3345 void RGB24ToARGBRow_Any_LSX(const uint8_t* src_ptr,
3346                             uint8_t* dst_ptr,
3347                             int width);
3348 void RGB24ToARGBRow_Any_LASX(const uint8_t* src_ptr,
3349                              uint8_t* dst_ptr,
3350                              int width);
3351 void RAWToARGBRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3352 void RAWToRGBARow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3353 void RAWToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3354 void RAWToARGBRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3355 void RAWToARGBRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3356 void RAWToRGB24Row_Any_NEON(const uint8_t* src_ptr,
3357                             uint8_t* dst_ptr,
3358                             int width);
3359 void RAWToRGB24Row_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3360 void RAWToRGB24Row_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3361 void RGB565ToARGBRow_Any_NEON(const uint8_t* src_ptr,
3362                               uint8_t* dst_ptr,
3363                               int width);
3364 void RGB565ToARGBRow_Any_MSA(const uint8_t* src_ptr,
3365                              uint8_t* dst_ptr,
3366                              int width);
3367 void RGB565ToARGBRow_Any_LSX(const uint8_t* src_ptr,
3368                              uint8_t* dst_ptr,
3369                              int width);
3370 void RGB565ToARGBRow_Any_LASX(const uint8_t* src_ptr,
3371                               uint8_t* dst_ptr,
3372                               int width);
3373 void ARGB1555ToARGBRow_Any_NEON(const uint8_t* src_ptr,
3374                                 uint8_t* dst_ptr,
3375                                 int width);
3376 void ARGB1555ToARGBRow_Any_MSA(const uint8_t* src_ptr,
3377                                uint8_t* dst_ptr,
3378                                int width);
3379 void ARGB4444ToARGBRow_Any_NEON(const uint8_t* src_ptr,
3380                                 uint8_t* dst_ptr,
3381                                 int width);
3382 void ARGB1555ToARGBRow_Any_LSX(const uint8_t* src_ptr,
3383                                uint8_t* dst_ptr,
3384                                int width);
3385 void ARGB1555ToARGBRow_Any_LASX(const uint8_t* src_ptr,
3386                                 uint8_t* dst_ptr,
3387                                 int width);
3388 
3389 void ARGB4444ToARGBRow_Any_MSA(const uint8_t* src_ptr,
3390                                uint8_t* dst_ptr,
3391                                int width);
3392 void ARGB4444ToARGBRow_Any_LSX(const uint8_t* src_ptr,
3393                                uint8_t* dst_ptr,
3394                                int width);
3395 void ARGB4444ToARGBRow_Any_LASX(const uint8_t* src_ptr,
3396                                 uint8_t* dst_ptr,
3397                                 int width);
3398 
3399 void ARGBToRGB24Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
3400 void ARGBToRAWRow_SSSE3(const uint8_t* src, uint8_t* dst, int width);
3401 void ARGBToRGB565Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
3402 void ARGBToARGB1555Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
3403 void ARGBToARGB4444Row_SSE2(const uint8_t* src, uint8_t* dst, int width);
3404 void ABGRToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
3405 void ARGBToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width);
3406 
3407 void ARGBToRAWRow_AVX2(const uint8_t* src, uint8_t* dst, int width);
3408 void ARGBToRGB24Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
3409 
3410 void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width);
3411 
3412 void ARGBToRGB565DitherRow_C(const uint8_t* src_argb,
3413                              uint8_t* dst_rgb,
3414                              uint32_t dither4,
3415                              int width);
3416 void ARGBToRGB565DitherRow_SSE2(const uint8_t* src,
3417                                 uint8_t* dst,
3418                                 uint32_t dither4,
3419                                 int width);
3420 void ARGBToRGB565DitherRow_AVX2(const uint8_t* src,
3421                                 uint8_t* dst,
3422                                 uint32_t dither4,
3423                                 int width);
3424 
3425 void ARGBToRGB565Row_AVX2(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3426 void ARGBToARGB1555Row_AVX2(const uint8_t* src_argb,
3427                             uint8_t* dst_rgb,
3428                             int width);
3429 void ARGBToARGB4444Row_AVX2(const uint8_t* src_argb,
3430                             uint8_t* dst_rgb,
3431                             int width);
3432 void ABGRToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
3433 void ARGBToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width);
3434 
3435 void ARGBToRGB24Row_NEON(const uint8_t* src_argb,
3436                          uint8_t* dst_rgb24,
3437                          int width);
3438 void ARGBToRAWRow_NEON(const uint8_t* src_argb, uint8_t* dst_raw, int width);
3439 void ARGBToRGB565Row_NEON(const uint8_t* src_argb,
3440                           uint8_t* dst_rgb565,
3441                           int width);
3442 void ARGBToARGB1555Row_NEON(const uint8_t* src_argb,
3443                             uint8_t* dst_argb1555,
3444                             int width);
3445 void ARGBToARGB4444Row_NEON(const uint8_t* src_argb,
3446                             uint8_t* dst_argb4444,
3447                             int width);
3448 void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb,
3449                                 uint8_t* dst_rgb,
3450                                 uint32_t dither4,
3451                                 int width);
3452 void ARGBToRGB24Row_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3453 void ARGBToRAWRow_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3454 void ARGBToRGB565Row_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3455 void ARGBToARGB1555Row_MSA(const uint8_t* src_argb,
3456                            uint8_t* dst_rgb,
3457                            int width);
3458 void ARGBToARGB4444Row_MSA(const uint8_t* src_argb,
3459                            uint8_t* dst_rgb,
3460                            int width);
3461 void ARGBToRGB565DitherRow_MSA(const uint8_t* src_argb,
3462                                uint8_t* dst_rgb,
3463                                uint32_t dither4,
3464                                int width);
3465 void ARGBToRGB565DitherRow_LSX(const uint8_t* src_argb,
3466                                uint8_t* dst_rgb,
3467                                uint32_t dither4,
3468                                int width);
3469 void ARGBToRGB565DitherRow_LASX(const uint8_t* src_argb,
3470                                 uint8_t* dst_rgb,
3471                                 uint32_t dither4,
3472                                 int width);
3473 
3474 void ARGBToRGB24Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3475 void ARGBToRGB24Row_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3476 void ARGBToRAWRow_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3477 void ARGBToRAWRow_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3478 void ARGBToRGB565Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3479 void ARGBToRGB565Row_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3480 void ARGBToARGB1555Row_LSX(const uint8_t* src_argb,
3481                            uint8_t* dst_rgb,
3482                            int width);
3483 void ARGBToARGB1555Row_LASX(const uint8_t* src_argb,
3484                             uint8_t* dst_rgb,
3485                             int width);
3486 void ARGBToARGB4444Row_LSX(const uint8_t* src_argb,
3487                            uint8_t* dst_rgb,
3488                            int width);
3489 void ARGBToARGB4444Row_LASX(const uint8_t* src_argb,
3490                             uint8_t* dst_rgb,
3491                             int width);
3492 
3493 void ARGBToRAWRow_RVV(const uint8_t* src_argb, uint8_t* dst_raw, int width);
3494 void ARGBToABGRRow_RVV(const uint8_t* src_argb, uint8_t* dst_abgr, int width);
3495 void ARGBToBGRARow_RVV(const uint8_t* src_argb, uint8_t* dst_rgba, int width);
3496 void ARGBToRGBARow_RVV(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3497 void ARGBToRGB24Row_RVV(const uint8_t* src_argb, uint8_t* dst_rgb24, int width);
3498 
3499 void ARGBToABGRRow_C(const uint8_t* src_argb, uint8_t* dst_abgr, int width);
3500 void ARGBToBGRARow_C(const uint8_t* src_argb, uint8_t* dst_bgra, int width);
3501 void ARGBToRGBARow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3502 void ARGBToRGB24Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3503 void ARGBToRAWRow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3504 void ARGBToRGB565Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3505 void ARGBToARGB1555Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3506 void ARGBToARGB4444Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width);
3507 void ABGRToAR30Row_C(const uint8_t* src_abgr, uint8_t* dst_ar30, int width);
3508 void ARGBToAR30Row_C(const uint8_t* src_argb, uint8_t* dst_ar30, int width);
3509 
3510 void ARGBToAR64Row_C(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
3511 void ARGBToAB64Row_C(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
3512 void AR64ToARGBRow_C(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
3513 void AB64ToARGBRow_C(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
3514 void AR64ToAB64Row_C(const uint16_t* src_ar64, uint16_t* dst_ab64, int width);
3515 void RGBAToARGBRow_C(const uint8_t* src_rgba, uint8_t* dst_argb, int width);
3516 void AR64ShuffleRow_C(const uint8_t* src_ar64,
3517                       uint8_t* dst_ar64,
3518                       const uint8_t* shuffler,
3519                       int width);
3520 void ARGBToAR64Row_SSSE3(const uint8_t* src_argb,
3521                          uint16_t* dst_ar64,
3522                          int width);
3523 void ARGBToAB64Row_SSSE3(const uint8_t* src_argb,
3524                          uint16_t* dst_ab64,
3525                          int width);
3526 void AR64ToARGBRow_SSSE3(const uint16_t* src_ar64,
3527                          uint8_t* dst_argb,
3528                          int width);
3529 void AB64ToARGBRow_SSSE3(const uint16_t* src_ab64,
3530                          uint8_t* dst_argb,
3531                          int width);
3532 void ARGBToAR64Row_AVX2(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
3533 void ARGBToAB64Row_AVX2(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
3534 void AR64ToARGBRow_AVX2(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
3535 void AB64ToARGBRow_AVX2(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
3536 void ARGBToAR64Row_NEON(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
3537 void ARGBToAB64Row_NEON(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
3538 void AR64ToARGBRow_NEON(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
3539 void AB64ToARGBRow_NEON(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
3540 void ARGBToAR64Row_RVV(const uint8_t* src_argb, uint16_t* dst_ar64, int width);
3541 void ARGBToAB64Row_RVV(const uint8_t* src_argb, uint16_t* dst_ab64, int width);
3542 void AR64ToARGBRow_RVV(const uint16_t* src_ar64, uint8_t* dst_argb, int width);
3543 void AB64ToARGBRow_RVV(const uint16_t* src_ab64, uint8_t* dst_argb, int width);
3544 void AR64ToAB64Row_RVV(const uint16_t* src_ar64, uint16_t* dst_ab64, int width);
3545 void RGBAToARGBRow_RVV(const uint8_t* src_rgba, uint8_t* dst_argb, int width);
3546 void ARGBToAR64Row_Any_SSSE3(const uint8_t* src_ptr,
3547                              uint16_t* dst_ptr,
3548                              int width);
3549 void ARGBToAB64Row_Any_SSSE3(const uint8_t* src_ptr,
3550                              uint16_t* dst_ptr,
3551                              int width);
3552 void AR64ToARGBRow_Any_SSSE3(const uint16_t* src_ptr,
3553                              uint8_t* dst_ptr,
3554                              int width);
3555 void AB64ToARGBRow_Any_SSSE3(const uint16_t* src_ptr,
3556                              uint8_t* dst_ptr,
3557                              int width);
3558 void ARGBToAR64Row_Any_AVX2(const uint8_t* src_ptr,
3559                             uint16_t* dst_ptr,
3560                             int width);
3561 void ARGBToAB64Row_Any_AVX2(const uint8_t* src_ptr,
3562                             uint16_t* dst_ptr,
3563                             int width);
3564 void AR64ToARGBRow_Any_AVX2(const uint16_t* src_ptr,
3565                             uint8_t* dst_ptr,
3566                             int width);
3567 void AB64ToARGBRow_Any_AVX2(const uint16_t* src_ptr,
3568                             uint8_t* dst_ptr,
3569                             int width);
3570 void ARGBToAR64Row_Any_NEON(const uint8_t* src_ptr,
3571                             uint16_t* dst_ptr,
3572                             int width);
3573 void ARGBToAB64Row_Any_NEON(const uint8_t* src_ptr,
3574                             uint16_t* dst_ptr,
3575                             int width);
3576 void AR64ToARGBRow_Any_NEON(const uint16_t* src_ptr,
3577                             uint8_t* dst_ptr,
3578                             int width);
3579 void AB64ToARGBRow_Any_NEON(const uint16_t* src_ptr,
3580                             uint8_t* dst_ptr,
3581                             int width);
3582 
3583 void J400ToARGBRow_SSE2(const uint8_t* src_y, uint8_t* dst_argb, int width);
3584 void J400ToARGBRow_AVX2(const uint8_t* src_y, uint8_t* dst_argb, int width);
3585 void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width);
3586 void J400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width);
3587 void J400ToARGBRow_LSX(const uint8_t* src_y, uint8_t* dst_argb, int width);
3588 void J400ToARGBRow_RVV(const uint8_t* src_y, uint8_t* dst_argb, int width);
3589 void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width);
3590 void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
3591                             uint8_t* dst_ptr,
3592                             int width);
3593 void J400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
3594                             uint8_t* dst_ptr,
3595                             int width);
3596 void J400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
3597                             uint8_t* dst_ptr,
3598                             int width);
3599 void J400ToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3600 void J400ToARGBRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
3601 
3602 void I444ToARGBRow_C(const uint8_t* src_y,
3603                      const uint8_t* src_u,
3604                      const uint8_t* src_v,
3605                      uint8_t* rgb_buf,
3606                      const struct YuvConstants* yuvconstants,
3607                      int width);
3608 void I444ToRGB24Row_C(const uint8_t* src_y,
3609                       const uint8_t* src_u,
3610                       const uint8_t* src_v,
3611                       uint8_t* rgb_buf,
3612                       const struct YuvConstants* yuvconstants,
3613                       int width);
3614 void I422ToARGBRow_C(const uint8_t* src_y,
3615                      const uint8_t* src_u,
3616                      const uint8_t* src_v,
3617                      uint8_t* rgb_buf,
3618                      const struct YuvConstants* yuvconstants,
3619                      int width);
3620 void I422ToAR30Row_C(const uint8_t* src_y,
3621                      const uint8_t* src_u,
3622                      const uint8_t* src_v,
3623                      uint8_t* rgb_buf,
3624                      const struct YuvConstants* yuvconstants,
3625                      int width);
3626 void I210ToAR30Row_C(const uint16_t* src_y,
3627                      const uint16_t* src_u,
3628                      const uint16_t* src_v,
3629                      uint8_t* rgb_buf,
3630                      const struct YuvConstants* yuvconstants,
3631                      int width);
3632 void I210ToARGBRow_C(const uint16_t* src_y,
3633                      const uint16_t* src_u,
3634                      const uint16_t* src_v,
3635                      uint8_t* rgb_buf,
3636                      const struct YuvConstants* yuvconstants,
3637                      int width);
3638 void I212ToAR30Row_C(const uint16_t* src_y,
3639                      const uint16_t* src_u,
3640                      const uint16_t* src_v,
3641                      uint8_t* rgb_buf,
3642                      const struct YuvConstants* yuvconstants,
3643                      int width);
3644 void I212ToARGBRow_C(const uint16_t* src_y,
3645                      const uint16_t* src_u,
3646                      const uint16_t* src_v,
3647                      uint8_t* rgb_buf,
3648                      const struct YuvConstants* yuvconstants,
3649                      int width);
3650 void I410ToAR30Row_C(const uint16_t* src_y,
3651                      const uint16_t* src_u,
3652                      const uint16_t* src_v,
3653                      uint8_t* rgb_buf,
3654                      const struct YuvConstants* yuvconstants,
3655                      int width);
3656 void I410ToARGBRow_C(const uint16_t* src_y,
3657                      const uint16_t* src_u,
3658                      const uint16_t* src_v,
3659                      uint8_t* rgb_buf,
3660                      const struct YuvConstants* yuvconstants,
3661                      int width);
3662 void I210AlphaToARGBRow_C(const uint16_t* src_y,
3663                           const uint16_t* src_u,
3664                           const uint16_t* src_v,
3665                           const uint16_t* src_a,
3666                           uint8_t* rgb_buf,
3667                           const struct YuvConstants* yuvconstants,
3668                           int width);
3669 void I410AlphaToARGBRow_C(const uint16_t* src_y,
3670                           const uint16_t* src_u,
3671                           const uint16_t* src_v,
3672                           const uint16_t* src_a,
3673                           uint8_t* rgb_buf,
3674                           const struct YuvConstants* yuvconstants,
3675                           int width);
3676 void I444AlphaToARGBRow_C(const uint8_t* src_y,
3677                           const uint8_t* src_u,
3678                           const uint8_t* src_v,
3679                           const uint8_t* src_a,
3680                           uint8_t* rgb_buf,
3681                           const struct YuvConstants* yuvconstants,
3682                           int width);
3683 void I422AlphaToARGBRow_C(const uint8_t* src_y,
3684                           const uint8_t* src_u,
3685                           const uint8_t* src_v,
3686                           const uint8_t* src_a,
3687                           uint8_t* rgb_buf,
3688                           const struct YuvConstants* yuvconstants,
3689                           int width);
3690 void NV12ToARGBRow_C(const uint8_t* src_y,
3691                      const uint8_t* src_uv,
3692                      uint8_t* rgb_buf,
3693                      const struct YuvConstants* yuvconstants,
3694                      int width);
3695 void NV12ToRGB565Row_C(const uint8_t* src_y,
3696                        const uint8_t* src_uv,
3697                        uint8_t* dst_rgb565,
3698                        const struct YuvConstants* yuvconstants,
3699                        int width);
3700 void NV21ToARGBRow_C(const uint8_t* src_y,
3701                      const uint8_t* src_vu,
3702                      uint8_t* rgb_buf,
3703                      const struct YuvConstants* yuvconstants,
3704                      int width);
3705 void NV12ToRGB24Row_C(const uint8_t* src_y,
3706                       const uint8_t* src_uv,
3707                       uint8_t* rgb_buf,
3708                       const struct YuvConstants* yuvconstants,
3709                       int width);
3710 void NV21ToRGB24Row_C(const uint8_t* src_y,
3711                       const uint8_t* src_vu,
3712                       uint8_t* rgb_buf,
3713                       const struct YuvConstants* yuvconstants,
3714                       int width);
3715 void NV21ToYUV24Row_C(const uint8_t* src_y,
3716                       const uint8_t* src_vu,
3717                       uint8_t* dst_yuv24,
3718                       int width);
3719 void YUY2ToARGBRow_C(const uint8_t* src_yuy2,
3720                      uint8_t* rgb_buf,
3721                      const struct YuvConstants* yuvconstants,
3722                      int width);
3723 void UYVYToARGBRow_C(const uint8_t* src_uyvy,
3724                      uint8_t* rgb_buf,
3725                      const struct YuvConstants* yuvconstants,
3726                      int width);
3727 void P210ToARGBRow_C(const uint16_t* src_y,
3728                      const uint16_t* src_uv,
3729                      uint8_t* dst_argb,
3730                      const struct YuvConstants* yuvconstants,
3731                      int width);
3732 void P410ToARGBRow_C(const uint16_t* src_y,
3733                      const uint16_t* src_uv,
3734                      uint8_t* dst_argb,
3735                      const struct YuvConstants* yuvconstants,
3736                      int width);
3737 void P210ToAR30Row_C(const uint16_t* src_y,
3738                      const uint16_t* src_uv,
3739                      uint8_t* dst_ar30,
3740                      const struct YuvConstants* yuvconstants,
3741                      int width);
3742 void P410ToAR30Row_C(const uint16_t* src_y,
3743                      const uint16_t* src_uv,
3744                      uint8_t* dst_ar30,
3745                      const struct YuvConstants* yuvconstants,
3746                      int width);
3747 
3748 void I422ToRGBARow_C(const uint8_t* src_y,
3749                      const uint8_t* src_u,
3750                      const uint8_t* src_v,
3751                      uint8_t* rgb_buf,
3752                      const struct YuvConstants* yuvconstants,
3753                      int width);
3754 void I422ToRGB24Row_C(const uint8_t* src_y,
3755                       const uint8_t* src_u,
3756                       const uint8_t* src_v,
3757                       uint8_t* rgb_buf,
3758                       const struct YuvConstants* yuvconstants,
3759                       int width);
3760 void I422ToARGB4444Row_C(const uint8_t* src_y,
3761                          const uint8_t* src_u,
3762                          const uint8_t* src_v,
3763                          uint8_t* dst_argb4444,
3764                          const struct YuvConstants* yuvconstants,
3765                          int width);
3766 void I422ToARGB1555Row_C(const uint8_t* src_y,
3767                          const uint8_t* src_u,
3768                          const uint8_t* src_v,
3769                          uint8_t* dst_argb1555,
3770                          const struct YuvConstants* yuvconstants,
3771                          int width);
3772 void I422ToRGB565Row_C(const uint8_t* src_y,
3773                        const uint8_t* src_u,
3774                        const uint8_t* src_v,
3775                        uint8_t* dst_rgb565,
3776                        const struct YuvConstants* yuvconstants,
3777                        int width);
3778 void I422ToARGBRow_AVX2(const uint8_t* y_buf,
3779                         const uint8_t* u_buf,
3780                         const uint8_t* v_buf,
3781                         uint8_t* dst_argb,
3782                         const struct YuvConstants* yuvconstants,
3783                         int width);
3784 void I422ToARGBRow_AVX512BW(const uint8_t* y_buf,
3785                             const uint8_t* u_buf,
3786                             const uint8_t* v_buf,
3787                             uint8_t* dst_argb,
3788                             const struct YuvConstants* yuvconstants,
3789                             int width);
3790 void I422ToRGBARow_AVX2(const uint8_t* y_buf,
3791                         const uint8_t* u_buf,
3792                         const uint8_t* v_buf,
3793                         uint8_t* dst_argb,
3794                         const struct YuvConstants* yuvconstants,
3795                         int width);
3796 void I444ToARGBRow_SSSE3(const uint8_t* y_buf,
3797                          const uint8_t* u_buf,
3798                          const uint8_t* v_buf,
3799                          uint8_t* dst_argb,
3800                          const struct YuvConstants* yuvconstants,
3801                          int width);
3802 void I444ToARGBRow_AVX2(const uint8_t* y_buf,
3803                         const uint8_t* u_buf,
3804                         const uint8_t* v_buf,
3805                         uint8_t* dst_argb,
3806                         const struct YuvConstants* yuvconstants,
3807                         int width);
3808 void I444ToRGB24Row_SSSE3(const uint8_t* y_buf,
3809                           const uint8_t* u_buf,
3810                           const uint8_t* v_buf,
3811                           uint8_t* dst_rgb24,
3812                           const struct YuvConstants* yuvconstants,
3813                           int width);
3814 void I444ToRGB24Row_AVX2(const uint8_t* y_buf,
3815                          const uint8_t* u_buf,
3816                          const uint8_t* v_buf,
3817                          uint8_t* dst_rgb24,
3818                          const struct YuvConstants* yuvconstants,
3819                          int width);
3820 void I422ToARGBRow_SSSE3(const uint8_t* y_buf,
3821                          const uint8_t* u_buf,
3822                          const uint8_t* v_buf,
3823                          uint8_t* dst_argb,
3824                          const struct YuvConstants* yuvconstants,
3825                          int width);
3826 
3827 void I422ToAR30Row_SSSE3(const uint8_t* y_buf,
3828                          const uint8_t* u_buf,
3829                          const uint8_t* v_buf,
3830                          uint8_t* dst_ar30,
3831                          const struct YuvConstants* yuvconstants,
3832                          int width);
3833 void I210ToAR30Row_SSSE3(const uint16_t* y_buf,
3834                          const uint16_t* u_buf,
3835                          const uint16_t* v_buf,
3836                          uint8_t* dst_ar30,
3837                          const struct YuvConstants* yuvconstants,
3838                          int width);
3839 void I210ToARGBRow_SSSE3(const uint16_t* y_buf,
3840                          const uint16_t* u_buf,
3841                          const uint16_t* v_buf,
3842                          uint8_t* dst_argb,
3843                          const struct YuvConstants* yuvconstants,
3844                          int width);
3845 void I212ToAR30Row_SSSE3(const uint16_t* y_buf,
3846                          const uint16_t* u_buf,
3847                          const uint16_t* v_buf,
3848                          uint8_t* dst_ar30,
3849                          const struct YuvConstants* yuvconstants,
3850                          int width);
3851 void I212ToARGBRow_SSSE3(const uint16_t* y_buf,
3852                          const uint16_t* u_buf,
3853                          const uint16_t* v_buf,
3854                          uint8_t* dst_argb,
3855                          const struct YuvConstants* yuvconstants,
3856                          int width);
3857 void I410ToAR30Row_SSSE3(const uint16_t* y_buf,
3858                          const uint16_t* u_buf,
3859                          const uint16_t* v_buf,
3860                          uint8_t* dst_ar30,
3861                          const struct YuvConstants* yuvconstants,
3862                          int width);
3863 void I410ToARGBRow_SSSE3(const uint16_t* y_buf,
3864                          const uint16_t* u_buf,
3865                          const uint16_t* v_buf,
3866                          uint8_t* dst_argb,
3867                          const struct YuvConstants* yuvconstants,
3868                          int width);
3869 void I210AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
3870                               const uint16_t* u_buf,
3871                               const uint16_t* v_buf,
3872                               const uint16_t* a_buf,
3873                               uint8_t* dst_argb,
3874                               const struct YuvConstants* yuvconstants,
3875                               int width);
3876 void I410AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
3877                               const uint16_t* u_buf,
3878                               const uint16_t* v_buf,
3879                               const uint16_t* a_buf,
3880                               uint8_t* dst_argb,
3881                               const struct YuvConstants* yuvconstants,
3882                               int width);
3883 void I422ToAR30Row_AVX2(const uint8_t* y_buf,
3884                         const uint8_t* u_buf,
3885                         const uint8_t* v_buf,
3886                         uint8_t* dst_ar30,
3887                         const struct YuvConstants* yuvconstants,
3888                         int width);
3889 void I210ToARGBRow_AVX2(const uint16_t* y_buf,
3890                         const uint16_t* u_buf,
3891                         const uint16_t* v_buf,
3892                         uint8_t* dst_argb,
3893                         const struct YuvConstants* yuvconstants,
3894                         int width);
3895 void I210ToAR30Row_AVX2(const uint16_t* y_buf,
3896                         const uint16_t* u_buf,
3897                         const uint16_t* v_buf,
3898                         uint8_t* dst_ar30,
3899                         const struct YuvConstants* yuvconstants,
3900                         int width);
3901 void I212ToARGBRow_AVX2(const uint16_t* y_buf,
3902                         const uint16_t* u_buf,
3903                         const uint16_t* v_buf,
3904                         uint8_t* dst_argb,
3905                         const struct YuvConstants* yuvconstants,
3906                         int width);
3907 void I212ToAR30Row_AVX2(const uint16_t* y_buf,
3908                         const uint16_t* u_buf,
3909                         const uint16_t* v_buf,
3910                         uint8_t* dst_ar30,
3911                         const struct YuvConstants* yuvconstants,
3912                         int width);
3913 void I410ToAR30Row_AVX2(const uint16_t* y_buf,
3914                         const uint16_t* u_buf,
3915                         const uint16_t* v_buf,
3916                         uint8_t* dst_ar30,
3917                         const struct YuvConstants* yuvconstants,
3918                         int width);
3919 void I410ToARGBRow_AVX2(const uint16_t* y_buf,
3920                         const uint16_t* u_buf,
3921                         const uint16_t* v_buf,
3922                         uint8_t* dst_argb,
3923                         const struct YuvConstants* yuvconstants,
3924                         int width);
3925 void I210AlphaToARGBRow_AVX2(const uint16_t* y_buf,
3926                              const uint16_t* u_buf,
3927                              const uint16_t* v_buf,
3928                              const uint16_t* a_buf,
3929                              uint8_t* dst_argb,
3930                              const struct YuvConstants* yuvconstants,
3931                              int width);
3932 void I410AlphaToARGBRow_AVX2(const uint16_t* y_buf,
3933                              const uint16_t* u_buf,
3934                              const uint16_t* v_buf,
3935                              const uint16_t* a_buf,
3936                              uint8_t* dst_argb,
3937                              const struct YuvConstants* yuvconstants,
3938                              int width);
3939 void I444AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
3940                               const uint8_t* u_buf,
3941                               const uint8_t* v_buf,
3942                               const uint8_t* a_buf,
3943                               uint8_t* dst_argb,
3944                               const struct YuvConstants* yuvconstants,
3945                               int width);
3946 void I444AlphaToARGBRow_AVX2(const uint8_t* y_buf,
3947                              const uint8_t* u_buf,
3948                              const uint8_t* v_buf,
3949                              const uint8_t* a_buf,
3950                              uint8_t* dst_argb,
3951                              const struct YuvConstants* yuvconstants,
3952                              int width);
3953 void I422AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
3954                               const uint8_t* u_buf,
3955                               const uint8_t* v_buf,
3956                               const uint8_t* a_buf,
3957                               uint8_t* dst_argb,
3958                               const struct YuvConstants* yuvconstants,
3959                               int width);
3960 void I422AlphaToARGBRow_AVX2(const uint8_t* y_buf,
3961                              const uint8_t* u_buf,
3962                              const uint8_t* v_buf,
3963                              const uint8_t* a_buf,
3964                              uint8_t* dst_argb,
3965                              const struct YuvConstants* yuvconstants,
3966                              int width);
3967 void NV12ToARGBRow_SSSE3(const uint8_t* y_buf,
3968                          const uint8_t* uv_buf,
3969                          uint8_t* dst_argb,
3970                          const struct YuvConstants* yuvconstants,
3971                          int width);
3972 void NV12ToARGBRow_AVX2(const uint8_t* y_buf,
3973                         const uint8_t* uv_buf,
3974                         uint8_t* dst_argb,
3975                         const struct YuvConstants* yuvconstants,
3976                         int width);
3977 void NV12ToRGB24Row_SSSE3(const uint8_t* src_y,
3978                           const uint8_t* src_uv,
3979                           uint8_t* dst_rgb24,
3980                           const struct YuvConstants* yuvconstants,
3981                           int width);
3982 void NV21ToRGB24Row_SSSE3(const uint8_t* src_y,
3983                           const uint8_t* src_vu,
3984                           uint8_t* dst_rgb24,
3985                           const struct YuvConstants* yuvconstants,
3986                           int width);
3987 void NV12ToRGB565Row_SSSE3(const uint8_t* src_y,
3988                            const uint8_t* src_uv,
3989                            uint8_t* dst_rgb565,
3990                            const struct YuvConstants* yuvconstants,
3991                            int width);
3992 void NV12ToRGB24Row_AVX2(const uint8_t* src_y,
3993                          const uint8_t* src_uv,
3994                          uint8_t* dst_rgb24,
3995                          const struct YuvConstants* yuvconstants,
3996                          int width);
3997 void NV21ToRGB24Row_AVX2(const uint8_t* src_y,
3998                          const uint8_t* src_vu,
3999                          uint8_t* dst_rgb24,
4000                          const struct YuvConstants* yuvconstants,
4001                          int width);
4002 void NV21ToYUV24Row_SSSE3(const uint8_t* src_y,
4003                           const uint8_t* src_vu,
4004                           uint8_t* dst_yuv24,
4005                           int width);
4006 void NV21ToYUV24Row_AVX2(const uint8_t* src_y,
4007                          const uint8_t* src_vu,
4008                          uint8_t* dst_yuv24,
4009                          int width);
4010 void NV12ToRGB565Row_AVX2(const uint8_t* src_y,
4011                           const uint8_t* src_uv,
4012                           uint8_t* dst_rgb565,
4013                           const struct YuvConstants* yuvconstants,
4014                           int width);
4015 void NV21ToARGBRow_SSSE3(const uint8_t* y_buf,
4016                          const uint8_t* vu_buf,
4017                          uint8_t* dst_argb,
4018                          const struct YuvConstants* yuvconstants,
4019                          int width);
4020 void NV21ToARGBRow_AVX2(const uint8_t* y_buf,
4021                         const uint8_t* vu_buf,
4022                         uint8_t* dst_argb,
4023                         const struct YuvConstants* yuvconstants,
4024                         int width);
4025 void YUY2ToARGBRow_SSSE3(const uint8_t* yuy2_buf,
4026                          uint8_t* dst_argb,
4027                          const struct YuvConstants* yuvconstants,
4028                          int width);
4029 void UYVYToARGBRow_SSSE3(const uint8_t* uyvy_buf,
4030                          uint8_t* dst_argb,
4031                          const struct YuvConstants* yuvconstants,
4032                          int width);
4033 void YUY2ToARGBRow_AVX2(const uint8_t* yuy2_buf,
4034                         uint8_t* dst_argb,
4035                         const struct YuvConstants* yuvconstants,
4036                         int width);
4037 void UYVYToARGBRow_AVX2(const uint8_t* uyvy_buf,
4038                         uint8_t* dst_argb,
4039                         const struct YuvConstants* yuvconstants,
4040                         int width);
4041 
4042 void P210ToARGBRow_SSSE3(const uint16_t* y_buf,
4043                          const uint16_t* uv_buf,
4044                          uint8_t* dst_argb,
4045                          const struct YuvConstants* yuvconstants,
4046                          int width);
4047 void P410ToARGBRow_SSSE3(const uint16_t* y_buf,
4048                          const uint16_t* uv_buf,
4049                          uint8_t* dst_argb,
4050                          const struct YuvConstants* yuvconstants,
4051                          int width);
4052 void P210ToAR30Row_SSSE3(const uint16_t* y_buf,
4053                          const uint16_t* uv_buf,
4054                          uint8_t* dst_ar30,
4055                          const struct YuvConstants* yuvconstants,
4056                          int width);
4057 void P410ToAR30Row_SSSE3(const uint16_t* y_buf,
4058                          const uint16_t* uv_buf,
4059                          uint8_t* dst_ar30,
4060                          const struct YuvConstants* yuvconstants,
4061                          int width);
4062 void P210ToARGBRow_AVX2(const uint16_t* y_buf,
4063                         const uint16_t* uv_buf,
4064                         uint8_t* dst_argb,
4065                         const struct YuvConstants* yuvconstants,
4066                         int width);
4067 void P410ToARGBRow_AVX2(const uint16_t* y_buf,
4068                         const uint16_t* uv_buf,
4069                         uint8_t* dst_argb,
4070                         const struct YuvConstants* yuvconstants,
4071                         int width);
4072 void P210ToAR30Row_AVX2(const uint16_t* y_buf,
4073                         const uint16_t* uv_buf,
4074                         uint8_t* dst_ar30,
4075                         const struct YuvConstants* yuvconstants,
4076                         int width);
4077 void P410ToAR30Row_AVX2(const uint16_t* y_buf,
4078                         const uint16_t* uv_buf,
4079                         uint8_t* dst_ar30,
4080                         const struct YuvConstants* yuvconstants,
4081                         int width);
4082 
4083 void I422ToRGBARow_SSSE3(const uint8_t* y_buf,
4084                          const uint8_t* u_buf,
4085                          const uint8_t* v_buf,
4086                          uint8_t* dst_rgba,
4087                          const struct YuvConstants* yuvconstants,
4088                          int width);
4089 void I422ToARGB4444Row_SSSE3(const uint8_t* src_y,
4090                              const uint8_t* src_u,
4091                              const uint8_t* src_v,
4092                              uint8_t* dst_argb4444,
4093                              const struct YuvConstants* yuvconstants,
4094                              int width);
4095 void I422ToARGB4444Row_AVX2(const uint8_t* src_y,
4096                             const uint8_t* src_u,
4097                             const uint8_t* src_v,
4098                             uint8_t* dst_argb4444,
4099                             const struct YuvConstants* yuvconstants,
4100                             int width);
4101 void I422ToARGB1555Row_SSSE3(const uint8_t* src_y,
4102                              const uint8_t* src_u,
4103                              const uint8_t* src_v,
4104                              uint8_t* dst_argb1555,
4105                              const struct YuvConstants* yuvconstants,
4106                              int width);
4107 void I422ToARGB1555Row_AVX2(const uint8_t* src_y,
4108                             const uint8_t* src_u,
4109                             const uint8_t* src_v,
4110                             uint8_t* dst_argb1555,
4111                             const struct YuvConstants* yuvconstants,
4112                             int width);
4113 void I422ToRGB565Row_SSSE3(const uint8_t* src_y,
4114                            const uint8_t* src_u,
4115                            const uint8_t* src_v,
4116                            uint8_t* dst_rgb565,
4117                            const struct YuvConstants* yuvconstants,
4118                            int width);
4119 void I422ToRGB565Row_AVX2(const uint8_t* src_y,
4120                           const uint8_t* src_u,
4121                           const uint8_t* src_v,
4122                           uint8_t* dst_rgb565,
4123                           const struct YuvConstants* yuvconstants,
4124                           int width);
4125 void I422ToRGB24Row_SSSE3(const uint8_t* y_buf,
4126                           const uint8_t* u_buf,
4127                           const uint8_t* v_buf,
4128                           uint8_t* dst_rgb24,
4129                           const struct YuvConstants* yuvconstants,
4130                           int width);
4131 void I422ToRGB24Row_AVX2(const uint8_t* src_y,
4132                          const uint8_t* src_u,
4133                          const uint8_t* src_v,
4134                          uint8_t* dst_rgb24,
4135                          const struct YuvConstants* yuvconstants,
4136                          int width);
4137 void I422ToARGBRow_Any_AVX2(const uint8_t* y_buf,
4138                             const uint8_t* u_buf,
4139                             const uint8_t* v_buf,
4140                             uint8_t* dst_ptr,
4141                             const struct YuvConstants* yuvconstants,
4142                             int width);
4143 void I422ToARGBRow_Any_AVX512BW(const uint8_t* y_buf,
4144                                 const uint8_t* u_buf,
4145                                 const uint8_t* v_buf,
4146                                 uint8_t* dst_ptr,
4147                                 const struct YuvConstants* yuvconstants,
4148                                 int width);
4149 void I422ToRGBARow_Any_AVX2(const uint8_t* y_buf,
4150                             const uint8_t* u_buf,
4151                             const uint8_t* v_buf,
4152                             uint8_t* dst_ptr,
4153                             const struct YuvConstants* yuvconstants,
4154                             int width);
4155 void I444ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
4156                              const uint8_t* u_buf,
4157                              const uint8_t* v_buf,
4158                              uint8_t* dst_ptr,
4159                              const struct YuvConstants* yuvconstants,
4160                              int width);
4161 void I444ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
4162                               const uint8_t* u_buf,
4163                               const uint8_t* v_buf,
4164                               uint8_t* dst_ptr,
4165                               const struct YuvConstants* yuvconstants,
4166                               int width);
4167 void I444ToARGBRow_Any_AVX2(const uint8_t* y_buf,
4168                             const uint8_t* u_buf,
4169                             const uint8_t* v_buf,
4170                             uint8_t* dst_ptr,
4171                             const struct YuvConstants* yuvconstants,
4172                             int width);
4173 void I444ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
4174                              const uint8_t* u_buf,
4175                              const uint8_t* v_buf,
4176                              uint8_t* dst_ptr,
4177                              const struct YuvConstants* yuvconstants,
4178                              int width);
4179 void I422ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
4180                              const uint8_t* u_buf,
4181                              const uint8_t* v_buf,
4182                              uint8_t* dst_ptr,
4183                              const struct YuvConstants* yuvconstants,
4184                              int width);
4185 void I422ToAR30Row_Any_SSSE3(const uint8_t* y_buf,
4186                              const uint8_t* u_buf,
4187                              const uint8_t* v_buf,
4188                              uint8_t* dst_ptr,
4189                              const struct YuvConstants* yuvconstants,
4190                              int width);
4191 void I210ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
4192                              const uint16_t* u_buf,
4193                              const uint16_t* v_buf,
4194                              uint8_t* dst_ptr,
4195                              const struct YuvConstants* yuvconstants,
4196                              int width);
4197 void I210ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
4198                              const uint16_t* u_buf,
4199                              const uint16_t* v_buf,
4200                              uint8_t* dst_ptr,
4201                              const struct YuvConstants* yuvconstants,
4202                              int width);
4203 void I212ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
4204                              const uint16_t* u_buf,
4205                              const uint16_t* v_buf,
4206                              uint8_t* dst_ptr,
4207                              const struct YuvConstants* yuvconstants,
4208                              int width);
4209 void I212ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
4210                              const uint16_t* u_buf,
4211                              const uint16_t* v_buf,
4212                              uint8_t* dst_ptr,
4213                              const struct YuvConstants* yuvconstants,
4214                              int width);
4215 void I410ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
4216                              const uint16_t* u_buf,
4217                              const uint16_t* v_buf,
4218                              uint8_t* dst_ptr,
4219                              const struct YuvConstants* yuvconstants,
4220                              int width);
4221 void I410ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
4222                              const uint16_t* u_buf,
4223                              const uint16_t* v_buf,
4224                              uint8_t* dst_ptr,
4225                              const struct YuvConstants* yuvconstants,
4226                              int width);
4227 void I210AlphaToARGBRow_Any_SSSE3(const uint16_t* y_buf,
4228                                   const uint16_t* u_buf,
4229                                   const uint16_t* v_buf,
4230                                   const uint16_t* a_buf,
4231                                   uint8_t* dst_ptr,
4232                                   const struct YuvConstants* yuvconstants,
4233                                   int width);
4234 void I410AlphaToARGBRow_Any_SSSE3(const uint16_t* y_buf,
4235                                   const uint16_t* u_buf,
4236                                   const uint16_t* v_buf,
4237                                   const uint16_t* a_buf,
4238                                   uint8_t* dst_ptr,
4239                                   const struct YuvConstants* yuvconstants,
4240                                   int width);
4241 void I422ToAR30Row_Any_AVX2(const uint8_t* y_buf,
4242                             const uint8_t* u_buf,
4243                             const uint8_t* v_buf,
4244                             uint8_t* dst_ptr,
4245                             const struct YuvConstants* yuvconstants,
4246                             int width);
4247 void I210ToARGBRow_Any_AVX2(const uint16_t* y_buf,
4248                             const uint16_t* u_buf,
4249                             const uint16_t* v_buf,
4250                             uint8_t* dst_ptr,
4251                             const struct YuvConstants* yuvconstants,
4252                             int width);
4253 void I210ToAR30Row_Any_AVX2(const uint16_t* y_buf,
4254                             const uint16_t* u_buf,
4255                             const uint16_t* v_buf,
4256                             uint8_t* dst_ptr,
4257                             const struct YuvConstants* yuvconstants,
4258                             int width);
4259 void I212ToARGBRow_Any_AVX2(const uint16_t* y_buf,
4260                             const uint16_t* u_buf,
4261                             const uint16_t* v_buf,
4262                             uint8_t* dst_ptr,
4263                             const struct YuvConstants* yuvconstants,
4264                             int width);
4265 void I212ToAR30Row_Any_AVX2(const uint16_t* y_buf,
4266                             const uint16_t* u_buf,
4267                             const uint16_t* v_buf,
4268                             uint8_t* dst_ptr,
4269                             const struct YuvConstants* yuvconstants,
4270                             int width);
4271 void I410ToAR30Row_Any_AVX2(const uint16_t* y_buf,
4272                             const uint16_t* u_buf,
4273                             const uint16_t* v_buf,
4274                             uint8_t* dst_ptr,
4275                             const struct YuvConstants* yuvconstants,
4276                             int width);
4277 void I410ToARGBRow_Any_AVX2(const uint16_t* y_buf,
4278                             const uint16_t* u_buf,
4279                             const uint16_t* v_buf,
4280                             uint8_t* dst_ptr,
4281                             const struct YuvConstants* yuvconstants,
4282                             int width);
4283 void I210AlphaToARGBRow_Any_AVX2(const uint16_t* y_buf,
4284                                  const uint16_t* u_buf,
4285                                  const uint16_t* v_buf,
4286                                  const uint16_t* a_buf,
4287                                  uint8_t* dst_ptr,
4288                                  const struct YuvConstants* yuvconstants,
4289                                  int width);
4290 void I410AlphaToARGBRow_Any_AVX2(const uint16_t* y_buf,
4291                                  const uint16_t* u_buf,
4292                                  const uint16_t* v_buf,
4293                                  const uint16_t* a_buf,
4294                                  uint8_t* dst_ptr,
4295                                  const struct YuvConstants* yuvconstants,
4296                                  int width);
4297 void I444AlphaToARGBRow_Any_SSSE3(const uint8_t* y_buf,
4298                                   const uint8_t* u_buf,
4299                                   const uint8_t* v_buf,
4300                                   const uint8_t* a_buf,
4301                                   uint8_t* dst_ptr,
4302                                   const struct YuvConstants* yuvconstants,
4303                                   int width);
4304 void I444AlphaToARGBRow_Any_AVX2(const uint8_t* y_buf,
4305                                  const uint8_t* u_buf,
4306                                  const uint8_t* v_buf,
4307                                  const uint8_t* a_buf,
4308                                  uint8_t* dst_ptr,
4309                                  const struct YuvConstants* yuvconstants,
4310                                  int width);
4311 void I422AlphaToARGBRow_Any_SSSE3(const uint8_t* y_buf,
4312                                   const uint8_t* u_buf,
4313                                   const uint8_t* v_buf,
4314                                   const uint8_t* a_buf,
4315                                   uint8_t* dst_ptr,
4316                                   const struct YuvConstants* yuvconstants,
4317                                   int width);
4318 void I422AlphaToARGBRow_Any_AVX2(const uint8_t* y_buf,
4319                                  const uint8_t* u_buf,
4320                                  const uint8_t* v_buf,
4321                                  const uint8_t* a_buf,
4322                                  uint8_t* dst_ptr,
4323                                  const struct YuvConstants* yuvconstants,
4324                                  int width);
4325 void NV12ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
4326                              const uint8_t* uv_buf,
4327                              uint8_t* dst_ptr,
4328                              const struct YuvConstants* yuvconstants,
4329                              int width);
4330 void NV12ToARGBRow_Any_AVX2(const uint8_t* y_buf,
4331                             const uint8_t* uv_buf,
4332                             uint8_t* dst_ptr,
4333                             const struct YuvConstants* yuvconstants,
4334                             int width);
4335 void NV21ToARGBRow_Any_SSSE3(const uint8_t* y_buf,
4336                              const uint8_t* uv_buf,
4337                              uint8_t* dst_ptr,
4338                              const struct YuvConstants* yuvconstants,
4339                              int width);
4340 void NV21ToARGBRow_Any_AVX2(const uint8_t* y_buf,
4341                             const uint8_t* uv_buf,
4342                             uint8_t* dst_ptr,
4343                             const struct YuvConstants* yuvconstants,
4344                             int width);
4345 void NV12ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
4346                               const uint8_t* uv_buf,
4347                               uint8_t* dst_ptr,
4348                               const struct YuvConstants* yuvconstants,
4349                               int width);
4350 void NV21ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
4351                               const uint8_t* uv_buf,
4352                               uint8_t* dst_ptr,
4353                               const struct YuvConstants* yuvconstants,
4354                               int width);
4355 void NV12ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
4356                              const uint8_t* uv_buf,
4357                              uint8_t* dst_ptr,
4358                              const struct YuvConstants* yuvconstants,
4359                              int width);
4360 void NV21ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
4361                              const uint8_t* uv_buf,
4362                              uint8_t* dst_ptr,
4363                              const struct YuvConstants* yuvconstants,
4364                              int width);
4365 void NV21ToYUV24Row_Any_SSSE3(const uint8_t* y_buf,
4366                               const uint8_t* uv_buf,
4367                               uint8_t* dst_ptr,
4368                               int width);
4369 void NV21ToYUV24Row_Any_AVX2(const uint8_t* y_buf,
4370                              const uint8_t* uv_buf,
4371                              uint8_t* dst_ptr,
4372                              int width);
4373 void NV12ToRGB565Row_Any_SSSE3(const uint8_t* y_buf,
4374                                const uint8_t* uv_buf,
4375                                uint8_t* dst_ptr,
4376                                const struct YuvConstants* yuvconstants,
4377                                int width);
4378 void NV12ToRGB565Row_Any_AVX2(const uint8_t* y_buf,
4379                               const uint8_t* uv_buf,
4380                               uint8_t* dst_ptr,
4381                               const struct YuvConstants* yuvconstants,
4382                               int width);
4383 void YUY2ToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
4384                              uint8_t* dst_ptr,
4385                              const struct YuvConstants* yuvconstants,
4386                              int width);
4387 void UYVYToARGBRow_Any_SSSE3(const uint8_t* src_ptr,
4388                              uint8_t* dst_ptr,
4389                              const struct YuvConstants* yuvconstants,
4390                              int width);
4391 void YUY2ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
4392                             uint8_t* dst_ptr,
4393                             const struct YuvConstants* yuvconstants,
4394                             int width);
4395 void UYVYToARGBRow_Any_AVX2(const uint8_t* src_ptr,
4396                             uint8_t* dst_ptr,
4397                             const struct YuvConstants* yuvconstants,
4398                             int width);
4399 void P210ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
4400                              const uint16_t* uv_buf,
4401                              uint8_t* dst_ptr,
4402                              const struct YuvConstants* yuvconstants,
4403                              int width);
4404 void P410ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
4405                              const uint16_t* uv_buf,
4406                              uint8_t* dst_ptr,
4407                              const struct YuvConstants* yuvconstants,
4408                              int width);
4409 void P210ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
4410                              const uint16_t* uv_buf,
4411                              uint8_t* dst_ptr,
4412                              const struct YuvConstants* yuvconstants,
4413                              int width);
4414 void P410ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
4415                              const uint16_t* uv_buf,
4416                              uint8_t* dst_ptr,
4417                              const struct YuvConstants* yuvconstants,
4418                              int width);
4419 void P210ToARGBRow_Any_AVX2(const uint16_t* y_buf,
4420                             const uint16_t* uv_buf,
4421                             uint8_t* dst_ptr,
4422                             const struct YuvConstants* yuvconstants,
4423                             int width);
4424 void P410ToARGBRow_Any_AVX2(const uint16_t* y_buf,
4425                             const uint16_t* uv_buf,
4426                             uint8_t* dst_ptr,
4427                             const struct YuvConstants* yuvconstants,
4428                             int width);
4429 void P210ToAR30Row_Any_AVX2(const uint16_t* y_buf,
4430                             const uint16_t* uv_buf,
4431                             uint8_t* dst_ptr,
4432                             const struct YuvConstants* yuvconstants,
4433                             int width);
4434 void P410ToAR30Row_Any_AVX2(const uint16_t* y_buf,
4435                             const uint16_t* uv_buf,
4436                             uint8_t* dst_ptr,
4437                             const struct YuvConstants* yuvconstants,
4438                             int width);
4439 void I422ToRGBARow_Any_SSSE3(const uint8_t* y_buf,
4440                              const uint8_t* u_buf,
4441                              const uint8_t* v_buf,
4442                              uint8_t* dst_ptr,
4443                              const struct YuvConstants* yuvconstants,
4444                              int width);
4445 void I422ToARGB4444Row_Any_SSSE3(const uint8_t* y_buf,
4446                                  const uint8_t* u_buf,
4447                                  const uint8_t* v_buf,
4448                                  uint8_t* dst_ptr,
4449                                  const struct YuvConstants* yuvconstants,
4450                                  int width);
4451 void I422ToARGB4444Row_Any_AVX2(const uint8_t* y_buf,
4452                                 const uint8_t* u_buf,
4453                                 const uint8_t* v_buf,
4454                                 uint8_t* dst_ptr,
4455                                 const struct YuvConstants* yuvconstants,
4456                                 int width);
4457 void I422ToARGB1555Row_Any_SSSE3(const uint8_t* y_buf,
4458                                  const uint8_t* u_buf,
4459                                  const uint8_t* v_buf,
4460                                  uint8_t* dst_ptr,
4461                                  const struct YuvConstants* yuvconstants,
4462                                  int width);
4463 void I422ToARGB1555Row_Any_AVX2(const uint8_t* y_buf,
4464                                 const uint8_t* u_buf,
4465                                 const uint8_t* v_buf,
4466                                 uint8_t* dst_ptr,
4467                                 const struct YuvConstants* yuvconstants,
4468                                 int width);
4469 void I422ToRGB565Row_Any_SSSE3(const uint8_t* y_buf,
4470                                const uint8_t* u_buf,
4471                                const uint8_t* v_buf,
4472                                uint8_t* dst_ptr,
4473                                const struct YuvConstants* yuvconstants,
4474                                int width);
4475 void I422ToRGB565Row_Any_AVX2(const uint8_t* y_buf,
4476                               const uint8_t* u_buf,
4477                               const uint8_t* v_buf,
4478                               uint8_t* dst_ptr,
4479                               const struct YuvConstants* yuvconstants,
4480                               int width);
4481 void I422ToRGB24Row_Any_SSSE3(const uint8_t* y_buf,
4482                               const uint8_t* u_buf,
4483                               const uint8_t* v_buf,
4484                               uint8_t* dst_ptr,
4485                               const struct YuvConstants* yuvconstants,
4486                               int width);
4487 void I422ToRGB24Row_Any_AVX2(const uint8_t* y_buf,
4488                              const uint8_t* u_buf,
4489                              const uint8_t* v_buf,
4490                              uint8_t* dst_ptr,
4491                              const struct YuvConstants* yuvconstants,
4492                              int width);
4493 
4494 void I400ToARGBRow_C(const uint8_t* src_y,
4495                      uint8_t* rgb_buf,
4496                      const struct YuvConstants* yuvconstants,
4497                      int width);
4498 void I400ToARGBRow_SSE2(const uint8_t* y_buf,
4499                         uint8_t* dst_argb,
4500                         const struct YuvConstants* yuvconstants,
4501                         int width);
4502 void I400ToARGBRow_AVX2(const uint8_t* y_buf,
4503                         uint8_t* dst_argb,
4504                         const struct YuvConstants* yuvconstants,
4505                         int width);
4506 void I400ToARGBRow_NEON(const uint8_t* src_y,
4507                         uint8_t* dst_argb,
4508                         const struct YuvConstants* yuvconstants,
4509                         int width);
4510 void I400ToARGBRow_MSA(const uint8_t* src_y,
4511                        uint8_t* dst_argb,
4512                        const struct YuvConstants* yuvconstants,
4513                        int width);
4514 void I400ToARGBRow_LSX(const uint8_t* src_y,
4515                        uint8_t* dst_argb,
4516                        const struct YuvConstants* yuvconstants,
4517                        int width);
4518 void I400ToARGBRow_RVV(const uint8_t* src_y,
4519                        uint8_t* dst_argb,
4520                        const struct YuvConstants* yuvconstants,
4521                        int width);
4522 void I400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
4523                             uint8_t* dst_ptr,
4524                             const struct YuvConstants* param,
4525                             int width);
4526 void I400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
4527                             uint8_t* dst_ptr,
4528                             const struct YuvConstants* param,
4529                             int width);
4530 void I400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
4531                             uint8_t* dst_ptr,
4532                             const struct YuvConstants* param,
4533                             int width);
4534 void I400ToARGBRow_Any_MSA(const uint8_t* src_ptr,
4535                            uint8_t* dst_ptr,
4536                            const struct YuvConstants* yuvconstants,
4537                            int width);
4538 void I400ToARGBRow_Any_LSX(const uint8_t* src_ptr,
4539                            uint8_t* dst_ptr,
4540                            const struct YuvConstants* yuvconstants,
4541                            int width);
4542 
4543 // ARGB preattenuated alpha blend.
4544 void ARGBBlendRow_SSSE3(const uint8_t* src_argb,
4545                         const uint8_t* src_argb1,
4546                         uint8_t* dst_argb,
4547                         int width);
4548 void ARGBBlendRow_NEON(const uint8_t* src_argb,
4549                        const uint8_t* src_argb1,
4550                        uint8_t* dst_argb,
4551                        int width);
4552 void ARGBBlendRow_MSA(const uint8_t* src_argb0,
4553                       const uint8_t* src_argb1,
4554                       uint8_t* dst_argb,
4555                       int width);
4556 void ARGBBlendRow_LSX(const uint8_t* src_argb0,
4557                       const uint8_t* src_argb1,
4558                       uint8_t* dst_argb,
4559                       int width);
4560 void ARGBBlendRow_RVV(const uint8_t* src_argb0,
4561                       const uint8_t* src_argb1,
4562                       uint8_t* dst_argb,
4563                       int width);
4564 void ARGBBlendRow_C(const uint8_t* src_argb,
4565                     const uint8_t* src_argb1,
4566                     uint8_t* dst_argb,
4567                     int width);
4568 
4569 // Unattenuated planar alpha blend.
4570 void BlendPlaneRow_SSSE3(const uint8_t* src0,
4571                          const uint8_t* src1,
4572                          const uint8_t* alpha,
4573                          uint8_t* dst,
4574                          int width);
4575 void BlendPlaneRow_Any_SSSE3(const uint8_t* y_buf,
4576                              const uint8_t* u_buf,
4577                              const uint8_t* v_buf,
4578                              uint8_t* dst_ptr,
4579                              int width);
4580 void BlendPlaneRow_AVX2(const uint8_t* src0,
4581                         const uint8_t* src1,
4582                         const uint8_t* alpha,
4583                         uint8_t* dst,
4584                         int width);
4585 void BlendPlaneRow_Any_AVX2(const uint8_t* y_buf,
4586                             const uint8_t* u_buf,
4587                             const uint8_t* v_buf,
4588                             uint8_t* dst_ptr,
4589                             int width);
4590 void BlendPlaneRow_RVV(const uint8_t* src0,
4591                        const uint8_t* src1,
4592                        const uint8_t* alpha,
4593                        uint8_t* dst,
4594                        int width);
4595 void BlendPlaneRow_C(const uint8_t* src0,
4596                      const uint8_t* src1,
4597                      const uint8_t* alpha,
4598                      uint8_t* dst,
4599                      int width);
4600 
4601 // ARGB multiply images. Same API as Blend, but these require
4602 // pointer and width alignment for SSE2.
4603 void ARGBMultiplyRow_C(const uint8_t* src_argb,
4604                        const uint8_t* src_argb1,
4605                        uint8_t* dst_argb,
4606                        int width);
4607 void ARGBMultiplyRow_SSE2(const uint8_t* src_argb,
4608                           const uint8_t* src_argb1,
4609                           uint8_t* dst_argb,
4610                           int width);
4611 void ARGBMultiplyRow_Any_SSE2(const uint8_t* y_buf,
4612                               const uint8_t* uv_buf,
4613                               uint8_t* dst_ptr,
4614                               int width);
4615 void ARGBMultiplyRow_AVX2(const uint8_t* src_argb,
4616                           const uint8_t* src_argb1,
4617                           uint8_t* dst_argb,
4618                           int width);
4619 void ARGBMultiplyRow_Any_AVX2(const uint8_t* y_buf,
4620                               const uint8_t* uv_buf,
4621                               uint8_t* dst_ptr,
4622                               int width);
4623 void ARGBMultiplyRow_NEON(const uint8_t* src_argb,
4624                           const uint8_t* src_argb1,
4625                           uint8_t* dst_argb,
4626                           int width);
4627 void ARGBMultiplyRow_Any_NEON(const uint8_t* y_buf,
4628                               const uint8_t* uv_buf,
4629                               uint8_t* dst_ptr,
4630                               int width);
4631 void ARGBMultiplyRow_MSA(const uint8_t* src_argb0,
4632                          const uint8_t* src_argb1,
4633                          uint8_t* dst_argb,
4634                          int width);
4635 void ARGBMultiplyRow_Any_MSA(const uint8_t* y_buf,
4636                              const uint8_t* uv_buf,
4637                              uint8_t* dst_ptr,
4638                              int width);
4639 void ARGBMultiplyRow_LSX(const uint8_t* src_argb0,
4640                          const uint8_t* src_argb1,
4641                          uint8_t* dst_argb,
4642                          int width);
4643 void ARGBMultiplyRow_LASX(const uint8_t* src_argb0,
4644                           const uint8_t* src_argb1,
4645                           uint8_t* dst_argb,
4646                           int width);
4647 void ARGBMultiplyRow_Any_LSX(const uint8_t* y_buf,
4648                              const uint8_t* uv_buf,
4649                              uint8_t* dst_ptr,
4650                              int width);
4651 void ARGBMultiplyRow_Any_LASX(const uint8_t* y_buf,
4652                               const uint8_t* uv_buf,
4653                               uint8_t* dst_ptr,
4654                               int width);
4655 
4656 // ARGB add images.
4657 void ARGBAddRow_C(const uint8_t* src_argb,
4658                   const uint8_t* src_argb1,
4659                   uint8_t* dst_argb,
4660                   int width);
4661 void ARGBAddRow_SSE2(const uint8_t* src_argb,
4662                      const uint8_t* src_argb1,
4663                      uint8_t* dst_argb,
4664                      int width);
4665 void ARGBAddRow_Any_SSE2(const uint8_t* y_buf,
4666                          const uint8_t* uv_buf,
4667                          uint8_t* dst_ptr,
4668                          int width);
4669 void ARGBAddRow_AVX2(const uint8_t* src_argb,
4670                      const uint8_t* src_argb1,
4671                      uint8_t* dst_argb,
4672                      int width);
4673 void ARGBAddRow_Any_AVX2(const uint8_t* y_buf,
4674                          const uint8_t* uv_buf,
4675                          uint8_t* dst_ptr,
4676                          int width);
4677 void ARGBAddRow_NEON(const uint8_t* src_argb,
4678                      const uint8_t* src_argb1,
4679                      uint8_t* dst_argb,
4680                      int width);
4681 void ARGBAddRow_Any_NEON(const uint8_t* y_buf,
4682                          const uint8_t* uv_buf,
4683                          uint8_t* dst_ptr,
4684                          int width);
4685 void ARGBAddRow_MSA(const uint8_t* src_argb0,
4686                     const uint8_t* src_argb1,
4687                     uint8_t* dst_argb,
4688                     int width);
4689 void ARGBAddRow_Any_MSA(const uint8_t* y_buf,
4690                         const uint8_t* uv_buf,
4691                         uint8_t* dst_ptr,
4692                         int width);
4693 void ARGBAddRow_LSX(const uint8_t* src_argb0,
4694                     const uint8_t* src_argb1,
4695                     uint8_t* dst_argb,
4696                     int width);
4697 void ARGBAddRow_LASX(const uint8_t* src_argb0,
4698                      const uint8_t* src_argb1,
4699                      uint8_t* dst_argb,
4700                      int width);
4701 void ARGBAddRow_Any_LSX(const uint8_t* y_buf,
4702                         const uint8_t* uv_buf,
4703                         uint8_t* dst_ptr,
4704                         int width);
4705 void ARGBAddRow_Any_LASX(const uint8_t* y_buf,
4706                          const uint8_t* uv_buf,
4707                          uint8_t* dst_ptr,
4708                          int width);
4709 
4710 // ARGB subtract images. Same API as Blend, but these require
4711 // pointer and width alignment for SSE2.
4712 void ARGBSubtractRow_C(const uint8_t* src_argb,
4713                        const uint8_t* src_argb1,
4714                        uint8_t* dst_argb,
4715                        int width);
4716 void ARGBSubtractRow_SSE2(const uint8_t* src_argb,
4717                           const uint8_t* src_argb1,
4718                           uint8_t* dst_argb,
4719                           int width);
4720 void ARGBSubtractRow_Any_SSE2(const uint8_t* y_buf,
4721                               const uint8_t* uv_buf,
4722                               uint8_t* dst_ptr,
4723                               int width);
4724 void ARGBSubtractRow_AVX2(const uint8_t* src_argb,
4725                           const uint8_t* src_argb1,
4726                           uint8_t* dst_argb,
4727                           int width);
4728 void ARGBSubtractRow_Any_AVX2(const uint8_t* y_buf,
4729                               const uint8_t* uv_buf,
4730                               uint8_t* dst_ptr,
4731                               int width);
4732 void ARGBSubtractRow_NEON(const uint8_t* src_argb,
4733                           const uint8_t* src_argb1,
4734                           uint8_t* dst_argb,
4735                           int width);
4736 void ARGBSubtractRow_Any_NEON(const uint8_t* y_buf,
4737                               const uint8_t* uv_buf,
4738                               uint8_t* dst_ptr,
4739                               int width);
4740 void ARGBSubtractRow_MSA(const uint8_t* src_argb0,
4741                          const uint8_t* src_argb1,
4742                          uint8_t* dst_argb,
4743                          int width);
4744 void ARGBSubtractRow_Any_MSA(const uint8_t* y_buf,
4745                              const uint8_t* uv_buf,
4746                              uint8_t* dst_ptr,
4747                              int width);
4748 void ARGBSubtractRow_LSX(const uint8_t* src_argb0,
4749                          const uint8_t* src_argb1,
4750                          uint8_t* dst_argb,
4751                          int width);
4752 void ARGBSubtractRow_LASX(const uint8_t* src_argb0,
4753                           const uint8_t* src_argb1,
4754                           uint8_t* dst_argb,
4755                           int width);
4756 void ARGBSubtractRow_Any_LSX(const uint8_t* y_buf,
4757                              const uint8_t* uv_buf,
4758                              uint8_t* dst_ptr,
4759                              int width);
4760 void ARGBSubtractRow_Any_LASX(const uint8_t* y_buf,
4761                               const uint8_t* uv_buf,
4762                               uint8_t* dst_ptr,
4763                               int width);
4764 
4765 void ARGBToRGB24Row_Any_SSSE3(const uint8_t* src_ptr,
4766                               uint8_t* dst_ptr,
4767                               int width);
4768 void ARGBToRAWRow_Any_SSSE3(const uint8_t* src_ptr,
4769                             uint8_t* dst_ptr,
4770                             int width);
4771 void ARGBToRGB565Row_Any_SSE2(const uint8_t* src_ptr,
4772                               uint8_t* dst_ptr,
4773                               int width);
4774 void ARGBToARGB1555Row_Any_SSE2(const uint8_t* src_ptr,
4775                                 uint8_t* dst_ptr,
4776                                 int width);
4777 void ARGBToARGB4444Row_Any_SSE2(const uint8_t* src_ptr,
4778                                 uint8_t* dst_ptr,
4779                                 int width);
4780 void ABGRToAR30Row_Any_SSSE3(const uint8_t* src_ptr,
4781                              uint8_t* dst_ptr,
4782                              int width);
4783 void ARGBToAR30Row_Any_SSSE3(const uint8_t* src_ptr,
4784                              uint8_t* dst_ptr,
4785                              int width);
4786 void ARGBToRAWRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4787 void ARGBToRGB24Row_Any_AVX2(const uint8_t* src_ptr,
4788                              uint8_t* dst_ptr,
4789                              int width);
4790 void ARGBToRGB24Row_Any_AVX512VBMI(const uint8_t* src_ptr,
4791                                    uint8_t* dst_ptr,
4792                                    int width);
4793 void ARGBToRGB565DitherRow_Any_SSE2(const uint8_t* src_ptr,
4794                                     uint8_t* dst_ptr,
4795                                     const uint32_t param,
4796                                     int width);
4797 void ARGBToRGB565DitherRow_Any_AVX2(const uint8_t* src_ptr,
4798                                     uint8_t* dst_ptr,
4799                                     const uint32_t param,
4800                                     int width);
4801 
4802 void ARGBToRGB565Row_Any_AVX2(const uint8_t* src_ptr,
4803                               uint8_t* dst_ptr,
4804                               int width);
4805 void ARGBToARGB1555Row_Any_AVX2(const uint8_t* src_ptr,
4806                                 uint8_t* dst_ptr,
4807                                 int width);
4808 void ARGBToARGB4444Row_Any_AVX2(const uint8_t* src_ptr,
4809                                 uint8_t* dst_ptr,
4810                                 int width);
4811 void ABGRToAR30Row_Any_AVX2(const uint8_t* src_ptr,
4812                             uint8_t* dst_ptr,
4813                             int width);
4814 void ARGBToAR30Row_Any_AVX2(const uint8_t* src_ptr,
4815                             uint8_t* dst_ptr,
4816                             int width);
4817 
4818 void ARGBToRGB24Row_Any_NEON(const uint8_t* src_ptr,
4819                              uint8_t* dst_ptr,
4820                              int width);
4821 void ARGBToRAWRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4822 void ARGBToRGB565Row_Any_NEON(const uint8_t* src_ptr,
4823                               uint8_t* dst_ptr,
4824                               int width);
4825 void ARGBToARGB1555Row_Any_NEON(const uint8_t* src_ptr,
4826                                 uint8_t* dst_ptr,
4827                                 int width);
4828 void ARGBToARGB4444Row_Any_NEON(const uint8_t* src_ptr,
4829                                 uint8_t* dst_ptr,
4830                                 int width);
4831 void ARGBToRGB565DitherRow_Any_NEON(const uint8_t* src_ptr,
4832                                     uint8_t* dst_ptr,
4833                                     const uint32_t param,
4834                                     int width);
4835 void ARGBToRGB24Row_Any_MSA(const uint8_t* src_ptr,
4836                             uint8_t* dst_ptr,
4837                             int width);
4838 void ARGBToRAWRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4839 void ARGBToRGB565Row_Any_MSA(const uint8_t* src_ptr,
4840                              uint8_t* dst_ptr,
4841                              int width);
4842 void ARGBToARGB1555Row_Any_MSA(const uint8_t* src_ptr,
4843                                uint8_t* dst_ptr,
4844                                int width);
4845 void ARGBToARGB4444Row_Any_MSA(const uint8_t* src_ptr,
4846                                uint8_t* dst_ptr,
4847                                int width);
4848 void ARGBToRGB565DitherRow_Any_MSA(const uint8_t* src_ptr,
4849                                    uint8_t* dst_ptr,
4850                                    const uint32_t param,
4851                                    int width);
4852 void ARGBToRGB565DitherRow_Any_LSX(const uint8_t* src_ptr,
4853                                    uint8_t* dst_ptr,
4854                                    const uint32_t param,
4855                                    int width);
4856 void ARGBToRGB565DitherRow_Any_LASX(const uint8_t* src_ptr,
4857                                     uint8_t* dst_ptr,
4858                                     const uint32_t param,
4859                                     int width);
4860 void ARGBToRGB24Row_Any_LSX(const uint8_t* src_ptr,
4861                             uint8_t* dst_ptr,
4862                             int width);
4863 void ARGBToRGB24Row_Any_LASX(const uint8_t* src_ptr,
4864                              uint8_t* dst_ptr,
4865                              int width);
4866 void ARGBToRAWRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4867 void ARGBToRAWRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
4868 void ARGBToRGB565Row_Any_LSX(const uint8_t* src_ptr,
4869                              uint8_t* dst_ptr,
4870                              int width);
4871 void ARGBToRGB565Row_Any_LASX(const uint8_t* src_ptr,
4872                               uint8_t* dst_ptr,
4873                               int width);
4874 void ARGBToARGB1555Row_Any_LSX(const uint8_t* src_ptr,
4875                                uint8_t* dst_ptr,
4876                                int width);
4877 void ARGBToARGB1555Row_Any_LASX(const uint8_t* src_ptr,
4878                                 uint8_t* dst_ptr,
4879                                 int width);
4880 void ARGBToARGB4444Row_Any_LSX(const uint8_t* src_ptr,
4881                                uint8_t* dst_ptr,
4882                                int width);
4883 void ARGBToARGB4444Row_Any_LASX(const uint8_t* src_ptr,
4884                                 uint8_t* dst_ptr,
4885                                 int width);
4886 
4887 void I444ToARGBRow_Any_NEON(const uint8_t* y_buf,
4888                             const uint8_t* u_buf,
4889                             const uint8_t* v_buf,
4890                             uint8_t* dst_ptr,
4891                             const struct YuvConstants* yuvconstants,
4892                             int width);
4893 void I444ToRGB24Row_Any_NEON(const uint8_t* y_buf,
4894                              const uint8_t* u_buf,
4895                              const uint8_t* v_buf,
4896                              uint8_t* dst_ptr,
4897                              const struct YuvConstants* yuvconstants,
4898                              int width);
4899 void I422ToARGBRow_Any_NEON(const uint8_t* y_buf,
4900                             const uint8_t* u_buf,
4901                             const uint8_t* v_buf,
4902                             uint8_t* dst_ptr,
4903                             const struct YuvConstants* yuvconstants,
4904                             int width);
4905 void I444AlphaToARGBRow_Any_NEON(const uint8_t* y_buf,
4906                                  const uint8_t* u_buf,
4907                                  const uint8_t* v_buf,
4908                                  const uint8_t* a_buf,
4909                                  uint8_t* dst_ptr,
4910                                  const struct YuvConstants* yuvconstants,
4911                                  int width);
4912 void I422AlphaToARGBRow_Any_NEON(const uint8_t* y_buf,
4913                                  const uint8_t* u_buf,
4914                                  const uint8_t* v_buf,
4915                                  const uint8_t* a_buf,
4916                                  uint8_t* dst_ptr,
4917                                  const struct YuvConstants* yuvconstants,
4918                                  int width);
4919 void I422ToRGBARow_Any_NEON(const uint8_t* y_buf,
4920                             const uint8_t* u_buf,
4921                             const uint8_t* v_buf,
4922                             uint8_t* dst_ptr,
4923                             const struct YuvConstants* yuvconstants,
4924                             int width);
4925 void I422ToRGB24Row_Any_NEON(const uint8_t* y_buf,
4926                              const uint8_t* u_buf,
4927                              const uint8_t* v_buf,
4928                              uint8_t* dst_ptr,
4929                              const struct YuvConstants* yuvconstants,
4930                              int width);
4931 void I422ToARGB4444Row_Any_NEON(const uint8_t* y_buf,
4932                                 const uint8_t* u_buf,
4933                                 const uint8_t* v_buf,
4934                                 uint8_t* dst_ptr,
4935                                 const struct YuvConstants* yuvconstants,
4936                                 int width);
4937 void I422ToARGB1555Row_Any_NEON(const uint8_t* y_buf,
4938                                 const uint8_t* u_buf,
4939                                 const uint8_t* v_buf,
4940                                 uint8_t* dst_ptr,
4941                                 const struct YuvConstants* yuvconstants,
4942                                 int width);
4943 void I422ToRGB565Row_Any_NEON(const uint8_t* y_buf,
4944                               const uint8_t* u_buf,
4945                               const uint8_t* v_buf,
4946                               uint8_t* dst_ptr,
4947                               const struct YuvConstants* yuvconstants,
4948                               int width);
4949 void NV12ToARGBRow_Any_NEON(const uint8_t* y_buf,
4950                             const uint8_t* uv_buf,
4951                             uint8_t* dst_ptr,
4952                             const struct YuvConstants* yuvconstants,
4953                             int width);
4954 void NV21ToARGBRow_Any_NEON(const uint8_t* y_buf,
4955                             const uint8_t* uv_buf,
4956                             uint8_t* dst_ptr,
4957                             const struct YuvConstants* yuvconstants,
4958                             int width);
4959 void NV12ToRGB24Row_Any_NEON(const uint8_t* y_buf,
4960                              const uint8_t* uv_buf,
4961                              uint8_t* dst_ptr,
4962                              const struct YuvConstants* yuvconstants,
4963                              int width);
4964 void NV21ToRGB24Row_Any_NEON(const uint8_t* y_buf,
4965                              const uint8_t* uv_buf,
4966                              uint8_t* dst_ptr,
4967                              const struct YuvConstants* yuvconstants,
4968                              int width);
4969 void NV21ToYUV24Row_Any_NEON(const uint8_t* y_buf,
4970                              const uint8_t* uv_buf,
4971                              uint8_t* dst_ptr,
4972                              int width);
4973 void NV12ToRGB565Row_Any_NEON(const uint8_t* y_buf,
4974                               const uint8_t* uv_buf,
4975                               uint8_t* dst_ptr,
4976                               const struct YuvConstants* yuvconstants,
4977                               int width);
4978 void YUY2ToARGBRow_Any_NEON(const uint8_t* src_ptr,
4979                             uint8_t* dst_ptr,
4980                             const struct YuvConstants* yuvconstants,
4981                             int width);
4982 void UYVYToARGBRow_Any_NEON(const uint8_t* src_ptr,
4983                             uint8_t* dst_ptr,
4984                             const struct YuvConstants* yuvconstants,
4985                             int width);
4986 void P210ToARGBRow_NEON(const uint16_t* y_buf,
4987                         const uint16_t* uv_buf,
4988                         uint8_t* dst_argb,
4989                         const struct YuvConstants* yuvconstants,
4990                         int width);
4991 void P410ToARGBRow_NEON(const uint16_t* y_buf,
4992                         const uint16_t* uv_buf,
4993                         uint8_t* dst_argb,
4994                         const struct YuvConstants* yuvconstants,
4995                         int width);
4996 void P210ToAR30Row_NEON(const uint16_t* y_buf,
4997                         const uint16_t* uv_buf,
4998                         uint8_t* dst_ar30,
4999                         const struct YuvConstants* yuvconstants,
5000                         int width);
5001 void P410ToAR30Row_NEON(const uint16_t* y_buf,
5002                         const uint16_t* uv_buf,
5003                         uint8_t* dst_ar30,
5004                         const struct YuvConstants* yuvconstants,
5005                         int width);
5006 void P210ToARGBRow_Any_NEON(const uint16_t* y_buf,
5007                             const uint16_t* uv_buf,
5008                             uint8_t* dst_argb,
5009                             const struct YuvConstants* yuvconstants,
5010                             int width);
5011 void P410ToARGBRow_Any_NEON(const uint16_t* y_buf,
5012                             const uint16_t* uv_buf,
5013                             uint8_t* dst_argb,
5014                             const struct YuvConstants* yuvconstants,
5015                             int width);
5016 void P210ToAR30Row_Any_NEON(const uint16_t* y_buf,
5017                             const uint16_t* uv_buf,
5018                             uint8_t* dst_ar30,
5019                             const struct YuvConstants* yuvconstants,
5020                             int width);
5021 void P410ToAR30Row_Any_NEON(const uint16_t* y_buf,
5022                             const uint16_t* uv_buf,
5023                             uint8_t* dst_ar30,
5024                             const struct YuvConstants* yuvconstants,
5025                             int width);
5026 void I444ToARGBRow_Any_MSA(const uint8_t* y_buf,
5027                            const uint8_t* u_buf,
5028                            const uint8_t* v_buf,
5029                            uint8_t* dst_ptr,
5030                            const struct YuvConstants* yuvconstants,
5031                            int width);
5032 void I444ToARGBRow_Any_LSX(const uint8_t* y_buf,
5033                            const uint8_t* u_buf,
5034                            const uint8_t* v_buf,
5035                            uint8_t* dst_ptr,
5036                            const struct YuvConstants* yuvconstants,
5037                            int width);
5038 void I422ToARGBRow_Any_MSA(const uint8_t* y_buf,
5039                            const uint8_t* u_buf,
5040                            const uint8_t* v_buf,
5041                            uint8_t* dst_ptr,
5042                            const struct YuvConstants* yuvconstants,
5043                            int width);
5044 void I422ToARGBRow_Any_LSX(const uint8_t* y_buf,
5045                            const uint8_t* u_buf,
5046                            const uint8_t* v_buf,
5047                            uint8_t* dst_ptr,
5048                            const struct YuvConstants* yuvconstants,
5049                            int width);
5050 void I422ToARGBRow_Any_LASX(const uint8_t* y_buf,
5051                             const uint8_t* u_buf,
5052                             const uint8_t* v_buf,
5053                             uint8_t* dst_ptr,
5054                             const struct YuvConstants* yuvconstants,
5055                             int width);
5056 void I422ToRGBARow_Any_MSA(const uint8_t* y_buf,
5057                            const uint8_t* u_buf,
5058                            const uint8_t* v_buf,
5059                            uint8_t* dst_ptr,
5060                            const struct YuvConstants* yuvconstants,
5061                            int width);
5062 void I422ToRGBARow_Any_LSX(const uint8_t* y_buf,
5063                            const uint8_t* u_buf,
5064                            const uint8_t* v_buf,
5065                            uint8_t* dst_ptr,
5066                            const struct YuvConstants* yuvconstants,
5067                            int width);
5068 void I422ToRGBARow_Any_LASX(const uint8_t* y_buf,
5069                             const uint8_t* u_buf,
5070                             const uint8_t* v_buf,
5071                             uint8_t* dst_ptr,
5072                             const struct YuvConstants* yuvconstants,
5073                             int width);
5074 void I422AlphaToARGBRow_Any_MSA(const uint8_t* y_buf,
5075                                 const uint8_t* u_buf,
5076                                 const uint8_t* v_buf,
5077                                 const uint8_t* a_buf,
5078                                 uint8_t* dst_ptr,
5079                                 const struct YuvConstants* yuvconstants,
5080                                 int width);
5081 void I422AlphaToARGBRow_Any_LSX(const uint8_t* y_buf,
5082                                 const uint8_t* u_buf,
5083                                 const uint8_t* v_buf,
5084                                 const uint8_t* a_buf,
5085                                 uint8_t* dst_ptr,
5086                                 const struct YuvConstants* yuvconstants,
5087                                 int width);
5088 void I422AlphaToARGBRow_Any_LASX(const uint8_t* y_buf,
5089                                  const uint8_t* u_buf,
5090                                  const uint8_t* v_buf,
5091                                  const uint8_t* a_buf,
5092                                  uint8_t* dst_ptr,
5093                                  const struct YuvConstants* yuvconstants,
5094                                  int width);
5095 void I422ToRGB24Row_Any_MSA(const uint8_t* y_buf,
5096                             const uint8_t* u_buf,
5097                             const uint8_t* v_buf,
5098                             uint8_t* dst_ptr,
5099                             const struct YuvConstants* yuvconstants,
5100                             int width);
5101 void I422ToRGB24Row_Any_LSX(const uint8_t* y_buf,
5102                             const uint8_t* u_buf,
5103                             const uint8_t* v_buf,
5104                             uint8_t* dst_ptr,
5105                             const struct YuvConstants* yuvconstants,
5106                             int width);
5107 void I422ToRGB24Row_Any_LASX(const uint8_t* y_buf,
5108                              const uint8_t* u_buf,
5109                              const uint8_t* v_buf,
5110                              uint8_t* dst_ptr,
5111                              const struct YuvConstants* yuvconstants,
5112                              int width);
5113 void I422ToRGB565Row_Any_MSA(const uint8_t* y_buf,
5114                              const uint8_t* u_buf,
5115                              const uint8_t* v_buf,
5116                              uint8_t* dst_ptr,
5117                              const struct YuvConstants* yuvconstants,
5118                              int width);
5119 void I422ToRGB565Row_Any_LSX(const uint8_t* y_buf,
5120                              const uint8_t* u_buf,
5121                              const uint8_t* v_buf,
5122                              uint8_t* dst_ptr,
5123                              const struct YuvConstants* yuvconstants,
5124                              int width);
5125 void I422ToRGB565Row_Any_LASX(const uint8_t* y_buf,
5126                               const uint8_t* u_buf,
5127                               const uint8_t* v_buf,
5128                               uint8_t* dst_ptr,
5129                               const struct YuvConstants* yuvconstants,
5130                               int width);
5131 void I422ToARGB4444Row_Any_MSA(const uint8_t* y_buf,
5132                                const uint8_t* u_buf,
5133                                const uint8_t* v_buf,
5134                                uint8_t* dst_ptr,
5135                                const struct YuvConstants* yuvconstants,
5136                                int width);
5137 void I422ToARGB4444Row_Any_LSX(const uint8_t* y_buf,
5138                                const uint8_t* u_buf,
5139                                const uint8_t* v_buf,
5140                                uint8_t* dst_ptr,
5141                                const struct YuvConstants* yuvconstants,
5142                                int width);
5143 void I422ToARGB4444Row_Any_LASX(const uint8_t* y_buf,
5144                                 const uint8_t* u_buf,
5145                                 const uint8_t* v_buf,
5146                                 uint8_t* dst_ptr,
5147                                 const struct YuvConstants* yuvconstants,
5148                                 int width);
5149 void I422ToARGB1555Row_Any_MSA(const uint8_t* y_buf,
5150                                const uint8_t* u_buf,
5151                                const uint8_t* v_buf,
5152                                uint8_t* dst_ptr,
5153                                const struct YuvConstants* yuvconstants,
5154                                int width);
5155 void I422ToARGB1555Row_Any_LSX(const uint8_t* y_buf,
5156                                const uint8_t* u_buf,
5157                                const uint8_t* v_buf,
5158                                uint8_t* dst_ptr,
5159                                const struct YuvConstants* yuvconstants,
5160                                int width);
5161 void I422ToARGB1555Row_Any_LASX(const uint8_t* y_buf,
5162                                 const uint8_t* u_buf,
5163                                 const uint8_t* v_buf,
5164                                 uint8_t* dst_ptr,
5165                                 const struct YuvConstants* yuvconstants,
5166                                 int width);
5167 void NV12ToARGBRow_Any_MSA(const uint8_t* y_buf,
5168                            const uint8_t* uv_buf,
5169                            uint8_t* dst_ptr,
5170                            const struct YuvConstants* yuvconstants,
5171                            int width);
5172 void NV12ToRGB565Row_Any_MSA(const uint8_t* y_buf,
5173                              const uint8_t* uv_buf,
5174                              uint8_t* dst_ptr,
5175                              const struct YuvConstants* yuvconstants,
5176                              int width);
5177 void NV21ToARGBRow_Any_MSA(const uint8_t* y_buf,
5178                            const uint8_t* uv_buf,
5179                            uint8_t* dst_ptr,
5180                            const struct YuvConstants* yuvconstants,
5181                            int width);
5182 void YUY2ToARGBRow_Any_MSA(const uint8_t* src_ptr,
5183                            uint8_t* dst_ptr,
5184                            const struct YuvConstants* yuvconstants,
5185                            int width);
5186 void UYVYToARGBRow_Any_MSA(const uint8_t* src_ptr,
5187                            uint8_t* dst_ptr,
5188                            const struct YuvConstants* yuvconstants,
5189                            int width);
5190 
5191 void NV12ToARGBRow_Any_LSX(const uint8_t* y_buf,
5192                            const uint8_t* uv_buf,
5193                            uint8_t* dst_ptr,
5194                            const struct YuvConstants* yuvconstants,
5195                            int width);
5196 void NV12ToARGBRow_Any_LASX(const uint8_t* y_buf,
5197                             const uint8_t* uv_buf,
5198                             uint8_t* dst_ptr,
5199                             const struct YuvConstants* yuvconstants,
5200                             int width);
5201 void NV12ToRGB565Row_Any_LSX(const uint8_t* y_buf,
5202                              const uint8_t* uv_buf,
5203                              uint8_t* dst_ptr,
5204                              const struct YuvConstants* yuvconstants,
5205                              int width);
5206 void NV12ToRGB565Row_Any_LASX(const uint8_t* y_buf,
5207                               const uint8_t* uv_buf,
5208                               uint8_t* dst_ptr,
5209                               const struct YuvConstants* yuvconstants,
5210                               int width);
5211 void NV21ToARGBRow_Any_LSX(const uint8_t* y_buf,
5212                            const uint8_t* uv_buf,
5213                            uint8_t* dst_ptr,
5214                            const struct YuvConstants* yuvconstants,
5215                            int width);
5216 void NV21ToARGBRow_Any_LASX(const uint8_t* y_buf,
5217                             const uint8_t* uv_buf,
5218                             uint8_t* dst_ptr,
5219                             const struct YuvConstants* yuvconstants,
5220                             int width);
5221 void YUY2ToARGBRow_Any_LSX(const uint8_t* src_ptr,
5222                            uint8_t* dst_ptr,
5223                            const struct YuvConstants* yuvconstants,
5224                            int width);
5225 void UYVYToARGBRow_Any_LSX(const uint8_t* src_ptr,
5226                            uint8_t* dst_ptr,
5227                            const struct YuvConstants* yuvconstants,
5228                            int width);
5229 
5230 void YUY2ToYRow_AVX2(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
5231 void YUY2ToUVRow_AVX2(const uint8_t* src_yuy2,
5232                       int stride_yuy2,
5233                       uint8_t* dst_u,
5234                       uint8_t* dst_v,
5235                       int width);
5236 void YUY2ToNVUVRow_AVX2(const uint8_t* src_yuy2,
5237                         int stride_yuy2,
5238                         uint8_t* dst_uv,
5239                         int width);
5240 void YUY2ToUV422Row_AVX2(const uint8_t* src_yuy2,
5241                          uint8_t* dst_u,
5242                          uint8_t* dst_v,
5243                          int width);
5244 void YUY2ToYRow_SSE2(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
5245 void YUY2ToUVRow_SSE2(const uint8_t* src_yuy2,
5246                       int stride_yuy2,
5247                       uint8_t* dst_u,
5248                       uint8_t* dst_v,
5249                       int width);
5250 void YUY2ToNVUVRow_SSE2(const uint8_t* src_yuy2,
5251                         int stride_yuy2,
5252                         uint8_t* dst_uv,
5253                         int width);
5254 void YUY2ToUV422Row_SSE2(const uint8_t* src_yuy2,
5255                          uint8_t* dst_u,
5256                          uint8_t* dst_v,
5257                          int width);
5258 void YUY2ToYRow_NEON(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
5259 void YUY2ToUVRow_NEON(const uint8_t* src_yuy2,
5260                       int stride_yuy2,
5261                       uint8_t* dst_u,
5262                       uint8_t* dst_v,
5263                       int width);
5264 void YUY2ToNVUVRow_NEON(const uint8_t* src_yuy2,
5265                         int stride_yuy2,
5266                         uint8_t* dst_uv,
5267                         int width);
5268 void YUY2ToUV422Row_NEON(const uint8_t* src_yuy2,
5269                          uint8_t* dst_u,
5270                          uint8_t* dst_v,
5271                          int width);
5272 void YUY2ToYRow_MSA(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
5273 void YUY2ToYRow_LSX(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
5274 void YUY2ToYRow_LASX(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
5275 void YUY2ToUVRow_MSA(const uint8_t* src_yuy2,
5276                      int src_stride_yuy2,
5277                      uint8_t* dst_u,
5278                      uint8_t* dst_v,
5279                      int width);
5280 void YUY2ToUVRow_LSX(const uint8_t* src_yuy2,
5281                      int src_stride_yuy2,
5282                      uint8_t* dst_u,
5283                      uint8_t* dst_v,
5284                      int width);
5285 void YUY2ToUVRow_LASX(const uint8_t* src_yuy2,
5286                       int src_stride_yuy2,
5287                       uint8_t* dst_u,
5288                       uint8_t* dst_v,
5289                       int width);
5290 void YUY2ToUV422Row_MSA(const uint8_t* src_yuy2,
5291                         uint8_t* dst_u,
5292                         uint8_t* dst_v,
5293                         int width);
5294 void YUY2ToUV422Row_LSX(const uint8_t* src_yuy2,
5295                         uint8_t* dst_u,
5296                         uint8_t* dst_v,
5297                         int width);
5298 void YUY2ToUV422Row_LASX(const uint8_t* src_yuy2,
5299                          uint8_t* dst_u,
5300                          uint8_t* dst_v,
5301                          int width);
5302 void YUY2ToYRow_C(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
5303 void YUY2ToUVRow_C(const uint8_t* src_yuy2,
5304                    int src_stride_yuy2,
5305                    uint8_t* dst_u,
5306                    uint8_t* dst_v,
5307                    int width);
5308 void YUY2ToNVUVRow_C(const uint8_t* src_yuy2,
5309                      int src_stride_yuy2,
5310                      uint8_t* dst_uv,
5311                      int width);
5312 void YUY2ToUV422Row_C(const uint8_t* src_yuy2,
5313                       uint8_t* dst_u,
5314                       uint8_t* dst_v,
5315                       int width);
5316 void YUY2ToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5317 void YUY2ToUVRow_Any_AVX2(const uint8_t* src_ptr,
5318                           int src_stride,
5319                           uint8_t* dst_u,
5320                           uint8_t* dst_v,
5321                           int width);
5322 void YUY2ToNVUVRow_Any_AVX2(const uint8_t* src_yuy2,
5323                             int stride_yuy2,
5324                             uint8_t* dst_uv,
5325                             int width);
5326 void YUY2ToUV422Row_Any_AVX2(const uint8_t* src_ptr,
5327                              uint8_t* dst_u,
5328                              uint8_t* dst_v,
5329                              int width);
5330 void YUY2ToYRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5331 void YUY2ToUVRow_Any_SSE2(const uint8_t* src_ptr,
5332                           int src_stride,
5333                           uint8_t* dst_u,
5334                           uint8_t* dst_v,
5335                           int width);
5336 void YUY2ToNVUVRow_Any_SSE2(const uint8_t* src_yuy2,
5337                             int stride_yuy2,
5338                             uint8_t* dst_uv,
5339                             int width);
5340 void YUY2ToUV422Row_Any_SSE2(const uint8_t* src_ptr,
5341                              uint8_t* dst_u,
5342                              uint8_t* dst_v,
5343                              int width);
5344 void YUY2ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5345 void YUY2ToUVRow_Any_NEON(const uint8_t* src_ptr,
5346                           int src_stride,
5347                           uint8_t* dst_u,
5348                           uint8_t* dst_v,
5349                           int width);
5350 void YUY2ToNVUVRow_Any_NEON(const uint8_t* src_yuy2,
5351                             int stride_yuy2,
5352                             uint8_t* dst_uv,
5353                             int width);
5354 void YUY2ToUV422Row_Any_NEON(const uint8_t* src_ptr,
5355                              uint8_t* dst_u,
5356                              uint8_t* dst_v,
5357                              int width);
5358 void YUY2ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5359 void YUY2ToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5360 void YUY2ToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5361 void YUY2ToUVRow_Any_MSA(const uint8_t* src_ptr,
5362                          int src_stride_ptr,
5363                          uint8_t* dst_u,
5364                          uint8_t* dst_v,
5365                          int width);
5366 void YUY2ToUVRow_Any_LSX(const uint8_t* src_ptr,
5367                          int src_stride_ptr,
5368                          uint8_t* dst_u,
5369                          uint8_t* dst_v,
5370                          int width);
5371 void YUY2ToUVRow_Any_LASX(const uint8_t* src_ptr,
5372                           int src_stride_ptr,
5373                           uint8_t* dst_u,
5374                           uint8_t* dst_v,
5375                           int width);
5376 void YUY2ToUV422Row_Any_MSA(const uint8_t* src_ptr,
5377                             uint8_t* dst_u,
5378                             uint8_t* dst_v,
5379                             int width);
5380 void YUY2ToUV422Row_Any_LSX(const uint8_t* src_ptr,
5381                             uint8_t* dst_u,
5382                             uint8_t* dst_v,
5383                             int width);
5384 void YUY2ToUV422Row_Any_LASX(const uint8_t* src_ptr,
5385                              uint8_t* dst_u,
5386                              uint8_t* dst_v,
5387                              int width);
5388 void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
5389 void UYVYToUVRow_AVX2(const uint8_t* src_uyvy,
5390                       int stride_uyvy,
5391                       uint8_t* dst_u,
5392                       uint8_t* dst_v,
5393                       int width);
5394 void UYVYToUV422Row_AVX2(const uint8_t* src_uyvy,
5395                          uint8_t* dst_u,
5396                          uint8_t* dst_v,
5397                          int width);
5398 void UYVYToYRow_SSE2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
5399 void UYVYToUVRow_SSE2(const uint8_t* src_uyvy,
5400                       int stride_uyvy,
5401                       uint8_t* dst_u,
5402                       uint8_t* dst_v,
5403                       int width);
5404 void UYVYToUV422Row_SSE2(const uint8_t* src_uyvy,
5405                          uint8_t* dst_u,
5406                          uint8_t* dst_v,
5407                          int width);
5408 void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
5409 void UYVYToUVRow_AVX2(const uint8_t* src_uyvy,
5410                       int stride_uyvy,
5411                       uint8_t* dst_u,
5412                       uint8_t* dst_v,
5413                       int width);
5414 void UYVYToUV422Row_AVX2(const uint8_t* src_uyvy,
5415                          uint8_t* dst_u,
5416                          uint8_t* dst_v,
5417                          int width);
5418 void UYVYToYRow_NEON(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
5419 void UYVYToUVRow_NEON(const uint8_t* src_uyvy,
5420                       int stride_uyvy,
5421                       uint8_t* dst_u,
5422                       uint8_t* dst_v,
5423                       int width);
5424 void UYVYToUV422Row_NEON(const uint8_t* src_uyvy,
5425                          uint8_t* dst_u,
5426                          uint8_t* dst_v,
5427                          int width);
5428 void UYVYToYRow_MSA(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
5429 void UYVYToYRow_LSX(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
5430 void UYVYToYRow_LASX(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
5431 void UYVYToUVRow_MSA(const uint8_t* src_uyvy,
5432                      int src_stride_uyvy,
5433                      uint8_t* dst_u,
5434                      uint8_t* dst_v,
5435                      int width);
5436 void UYVYToUVRow_LSX(const uint8_t* src_uyvy,
5437                      int src_stride_uyvy,
5438                      uint8_t* dst_u,
5439                      uint8_t* dst_v,
5440                      int width);
5441 void UYVYToUVRow_LASX(const uint8_t* src_uyvy,
5442                       int src_stride_uyvy,
5443                       uint8_t* dst_u,
5444                       uint8_t* dst_v,
5445                       int width);
5446 void UYVYToUV422Row_MSA(const uint8_t* src_uyvy,
5447                         uint8_t* dst_u,
5448                         uint8_t* dst_v,
5449                         int width);
5450 void UYVYToUV422Row_LSX(const uint8_t* src_uyvy,
5451                         uint8_t* dst_u,
5452                         uint8_t* dst_v,
5453                         int width);
5454 void UYVYToUV422Row_LASX(const uint8_t* src_uyvy,
5455                          uint8_t* dst_u,
5456                          uint8_t* dst_v,
5457                          int width);
5458 
5459 void UYVYToYRow_C(const uint8_t* src_uyvy, uint8_t* dst_y, int width);
5460 void UYVYToUVRow_C(const uint8_t* src_uyvy,
5461                    int src_stride_uyvy,
5462                    uint8_t* dst_u,
5463                    uint8_t* dst_v,
5464                    int width);
5465 void UYVYToUV422Row_C(const uint8_t* src_uyvy,
5466                       uint8_t* dst_u,
5467                       uint8_t* dst_v,
5468                       int width);
5469 void UYVYToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5470 void UYVYToUVRow_Any_AVX2(const uint8_t* src_ptr,
5471                           int src_stride,
5472                           uint8_t* dst_u,
5473                           uint8_t* dst_v,
5474                           int width);
5475 void UYVYToUV422Row_Any_AVX2(const uint8_t* src_ptr,
5476                              uint8_t* dst_u,
5477                              uint8_t* dst_v,
5478                              int width);
5479 void UYVYToYRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5480 void UYVYToUVRow_Any_SSE2(const uint8_t* src_ptr,
5481                           int src_stride,
5482                           uint8_t* dst_u,
5483                           uint8_t* dst_v,
5484                           int width);
5485 void UYVYToUV422Row_Any_SSE2(const uint8_t* src_ptr,
5486                              uint8_t* dst_u,
5487                              uint8_t* dst_v,
5488                              int width);
5489 void UYVYToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5490 void UYVYToUVRow_Any_NEON(const uint8_t* src_ptr,
5491                           int src_stride,
5492                           uint8_t* dst_u,
5493                           uint8_t* dst_v,
5494                           int width);
5495 void UYVYToUV422Row_Any_NEON(const uint8_t* src_ptr,
5496                              uint8_t* dst_u,
5497                              uint8_t* dst_v,
5498                              int width);
5499 void UYVYToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5500 void UYVYToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5501 void UYVYToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5502 void UYVYToUVRow_Any_MSA(const uint8_t* src_ptr,
5503                          int src_stride_ptr,
5504                          uint8_t* dst_u,
5505                          uint8_t* dst_v,
5506                          int width);
5507 void UYVYToUVRow_Any_LSX(const uint8_t* src_ptr,
5508                          int src_stride_ptr,
5509                          uint8_t* dst_u,
5510                          uint8_t* dst_v,
5511                          int width);
5512 void UYVYToUVRow_Any_LASX(const uint8_t* src_ptr,
5513                           int src_stride_ptr,
5514                           uint8_t* dst_u,
5515                           uint8_t* dst_v,
5516                           int width);
5517 void UYVYToUV422Row_Any_MSA(const uint8_t* src_ptr,
5518                             uint8_t* dst_u,
5519                             uint8_t* dst_v,
5520                             int width);
5521 void UYVYToUV422Row_Any_LSX(const uint8_t* src_ptr,
5522                             uint8_t* dst_u,
5523                             uint8_t* dst_v,
5524                             int width);
5525 void UYVYToUV422Row_Any_LASX(const uint8_t* src_ptr,
5526                              uint8_t* dst_u,
5527                              uint8_t* dst_v,
5528                              int width);
5529 void SwapUVRow_C(const uint8_t* src_uv, uint8_t* dst_vu, int width);
5530 void SwapUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width);
5531 void SwapUVRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5532 void SwapUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_vu, int width);
5533 void SwapUVRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5534 void SwapUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_vu, int width);
5535 void SwapUVRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5536 void AYUVToYRow_C(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
5537 void AYUVToUVRow_C(const uint8_t* src_ayuv,
5538                    int src_stride_ayuv,
5539                    uint8_t* dst_uv,
5540                    int width);
5541 void AYUVToVURow_C(const uint8_t* src_ayuv,
5542                    int src_stride_ayuv,
5543                    uint8_t* dst_vu,
5544                    int width);
5545 void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width);
5546 void AYUVToUVRow_NEON(const uint8_t* src_ayuv,
5547                       int src_stride_ayuv,
5548                       uint8_t* dst_uv,
5549                       int width);
5550 void AYUVToVURow_NEON(const uint8_t* src_ayuv,
5551                       int src_stride_ayuv,
5552                       uint8_t* dst_vu,
5553                       int width);
5554 void AYUVToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
5555 void AYUVToUVRow_Any_NEON(const uint8_t* src_ptr,
5556                           int src_stride,
5557                           uint8_t* dst_vu,
5558                           int width);
5559 void AYUVToVURow_Any_NEON(const uint8_t* src_ptr,
5560                           int src_stride,
5561                           uint8_t* dst_vu,
5562                           int width);
5563 
5564 void I422ToYUY2Row_C(const uint8_t* src_y,
5565                      const uint8_t* src_u,
5566                      const uint8_t* src_v,
5567                      uint8_t* dst_frame,
5568                      int width);
5569 void I422ToUYVYRow_C(const uint8_t* src_y,
5570                      const uint8_t* src_u,
5571                      const uint8_t* src_v,
5572                      uint8_t* dst_frame,
5573                      int width);
5574 void I422ToYUY2Row_SSE2(const uint8_t* src_y,
5575                         const uint8_t* src_u,
5576                         const uint8_t* src_v,
5577                         uint8_t* dst_yuy2,
5578                         int width);
5579 void I422ToUYVYRow_SSE2(const uint8_t* src_y,
5580                         const uint8_t* src_u,
5581                         const uint8_t* src_v,
5582                         uint8_t* dst_uyvy,
5583                         int width);
5584 void I422ToYUY2Row_Any_SSE2(const uint8_t* y_buf,
5585                             const uint8_t* u_buf,
5586                             const uint8_t* v_buf,
5587                             uint8_t* dst_ptr,
5588                             int width);
5589 void I422ToUYVYRow_Any_SSE2(const uint8_t* y_buf,
5590                             const uint8_t* u_buf,
5591                             const uint8_t* v_buf,
5592                             uint8_t* dst_ptr,
5593                             int width);
5594 void I422ToYUY2Row_AVX2(const uint8_t* src_y,
5595                         const uint8_t* src_u,
5596                         const uint8_t* src_v,
5597                         uint8_t* dst_yuy2,
5598                         int width);
5599 void I422ToUYVYRow_AVX2(const uint8_t* src_y,
5600                         const uint8_t* src_u,
5601                         const uint8_t* src_v,
5602                         uint8_t* dst_uyvy,
5603                         int width);
5604 void I422ToYUY2Row_Any_AVX2(const uint8_t* y_buf,
5605                             const uint8_t* u_buf,
5606                             const uint8_t* v_buf,
5607                             uint8_t* dst_ptr,
5608                             int width);
5609 void I422ToUYVYRow_Any_AVX2(const uint8_t* y_buf,
5610                             const uint8_t* u_buf,
5611                             const uint8_t* v_buf,
5612                             uint8_t* dst_ptr,
5613                             int width);
5614 void I422ToYUY2Row_NEON(const uint8_t* src_y,
5615                         const uint8_t* src_u,
5616                         const uint8_t* src_v,
5617                         uint8_t* dst_yuy2,
5618                         int width);
5619 void I422ToUYVYRow_NEON(const uint8_t* src_y,
5620                         const uint8_t* src_u,
5621                         const uint8_t* src_v,
5622                         uint8_t* dst_uyvy,
5623                         int width);
5624 void I422ToYUY2Row_Any_NEON(const uint8_t* y_buf,
5625                             const uint8_t* u_buf,
5626                             const uint8_t* v_buf,
5627                             uint8_t* dst_ptr,
5628                             int width);
5629 void I422ToUYVYRow_Any_NEON(const uint8_t* y_buf,
5630                             const uint8_t* u_buf,
5631                             const uint8_t* v_buf,
5632                             uint8_t* dst_ptr,
5633                             int width);
5634 void I422ToYUY2Row_MSA(const uint8_t* src_y,
5635                        const uint8_t* src_u,
5636                        const uint8_t* src_v,
5637                        uint8_t* dst_yuy2,
5638                        int width);
5639 void I422ToYUY2Row_LSX(const uint8_t* src_y,
5640                        const uint8_t* src_u,
5641                        const uint8_t* src_v,
5642                        uint8_t* dst_yuy2,
5643                        int width);
5644 void I422ToYUY2Row_LASX(const uint8_t* src_y,
5645                         const uint8_t* src_u,
5646                         const uint8_t* src_v,
5647                         uint8_t* dst_yuy2,
5648                         int width);
5649 void I422ToUYVYRow_MSA(const uint8_t* src_y,
5650                        const uint8_t* src_u,
5651                        const uint8_t* src_v,
5652                        uint8_t* dst_uyvy,
5653                        int width);
5654 void I422ToUYVYRow_LSX(const uint8_t* src_y,
5655                        const uint8_t* src_u,
5656                        const uint8_t* src_v,
5657                        uint8_t* dst_uyvy,
5658                        int width);
5659 void I422ToUYVYRow_LASX(const uint8_t* src_y,
5660                         const uint8_t* src_u,
5661                         const uint8_t* src_v,
5662                         uint8_t* dst_uyvy,
5663                         int width);
5664 void I422ToYUY2Row_Any_MSA(const uint8_t* y_buf,
5665                            const uint8_t* u_buf,
5666                            const uint8_t* v_buf,
5667                            uint8_t* dst_ptr,
5668                            int width);
5669 void I422ToYUY2Row_Any_LSX(const uint8_t* y_buf,
5670                            const uint8_t* u_buf,
5671                            const uint8_t* v_buf,
5672                            uint8_t* dst_ptr,
5673                            int width);
5674 void I422ToYUY2Row_Any_LASX(const uint8_t* y_buf,
5675                             const uint8_t* u_buf,
5676                             const uint8_t* v_buf,
5677                             uint8_t* dst_ptr,
5678                             int width);
5679 void I422ToUYVYRow_Any_MSA(const uint8_t* y_buf,
5680                            const uint8_t* u_buf,
5681                            const uint8_t* v_buf,
5682                            uint8_t* dst_ptr,
5683                            int width);
5684 void I422ToUYVYRow_Any_LSX(const uint8_t* y_buf,
5685                            const uint8_t* u_buf,
5686                            const uint8_t* v_buf,
5687                            uint8_t* dst_ptr,
5688                            int width);
5689 void I422ToUYVYRow_Any_LASX(const uint8_t* y_buf,
5690                             const uint8_t* u_buf,
5691                             const uint8_t* v_buf,
5692                             uint8_t* dst_ptr,
5693                             int width);
5694 
5695 // Effects related row functions.
5696 void ARGBAttenuateRow_C(const uint8_t* src_argb, uint8_t* dst_argb, int width);
5697 void ARGBAttenuateRow_SSSE3(const uint8_t* src_argb,
5698                             uint8_t* dst_argb,
5699                             int width);
5700 void ARGBAttenuateRow_AVX2(const uint8_t* src_argb,
5701                            uint8_t* dst_argb,
5702                            int width);
5703 void ARGBAttenuateRow_NEON(const uint8_t* src_argb,
5704                            uint8_t* dst_argb,
5705                            int width);
5706 void ARGBAttenuateRow_MSA(const uint8_t* src_argb,
5707                           uint8_t* dst_argb,
5708                           int width);
5709 void ARGBAttenuateRow_LSX(const uint8_t* src_argb,
5710                           uint8_t* dst_argb,
5711                           int width);
5712 void ARGBAttenuateRow_LASX(const uint8_t* src_argb,
5713                            uint8_t* dst_argb,
5714                            int width);
5715 void ARGBAttenuateRow_RVV(const uint8_t* src_argb,
5716                           uint8_t* dst_argb,
5717                           int width);
5718 void ARGBAttenuateRow_Any_SSSE3(const uint8_t* src_ptr,
5719                                 uint8_t* dst_ptr,
5720                                 int width);
5721 void ARGBAttenuateRow_Any_AVX2(const uint8_t* src_ptr,
5722                                uint8_t* dst_ptr,
5723                                int width);
5724 void ARGBAttenuateRow_Any_NEON(const uint8_t* src_ptr,
5725                                uint8_t* dst_ptr,
5726                                int width);
5727 void ARGBAttenuateRow_Any_MSA(const uint8_t* src_ptr,
5728                               uint8_t* dst_ptr,
5729                               int width);
5730 void ARGBAttenuateRow_Any_LSX(const uint8_t* src_ptr,
5731                               uint8_t* dst_ptr,
5732                               int width);
5733 void ARGBAttenuateRow_Any_LASX(const uint8_t* src_ptr,
5734                                uint8_t* dst_ptr,
5735                                int width);
5736 
5737 // Inverse table for unattenuate, shared by C and SSE2.
5738 extern const uint32_t fixed_invtbl8[256];
5739 void ARGBUnattenuateRow_C(const uint8_t* src_argb,
5740                           uint8_t* dst_argb,
5741                           int width);
5742 void ARGBUnattenuateRow_SSE2(const uint8_t* src_argb,
5743                              uint8_t* dst_argb,
5744                              int width);
5745 void ARGBUnattenuateRow_AVX2(const uint8_t* src_argb,
5746                              uint8_t* dst_argb,
5747                              int width);
5748 void ARGBUnattenuateRow_Any_SSE2(const uint8_t* src_ptr,
5749                                  uint8_t* dst_ptr,
5750                                  int width);
5751 void ARGBUnattenuateRow_Any_AVX2(const uint8_t* src_ptr,
5752                                  uint8_t* dst_ptr,
5753                                  int width);
5754 
5755 void ARGBGrayRow_C(const uint8_t* src_argb, uint8_t* dst_argb, int width);
5756 void ARGBGrayRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_argb, int width);
5757 void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width);
5758 void ARGBGrayRow_MSA(const uint8_t* src_argb, uint8_t* dst_argb, int width);
5759 void ARGBGrayRow_LSX(const uint8_t* src_argb, uint8_t* dst_argb, int width);
5760 void ARGBGrayRow_LASX(const uint8_t* src_argb, uint8_t* dst_argb, int width);
5761 
5762 void ARGBSepiaRow_C(uint8_t* dst_argb, int width);
5763 void ARGBSepiaRow_SSSE3(uint8_t* dst_argb, int width);
5764 void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width);
5765 void ARGBSepiaRow_MSA(uint8_t* dst_argb, int width);
5766 void ARGBSepiaRow_LSX(uint8_t* dst_argb, int width);
5767 void ARGBSepiaRow_LASX(uint8_t* dst_argb, int width);
5768 
5769 void ARGBColorMatrixRow_C(const uint8_t* src_argb,
5770                           uint8_t* dst_argb,
5771                           const int8_t* matrix_argb,
5772                           int width);
5773 void ARGBColorMatrixRow_SSSE3(const uint8_t* src_argb,
5774                               uint8_t* dst_argb,
5775                               const int8_t* matrix_argb,
5776                               int width);
5777 void ARGBColorMatrixRow_NEON(const uint8_t* src_argb,
5778                              uint8_t* dst_argb,
5779                              const int8_t* matrix_argb,
5780                              int width);
5781 void ARGBColorMatrixRow_MSA(const uint8_t* src_argb,
5782                             uint8_t* dst_argb,
5783                             const int8_t* matrix_argb,
5784                             int width);
5785 void ARGBColorMatrixRow_LSX(const uint8_t* src_argb,
5786                             uint8_t* dst_argb,
5787                             const int8_t* matrix_argb,
5788                             int width);
5789 
5790 void ARGBColorTableRow_C(uint8_t* dst_argb,
5791                          const uint8_t* table_argb,
5792                          int width);
5793 void ARGBColorTableRow_X86(uint8_t* dst_argb,
5794                            const uint8_t* table_argb,
5795                            int width);
5796 
5797 void RGBColorTableRow_C(uint8_t* dst_argb,
5798                         const uint8_t* table_argb,
5799                         int width);
5800 void RGBColorTableRow_X86(uint8_t* dst_argb,
5801                           const uint8_t* table_argb,
5802                           int width);
5803 
5804 void ARGBQuantizeRow_C(uint8_t* dst_argb,
5805                        int scale,
5806                        int interval_size,
5807                        int interval_offset,
5808                        int width);
5809 void ARGBQuantizeRow_SSE2(uint8_t* dst_argb,
5810                           int scale,
5811                           int interval_size,
5812                           int interval_offset,
5813                           int width);
5814 void ARGBQuantizeRow_NEON(uint8_t* dst_argb,
5815                           int scale,
5816                           int interval_size,
5817                           int interval_offset,
5818                           int width);
5819 void ARGBQuantizeRow_MSA(uint8_t* dst_argb,
5820                          int scale,
5821                          int interval_size,
5822                          int interval_offset,
5823                          int width);
5824 void ARGBQuantizeRow_LSX(uint8_t* dst_argb,
5825                          int scale,
5826                          int interval_size,
5827                          int interval_offset,
5828                          int width);
5829 
5830 void ARGBShadeRow_C(const uint8_t* src_argb,
5831                     uint8_t* dst_argb,
5832                     int width,
5833                     uint32_t value);
5834 void ARGBShadeRow_SSE2(const uint8_t* src_argb,
5835                        uint8_t* dst_argb,
5836                        int width,
5837                        uint32_t value);
5838 void ARGBShadeRow_NEON(const uint8_t* src_argb,
5839                        uint8_t* dst_argb,
5840                        int width,
5841                        uint32_t value);
5842 void ARGBShadeRow_MSA(const uint8_t* src_argb,
5843                       uint8_t* dst_argb,
5844                       int width,
5845                       uint32_t value);
5846 void ARGBShadeRow_LSX(const uint8_t* src_argb,
5847                       uint8_t* dst_argb,
5848                       int width,
5849                       uint32_t value);
5850 void ARGBShadeRow_LASX(const uint8_t* src_argb,
5851                        uint8_t* dst_argb,
5852                        int width,
5853                        uint32_t value);
5854 
5855 // Used for blur.
5856 void CumulativeSumToAverageRow_SSE2(const int32_t* topleft,
5857                                     const int32_t* botleft,
5858                                     int width,
5859                                     int area,
5860                                     uint8_t* dst,
5861                                     int count);
5862 void ComputeCumulativeSumRow_SSE2(const uint8_t* row,
5863                                   int32_t* cumsum,
5864                                   const int32_t* previous_cumsum,
5865                                   int width);
5866 
5867 void CumulativeSumToAverageRow_C(const int32_t* tl,
5868                                  const int32_t* bl,
5869                                  int w,
5870                                  int area,
5871                                  uint8_t* dst,
5872                                  int count);
5873 void ComputeCumulativeSumRow_C(const uint8_t* row,
5874                                int32_t* cumsum,
5875                                const int32_t* previous_cumsum,
5876                                int width);
5877 
5878 LIBYUV_API
5879 void ARGBAffineRow_C(const uint8_t* src_argb,
5880                      int src_argb_stride,
5881                      uint8_t* dst_argb,
5882                      const float* uv_dudv,
5883                      int width);
5884 LIBYUV_API
5885 void ARGBAffineRow_SSE2(const uint8_t* src_argb,
5886                         int src_argb_stride,
5887                         uint8_t* dst_argb,
5888                         const float* src_dudv,
5889                         int width);
5890 
5891 // Used for I420Scale, ARGBScale, and ARGBInterpolate.
5892 void InterpolateRow_C(uint8_t* dst_ptr,
5893                       const uint8_t* src_ptr,
5894                       ptrdiff_t src_stride,
5895                       int width,
5896                       int source_y_fraction);
5897 void InterpolateRow_SSSE3(uint8_t* dst_ptr,
5898                           const uint8_t* src_ptr,
5899                           ptrdiff_t src_stride,
5900                           int dst_width,
5901                           int source_y_fraction);
5902 void InterpolateRow_AVX2(uint8_t* dst_ptr,
5903                          const uint8_t* src_ptr,
5904                          ptrdiff_t src_stride,
5905                          int dst_width,
5906                          int source_y_fraction);
5907 void InterpolateRow_NEON(uint8_t* dst_ptr,
5908                          const uint8_t* src_ptr,
5909                          ptrdiff_t src_stride,
5910                          int dst_width,
5911                          int source_y_fraction);
5912 void InterpolateRow_MSA(uint8_t* dst_ptr,
5913                         const uint8_t* src_ptr,
5914                         ptrdiff_t src_stride,
5915                         int width,
5916                         int source_y_fraction);
5917 void InterpolateRow_LSX(uint8_t* dst_ptr,
5918                         const uint8_t* src_ptr,
5919                         ptrdiff_t src_stride,
5920                         int width,
5921                         int source_y_fraction);
5922 void InterpolateRow_RVV(uint8_t* dst_ptr,
5923                         const uint8_t* src_ptr,
5924                         ptrdiff_t src_stride,
5925                         int width,
5926                         int source_y_fraction);
5927 void InterpolateRow_Any_NEON(uint8_t* dst_ptr,
5928                              const uint8_t* src_ptr,
5929                              ptrdiff_t src_stride_ptr,
5930                              int width,
5931                              int source_y_fraction);
5932 void InterpolateRow_Any_SSSE3(uint8_t* dst_ptr,
5933                               const uint8_t* src_ptr,
5934                               ptrdiff_t src_stride_ptr,
5935                               int width,
5936                               int source_y_fraction);
5937 void InterpolateRow_Any_AVX2(uint8_t* dst_ptr,
5938                              const uint8_t* src_ptr,
5939                              ptrdiff_t src_stride_ptr,
5940                              int width,
5941                              int source_y_fraction);
5942 void InterpolateRow_Any_MSA(uint8_t* dst_ptr,
5943                             const uint8_t* src_ptr,
5944                             ptrdiff_t src_stride_ptr,
5945                             int width,
5946                             int source_y_fraction);
5947 void InterpolateRow_Any_LSX(uint8_t* dst_ptr,
5948                             const uint8_t* src_ptr,
5949                             ptrdiff_t src_stride_ptr,
5950                             int width,
5951                             int source_y_fraction);
5952 
5953 void InterpolateRow_16_C(uint16_t* dst_ptr,
5954                          const uint16_t* src_ptr,
5955                          ptrdiff_t src_stride,
5956                          int width,
5957                          int source_y_fraction);
5958 void InterpolateRow_16_NEON(uint16_t* dst_ptr,
5959                             const uint16_t* src_ptr,
5960                             ptrdiff_t src_stride,
5961                             int width,
5962                             int source_y_fraction);
5963 void InterpolateRow_16_Any_NEON(uint16_t* dst_ptr,
5964                                 const uint16_t* src_ptr,
5965                                 ptrdiff_t src_stride,
5966                                 int width,
5967                                 int source_y_fraction);
5968 
5969 void InterpolateRow_16To8_C(uint8_t* dst_ptr,
5970                             const uint16_t* src_ptr,
5971                             ptrdiff_t src_stride,
5972                             int scale,
5973                             int width,
5974                             int source_y_fraction);
5975 void InterpolateRow_16To8_NEON(uint8_t* dst_ptr,
5976                                const uint16_t* src_ptr,
5977                                ptrdiff_t src_stride,
5978                                int scale,
5979                                int width,
5980                                int source_y_fraction);
5981 void InterpolateRow_16To8_Any_NEON(uint8_t* dst_ptr,
5982                                    const uint16_t* src_ptr,
5983                                    ptrdiff_t src_stride,
5984                                    int scale,
5985                                    int width,
5986                                    int source_y_fraction);
5987 void InterpolateRow_16To8_AVX2(uint8_t* dst_ptr,
5988                                const uint16_t* src_ptr,
5989                                ptrdiff_t src_stride,
5990                                int scale,
5991                                int width,
5992                                int source_y_fraction);
5993 void InterpolateRow_16To8_Any_AVX2(uint8_t* dst_ptr,
5994                                    const uint16_t* src_ptr,
5995                                    ptrdiff_t src_stride,
5996                                    int scale,
5997                                    int width,
5998                                    int source_y_fraction);
5999 
6000 // Sobel images.
6001 void SobelXRow_C(const uint8_t* src_y0,
6002                  const uint8_t* src_y1,
6003                  const uint8_t* src_y2,
6004                  uint8_t* dst_sobelx,
6005                  int width);
6006 void SobelXRow_SSE2(const uint8_t* src_y0,
6007                     const uint8_t* src_y1,
6008                     const uint8_t* src_y2,
6009                     uint8_t* dst_sobelx,
6010                     int width);
6011 void SobelXRow_NEON(const uint8_t* src_y0,
6012                     const uint8_t* src_y1,
6013                     const uint8_t* src_y2,
6014                     uint8_t* dst_sobelx,
6015                     int width);
6016 void SobelXRow_MSA(const uint8_t* src_y0,
6017                    const uint8_t* src_y1,
6018                    const uint8_t* src_y2,
6019                    uint8_t* dst_sobelx,
6020                    int width);
6021 void SobelYRow_C(const uint8_t* src_y0,
6022                  const uint8_t* src_y1,
6023                  uint8_t* dst_sobely,
6024                  int width);
6025 void SobelYRow_SSE2(const uint8_t* src_y0,
6026                     const uint8_t* src_y1,
6027                     uint8_t* dst_sobely,
6028                     int width);
6029 void SobelYRow_NEON(const uint8_t* src_y0,
6030                     const uint8_t* src_y1,
6031                     uint8_t* dst_sobely,
6032                     int width);
6033 void SobelYRow_MSA(const uint8_t* src_y0,
6034                    const uint8_t* src_y1,
6035                    uint8_t* dst_sobely,
6036                    int width);
6037 void SobelRow_C(const uint8_t* src_sobelx,
6038                 const uint8_t* src_sobely,
6039                 uint8_t* dst_argb,
6040                 int width);
6041 void SobelRow_SSE2(const uint8_t* src_sobelx,
6042                    const uint8_t* src_sobely,
6043                    uint8_t* dst_argb,
6044                    int width);
6045 void SobelRow_NEON(const uint8_t* src_sobelx,
6046                    const uint8_t* src_sobely,
6047                    uint8_t* dst_argb,
6048                    int width);
6049 void SobelRow_MSA(const uint8_t* src_sobelx,
6050                   const uint8_t* src_sobely,
6051                   uint8_t* dst_argb,
6052                   int width);
6053 void SobelRow_LSX(const uint8_t* src_sobelx,
6054                   const uint8_t* src_sobely,
6055                   uint8_t* dst_argb,
6056                   int width);
6057 void SobelToPlaneRow_C(const uint8_t* src_sobelx,
6058                        const uint8_t* src_sobely,
6059                        uint8_t* dst_y,
6060                        int width);
6061 void SobelToPlaneRow_SSE2(const uint8_t* src_sobelx,
6062                           const uint8_t* src_sobely,
6063                           uint8_t* dst_y,
6064                           int width);
6065 void SobelToPlaneRow_NEON(const uint8_t* src_sobelx,
6066                           const uint8_t* src_sobely,
6067                           uint8_t* dst_y,
6068                           int width);
6069 void SobelToPlaneRow_MSA(const uint8_t* src_sobelx,
6070                          const uint8_t* src_sobely,
6071                          uint8_t* dst_y,
6072                          int width);
6073 void SobelToPlaneRow_LSX(const uint8_t* src_sobelx,
6074                          const uint8_t* src_sobely,
6075                          uint8_t* dst_y,
6076                          int width);
6077 void SobelXYRow_C(const uint8_t* src_sobelx,
6078                   const uint8_t* src_sobely,
6079                   uint8_t* dst_argb,
6080                   int width);
6081 void SobelXYRow_SSE2(const uint8_t* src_sobelx,
6082                      const uint8_t* src_sobely,
6083                      uint8_t* dst_argb,
6084                      int width);
6085 void SobelXYRow_NEON(const uint8_t* src_sobelx,
6086                      const uint8_t* src_sobely,
6087                      uint8_t* dst_argb,
6088                      int width);
6089 void SobelXYRow_MSA(const uint8_t* src_sobelx,
6090                     const uint8_t* src_sobely,
6091                     uint8_t* dst_argb,
6092                     int width);
6093 void SobelXYRow_LSX(const uint8_t* src_sobelx,
6094                     const uint8_t* src_sobely,
6095                     uint8_t* dst_argb,
6096                     int width);
6097 void SobelRow_Any_SSE2(const uint8_t* y_buf,
6098                        const uint8_t* uv_buf,
6099                        uint8_t* dst_ptr,
6100                        int width);
6101 void SobelRow_Any_NEON(const uint8_t* y_buf,
6102                        const uint8_t* uv_buf,
6103                        uint8_t* dst_ptr,
6104                        int width);
6105 void SobelRow_Any_MSA(const uint8_t* y_buf,
6106                       const uint8_t* uv_buf,
6107                       uint8_t* dst_ptr,
6108                       int width);
6109 void SobelRow_Any_LSX(const uint8_t* y_buf,
6110                       const uint8_t* uv_buf,
6111                       uint8_t* dst_ptr,
6112                       int width);
6113 void SobelToPlaneRow_Any_SSE2(const uint8_t* y_buf,
6114                               const uint8_t* uv_buf,
6115                               uint8_t* dst_ptr,
6116                               int width);
6117 void SobelToPlaneRow_Any_NEON(const uint8_t* y_buf,
6118                               const uint8_t* uv_buf,
6119                               uint8_t* dst_ptr,
6120                               int width);
6121 void SobelToPlaneRow_Any_MSA(const uint8_t* y_buf,
6122                              const uint8_t* uv_buf,
6123                              uint8_t* dst_ptr,
6124                              int width);
6125 void SobelToPlaneRow_Any_LSX(const uint8_t* y_buf,
6126                              const uint8_t* uv_buf,
6127                              uint8_t* dst_ptr,
6128                              int width);
6129 void SobelXYRow_Any_SSE2(const uint8_t* y_buf,
6130                          const uint8_t* uv_buf,
6131                          uint8_t* dst_ptr,
6132                          int width);
6133 void SobelXYRow_Any_NEON(const uint8_t* y_buf,
6134                          const uint8_t* uv_buf,
6135                          uint8_t* dst_ptr,
6136                          int width);
6137 void SobelXYRow_Any_MSA(const uint8_t* y_buf,
6138                         const uint8_t* uv_buf,
6139                         uint8_t* dst_ptr,
6140                         int width);
6141 void SobelXYRow_Any_LSX(const uint8_t* y_buf,
6142                         const uint8_t* uv_buf,
6143                         uint8_t* dst_ptr,
6144                         int width);
6145 
6146 void ARGBPolynomialRow_C(const uint8_t* src_argb,
6147                          uint8_t* dst_argb,
6148                          const float* poly,
6149                          int width);
6150 void ARGBPolynomialRow_SSE2(const uint8_t* src_argb,
6151                             uint8_t* dst_argb,
6152                             const float* poly,
6153                             int width);
6154 void ARGBPolynomialRow_AVX2(const uint8_t* src_argb,
6155                             uint8_t* dst_argb,
6156                             const float* poly,
6157                             int width);
6158 
6159 // Scale and convert to half float.
6160 void HalfFloatRow_C(const uint16_t* src, uint16_t* dst, float scale, int width);
6161 void HalfFloatRow_SSE2(const uint16_t* src,
6162                        uint16_t* dst,
6163                        float scale,
6164                        int width);
6165 void HalfFloatRow_Any_SSE2(const uint16_t* src_ptr,
6166                            uint16_t* dst_ptr,
6167                            float param,
6168                            int width);
6169 void HalfFloatRow_AVX2(const uint16_t* src,
6170                        uint16_t* dst,
6171                        float scale,
6172                        int width);
6173 void HalfFloatRow_Any_AVX2(const uint16_t* src_ptr,
6174                            uint16_t* dst_ptr,
6175                            float param,
6176                            int width);
6177 void HalfFloatRow_F16C(const uint16_t* src,
6178                        uint16_t* dst,
6179                        float scale,
6180                        int width);
6181 void HalfFloatRow_Any_F16C(const uint16_t* src,
6182                            uint16_t* dst,
6183                            float scale,
6184                            int width);
6185 void HalfFloat1Row_F16C(const uint16_t* src,
6186                         uint16_t* dst,
6187                         float scale,
6188                         int width);
6189 void HalfFloat1Row_Any_F16C(const uint16_t* src,
6190                             uint16_t* dst,
6191                             float scale,
6192                             int width);
6193 void HalfFloatRow_NEON(const uint16_t* src,
6194                        uint16_t* dst,
6195                        float scale,
6196                        int width);
6197 void HalfFloatRow_Any_NEON(const uint16_t* src_ptr,
6198                            uint16_t* dst_ptr,
6199                            float param,
6200                            int width);
6201 void HalfFloat1Row_NEON(const uint16_t* src,
6202                         uint16_t* dst,
6203                         float scale,
6204                         int width);
6205 void HalfFloat1Row_Any_NEON(const uint16_t* src_ptr,
6206                             uint16_t* dst_ptr,
6207                             float param,
6208                             int width);
6209 void HalfFloatRow_MSA(const uint16_t* src,
6210                       uint16_t* dst,
6211                       float scale,
6212                       int width);
6213 void HalfFloatRow_Any_MSA(const uint16_t* src_ptr,
6214                           uint16_t* dst_ptr,
6215                           float param,
6216                           int width);
6217 void HalfFloatRow_LSX(const uint16_t* src,
6218                       uint16_t* dst,
6219                       float scale,
6220                       int width);
6221 void HalfFloatRow_Any_LSX(const uint16_t* src_ptr,
6222                           uint16_t* dst_ptr,
6223                           float param,
6224                           int width);
6225 void ByteToFloatRow_C(const uint8_t* src, float* dst, float scale, int width);
6226 void ByteToFloatRow_NEON(const uint8_t* src,
6227                          float* dst,
6228                          float scale,
6229                          int width);
6230 void ByteToFloatRow_Any_NEON(const uint8_t* src_ptr,
6231                              float* dst_ptr,
6232                              float param,
6233                              int width);
6234 // Convert FP16 Half Floats to FP32 Floats
6235 void ConvertFP16ToFP32Row_NEON(const uint16_t* src,  // fp16
6236                                float* dst,
6237                                int width);
6238 // Convert a column of FP16 Half Floats to a row of FP32 Floats
6239 void ConvertFP16ToFP32Column_NEON(const uint16_t* src,  // fp16
6240                                   int src_stride,       // stride in elements
6241                                   float* dst,
6242                                   int width);
6243 // Convert FP32 Floats to FP16 Half Floats
6244 void ConvertFP32ToFP16Row_NEON(const float* src,
6245                                uint16_t* dst,  // fp16
6246                                int width);
6247 void ARGBLumaColorTableRow_C(const uint8_t* src_argb,
6248                              uint8_t* dst_argb,
6249                              int width,
6250                              const uint8_t* luma,
6251                              uint32_t lumacoeff);
6252 void ARGBLumaColorTableRow_SSSE3(const uint8_t* src_argb,
6253                                  uint8_t* dst_argb,
6254                                  int width,
6255                                  const uint8_t* luma,
6256                                  uint32_t lumacoeff);
6257 
6258 float ScaleMaxSamples_C(const float* src, float* dst, float scale, int width);
6259 float ScaleMaxSamples_NEON(const float* src,
6260                            float* dst,
6261                            float scale,
6262                            int width);
6263 float ScaleSumSamples_C(const float* src, float* dst, float scale, int width);
6264 float ScaleSumSamples_NEON(const float* src,
6265                            float* dst,
6266                            float scale,
6267                            int width);
6268 void ScaleSamples_C(const float* src, float* dst, float scale, int width);
6269 void ScaleSamples_NEON(const float* src, float* dst, float scale, int width);
6270 
6271 void GaussRow_F32_NEON(const float* src, float* dst, int width);
6272 void GaussRow_F32_C(const float* src, float* dst, int width);
6273 
6274 void GaussCol_F32_NEON(const float* src0,
6275                        const float* src1,
6276                        const float* src2,
6277                        const float* src3,
6278                        const float* src4,
6279                        float* dst,
6280                        int width);
6281 
6282 void GaussCol_F32_C(const float* src0,
6283                     const float* src1,
6284                     const float* src2,
6285                     const float* src3,
6286                     const float* src4,
6287                     float* dst,
6288                     int width);
6289 
6290 void GaussRow_C(const uint32_t* src, uint16_t* dst, int width);
6291 void GaussCol_C(const uint16_t* src0,
6292                 const uint16_t* src1,
6293                 const uint16_t* src2,
6294                 const uint16_t* src3,
6295                 const uint16_t* src4,
6296                 uint32_t* dst,
6297                 int width);
6298 
6299 void ClampFloatToZero_SSE2(const float* src_x, float* dst_y, int width);
6300 
6301 #ifdef __cplusplus
6302 }  // extern "C"
6303 }  // namespace libyuv
6304 #endif
6305 
6306 #endif  // INCLUDE_LIBYUV_ROW_H_
6307