cdf6cecb0d845bff835079e5164cdf796fd5cf5a
[platform/framework/web/crosswalk.git] / src / third_party / libyuv / include / libyuv / row.h
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_  // NOLINT
12 #define INCLUDE_LIBYUV_ROW_H_
13
14 #include <stdlib.h>  // For malloc.
15
16 #include "libyuv/basic_types.h"
17
18 #if defined(__native_client__)
19 #include "ppapi/c/pp_macros.h"  // For PPAPI_RELEASE
20 #endif
21
22 #ifdef __cplusplus
23 namespace libyuv {
24 extern "C" {
25 #endif
26
27 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
28
29 #ifdef __cplusplus
30 #define align_buffer_64(var, size)                                             \
31   uint8* var##_mem = reinterpret_cast<uint8*>(malloc((size) + 63));            \
32   uint8* var = reinterpret_cast<uint8*>                                        \
33       ((reinterpret_cast<intptr_t>(var##_mem) + 63) & ~63)
34 #else
35 #define align_buffer_64(var, size)                                             \
36   uint8* var##_mem = (uint8*)(malloc((size) + 63));               /* NOLINT */ \
37   uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63)       /* NOLINT */
38 #endif
39
40 #define free_aligned_buffer_64(var) \
41   free(var##_mem);  \
42   var = 0
43
44 #if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
45     defined(TARGET_IPHONE_SIMULATOR) || \
46     (defined(_MSC_VER) && defined(__clang__))
47 #define LIBYUV_DISABLE_X86
48 #endif
49 // True if compiling for SSSE3 as a requirement.
50 #if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3))
51 #define LIBYUV_SSSE3_ONLY
52 #endif
53
54 // Enable for NaCL pepper 33 for bundle and AVX2 support.
55 #if defined(__native_client__) && PPAPI_RELEASE >= 33
56 #define NEW_BINUTILS
57 #endif
58 #if defined(__native_client__) && defined(__arm__) && PPAPI_RELEASE < 37
59 #define LIBYUV_DISABLE_NEON
60 #endif
61
62 // The following are available on all x86 platforms:
63 #if !defined(LIBYUV_DISABLE_X86) && \
64     (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
65 // Effects:
66 #define HAS_ARGBADDROW_SSE2
67 #define HAS_ARGBAFFINEROW_SSE2
68 #define HAS_ARGBATTENUATEROW_SSSE3
69 #define HAS_ARGBBLENDROW_SSSE3
70 #define HAS_ARGBCOLORMATRIXROW_SSSE3
71 #define HAS_ARGBCOLORTABLEROW_X86
72 #define HAS_ARGBCOPYALPHAROW_SSE2
73 #define HAS_ARGBCOPYYTOALPHAROW_SSE2
74 #define HAS_ARGBGRAYROW_SSSE3
75 #define HAS_ARGBLUMACOLORTABLEROW_SSSE3
76 #define HAS_ARGBMIRRORROW_SSSE3
77 #define HAS_ARGBMULTIPLYROW_SSE2
78 #define HAS_ARGBPOLYNOMIALROW_SSE2
79 #define HAS_ARGBQUANTIZEROW_SSE2
80 #define HAS_ARGBSEPIAROW_SSSE3
81 #define HAS_ARGBSHADEROW_SSE2
82 #define HAS_ARGBSUBTRACTROW_SSE2
83 #define HAS_ARGBTOUVROW_SSSE3
84 #define HAS_ARGBUNATTENUATEROW_SSE2
85 #define HAS_COMPUTECUMULATIVESUMROW_SSE2
86 #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
87 #define HAS_INTERPOLATEROW_SSE2
88 #define HAS_INTERPOLATEROW_SSSE3
89 #define HAS_RGBCOLORTABLEROW_X86
90 #define HAS_SOBELROW_SSE2
91 #define HAS_SOBELTOPLANEROW_SSE2
92 #define HAS_SOBELXROW_SSE2
93 #define HAS_SOBELXYROW_SSE2
94 #define HAS_SOBELYROW_SSE2
95
96 // Conversions:
97 #define HAS_ABGRTOUVROW_SSSE3
98 #define HAS_ABGRTOYROW_SSSE3
99 #define HAS_ARGB1555TOARGBROW_SSE2
100 #define HAS_ARGB4444TOARGBROW_SSE2
101 #define HAS_ARGBSHUFFLEROW_SSE2
102 #define HAS_ARGBSHUFFLEROW_SSSE3
103 #define HAS_ARGBTOARGB1555ROW_SSE2
104 #define HAS_ARGBTOARGB4444ROW_SSE2
105 #define HAS_ARGBTOBAYERGGROW_SSE2
106 #define HAS_ARGBTOBAYERROW_SSSE3
107 #define HAS_ARGBTORAWROW_SSSE3
108 #define HAS_ARGBTORGB24ROW_SSSE3
109 #define HAS_ARGBTORGB565ROW_SSE2
110 #define HAS_ARGBTOUV422ROW_SSSE3
111 #define HAS_ARGBTOUV444ROW_SSSE3
112 #define HAS_ARGBTOUVJROW_SSSE3
113 #define HAS_ARGBTOYJROW_SSSE3
114 #define HAS_ARGBTOYROW_SSSE3
115 #define HAS_BGRATOUVROW_SSSE3
116 #define HAS_BGRATOYROW_SSSE3
117 #define HAS_COPYROW_ERMS
118 #define HAS_COPYROW_SSE2
119 #define HAS_COPYROW_X86
120 #define HAS_HALFROW_SSE2
121 #define HAS_I400TOARGBROW_SSE2
122 #define HAS_I411TOARGBROW_SSSE3
123 #define HAS_I422TOARGB1555ROW_SSSE3
124 #define HAS_I422TOABGRROW_SSSE3
125 #define HAS_I422TOARGB1555ROW_SSSE3
126 #define HAS_I422TOARGB4444ROW_SSSE3
127 #define HAS_I422TOARGBROW_SSSE3
128 #define HAS_I422TOBGRAROW_SSSE3
129 #define HAS_I422TORAWROW_SSSE3
130 #define HAS_I422TORGB24ROW_SSSE3
131 #define HAS_I422TORGB565ROW_SSSE3
132 #define HAS_I422TORGBAROW_SSSE3
133 #define HAS_I422TOUYVYROW_SSE2
134 #define HAS_I422TOYUY2ROW_SSE2
135 #define HAS_I444TOARGBROW_SSSE3
136 #define HAS_MERGEUVROW_SSE2
137 #define HAS_MIRRORROW_SSE2
138 #define HAS_MIRRORROW_SSSE3
139 #define HAS_MIRRORROW_UV_SSSE3
140 #define HAS_MIRRORUVROW_SSSE3
141 #define HAS_NV12TOARGBROW_SSSE3
142 #define HAS_NV12TORGB565ROW_SSSE3
143 #define HAS_NV21TOARGBROW_SSSE3
144 #define HAS_NV21TORGB565ROW_SSSE3
145 #define HAS_RAWTOARGBROW_SSSE3
146 #define HAS_RAWTOYROW_SSSE3
147 #define HAS_RGB24TOARGBROW_SSSE3
148 #define HAS_RGB24TOYROW_SSSE3
149 #define HAS_RGB565TOARGBROW_SSE2
150 #define HAS_RGBATOUVROW_SSSE3
151 #define HAS_RGBATOYROW_SSSE3
152 #define HAS_SETROW_X86
153 #define HAS_SPLITUVROW_SSE2
154 #define HAS_UYVYTOARGBROW_SSSE3
155 #define HAS_UYVYTOUV422ROW_SSE2
156 #define HAS_UYVYTOUVROW_SSE2
157 #define HAS_UYVYTOYROW_SSE2
158 #define HAS_YTOARGBROW_SSE2
159 #define HAS_YUY2TOARGBROW_SSSE3
160 #define HAS_YUY2TOUV422ROW_SSE2
161 #define HAS_YUY2TOUVROW_SSE2
162 #define HAS_YUY2TOYROW_SSE2
163 #endif
164
165 // The following are available on x64 Visual C:
166 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64)
167 #define HAS_I422TOARGBROW_SSSE3
168 #endif
169
170 // GCC >= 4.7.0 required for AVX2.
171 #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
172 #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
173 #define GCC_HAS_AVX2 1
174 #endif  // GNUC >= 4.7
175 #endif  // __GNUC__
176
177 // clang >= 3.4.0 required for AVX2.
178 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
179 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
180 #define CLANG_HAS_AVX2 1
181 #endif  // clang >= 3.4
182 #endif  // __clang__
183
184 // Visual C 2012 required for AVX2.
185 #if defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1700
186 #define VISUALC_HAS_AVX2 1
187 #endif  // VisualStudio >= 2012
188
189 // The following are available on all x86 platforms, but
190 // require VS2012, clang 3.4 or gcc 4.7.
191 // The code supports NaCL but requires a new compiler and validator.
192 #if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \
193     defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
194 // Effects:
195 #define HAS_ARGBPOLYNOMIALROW_AVX2
196 #define HAS_ARGBSHUFFLEROW_AVX2
197 #define HAS_ARGBCOPYALPHAROW_AVX2
198 #define HAS_ARGBCOPYYTOALPHAROW_AVX2
199 #endif
200
201 // The following are require VS2012.
202 // TODO(fbarchard): Port to gcc.
203 #if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
204 #define HAS_ARGBTOUVROW_AVX2
205 #define HAS_ARGBTOYJROW_AVX2
206 #define HAS_ARGBTOYROW_AVX2
207 #define HAS_HALFROW_AVX2
208 #define HAS_I422TOARGBROW_AVX2
209 #define HAS_INTERPOLATEROW_AVX2
210 #define HAS_MERGEUVROW_AVX2
211 #define HAS_MIRRORROW_AVX2
212 #define HAS_SPLITUVROW_AVX2
213 #define HAS_UYVYTOUV422ROW_AVX2
214 #define HAS_UYVYTOUVROW_AVX2
215 #define HAS_UYVYTOYROW_AVX2
216 #define HAS_YUY2TOUV422ROW_AVX2
217 #define HAS_YUY2TOUVROW_AVX2
218 #define HAS_YUY2TOYROW_AVX2
219
220 // Effects:
221 #define HAS_ARGBADDROW_AVX2
222 #define HAS_ARGBATTENUATEROW_AVX2
223 #define HAS_ARGBMIRRORROW_AVX2
224 #define HAS_ARGBMULTIPLYROW_AVX2
225 #define HAS_ARGBSUBTRACTROW_AVX2
226 #define HAS_ARGBUNATTENUATEROW_AVX2
227 #endif  // defined(VISUALC_HAS_AVX2)
228
229 // The following are Yasm x86 only:
230 // TODO(fbarchard): Port AVX2 to inline.
231 #if !defined(LIBYUV_DISABLE_X86) && defined(HAVE_YASM)
232     (defined(_M_IX86) || defined(_M_X64) || \
233     defined(__x86_64__) || defined(__i386__))
234 #define HAS_MERGEUVROW_AVX2
235 #define HAS_MERGEUVROW_MMX
236 #define HAS_SPLITUVROW_AVX2
237 #define HAS_SPLITUVROW_MMX
238 #define HAS_UYVYTOYROW_AVX2
239 #define HAS_UYVYTOYROW_MMX
240 #define HAS_YUY2TOYROW_AVX2
241 #define HAS_YUY2TOYROW_MMX
242 #endif
243
244 // The following are disabled when SSSE3 is available:
245 #if !defined(LIBYUV_DISABLE_X86) && \
246     (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) && \
247     !defined(LIBYUV_SSSE3_ONLY)
248 #define HAS_ARGBBLENDROW_SSE2
249 #define HAS_ARGBATTENUATEROW_SSE2
250 #define HAS_MIRRORROW_SSE2
251 #endif
252
253 // The following are available on Neon platforms:
254 #if !defined(LIBYUV_DISABLE_NEON) && \
255     (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
256 #define HAS_ABGRTOUVROW_NEON
257 #define HAS_ABGRTOYROW_NEON
258 #define HAS_ARGB1555TOARGBROW_NEON
259 #define HAS_ARGB1555TOUVROW_NEON
260 #define HAS_ARGB1555TOYROW_NEON
261 #define HAS_ARGB4444TOARGBROW_NEON
262 #define HAS_ARGB4444TOUVROW_NEON
263 #define HAS_ARGB4444TOYROW_NEON
264 #define HAS_ARGBTOARGB1555ROW_NEON
265 #define HAS_ARGBTOARGB4444ROW_NEON
266 #define HAS_ARGBTOBAYERROW_NEON
267 #define HAS_ARGBTOBAYERGGROW_NEON
268 #define HAS_ARGBTORAWROW_NEON
269 #define HAS_ARGBTORGB24ROW_NEON
270 #define HAS_ARGBTORGB565ROW_NEON
271 #define HAS_ARGBTOUV411ROW_NEON
272 #define HAS_ARGBTOUV422ROW_NEON
273 #define HAS_ARGBTOUV444ROW_NEON
274 #define HAS_ARGBTOUVROW_NEON
275 #define HAS_ARGBTOUVJROW_NEON
276 #define HAS_ARGBTOYROW_NEON
277 #define HAS_ARGBTOYJROW_NEON
278 #define HAS_BGRATOUVROW_NEON
279 #define HAS_BGRATOYROW_NEON
280 #define HAS_COPYROW_NEON
281 #define HAS_HALFROW_NEON
282 #define HAS_I400TOARGBROW_NEON
283 #define HAS_I411TOARGBROW_NEON
284 #define HAS_I422TOABGRROW_NEON
285 #define HAS_I422TOARGB1555ROW_NEON
286 #define HAS_I422TOARGB4444ROW_NEON
287 #define HAS_I422TOARGBROW_NEON
288 #define HAS_I422TOBGRAROW_NEON
289 #define HAS_I422TORAWROW_NEON
290 #define HAS_I422TORGB24ROW_NEON
291 #define HAS_I422TORGB565ROW_NEON
292 #define HAS_I422TORGBAROW_NEON
293 #define HAS_I422TOUYVYROW_NEON
294 #define HAS_I422TOYUY2ROW_NEON
295 #define HAS_I444TOARGBROW_NEON
296 #define HAS_MERGEUVROW_NEON
297 #define HAS_MIRRORROW_NEON
298 #define HAS_MIRRORUVROW_NEON
299 #define HAS_NV12TOARGBROW_NEON
300 #define HAS_NV12TORGB565ROW_NEON
301 #define HAS_NV21TOARGBROW_NEON
302 #define HAS_NV21TORGB565ROW_NEON
303 #define HAS_RAWTOARGBROW_NEON
304 #define HAS_RAWTOUVROW_NEON
305 #define HAS_RAWTOYROW_NEON
306 #define HAS_RGB24TOARGBROW_NEON
307 #define HAS_RGB24TOUVROW_NEON
308 #define HAS_RGB24TOYROW_NEON
309 #define HAS_RGB565TOARGBROW_NEON
310 #define HAS_RGB565TOUVROW_NEON
311 #define HAS_RGB565TOYROW_NEON
312 #define HAS_RGBATOUVROW_NEON
313 #define HAS_RGBATOYROW_NEON
314 #define HAS_SETROW_NEON
315 #define HAS_SPLITUVROW_NEON
316 #define HAS_UYVYTOARGBROW_NEON
317 #define HAS_UYVYTOUV422ROW_NEON
318 #define HAS_UYVYTOUVROW_NEON
319 #define HAS_UYVYTOYROW_NEON
320 #define HAS_YTOARGBROW_NEON
321 #define HAS_YUY2TOARGBROW_NEON
322 #define HAS_YUY2TOUV422ROW_NEON
323 #define HAS_YUY2TOUVROW_NEON
324 #define HAS_YUY2TOYROW_NEON
325
326 // Effects:
327 #define HAS_ARGBADDROW_NEON
328 #define HAS_ARGBATTENUATEROW_NEON
329 #define HAS_ARGBBLENDROW_NEON
330 #define HAS_ARGBGRAYROW_NEON
331 #define HAS_ARGBMIRRORROW_NEON
332 #define HAS_ARGBMULTIPLYROW_NEON
333 #define HAS_ARGBQUANTIZEROW_NEON
334 #define HAS_ARGBSEPIAROW_NEON
335 #define HAS_ARGBSHADEROW_NEON
336 #define HAS_ARGBSUBTRACTROW_NEON
337 #define HAS_SOBELROW_NEON
338 #define HAS_SOBELTOPLANEROW_NEON
339 #define HAS_SOBELXYROW_NEON
340 #define HAS_SOBELXROW_NEON
341 #define HAS_SOBELYROW_NEON
342 #define HAS_INTERPOLATEROW_NEON
343 // TODO(fbarchard): Investigate neon unittest failure.
344 // #define HAS_ARGBCOLORMATRIXROW_NEON
345 #endif
346
347 // The following are available on Mips platforms:
348 #if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \
349     (_MIPS_SIM == _MIPS_SIM_ABI32)
350 #define HAS_COPYROW_MIPS
351 #if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
352 #define HAS_I422TOABGRROW_MIPS_DSPR2
353 #define HAS_I422TOARGBROW_MIPS_DSPR2
354 #define HAS_I422TOBGRAROW_MIPS_DSPR2
355 #define HAS_INTERPOLATEROWS_MIPS_DSPR2
356 #define HAS_MIRRORROW_MIPS_DSPR2
357 #define HAS_MIRRORUVROW_MIPS_DSPR2
358 #define HAS_SPLITUVROW_MIPS_DSPR2
359 #endif
360 #endif
361
362 #if defined(_MSC_VER) && !defined(__CLR_VER)
363 #define SIMD_ALIGNED(var) __declspec(align(16)) var
364 typedef __declspec(align(16)) int16 vec16[8];
365 typedef __declspec(align(16)) int32 vec32[4];
366 typedef __declspec(align(16)) int8 vec8[16];
367 typedef __declspec(align(16)) uint16 uvec16[8];
368 typedef __declspec(align(16)) uint32 uvec32[4];
369 typedef __declspec(align(16)) uint8 uvec8[16];
370 typedef __declspec(align(32)) int16 lvec16[16];
371 typedef __declspec(align(32)) int32 lvec32[8];
372 typedef __declspec(align(32)) int8 lvec8[32];
373 typedef __declspec(align(32)) uint16 ulvec16[16];
374 typedef __declspec(align(32)) uint32 ulvec32[8];
375 typedef __declspec(align(32)) uint8 ulvec8[32];
376
377 #elif defined(__GNUC__)
378 // Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
379 #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
380 typedef int16 __attribute__((vector_size(16))) vec16;
381 typedef int32 __attribute__((vector_size(16))) vec32;
382 typedef int8 __attribute__((vector_size(16))) vec8;
383 typedef uint16 __attribute__((vector_size(16))) uvec16;
384 typedef uint32 __attribute__((vector_size(16))) uvec32;
385 typedef uint8 __attribute__((vector_size(16))) uvec8;
386 #else
387 #define SIMD_ALIGNED(var) var
388 typedef int16 vec16[8];
389 typedef int32 vec32[4];
390 typedef int8 vec8[16];
391 typedef uint16 uvec16[8];
392 typedef uint32 uvec32[4];
393 typedef uint8 uvec8[16];
394 #endif
395
396 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__)
397 #define OMITFP
398 #else
399 #define OMITFP __attribute__((optimize("omit-frame-pointer")))
400 #endif
401
402 // NaCL macros for GCC x86 and x64.
403
404 // TODO(nfullagar): When pepper_33 toolchain is distributed, default to
405 // NEW_BINUTILS and remove all BUNDLEALIGN occurances.
406 #if defined(__native_client__)
407 #define LABELALIGN ".p2align 5\n"
408 #else
409 #define LABELALIGN ".p2align 2\n"
410 #endif
411 #if defined(__native_client__) && defined(__x86_64__)
412 #if defined(NEW_BINUTILS)
413 #define BUNDLELOCK ".bundle_lock\n"
414 #define BUNDLEUNLOCK ".bundle_unlock\n"
415 #define BUNDLEALIGN "\n"
416 #else
417 #define BUNDLELOCK "\n"
418 #define BUNDLEUNLOCK "\n"
419 #define BUNDLEALIGN ".p2align 5\n"
420 #endif
421 #define MEMACCESS(base) "%%nacl:(%%r15,%q" #base ")"
422 #define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")"
423 #define MEMLEA(offset, base) #offset "(%q" #base ")"
424 #define MEMLEA3(offset, index, scale) \
425     #offset "(,%q" #index "," #scale ")"
426 #define MEMLEA4(offset, base, index, scale) \
427     #offset "(%q" #base ",%q" #index "," #scale ")"
428 #define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15"
429 #define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15"
430 #define MEMOPREG(opcode, offset, base, index, scale, reg) \
431     BUNDLELOCK \
432     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
433     #opcode " (%%r15,%%r14),%%" #reg "\n" \
434     BUNDLEUNLOCK
435 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \
436     BUNDLELOCK \
437     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
438     #opcode " %%" #reg ",(%%r15,%%r14)\n" \
439     BUNDLEUNLOCK
440 #define MEMOPARG(opcode, offset, base, index, scale, arg) \
441     BUNDLELOCK \
442     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
443     #opcode " (%%r15,%%r14),%" #arg "\n" \
444     BUNDLEUNLOCK
445 #else  // defined(__native_client__) && defined(__x86_64__)
446 #define BUNDLEALIGN "\n"
447 #define MEMACCESS(base) "(%" #base ")"
448 #define MEMACCESS2(offset, base) #offset "(%" #base ")"
449 #define MEMLEA(offset, base) #offset "(%" #base ")"
450 #define MEMLEA3(offset, index, scale) \
451     #offset "(,%" #index "," #scale ")"
452 #define MEMLEA4(offset, base, index, scale) \
453     #offset "(%" #base ",%" #index "," #scale ")"
454 #define MEMMOVESTRING(s, d)
455 #define MEMSTORESTRING(reg, d)
456 #define MEMOPREG(opcode, offset, base, index, scale, reg) \
457     #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n"
458 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \
459     #opcode " %%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n"
460 #define MEMOPARG(opcode, offset, base, index, scale, arg) \
461     #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n"
462 #endif  // defined(__native_client__) && defined(__x86_64__)
463
464 #if defined(__arm__)
465 #undef MEMACCESS
466 #if defined(__native_client__)
467 #define MEMACCESS(base) ".p2align   3\nbic %" #base ", #0xc0000000\n"
468 #else
469 #define MEMACCESS(base) "\n"
470 #endif
471 #endif
472
473 void I444ToARGBRow_NEON(const uint8* src_y,
474                         const uint8* src_u,
475                         const uint8* src_v,
476                         uint8* dst_argb,
477                         int width);
478 void I422ToARGBRow_NEON(const uint8* src_y,
479                         const uint8* src_u,
480                         const uint8* src_v,
481                         uint8* dst_argb,
482                         int width);
483 void I411ToARGBRow_NEON(const uint8* src_y,
484                         const uint8* src_u,
485                         const uint8* src_v,
486                         uint8* dst_argb,
487                         int width);
488 void I422ToBGRARow_NEON(const uint8* src_y,
489                         const uint8* src_u,
490                         const uint8* src_v,
491                         uint8* dst_bgra,
492                         int width);
493 void I422ToABGRRow_NEON(const uint8* src_y,
494                         const uint8* src_u,
495                         const uint8* src_v,
496                         uint8* dst_abgr,
497                         int width);
498 void I422ToRGBARow_NEON(const uint8* src_y,
499                         const uint8* src_u,
500                         const uint8* src_v,
501                         uint8* dst_rgba,
502                         int width);
503 void I422ToRGB24Row_NEON(const uint8* src_y,
504                          const uint8* src_u,
505                          const uint8* src_v,
506                          uint8* dst_rgb24,
507                          int width);
508 void I422ToRAWRow_NEON(const uint8* src_y,
509                        const uint8* src_u,
510                        const uint8* src_v,
511                        uint8* dst_raw,
512                        int width);
513 void I422ToRGB565Row_NEON(const uint8* src_y,
514                           const uint8* src_u,
515                           const uint8* src_v,
516                           uint8* dst_rgb565,
517                           int width);
518 void I422ToARGB1555Row_NEON(const uint8* src_y,
519                             const uint8* src_u,
520                             const uint8* src_v,
521                             uint8* dst_argb1555,
522                             int width);
523 void I422ToARGB4444Row_NEON(const uint8* src_y,
524                             const uint8* src_u,
525                             const uint8* src_v,
526                             uint8* dst_argb4444,
527                             int width);
528 void NV12ToARGBRow_NEON(const uint8* src_y,
529                         const uint8* src_uv,
530                         uint8* dst_argb,
531                         int width);
532 void NV21ToARGBRow_NEON(const uint8* src_y,
533                         const uint8* src_vu,
534                         uint8* dst_argb,
535                         int width);
536 void NV12ToRGB565Row_NEON(const uint8* src_y,
537                           const uint8* src_uv,
538                           uint8* dst_rgb565,
539                           int width);
540 void NV21ToRGB565Row_NEON(const uint8* src_y,
541                           const uint8* src_vu,
542                           uint8* dst_rgb565,
543                           int width);
544 void YUY2ToARGBRow_NEON(const uint8* src_yuy2,
545                         uint8* dst_argb,
546                         int width);
547 void UYVYToARGBRow_NEON(const uint8* src_uyvy,
548                         uint8* dst_argb,
549                         int width);
550
551 void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
552 void ARGBToYRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
553 void ARGBToYRow_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
554 void ARGBToYJRow_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
555 void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
556 void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
557 void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int pix);
558 void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int pix);
559 void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int pix);
560 void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int pix);
561 void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int pix);
562 void ARGBToYRow_Unaligned_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
563 void ARGBToYJRow_Unaligned_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
564 void BGRAToYRow_Unaligned_SSSE3(const uint8* src_bgra, uint8* dst_y, int pix);
565 void ABGRToYRow_Unaligned_SSSE3(const uint8* src_abgr, uint8* dst_y, int pix);
566 void RGBAToYRow_Unaligned_SSSE3(const uint8* src_rgba, uint8* dst_y, int pix);
567 void RGB24ToYRow_Unaligned_SSSE3(const uint8* src_rgb24, uint8* dst_y, int pix);
568 void RAWToYRow_Unaligned_SSSE3(const uint8* src_raw, uint8* dst_y, int pix);
569 void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int pix);
570 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int pix);
571 void ARGBToUV444Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
572                          int pix);
573 void ARGBToUV422Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
574                          int pix);
575 void ARGBToUV411Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
576                          int pix);
577 void ARGBToUVRow_NEON(const uint8* src_argb, int src_stride_argb,
578                       uint8* dst_u, uint8* dst_v, int pix);
579 void ARGBToUVJRow_NEON(const uint8* src_argb, int src_stride_argb,
580                        uint8* dst_u, uint8* dst_v, int pix);
581 void BGRAToUVRow_NEON(const uint8* src_bgra, int src_stride_bgra,
582                       uint8* dst_u, uint8* dst_v, int pix);
583 void ABGRToUVRow_NEON(const uint8* src_abgr, int src_stride_abgr,
584                       uint8* dst_u, uint8* dst_v, int pix);
585 void RGBAToUVRow_NEON(const uint8* src_rgba, int src_stride_rgba,
586                       uint8* dst_u, uint8* dst_v, int pix);
587 void RGB24ToUVRow_NEON(const uint8* src_rgb24, int src_stride_rgb24,
588                        uint8* dst_u, uint8* dst_v, int pix);
589 void RAWToUVRow_NEON(const uint8* src_raw, int src_stride_raw,
590                      uint8* dst_u, uint8* dst_v, int pix);
591 void RGB565ToUVRow_NEON(const uint8* src_rgb565, int src_stride_rgb565,
592                         uint8* dst_u, uint8* dst_v, int pix);
593 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, int src_stride_argb1555,
594                           uint8* dst_u, uint8* dst_v, int pix);
595 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, int src_stride_argb4444,
596                           uint8* dst_u, uint8* dst_v, int pix);
597 void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int pix);
598 void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int pix);
599 void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int pix);
600 void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int pix);
601 void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int pix);
602 void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int pix);
603 void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int pix);
604 void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int pix);
605 void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int pix);
606 void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int pix);
607 void BGRAToYRow_C(const uint8* src_bgra, uint8* dst_y, int pix);
608 void ABGRToYRow_C(const uint8* src_abgr, uint8* dst_y, int pix);
609 void RGBAToYRow_C(const uint8* src_rgba, uint8* dst_y, int pix);
610 void RGB24ToYRow_C(const uint8* src_rgb24, uint8* dst_y, int pix);
611 void RAWToYRow_C(const uint8* src_raw, uint8* dst_y, int pix);
612 void RGB565ToYRow_C(const uint8* src_rgb565, uint8* dst_y, int pix);
613 void ARGB1555ToYRow_C(const uint8* src_argb1555, uint8* dst_y, int pix);
614 void ARGB4444ToYRow_C(const uint8* src_argb4444, uint8* dst_y, int pix);
615 void ARGBToYRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
616 void ARGBToYJRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
617 void BGRAToYRow_Any_SSSE3(const uint8* src_bgra, uint8* dst_y, int pix);
618 void ABGRToYRow_Any_SSSE3(const uint8* src_abgr, uint8* dst_y, int pix);
619 void RGBAToYRow_Any_SSSE3(const uint8* src_rgba, uint8* dst_y, int pix);
620 void RGB24ToYRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_y, int pix);
621 void RAWToYRow_Any_SSSE3(const uint8* src_raw, uint8* dst_y, int pix);
622 void ARGBToYRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int pix);
623 void ARGBToYJRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int pix);
624 void BGRAToYRow_Any_NEON(const uint8* src_bgra, uint8* dst_y, int pix);
625 void ABGRToYRow_Any_NEON(const uint8* src_abgr, uint8* dst_y, int pix);
626 void RGBAToYRow_Any_NEON(const uint8* src_rgba, uint8* dst_y, int pix);
627 void RGB24ToYRow_Any_NEON(const uint8* src_rgb24, uint8* dst_y, int pix);
628 void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int pix);
629 void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int pix);
630 void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, uint8* dst_y, int pix);
631 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, uint8* dst_y, int pix);
632
633 void ARGBToUVRow_AVX2(const uint8* src_argb, int src_stride_argb,
634                       uint8* dst_u, uint8* dst_v, int width);
635 void ARGBToUVRow_Any_AVX2(const uint8* src_argb, int src_stride_argb,
636                           uint8* dst_u, uint8* dst_v, int width);
637 void ARGBToUVRow_SSSE3(const uint8* src_argb, int src_stride_argb,
638                        uint8* dst_u, uint8* dst_v, int width);
639 void ARGBToUVJRow_SSSE3(const uint8* src_argb, int src_stride_argb,
640                         uint8* dst_u, uint8* dst_v, int width);
641 void BGRAToUVRow_SSSE3(const uint8* src_bgra, int src_stride_bgra,
642                        uint8* dst_u, uint8* dst_v, int width);
643 void ABGRToUVRow_SSSE3(const uint8* src_abgr, int src_stride_abgr,
644                        uint8* dst_u, uint8* dst_v, int width);
645 void RGBAToUVRow_SSSE3(const uint8* src_rgba, int src_stride_rgba,
646                        uint8* dst_u, uint8* dst_v, int width);
647 void ARGBToUVRow_Unaligned_SSSE3(const uint8* src_argb, int src_stride_argb,
648                                  uint8* dst_u, uint8* dst_v, int width);
649 void ARGBToUVJRow_Unaligned_SSSE3(const uint8* src_argb, int src_stride_argb,
650                                   uint8* dst_u, uint8* dst_v, int width);
651 void BGRAToUVRow_Unaligned_SSSE3(const uint8* src_bgra, int src_stride_bgra,
652                                  uint8* dst_u, uint8* dst_v, int width);
653 void ABGRToUVRow_Unaligned_SSSE3(const uint8* src_abgr, int src_stride_abgr,
654                                  uint8* dst_u, uint8* dst_v, int width);
655 void RGBAToUVRow_Unaligned_SSSE3(const uint8* src_rgba, int src_stride_rgba,
656                                  uint8* dst_u, uint8* dst_v, int width);
657 void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb,
658                            uint8* dst_u, uint8* dst_v, int width);
659 void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb,
660                             uint8* dst_u, uint8* dst_v, int width);
661 void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, int src_stride_bgra,
662                            uint8* dst_u, uint8* dst_v, int width);
663 void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, int src_stride_abgr,
664                            uint8* dst_u, uint8* dst_v, int width);
665 void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, int src_stride_rgba,
666                            uint8* dst_u, uint8* dst_v, int width);
667 void ARGBToUV444Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
668                              int pix);
669 void ARGBToUV422Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
670                              int pix);
671 void ARGBToUV411Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
672                              int pix);
673 void ARGBToUVRow_Any_NEON(const uint8* src_argb, int src_stride_argb,
674                           uint8* dst_u, uint8* dst_v, int pix);
675 void ARGBToUVJRow_Any_NEON(const uint8* src_argb, int src_stride_argb,
676                            uint8* dst_u, uint8* dst_v, int pix);
677 void BGRAToUVRow_Any_NEON(const uint8* src_bgra, int src_stride_bgra,
678                           uint8* dst_u, uint8* dst_v, int pix);
679 void ABGRToUVRow_Any_NEON(const uint8* src_abgr, int src_stride_abgr,
680                           uint8* dst_u, uint8* dst_v, int pix);
681 void RGBAToUVRow_Any_NEON(const uint8* src_rgba, int src_stride_rgba,
682                           uint8* dst_u, uint8* dst_v, int pix);
683 void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, int src_stride_rgb24,
684                            uint8* dst_u, uint8* dst_v, int pix);
685 void RAWToUVRow_Any_NEON(const uint8* src_raw, int src_stride_raw,
686                          uint8* dst_u, uint8* dst_v, int pix);
687 void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, int src_stride_rgb565,
688                             uint8* dst_u, uint8* dst_v, int pix);
689 void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555,
690                               int src_stride_argb1555,
691                               uint8* dst_u, uint8* dst_v, int pix);
692 void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444,
693                               int src_stride_argb4444,
694                               uint8* dst_u, uint8* dst_v, int pix);
695 void ARGBToUVRow_C(const uint8* src_argb, int src_stride_argb,
696                    uint8* dst_u, uint8* dst_v, int width);
697 void ARGBToUVJRow_C(const uint8* src_argb, int src_stride_argb,
698                     uint8* dst_u, uint8* dst_v, int width);
699 void BGRAToUVRow_C(const uint8* src_bgra, int src_stride_bgra,
700                    uint8* dst_u, uint8* dst_v, int width);
701 void ABGRToUVRow_C(const uint8* src_abgr, int src_stride_abgr,
702                    uint8* dst_u, uint8* dst_v, int width);
703 void RGBAToUVRow_C(const uint8* src_rgba, int src_stride_rgba,
704                    uint8* dst_u, uint8* dst_v, int width);
705 void RGB24ToUVRow_C(const uint8* src_rgb24, int src_stride_rgb24,
706                     uint8* dst_u, uint8* dst_v, int width);
707 void RAWToUVRow_C(const uint8* src_raw, int src_stride_raw,
708                   uint8* dst_u, uint8* dst_v, int width);
709 void RGB565ToUVRow_C(const uint8* src_rgb565, int src_stride_rgb565,
710                      uint8* dst_u, uint8* dst_v, int width);
711 void ARGB1555ToUVRow_C(const uint8* src_argb1555, int src_stride_argb1555,
712                        uint8* dst_u, uint8* dst_v, int width);
713 void ARGB4444ToUVRow_C(const uint8* src_argb4444, int src_stride_argb4444,
714                        uint8* dst_u, uint8* dst_v, int width);
715
716 void ARGBToUV444Row_SSSE3(const uint8* src_argb,
717                           uint8* dst_u, uint8* dst_v, int width);
718 void ARGBToUV444Row_Unaligned_SSSE3(const uint8* src_argb,
719                                     uint8* dst_u, uint8* dst_v, int width);
720 void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb,
721                               uint8* dst_u, uint8* dst_v, int width);
722
723 void ARGBToUV422Row_SSSE3(const uint8* src_argb,
724                           uint8* dst_u, uint8* dst_v, int width);
725 void ARGBToUV422Row_Unaligned_SSSE3(const uint8* src_argb,
726                                     uint8* dst_u, uint8* dst_v, int width);
727 void ARGBToUV422Row_Any_SSSE3(const uint8* src_argb,
728                               uint8* dst_u, uint8* dst_v, int width);
729
730 void ARGBToUV444Row_C(const uint8* src_argb,
731                       uint8* dst_u, uint8* dst_v, int width);
732 void ARGBToUV422Row_C(const uint8* src_argb,
733                       uint8* dst_u, uint8* dst_v, int width);
734 void ARGBToUV411Row_C(const uint8* src_argb,
735                       uint8* dst_u, uint8* dst_v, int width);
736
737 void MirrorRow_AVX2(const uint8* src, uint8* dst, int width);
738 void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width);
739 void MirrorRow_SSE2(const uint8* src, uint8* dst, int width);
740 void MirrorRow_NEON(const uint8* src, uint8* dst, int width);
741 void MirrorRow_MIPS_DSPR2(const uint8* src, uint8* dst, int width);
742 void MirrorRow_C(const uint8* src, uint8* dst, int width);
743
744 void MirrorUVRow_SSSE3(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
745                        int width);
746 void MirrorUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
747                       int width);
748 void MirrorUVRow_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
749                             int width);
750 void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
751                    int width);
752
753 void ARGBMirrorRow_AVX2(const uint8* src, uint8* dst, int width);
754 void ARGBMirrorRow_SSSE3(const uint8* src, uint8* dst, int width);
755 void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width);
756 void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width);
757
758 void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
759 void SplitUVRow_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
760 void SplitUVRow_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
761 void SplitUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
762 void SplitUVRow_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
763                            int pix);
764 void SplitUVRow_Unaligned_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
765                                int pix);
766 void SplitUVRow_Unaligned_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u,
767                                      uint8* dst_v, int pix);
768 void SplitUVRow_Any_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
769                          int pix);
770 void SplitUVRow_Any_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
771                          int pix);
772 void SplitUVRow_Any_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
773                          int pix);
774 void SplitUVRow_Any_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
775                                int pix);
776
777 void MergeUVRow_C(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
778                   int width);
779 void MergeUVRow_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
780                      int width);
781 void MergeUVRow_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
782                      int width);
783 void MergeUVRow_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
784                      int width);
785 void MergeUVRow_Unaligned_SSE2(const uint8* src_u, const uint8* src_v,
786                                uint8* dst_uv, int width);
787 void MergeUVRow_Any_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
788                          int width);
789 void MergeUVRow_Any_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
790                          int width);
791 void MergeUVRow_Any_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
792                          int width);
793
794 void CopyRow_SSE2(const uint8* src, uint8* dst, int count);
795 void CopyRow_ERMS(const uint8* src, uint8* dst, int count);
796 void CopyRow_X86(const uint8* src, uint8* dst, int count);
797 void CopyRow_NEON(const uint8* src, uint8* dst, int count);
798 void CopyRow_MIPS(const uint8* src, uint8* dst, int count);
799 void CopyRow_C(const uint8* src, uint8* dst, int count);
800
801 void CopyRow_16_C(const uint16* src, uint16* dst, int count);
802
803 void ARGBCopyAlphaRow_C(const uint8* src_argb, uint8* dst_argb, int width);
804 void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
805 void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
806
807 void ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width);
808 void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
809 void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
810
811 void SetRow_X86(uint8* dst, uint32 v32, int count);
812 void ARGBSetRows_X86(uint8* dst, uint32 v32, int width,
813                      int dst_stride, int height);
814 void SetRow_NEON(uint8* dst, uint32 v32, int count);
815 void ARGBSetRows_NEON(uint8* dst, uint32 v32, int width,
816                       int dst_stride, int height);
817 void SetRow_C(uint8* dst, uint32 v32, int count);
818 void ARGBSetRows_C(uint8* dst, uint32 v32, int width, int dst_stride,
819                    int height);
820
821 // ARGBShufflers for BGRAToARGB etc.
822 void ARGBShuffleRow_C(const uint8* src_argb, uint8* dst_argb,
823                       const uint8* shuffler, int pix);
824 void ARGBShuffleRow_SSE2(const uint8* src_argb, uint8* dst_argb,
825                          const uint8* shuffler, int pix);
826 void ARGBShuffleRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
827                           const uint8* shuffler, int pix);
828 void ARGBShuffleRow_AVX2(const uint8* src_argb, uint8* dst_argb,
829                          const uint8* shuffler, int pix);
830 void ARGBShuffleRow_NEON(const uint8* src_argb, uint8* dst_argb,
831                          const uint8* shuffler, int pix);
832 void ARGBShuffleRow_Unaligned_SSSE3(const uint8* src_argb, uint8* dst_argb,
833                                     const uint8* shuffler, int pix);
834 void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
835                              const uint8* shuffler, int pix);
836 void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb,
837                               const uint8* shuffler, int pix);
838 void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
839                              const uint8* shuffler, int pix);
840 void ARGBShuffleRow_Any_NEON(const uint8* src_argb, uint8* dst_argb,
841                              const uint8* shuffler, int pix);
842
843 void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix);
844 void RAWToARGBRow_SSSE3(const uint8* src_raw, uint8* dst_argb, int pix);
845 void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int pix);
846 void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, uint8* dst_argb,
847                             int pix);
848 void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, uint8* dst_argb,
849                             int pix);
850
851 void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int pix);
852 void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int pix);
853 void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int pix);
854 void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, uint8* dst_argb,
855                             int pix);
856 void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, uint8* dst_argb,
857                             int pix);
858 void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int pix);
859 void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int pix);
860 void RGB565ToARGBRow_C(const uint8* src_rgb, uint8* dst_argb, int pix);
861 void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int pix);
862 void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int pix);
863 void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix);
864 void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int pix);
865 void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, uint8* dst_argb,
866                               int pix);
867 void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, uint8* dst_argb,
868                                 int pix);
869 void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, uint8* dst_argb,
870                                 int pix);
871 void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, uint8* dst_argb, int pix);
872 void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int pix);
873 void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, uint8* dst_argb,
874                               int pix);
875 void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, uint8* dst_argb,
876                                 int pix);
877 void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444, uint8* dst_argb,
878                                 int pix);
879
880 void ARGBToRGB24Row_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
881 void ARGBToRAWRow_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
882 void ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
883 void ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
884 void ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
885
886 void ARGBToRGB24Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
887 void ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
888 void ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
889 void ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
890 void ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
891
892 void ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int pix);
893 void ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
894 void ARGBToRAWRow_C(const uint8* src_argb, uint8* dst_rgb, int pix);
895 void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
896 void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
897 void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
898
899 void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
900 void I400ToARGBRow_Unaligned_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
901 void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int pix);
902 void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int pix);
903 void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
904 void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int pix);
905
906 void I444ToARGBRow_C(const uint8* src_y,
907                      const uint8* src_u,
908                      const uint8* src_v,
909                      uint8* dst_argb,
910                      int width);
911 void I422ToARGBRow_C(const uint8* src_y,
912                      const uint8* src_u,
913                      const uint8* src_v,
914                      uint8* dst_argb,
915                      int width);
916 void I411ToARGBRow_C(const uint8* src_y,
917                      const uint8* src_u,
918                      const uint8* src_v,
919                      uint8* dst_argb,
920                      int width);
921 void NV12ToARGBRow_C(const uint8* src_y,
922                      const uint8* src_uv,
923                      uint8* dst_argb,
924                      int width);
925 void NV21ToRGB565Row_C(const uint8* src_y,
926                        const uint8* src_vu,
927                        uint8* dst_argb,
928                        int width);
929 void NV12ToRGB565Row_C(const uint8* src_y,
930                        const uint8* src_uv,
931                        uint8* dst_argb,
932                        int width);
933 void NV21ToARGBRow_C(const uint8* src_y,
934                      const uint8* src_vu,
935                      uint8* dst_argb,
936                      int width);
937 void YUY2ToARGBRow_C(const uint8* src_yuy2,
938                      uint8* dst_argb,
939                      int width);
940 void UYVYToARGBRow_C(const uint8* src_uyvy,
941                      uint8* dst_argb,
942                      int width);
943 void I422ToBGRARow_C(const uint8* src_y,
944                      const uint8* src_u,
945                      const uint8* src_v,
946                      uint8* dst_bgra,
947                      int width);
948 void I422ToABGRRow_C(const uint8* src_y,
949                      const uint8* src_u,
950                      const uint8* src_v,
951                      uint8* dst_abgr,
952                      int width);
953 void I422ToRGBARow_C(const uint8* src_y,
954                      const uint8* src_u,
955                      const uint8* src_v,
956                      uint8* dst_rgba,
957                      int width);
958 void I422ToRGB24Row_C(const uint8* src_y,
959                       const uint8* src_u,
960                       const uint8* src_v,
961                       uint8* dst_rgb24,
962                       int width);
963 void I422ToRAWRow_C(const uint8* src_y,
964                     const uint8* src_u,
965                     const uint8* src_v,
966                     uint8* dst_raw,
967                     int width);
968 void I422ToARGB4444Row_C(const uint8* src_y,
969                          const uint8* src_u,
970                          const uint8* src_v,
971                          uint8* dst_argb4444,
972                          int width);
973 void I422ToARGB1555Row_C(const uint8* src_y,
974                          const uint8* src_u,
975                          const uint8* src_v,
976                          uint8* dst_argb4444,
977                          int width);
978 void I422ToRGB565Row_C(const uint8* src_y,
979                        const uint8* src_u,
980                        const uint8* src_v,
981                        uint8* dst_rgb565,
982                        int width);
983 void YToARGBRow_C(const uint8* src_y,
984                   uint8* dst_argb,
985                   int width);
986 void I422ToARGBRow_AVX2(const uint8* src_y,
987                         const uint8* src_u,
988                         const uint8* src_v,
989                         uint8* dst_argb,
990                         int width);
991 void I444ToARGBRow_SSSE3(const uint8* src_y,
992                          const uint8* src_u,
993                          const uint8* src_v,
994                          uint8* dst_argb,
995                          int width);
996 void I422ToARGBRow_SSSE3(const uint8* src_y,
997                          const uint8* src_u,
998                          const uint8* src_v,
999                          uint8* dst_argb,
1000                          int width);
1001 void I411ToARGBRow_SSSE3(const uint8* src_y,
1002                          const uint8* src_u,
1003                          const uint8* src_v,
1004                          uint8* dst_argb,
1005                          int width);
1006 void NV12ToARGBRow_SSSE3(const uint8* src_y,
1007                          const uint8* src_uv,
1008                          uint8* dst_argb,
1009                          int width);
1010 void NV21ToARGBRow_SSSE3(const uint8* src_y,
1011                          const uint8* src_vu,
1012                          uint8* dst_argb,
1013                          int width);
1014 void NV12ToRGB565Row_SSSE3(const uint8* src_y,
1015                            const uint8* src_uv,
1016                            uint8* dst_argb,
1017                            int width);
1018 void NV21ToRGB565Row_SSSE3(const uint8* src_y,
1019                            const uint8* src_vu,
1020                            uint8* dst_argb,
1021                            int width);
1022 void YUY2ToARGBRow_SSSE3(const uint8* src_yuy2,
1023                          uint8* dst_argb,
1024                          int width);
1025 void UYVYToARGBRow_SSSE3(const uint8* src_uyvy,
1026                          uint8* dst_argb,
1027                          int width);
1028 void I422ToBGRARow_SSSE3(const uint8* src_y,
1029                          const uint8* src_u,
1030                          const uint8* src_v,
1031                          uint8* dst_bgra,
1032                          int width);
1033 void I422ToABGRRow_SSSE3(const uint8* src_y,
1034                          const uint8* src_u,
1035                          const uint8* src_v,
1036                          uint8* dst_abgr,
1037                          int width);
1038 void I422ToRGBARow_SSSE3(const uint8* src_y,
1039                          const uint8* src_u,
1040                          const uint8* src_v,
1041                          uint8* dst_rgba,
1042                          int width);
1043 void I422ToARGB4444Row_SSSE3(const uint8* src_y,
1044                              const uint8* src_u,
1045                              const uint8* src_v,
1046                              uint8* dst_argb,
1047                              int width);
1048 void I422ToARGB1555Row_SSSE3(const uint8* src_y,
1049                              const uint8* src_u,
1050                              const uint8* src_v,
1051                              uint8* dst_argb,
1052                              int width);
1053 void I422ToRGB565Row_SSSE3(const uint8* src_y,
1054                            const uint8* src_u,
1055                            const uint8* src_v,
1056                            uint8* dst_argb,
1057                            int width);
1058 // RGB24/RAW are unaligned.
1059 void I422ToRGB24Row_SSSE3(const uint8* src_y,
1060                           const uint8* src_u,
1061                           const uint8* src_v,
1062                           uint8* dst_rgb24,
1063                           int width);
1064 void I422ToRAWRow_SSSE3(const uint8* src_y,
1065                         const uint8* src_u,
1066                         const uint8* src_v,
1067                         uint8* dst_raw,
1068                         int width);
1069
1070 void I444ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1071                                    const uint8* src_u,
1072                                    const uint8* src_v,
1073                                    uint8* dst_argb,
1074                                    int width);
1075 void I422ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1076                                    const uint8* src_u,
1077                                    const uint8* src_v,
1078                                    uint8* dst_argb,
1079                                    int width);
1080 void I411ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1081                                    const uint8* src_u,
1082                                    const uint8* src_v,
1083                                    uint8* dst_argb,
1084                                    int width);
1085 void NV12ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1086                                    const uint8* src_uv,
1087                                    uint8* dst_argb,
1088                                    int width);
1089 void NV21ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1090                                    const uint8* src_vu,
1091                                    uint8* dst_argb,
1092                                    int width);
1093 void YUY2ToARGBRow_Unaligned_SSSE3(const uint8* src_yuy2,
1094                                    uint8* dst_argb,
1095                                    int width);
1096 void UYVYToARGBRow_Unaligned_SSSE3(const uint8* src_uyvy,
1097                                    uint8* dst_argb,
1098                                    int width);
1099 void I422ToBGRARow_Unaligned_SSSE3(const uint8* src_y,
1100                                    const uint8* src_u,
1101                                    const uint8* src_v,
1102                                    uint8* dst_bgra,
1103                                    int width);
1104 void I422ToABGRRow_Unaligned_SSSE3(const uint8* src_y,
1105                                    const uint8* src_u,
1106                                    const uint8* src_v,
1107                                    uint8* dst_abgr,
1108                                    int width);
1109 void I422ToRGBARow_Unaligned_SSSE3(const uint8* src_y,
1110                                    const uint8* src_u,
1111                                    const uint8* src_v,
1112                                    uint8* dst_rgba,
1113                                    int width);
1114 void I422ToARGBRow_Any_AVX2(const uint8* src_y,
1115                             const uint8* src_u,
1116                             const uint8* src_v,
1117                             uint8* dst_argb,
1118                             int width);
1119 void I444ToARGBRow_Any_SSSE3(const uint8* src_y,
1120                              const uint8* src_u,
1121                              const uint8* src_v,
1122                              uint8* dst_argb,
1123                              int width);
1124 void I422ToARGBRow_Any_SSSE3(const uint8* src_y,
1125                              const uint8* src_u,
1126                              const uint8* src_v,
1127                              uint8* dst_argb,
1128                              int width);
1129 void I411ToARGBRow_Any_SSSE3(const uint8* src_y,
1130                              const uint8* src_u,
1131                              const uint8* src_v,
1132                              uint8* dst_argb,
1133                              int width);
1134 void NV12ToARGBRow_Any_SSSE3(const uint8* src_y,
1135                              const uint8* src_uv,
1136                              uint8* dst_argb,
1137                              int width);
1138 void NV21ToARGBRow_Any_SSSE3(const uint8* src_y,
1139                              const uint8* src_vu,
1140                              uint8* dst_argb,
1141                              int width);
1142 void NV12ToRGB565Row_Any_SSSE3(const uint8* src_y,
1143                                const uint8* src_uv,
1144                                uint8* dst_argb,
1145                                int width);
1146 void NV21ToRGB565Row_Any_SSSE3(const uint8* src_y,
1147                                const uint8* src_vu,
1148                                uint8* dst_argb,
1149                                int width);
1150 void YUY2ToARGBRow_Any_SSSE3(const uint8* src_yuy2,
1151                              uint8* dst_argb,
1152                              int width);
1153 void UYVYToARGBRow_Any_SSSE3(const uint8* src_uyvy,
1154                              uint8* dst_argb,
1155                              int width);
1156 void I422ToBGRARow_Any_SSSE3(const uint8* src_y,
1157                              const uint8* src_u,
1158                              const uint8* src_v,
1159                              uint8* dst_bgra,
1160                              int width);
1161 void I422ToABGRRow_Any_SSSE3(const uint8* src_y,
1162                              const uint8* src_u,
1163                              const uint8* src_v,
1164                              uint8* dst_abgr,
1165                              int width);
1166 void I422ToRGBARow_Any_SSSE3(const uint8* src_y,
1167                              const uint8* src_u,
1168                              const uint8* src_v,
1169                              uint8* dst_rgba,
1170                              int width);
1171 void I422ToARGB4444Row_Any_SSSE3(const uint8* src_y,
1172                                  const uint8* src_u,
1173                                  const uint8* src_v,
1174                                  uint8* dst_rgba,
1175                                  int width);
1176 void I422ToARGB1555Row_Any_SSSE3(const uint8* src_y,
1177                                  const uint8* src_u,
1178                                  const uint8* src_v,
1179                                  uint8* dst_rgba,
1180                                  int width);
1181 void I422ToRGB565Row_Any_SSSE3(const uint8* src_y,
1182                                const uint8* src_u,
1183                                const uint8* src_v,
1184                                uint8* dst_rgba,
1185                                int width);
1186 // RGB24/RAW are unaligned.
1187 void I422ToRGB24Row_Any_SSSE3(const uint8* src_y,
1188                               const uint8* src_u,
1189                               const uint8* src_v,
1190                               uint8* dst_argb,
1191                               int width);
1192 void I422ToRAWRow_Any_SSSE3(const uint8* src_y,
1193                             const uint8* src_u,
1194                             const uint8* src_v,
1195                             uint8* dst_argb,
1196                             int width);
1197 void YToARGBRow_SSE2(const uint8* src_y,
1198                      uint8* dst_argb,
1199                      int width);
1200 void YToARGBRow_NEON(const uint8* src_y,
1201                      uint8* dst_argb,
1202                      int width);
1203 void YToARGBRow_Any_SSE2(const uint8* src_y,
1204                          uint8* dst_argb,
1205                          int width);
1206 void YToARGBRow_Any_NEON(const uint8* src_y,
1207                          uint8* dst_argb,
1208                          int width);
1209
1210 // ARGB preattenuated alpha blend.
1211 void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1,
1212                         uint8* dst_argb, int width);
1213 void ARGBBlendRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1214                        uint8* dst_argb, int width);
1215 void ARGBBlendRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1216                        uint8* dst_argb, int width);
1217 void ARGBBlendRow_C(const uint8* src_argb, const uint8* src_argb1,
1218                     uint8* dst_argb, int width);
1219
1220 // ARGB multiply images. Same API as Blend, but these require
1221 // pointer and width alignment for SSE2.
1222 void ARGBMultiplyRow_C(const uint8* src_argb, const uint8* src_argb1,
1223                        uint8* dst_argb, int width);
1224 void ARGBMultiplyRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1225                           uint8* dst_argb, int width);
1226 void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
1227                               uint8* dst_argb, int width);
1228 void ARGBMultiplyRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
1229                           uint8* dst_argb, int width);
1230 void ARGBMultiplyRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
1231                               uint8* dst_argb, int width);
1232 void ARGBMultiplyRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1233                           uint8* dst_argb, int width);
1234 void ARGBMultiplyRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
1235                               uint8* dst_argb, int width);
1236
1237 // ARGB add images.
1238 void ARGBAddRow_C(const uint8* src_argb, const uint8* src_argb1,
1239                   uint8* dst_argb, int width);
1240 void ARGBAddRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1241                      uint8* dst_argb, int width);
1242 void ARGBAddRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
1243                          uint8* dst_argb, int width);
1244 void ARGBAddRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
1245                      uint8* dst_argb, int width);
1246 void ARGBAddRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
1247                          uint8* dst_argb, int width);
1248 void ARGBAddRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1249                      uint8* dst_argb, int width);
1250 void ARGBAddRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
1251                          uint8* dst_argb, int width);
1252
1253 // ARGB subtract images. Same API as Blend, but these require
1254 // pointer and width alignment for SSE2.
1255 void ARGBSubtractRow_C(const uint8* src_argb, const uint8* src_argb1,
1256                        uint8* dst_argb, int width);
1257 void ARGBSubtractRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1258                           uint8* dst_argb, int width);
1259 void ARGBSubtractRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
1260                               uint8* dst_argb, int width);
1261 void ARGBSubtractRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
1262                           uint8* dst_argb, int width);
1263 void ARGBSubtractRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
1264                               uint8* dst_argb, int width);
1265 void ARGBSubtractRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1266                           uint8* dst_argb, int width);
1267 void ARGBSubtractRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
1268                               uint8* dst_argb, int width);
1269
1270 void ARGBToRGB24Row_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
1271 void ARGBToRAWRow_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
1272 void ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1273 void ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1274 void ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1275
1276 void ARGBToRGB24Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1277 void ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1278 void ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1279 void ARGBToARGB1555Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1280 void ARGBToARGB4444Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1281
1282 void I444ToARGBRow_Any_NEON(const uint8* src_y,
1283                             const uint8* src_u,
1284                             const uint8* src_v,
1285                             uint8* dst_argb,
1286                             int width);
1287 void I422ToARGBRow_Any_NEON(const uint8* src_y,
1288                             const uint8* src_u,
1289                             const uint8* src_v,
1290                             uint8* dst_argb,
1291                             int width);
1292 void I411ToARGBRow_Any_NEON(const uint8* src_y,
1293                             const uint8* src_u,
1294                             const uint8* src_v,
1295                             uint8* dst_argb,
1296                             int width);
1297 void I422ToBGRARow_Any_NEON(const uint8* src_y,
1298                             const uint8* src_u,
1299                             const uint8* src_v,
1300                             uint8* dst_argb,
1301                             int width);
1302 void I422ToABGRRow_Any_NEON(const uint8* src_y,
1303                             const uint8* src_u,
1304                             const uint8* src_v,
1305                             uint8* dst_argb,
1306                             int width);
1307 void I422ToRGBARow_Any_NEON(const uint8* src_y,
1308                             const uint8* src_u,
1309                             const uint8* src_v,
1310                             uint8* dst_argb,
1311                             int width);
1312 void I422ToRGB24Row_Any_NEON(const uint8* src_y,
1313                              const uint8* src_u,
1314                              const uint8* src_v,
1315                              uint8* dst_argb,
1316                              int width);
1317 void I422ToRAWRow_Any_NEON(const uint8* src_y,
1318                            const uint8* src_u,
1319                            const uint8* src_v,
1320                            uint8* dst_argb,
1321                            int width);
1322 void I422ToARGB4444Row_Any_NEON(const uint8* src_y,
1323                                 const uint8* src_u,
1324                                 const uint8* src_v,
1325                                 uint8* dst_argb,
1326                                 int width);
1327 void I422ToARGB1555Row_Any_NEON(const uint8* src_y,
1328                                 const uint8* src_u,
1329                                 const uint8* src_v,
1330                                 uint8* dst_argb,
1331                                 int width);
1332 void I422ToRGB565Row_Any_NEON(const uint8* src_y,
1333                               const uint8* src_u,
1334                               const uint8* src_v,
1335                               uint8* dst_argb,
1336                               int width);
1337 void NV12ToARGBRow_Any_NEON(const uint8* src_y,
1338                             const uint8* src_uv,
1339                             uint8* dst_argb,
1340                             int width);
1341 void NV21ToARGBRow_Any_NEON(const uint8* src_y,
1342                             const uint8* src_uv,
1343                             uint8* dst_argb,
1344                             int width);
1345 void NV12ToRGB565Row_Any_NEON(const uint8* src_y,
1346                               const uint8* src_uv,
1347                               uint8* dst_argb,
1348                               int width);
1349 void NV21ToRGB565Row_Any_NEON(const uint8* src_y,
1350                               const uint8* src_uv,
1351                               uint8* dst_argb,
1352                               int width);
1353 void YUY2ToARGBRow_Any_NEON(const uint8* src_yuy2,
1354                             uint8* dst_argb,
1355                             int width);
1356 void UYVYToARGBRow_Any_NEON(const uint8* src_uyvy,
1357                             uint8* dst_argb,
1358                             int width);
1359 void I422ToARGBRow_MIPS_DSPR2(const uint8* src_y,
1360                               const uint8* src_u,
1361                               const uint8* src_v,
1362                               uint8* dst_argb,
1363                               int width);
1364 void I422ToBGRARow_MIPS_DSPR2(const uint8* src_y,
1365                               const uint8* src_u,
1366                               const uint8* src_v,
1367                               uint8* dst_argb,
1368                               int width);
1369 void I422ToABGRRow_MIPS_DSPR2(const uint8* src_y,
1370                               const uint8* src_u,
1371                               const uint8* src_v,
1372                               uint8* dst_argb,
1373                               int width);
1374 void I422ToARGBRow_MIPS_DSPR2(const uint8* src_y,
1375                               const uint8* src_u,
1376                               const uint8* src_v,
1377                               uint8* dst_argb,
1378                               int width);
1379 void I422ToBGRARow_MIPS_DSPR2(const uint8* src_y,
1380                               const uint8* src_u,
1381                               const uint8* src_v,
1382                               uint8* dst_argb,
1383                               int width);
1384 void I422ToABGRRow_MIPS_DSPR2(const uint8* src_y,
1385                               const uint8* src_u,
1386                               const uint8* src_v,
1387                               uint8* dst_argb,
1388                               int width);
1389
1390 void YUY2ToYRow_AVX2(const uint8* src_yuy2, uint8* dst_y, int pix);
1391 void YUY2ToUVRow_AVX2(const uint8* src_yuy2, int stride_yuy2,
1392                       uint8* dst_u, uint8* dst_v, int pix);
1393 void YUY2ToUV422Row_AVX2(const uint8* src_yuy2,
1394                          uint8* dst_u, uint8* dst_v, int pix);
1395 void YUY2ToYRow_SSE2(const uint8* src_yuy2, uint8* dst_y, int pix);
1396 void YUY2ToUVRow_SSE2(const uint8* src_yuy2, int stride_yuy2,
1397                       uint8* dst_u, uint8* dst_v, int pix);
1398 void YUY2ToUV422Row_SSE2(const uint8* src_yuy2,
1399                          uint8* dst_u, uint8* dst_v, int pix);
1400 void YUY2ToYRow_Unaligned_SSE2(const uint8* src_yuy2,
1401                                uint8* dst_y, int pix);
1402 void YUY2ToUVRow_Unaligned_SSE2(const uint8* src_yuy2, int stride_yuy2,
1403                                 uint8* dst_u, uint8* dst_v, int pix);
1404 void YUY2ToUV422Row_Unaligned_SSE2(const uint8* src_yuy2,
1405                                    uint8* dst_u, uint8* dst_v, int pix);
1406 void YUY2ToYRow_NEON(const uint8* src_yuy2, uint8* dst_y, int pix);
1407 void YUY2ToUVRow_NEON(const uint8* src_yuy2, int stride_yuy2,
1408                       uint8* dst_u, uint8* dst_v, int pix);
1409 void YUY2ToUV422Row_NEON(const uint8* src_yuy2,
1410                          uint8* dst_u, uint8* dst_v, int pix);
1411 void YUY2ToYRow_C(const uint8* src_yuy2, uint8* dst_y, int pix);
1412 void YUY2ToUVRow_C(const uint8* src_yuy2, int stride_yuy2,
1413                    uint8* dst_u, uint8* dst_v, int pix);
1414 void YUY2ToUV422Row_C(const uint8* src_yuy2,
1415                       uint8* dst_u, uint8* dst_v, int pix);
1416 void YUY2ToYRow_Any_AVX2(const uint8* src_yuy2, uint8* dst_y, int pix);
1417 void YUY2ToUVRow_Any_AVX2(const uint8* src_yuy2, int stride_yuy2,
1418                           uint8* dst_u, uint8* dst_v, int pix);
1419 void YUY2ToUV422Row_Any_AVX2(const uint8* src_yuy2,
1420                              uint8* dst_u, uint8* dst_v, int pix);
1421 void YUY2ToYRow_Any_SSE2(const uint8* src_yuy2, uint8* dst_y, int pix);
1422 void YUY2ToUVRow_Any_SSE2(const uint8* src_yuy2, int stride_yuy2,
1423                           uint8* dst_u, uint8* dst_v, int pix);
1424 void YUY2ToUV422Row_Any_SSE2(const uint8* src_yuy2,
1425                              uint8* dst_u, uint8* dst_v, int pix);
1426 void YUY2ToYRow_Any_NEON(const uint8* src_yuy2, uint8* dst_y, int pix);
1427 void YUY2ToUVRow_Any_NEON(const uint8* src_yuy2, int stride_yuy2,
1428                           uint8* dst_u, uint8* dst_v, int pix);
1429 void YUY2ToUV422Row_Any_NEON(const uint8* src_yuy2,
1430                              uint8* dst_u, uint8* dst_v, int pix);
1431 void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1432 void UYVYToUVRow_AVX2(const uint8* src_uyvy, int stride_uyvy,
1433                       uint8* dst_u, uint8* dst_v, int pix);
1434 void UYVYToUV422Row_AVX2(const uint8* src_uyvy,
1435                          uint8* dst_u, uint8* dst_v, int pix);
1436 void UYVYToYRow_SSE2(const uint8* src_uyvy, uint8* dst_y, int pix);
1437 void UYVYToUVRow_SSE2(const uint8* src_uyvy, int stride_uyvy,
1438                       uint8* dst_u, uint8* dst_v, int pix);
1439 void UYVYToUV422Row_SSE2(const uint8* src_uyvy,
1440                          uint8* dst_u, uint8* dst_v, int pix);
1441 void UYVYToYRow_Unaligned_SSE2(const uint8* src_uyvy,
1442                                uint8* dst_y, int pix);
1443 void UYVYToUVRow_Unaligned_SSE2(const uint8* src_uyvy, int stride_uyvy,
1444                                 uint8* dst_u, uint8* dst_v, int pix);
1445 void UYVYToUV422Row_Unaligned_SSE2(const uint8* src_uyvy,
1446                                    uint8* dst_u, uint8* dst_v, int pix);
1447 void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1448 void UYVYToUVRow_AVX2(const uint8* src_uyvy, int stride_uyvy,
1449                       uint8* dst_u, uint8* dst_v, int pix);
1450 void UYVYToUV422Row_AVX2(const uint8* src_uyvy,
1451                          uint8* dst_u, uint8* dst_v, int pix);
1452 void UYVYToYRow_NEON(const uint8* src_uyvy, uint8* dst_y, int pix);
1453 void UYVYToUVRow_NEON(const uint8* src_uyvy, int stride_uyvy,
1454                       uint8* dst_u, uint8* dst_v, int pix);
1455 void UYVYToUV422Row_NEON(const uint8* src_uyvy,
1456                          uint8* dst_u, uint8* dst_v, int pix);
1457
1458 void UYVYToYRow_C(const uint8* src_uyvy, uint8* dst_y, int pix);
1459 void UYVYToUVRow_C(const uint8* src_uyvy, int stride_uyvy,
1460                    uint8* dst_u, uint8* dst_v, int pix);
1461 void UYVYToUV422Row_C(const uint8* src_uyvy,
1462                       uint8* dst_u, uint8* dst_v, int pix);
1463 void UYVYToYRow_Any_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1464 void UYVYToUVRow_Any_AVX2(const uint8* src_uyvy, int stride_uyvy,
1465                           uint8* dst_u, uint8* dst_v, int pix);
1466 void UYVYToUV422Row_Any_AVX2(const uint8* src_uyvy,
1467                              uint8* dst_u, uint8* dst_v, int pix);
1468 void UYVYToYRow_Any_SSE2(const uint8* src_uyvy, uint8* dst_y, int pix);
1469 void UYVYToUVRow_Any_SSE2(const uint8* src_uyvy, int stride_uyvy,
1470                           uint8* dst_u, uint8* dst_v, int pix);
1471 void UYVYToUV422Row_Any_SSE2(const uint8* src_uyvy,
1472                              uint8* dst_u, uint8* dst_v, int pix);
1473 void UYVYToYRow_Any_NEON(const uint8* src_uyvy, uint8* dst_y, int pix);
1474 void UYVYToUVRow_Any_NEON(const uint8* src_uyvy, int stride_uyvy,
1475                           uint8* dst_u, uint8* dst_v, int pix);
1476 void UYVYToUV422Row_Any_NEON(const uint8* src_uyvy,
1477                              uint8* dst_u, uint8* dst_v, int pix);
1478
1479 void HalfRow_C(const uint8* src_uv, int src_uv_stride,
1480                uint8* dst_uv, int pix);
1481 void HalfRow_SSE2(const uint8* src_uv, int src_uv_stride,
1482                   uint8* dst_uv, int pix);
1483 void HalfRow_AVX2(const uint8* src_uv, int src_uv_stride,
1484                   uint8* dst_uv, int pix);
1485 void HalfRow_NEON(const uint8* src_uv, int src_uv_stride,
1486                   uint8* dst_uv, int pix);
1487
1488 void HalfRow_16_C(const uint16* src_uv, int src_uv_stride,
1489                   uint16* dst_uv, int pix);
1490
1491 void ARGBToBayerRow_C(const uint8* src_argb, uint8* dst_bayer,
1492                       uint32 selector, int pix);
1493 void ARGBToBayerRow_SSSE3(const uint8* src_argb, uint8* dst_bayer,
1494                           uint32 selector, int pix);
1495 void ARGBToBayerRow_NEON(const uint8* src_argb, uint8* dst_bayer,
1496                          uint32 selector, int pix);
1497 void ARGBToBayerRow_Any_SSSE3(const uint8* src_argb, uint8* dst_bayer,
1498                               uint32 selector, int pix);
1499 void ARGBToBayerRow_Any_NEON(const uint8* src_argb, uint8* dst_bayer,
1500                              uint32 selector, int pix);
1501 void ARGBToBayerGGRow_C(const uint8* src_argb, uint8* dst_bayer,
1502                         uint32 /* selector */, int pix);
1503 void ARGBToBayerGGRow_SSE2(const uint8* src_argb, uint8* dst_bayer,
1504                            uint32 /* selector */, int pix);
1505 void ARGBToBayerGGRow_NEON(const uint8* src_argb, uint8* dst_bayer,
1506                            uint32 /* selector */, int pix);
1507 void ARGBToBayerGGRow_Any_SSE2(const uint8* src_argb, uint8* dst_bayer,
1508                                uint32 /* selector */, int pix);
1509 void ARGBToBayerGGRow_Any_NEON(const uint8* src_argb, uint8* dst_bayer,
1510                                uint32 /* selector */, int pix);
1511
1512 void I422ToYUY2Row_C(const uint8* src_y,
1513                      const uint8* src_u,
1514                      const uint8* src_v,
1515                      uint8* dst_yuy2, int width);
1516 void I422ToUYVYRow_C(const uint8* src_y,
1517                      const uint8* src_u,
1518                      const uint8* src_v,
1519                      uint8* dst_uyvy, int width);
1520 void I422ToYUY2Row_SSE2(const uint8* src_y,
1521                         const uint8* src_u,
1522                         const uint8* src_v,
1523                         uint8* dst_yuy2, int width);
1524 void I422ToUYVYRow_SSE2(const uint8* src_y,
1525                         const uint8* src_u,
1526                         const uint8* src_v,
1527                         uint8* dst_uyvy, int width);
1528 void I422ToYUY2Row_Any_SSE2(const uint8* src_y,
1529                             const uint8* src_u,
1530                             const uint8* src_v,
1531                             uint8* dst_yuy2, int width);
1532 void I422ToUYVYRow_Any_SSE2(const uint8* src_y,
1533                             const uint8* src_u,
1534                             const uint8* src_v,
1535                             uint8* dst_uyvy, int width);
1536 void I422ToYUY2Row_NEON(const uint8* src_y,
1537                         const uint8* src_u,
1538                         const uint8* src_v,
1539                         uint8* dst_yuy2, int width);
1540 void I422ToUYVYRow_NEON(const uint8* src_y,
1541                         const uint8* src_u,
1542                         const uint8* src_v,
1543                         uint8* dst_uyvy, int width);
1544 void I422ToYUY2Row_Any_NEON(const uint8* src_y,
1545                             const uint8* src_u,
1546                             const uint8* src_v,
1547                             uint8* dst_yuy2, int width);
1548 void I422ToUYVYRow_Any_NEON(const uint8* src_y,
1549                             const uint8* src_u,
1550                             const uint8* src_v,
1551                             uint8* dst_uyvy, int width);
1552
1553 // Effects related row functions.
1554 void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
1555 void ARGBAttenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
1556 void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
1557 void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
1558 void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
1559 void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
1560                                int width);
1561 void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb,
1562                                 int width);
1563 void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
1564                                int width);
1565 void ARGBAttenuateRow_Any_NEON(const uint8* src_argb, uint8* dst_argb,
1566                                int width);
1567
1568 // Inverse table for unattenuate, shared by C and SSE2.
1569 extern const uint32 fixed_invtbl8[256];
1570 void ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
1571 void ARGBUnattenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
1572 void ARGBUnattenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
1573 void ARGBUnattenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
1574                                  int width);
1575 void ARGBUnattenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
1576                                  int width);
1577
1578 void ARGBGrayRow_C(const uint8* src_argb, uint8* dst_argb, int width);
1579 void ARGBGrayRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
1580 void ARGBGrayRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
1581
1582 void ARGBSepiaRow_C(uint8* dst_argb, int width);
1583 void ARGBSepiaRow_SSSE3(uint8* dst_argb, int width);
1584 void ARGBSepiaRow_NEON(uint8* dst_argb, int width);
1585
1586 void ARGBColorMatrixRow_C(const uint8* src_argb, uint8* dst_argb,
1587                           const int8* matrix_argb, int width);
1588 void ARGBColorMatrixRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
1589                               const int8* matrix_argb, int width);
1590 void ARGBColorMatrixRow_NEON(const uint8* src_argb, uint8* dst_argb,
1591                              const int8* matrix_argb, int width);
1592
1593 void ARGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
1594 void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
1595
1596 void RGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
1597 void RGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
1598
1599 void ARGBQuantizeRow_C(uint8* dst_argb, int scale, int interval_size,
1600                        int interval_offset, int width);
1601 void ARGBQuantizeRow_SSE2(uint8* dst_argb, int scale, int interval_size,
1602                           int interval_offset, int width);
1603 void ARGBQuantizeRow_NEON(uint8* dst_argb, int scale, int interval_size,
1604                           int interval_offset, int width);
1605
1606 void ARGBShadeRow_C(const uint8* src_argb, uint8* dst_argb, int width,
1607                     uint32 value);
1608 void ARGBShadeRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width,
1609                        uint32 value);
1610 void ARGBShadeRow_NEON(const uint8* src_argb, uint8* dst_argb, int width,
1611                        uint32 value);
1612
1613 // Used for blur.
1614 void CumulativeSumToAverageRow_SSE2(const int32* topleft, const int32* botleft,
1615                                     int width, int area, uint8* dst, int count);
1616 void ComputeCumulativeSumRow_SSE2(const uint8* row, int32* cumsum,
1617                                   const int32* previous_cumsum, int width);
1618
1619 void CumulativeSumToAverageRow_C(const int32* topleft, const int32* botleft,
1620                                  int width, int area, uint8* dst, int count);
1621 void ComputeCumulativeSumRow_C(const uint8* row, int32* cumsum,
1622                                const int32* previous_cumsum, int width);
1623
1624 LIBYUV_API
1625 void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
1626                      uint8* dst_argb, const float* uv_dudv, int width);
1627 LIBYUV_API
1628 void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
1629                         uint8* dst_argb, const float* uv_dudv, int width);
1630
1631 // Used for I420Scale, ARGBScale, and ARGBInterpolate.
1632 void InterpolateRow_C(uint8* dst_ptr, const uint8* src_ptr,
1633                       ptrdiff_t src_stride_ptr,
1634                       int width, int source_y_fraction);
1635 void InterpolateRow_SSE2(uint8* dst_ptr, const uint8* src_ptr,
1636                          ptrdiff_t src_stride_ptr, int width,
1637                          int source_y_fraction);
1638 void InterpolateRow_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
1639                           ptrdiff_t src_stride_ptr, int width,
1640                           int source_y_fraction);
1641 void InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr,
1642                          ptrdiff_t src_stride_ptr, int width,
1643                          int source_y_fraction);
1644 void InterpolateRow_NEON(uint8* dst_ptr, const uint8* src_ptr,
1645                          ptrdiff_t src_stride_ptr, int width,
1646                          int source_y_fraction);
1647 void InterpolateRows_MIPS_DSPR2(uint8* dst_ptr, const uint8* src_ptr,
1648                                 ptrdiff_t src_stride_ptr, int width,
1649                                 int source_y_fraction);
1650 void InterpolateRow_Unaligned_SSE2(uint8* dst_ptr, const uint8* src_ptr,
1651                                    ptrdiff_t src_stride_ptr, int width,
1652                                    int source_y_fraction);
1653 void InterpolateRow_Unaligned_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
1654                                     ptrdiff_t src_stride_ptr, int width,
1655                                     int source_y_fraction);
1656 void InterpolateRow_Any_NEON(uint8* dst_ptr, const uint8* src_ptr,
1657                              ptrdiff_t src_stride_ptr, int width,
1658                              int source_y_fraction);
1659 void InterpolateRow_Any_SSE2(uint8* dst_ptr, const uint8* src_ptr,
1660                              ptrdiff_t src_stride_ptr, int width,
1661                              int source_y_fraction);
1662 void InterpolateRow_Any_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
1663                               ptrdiff_t src_stride_ptr, int width,
1664                               int source_y_fraction);
1665 void InterpolateRow_Any_AVX2(uint8* dst_ptr, const uint8* src_ptr,
1666                              ptrdiff_t src_stride_ptr, int width,
1667                              int source_y_fraction);
1668 void InterpolateRows_Any_MIPS_DSPR2(uint8* dst_ptr, const uint8* src_ptr,
1669                                     ptrdiff_t src_stride_ptr, int width,
1670                                     int source_y_fraction);
1671
1672 void InterpolateRow_16_C(uint16* dst_ptr, const uint16* src_ptr,
1673                          ptrdiff_t src_stride_ptr,
1674                          int width, int source_y_fraction);
1675
1676 // Sobel images.
1677 void SobelXRow_C(const uint8* src_y0, const uint8* src_y1, const uint8* src_y2,
1678                  uint8* dst_sobelx, int width);
1679 void SobelXRow_SSE2(const uint8* src_y0, const uint8* src_y1,
1680                     const uint8* src_y2, uint8* dst_sobelx, int width);
1681 void SobelXRow_NEON(const uint8* src_y0, const uint8* src_y1,
1682                     const uint8* src_y2, uint8* dst_sobelx, int width);
1683 void SobelYRow_C(const uint8* src_y0, const uint8* src_y1,
1684                  uint8* dst_sobely, int width);
1685 void SobelYRow_SSE2(const uint8* src_y0, const uint8* src_y1,
1686                     uint8* dst_sobely, int width);
1687 void SobelYRow_NEON(const uint8* src_y0, const uint8* src_y1,
1688                     uint8* dst_sobely, int width);
1689 void SobelRow_C(const uint8* src_sobelx, const uint8* src_sobely,
1690                 uint8* dst_argb, int width);
1691 void SobelRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
1692                    uint8* dst_argb, int width);
1693 void SobelRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
1694                    uint8* dst_argb, int width);
1695 void SobelToPlaneRow_C(const uint8* src_sobelx, const uint8* src_sobely,
1696                        uint8* dst_y, int width);
1697 void SobelToPlaneRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
1698                           uint8* dst_y, int width);
1699 void SobelToPlaneRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
1700                           uint8* dst_y, int width);
1701 void SobelXYRow_C(const uint8* src_sobelx, const uint8* src_sobely,
1702                   uint8* dst_argb, int width);
1703 void SobelXYRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
1704                      uint8* dst_argb, int width);
1705 void SobelXYRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
1706                      uint8* dst_argb, int width);
1707
1708 void ARGBPolynomialRow_C(const uint8* src_argb,
1709                          uint8* dst_argb, const float* poly,
1710                          int width);
1711 void ARGBPolynomialRow_SSE2(const uint8* src_argb,
1712                             uint8* dst_argb, const float* poly,
1713                             int width);
1714 void ARGBPolynomialRow_AVX2(const uint8* src_argb,
1715                             uint8* dst_argb, const float* poly,
1716                             int width);
1717
1718 void ARGBLumaColorTableRow_C(const uint8* src_argb, uint8* dst_argb, int width,
1719                              const uint8* luma, uint32 lumacoeff);
1720 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
1721                                  int width,
1722                                  const uint8* luma, uint32 lumacoeff);
1723
1724 #ifdef __cplusplus
1725 }  // extern "C"
1726 }  // namespace libyuv
1727 #endif
1728
1729 #endif  // INCLUDE_LIBYUV_ROW_H_  NOLINT