2 * Copyright 2011 The LibYuv Project Authors. All rights reserved.
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.
11 #ifndef INCLUDE_LIBYUV_ROW_H_ // NOLINT
12 #define INCLUDE_LIBYUV_ROW_H_
14 #include <stdlib.h> // For malloc.
16 #include "libyuv/basic_types.h"
23 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
26 #define align_buffer_64(var, size) \
27 uint8* var##_mem = reinterpret_cast<uint8*>(malloc((size) + 63)); \
28 uint8* var = reinterpret_cast<uint8*> \
29 ((reinterpret_cast<intptr_t>(var##_mem) + 63) & ~63)
31 #define align_buffer_64(var, size) \
32 uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \
33 uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */
36 #define free_aligned_buffer_64(var) \
40 #if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
41 defined(TARGET_IPHONE_SIMULATOR) || \
42 (defined(_MSC_VER) && defined(__clang__))
43 #define LIBYUV_DISABLE_X86
45 // True if compiling for SSSE3 as a requirement.
46 #if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3))
47 #define LIBYUV_SSSE3_ONLY
50 // clang >= 3.5.0 required for Arm64.
51 #if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON)
52 #if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5))
53 #define LIBYUV_DISABLE_NEON
54 #endif // clang >= 3.5
57 // The following are available on all x86 platforms:
58 #if !defined(LIBYUV_DISABLE_X86) && \
59 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
61 #define HAS_ARGBADDROW_SSE2
62 #define HAS_ARGBAFFINEROW_SSE2
63 #define HAS_ARGBATTENUATEROW_SSSE3
64 #define HAS_ARGBBLENDROW_SSSE3
65 #define HAS_ARGBCOLORMATRIXROW_SSSE3
66 #define HAS_ARGBCOLORTABLEROW_X86
67 #define HAS_ARGBCOPYALPHAROW_SSE2
68 #define HAS_ARGBCOPYYTOALPHAROW_SSE2
69 #define HAS_ARGBGRAYROW_SSSE3
70 #define HAS_ARGBLUMACOLORTABLEROW_SSSE3
71 #define HAS_ARGBMIRRORROW_SSSE3
72 #define HAS_ARGBMULTIPLYROW_SSE2
73 #define HAS_ARGBPOLYNOMIALROW_SSE2
74 #define HAS_ARGBQUANTIZEROW_SSE2
75 #define HAS_ARGBSEPIAROW_SSSE3
76 #define HAS_ARGBSHADEROW_SSE2
77 #define HAS_ARGBSUBTRACTROW_SSE2
78 #define HAS_ARGBUNATTENUATEROW_SSE2
79 #define HAS_COMPUTECUMULATIVESUMROW_SSE2
80 #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
81 #define HAS_INTERPOLATEROW_SSE2
82 #define HAS_INTERPOLATEROW_SSSE3
83 #define HAS_RGBCOLORTABLEROW_X86
84 #define HAS_SOBELROW_SSE2
85 #define HAS_SOBELTOPLANEROW_SSE2
86 #define HAS_SOBELXROW_SSE2
87 #define HAS_SOBELXYROW_SSE2
88 #define HAS_SOBELYROW_SSE2
91 #define HAS_ARGBTOUVROW_SSSE3
92 #define HAS_ABGRTOUVROW_SSSE3
93 #define HAS_ABGRTOYROW_SSSE3
94 #define HAS_ARGB1555TOARGBROW_SSE2
95 #define HAS_ARGB4444TOARGBROW_SSE2
96 #define HAS_ARGBSHUFFLEROW_SSE2
97 #define HAS_ARGBSHUFFLEROW_SSSE3
98 #define HAS_ARGBTOARGB1555ROW_SSE2
99 #define HAS_ARGBTOARGB4444ROW_SSE2
100 #define HAS_ARGBTOBAYERGGROW_SSE2
101 #define HAS_ARGBTOBAYERROW_SSSE3
102 #define HAS_ARGBTORAWROW_SSSE3
103 #define HAS_ARGBTORGB24ROW_SSSE3
104 #define HAS_ARGBTORGB565ROW_SSE2
105 #define HAS_ARGBTOUV422ROW_SSSE3
106 #define HAS_ARGBTOUV444ROW_SSSE3
107 #define HAS_ARGBTOUVJROW_SSSE3
108 #define HAS_ARGBTOYJROW_SSSE3
109 #define HAS_ARGBTOYROW_SSSE3
110 #define HAS_BGRATOUVROW_SSSE3
111 #define HAS_BGRATOYROW_SSSE3
112 #define HAS_COPYROW_ERMS
113 #define HAS_COPYROW_SSE2
114 #define HAS_COPYROW_X86
115 #define HAS_I400TOARGBROW_SSE2
116 #define HAS_I411TOARGBROW_SSSE3
117 #define HAS_I422TOARGB1555ROW_SSSE3
118 #define HAS_I422TOABGRROW_SSSE3
119 #define HAS_I422TOARGB1555ROW_SSSE3
120 #define HAS_I422TOARGB4444ROW_SSSE3
121 #define HAS_I422TOARGBROW_SSSE3
122 #define HAS_I422TOBGRAROW_SSSE3
123 #define HAS_I422TORAWROW_SSSE3
124 #define HAS_I422TORGB24ROW_SSSE3
125 #define HAS_I422TORGB565ROW_SSSE3
126 #define HAS_I422TORGBAROW_SSSE3
127 #define HAS_I422TOUYVYROW_SSE2
128 #define HAS_I422TOYUY2ROW_SSE2
129 #define HAS_I444TOARGBROW_SSSE3
130 #define HAS_MERGEUVROW_SSE2
131 #define HAS_MIRRORROW_SSE2
132 #define HAS_MIRRORROW_SSSE3
133 #define HAS_MIRRORROW_UV_SSSE3
134 #define HAS_MIRRORUVROW_SSSE3
135 #define HAS_NV12TOARGBROW_SSSE3
136 #define HAS_NV12TORGB565ROW_SSSE3
137 #define HAS_NV21TOARGBROW_SSSE3
138 #define HAS_NV21TORGB565ROW_SSSE3
139 #define HAS_RAWTOARGBROW_SSSE3
140 #define HAS_RAWTOYROW_SSSE3
141 #define HAS_RGB24TOARGBROW_SSSE3
142 #define HAS_RGB24TOYROW_SSSE3
143 #define HAS_RGB565TOARGBROW_SSE2
144 #define HAS_RGBATOUVROW_SSSE3
145 #define HAS_RGBATOYROW_SSSE3
146 #define HAS_SETROW_X86
147 #define HAS_SPLITUVROW_SSE2
148 #define HAS_UYVYTOARGBROW_SSSE3
149 #define HAS_UYVYTOUV422ROW_SSE2
150 #define HAS_UYVYTOUVROW_SSE2
151 #define HAS_UYVYTOYROW_SSE2
152 #define HAS_YTOARGBROW_SSE2
153 #define HAS_YUY2TOARGBROW_SSSE3
154 #define HAS_YUY2TOUV422ROW_SSE2
155 #define HAS_YUY2TOUVROW_SSE2
156 #define HAS_YUY2TOYROW_SSE2
159 // The following are available on x64 Visual C:
160 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64)
161 #define HAS_I422TOARGBROW_SSSE3
164 // GCC >= 4.7.0 required for AVX2.
165 #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
166 #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
167 #define GCC_HAS_AVX2 1
168 #endif // GNUC >= 4.7
171 // clang >= 3.4.0 required for AVX2.
172 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
173 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
174 #define CLANG_HAS_AVX2 1
175 #endif // clang >= 3.4
178 // Visual C 2012 required for AVX2.
179 #if defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1700
180 #define VISUALC_HAS_AVX2 1
181 #endif // VisualStudio >= 2012
183 // The following are available on all x86 platforms, but
184 // require VS2012, clang 3.4 or gcc 4.7.
185 // The code supports NaCL but requires a new compiler and validator.
186 #if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \
187 defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
189 #define HAS_COPYROW_AVX
190 #define HAS_ARGBPOLYNOMIALROW_AVX2
191 #define HAS_ARGBSHUFFLEROW_AVX2
192 #define HAS_ARGBCOPYALPHAROW_AVX2
193 #define HAS_ARGBCOPYYTOALPHAROW_AVX2
196 // The following are require VS2012.
197 // TODO(fbarchard): Port to gcc.
198 #if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
199 #define HAS_ARGBTOUVROW_AVX2
200 #define HAS_ARGBTOYJROW_AVX2
201 #define HAS_ARGBTOYROW_AVX2
202 #define HAS_I422TOARGBROW_AVX2
203 #define HAS_I422TOBGRAROW_AVX2
204 #define HAS_INTERPOLATEROW_AVX2
205 #define HAS_MERGEUVROW_AVX2
206 #define HAS_MIRRORROW_AVX2
207 #define HAS_SPLITUVROW_AVX2
208 #define HAS_UYVYTOUV422ROW_AVX2
209 #define HAS_UYVYTOUVROW_AVX2
210 #define HAS_UYVYTOYROW_AVX2
211 #define HAS_YUY2TOUV422ROW_AVX2
212 #define HAS_YUY2TOUVROW_AVX2
213 #define HAS_YUY2TOYROW_AVX2
216 #define HAS_ARGBADDROW_AVX2
217 #define HAS_ARGBATTENUATEROW_AVX2
218 #define HAS_ARGBMIRRORROW_AVX2
219 #define HAS_ARGBMULTIPLYROW_AVX2
220 #define HAS_ARGBSUBTRACTROW_AVX2
221 #define HAS_ARGBUNATTENUATEROW_AVX2
222 #endif // defined(VISUALC_HAS_AVX2)
224 // The following are Yasm x86 only:
225 // TODO(fbarchard): Port AVX2 to inline.
226 #if !defined(LIBYUV_DISABLE_X86) && defined(HAVE_YASM)
227 (defined(_M_IX86) || defined(_M_X64) || \
228 defined(__x86_64__) || defined(__i386__))
229 #define HAS_MERGEUVROW_AVX2
230 #define HAS_MERGEUVROW_MMX
231 #define HAS_SPLITUVROW_AVX2
232 #define HAS_SPLITUVROW_MMX
233 #define HAS_UYVYTOYROW_AVX2
234 #define HAS_UYVYTOYROW_MMX
235 #define HAS_YUY2TOYROW_AVX2
236 #define HAS_YUY2TOYROW_MMX
239 // The following are disabled when SSSE3 is available:
240 #if !defined(LIBYUV_DISABLE_X86) && \
241 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) && \
242 !defined(LIBYUV_SSSE3_ONLY)
243 #define HAS_ARGBBLENDROW_SSE2
244 #define HAS_ARGBATTENUATEROW_SSE2
245 #define HAS_MIRRORROW_SSE2
248 // The following are available on arm64 platforms:
249 #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
250 #define HAS_I444TOARGBROW_NEON
251 #define HAS_I422TOARGBROW_NEON
252 #define HAS_I411TOARGBROW_NEON
253 #define HAS_I422TOBGRAROW_NEON
254 #define HAS_I422TOABGRROW_NEON
255 #define HAS_I422TORGBAROW_NEON
256 #define HAS_I422TORGB24ROW_NEON
257 #define HAS_I422TORAWROW_NEON
258 #define HAS_I422TORGB565ROW_NEON
259 #define HAS_I422TOARGB1555ROW_NEON
260 #define HAS_I422TOARGB4444ROW_NEON
261 #define HAS_YTOARGBROW_NEON
262 #define HAS_I400TOARGBROW_NEON
263 #define HAS_NV12TOARGBROW_NEON
264 #define HAS_NV21TOARGBROW_NEON
265 #define HAS_NV12TORGB565ROW_NEON
266 #define HAS_NV21TORGB565ROW_NEON
267 #define HAS_YUY2TOARGBROW_NEON
268 #define HAS_UYVYTOARGBROW_NEON
269 #define HAS_SPLITUVROW_NEON
270 #define HAS_MERGEUVROW_NEON
271 #define HAS_COPYROW_NEON
272 #define HAS_SETROW_NEON
273 #define HAS_ARGBSETROWS_NEON
274 #define HAS_MIRRORROW_NEON
275 #define HAS_MIRRORUVROW_NEON
276 #define HAS_ARGBMIRRORROW_NEON
277 #define HAS_RGB24TOARGBROW_NEON
278 #define HAS_RAWTOARGBROW_NEON
279 #define HAS_RGB565TOARGBROW_NEON
280 #define HAS_ARGB1555TOARGBROW_NEON
281 #define HAS_ARGB4444TOARGBROW_NEON
282 #define HAS_ARGBTORGB24ROW_NEON
283 #define HAS_ARGBTORAWROW_NEON
284 #define HAS_YUY2TOYROW_NEON
285 #define HAS_UYVYTOYROW_NEON
286 #define HAS_YUY2TOUV422ROW_NEON
287 #define HAS_UYVYTOUV422ROW_NEON
288 #define HAS_YUY2TOUVROW_NEON
289 #define HAS_UYVYTOUVROW_NEON
290 #define HAS_ARGBTOBAYERROW_NEON
291 #define HAS_ARGBTOBAYERGGROW_NEON
292 #define HAS_ARGBSHUFFLEROW_NEON
293 #define HAS_I422TOYUY2ROW_NEON
294 #define HAS_I422TOUYVYROW_NEON
295 #define HAS_ARGBTORGB565ROW_NEON
296 #define HAS_ARGBTOARGB1555ROW_NEON
297 #define HAS_ARGBTOARGB4444ROW_NEON
298 #define HAS_ARGBTOYROW_NEON
299 #define HAS_ARGBTOYJROW_NEON
300 #define HAS_ARGBTOUV444ROW_NEON
301 #define HAS_ARGBTOUV422ROW_NEON
302 #define HAS_ARGBTOUV411ROW_NEON
303 #define HAS_ARGBTOUVROW_NEON
304 #define HAS_ARGBTOUVJROW_NEON
305 #define HAS_BGRATOUVROW_NEON
306 #define HAS_ABGRTOUVROW_NEON
307 #define HAS_RGBATOUVROW_NEON
308 #define HAS_RGB24TOUVROW_NEON
309 #define HAS_RAWTOUVROW_NEON
310 #define HAS_RGB565TOUVROW_NEON
311 #define HAS_ARGB1555TOUVROW_NEON
312 #define HAS_ARGB4444TOUVROW_NEON
313 #define HAS_RGB565TOYROW_NEON
314 #define HAS_ARGB1555TOYROW_NEON
315 #define HAS_ARGB4444TOYROW_NEON
316 #define HAS_BGRATOYROW_NEON
317 #define HAS_ABGRTOYROW_NEON
318 #define HAS_RGBATOYROW_NEON
319 #define HAS_RGB24TOYROW_NEON
320 #define HAS_RAWTOYROW_NEON
321 #define HAS_INTERPOLATEROW_NEON
322 #define HAS_ARGBBLENDROW_NEON
323 #define HAS_ARGBATTENUATEROW_NEON
324 #define HAS_ARGBQUANTIZEROW_NEON
325 #define HAS_ARGBSHADEROW_NEON
326 #define HAS_ARGBGRAYROW_NEON
327 #define HAS_ARGBSEPIAROW_NEON
328 #define HAS_ARGBCOLORMATRIXROW_NEON
329 #define HAS_ARGBMULTIPLYROW_NEON
330 #define HAS_ARGBADDROW_NEON
331 #define HAS_ARGBSUBTRACTROW_NEON
332 #define HAS_SOBELROW_NEON
333 #define HAS_SOBELTOPLANEROW_NEON
334 #define HAS_SOBELXYROW_NEON
335 #define HAS_SOBELXROW_NEON
336 #define HAS_SOBELYROW_NEON
339 // The following are available on Neon platforms:
340 #if !defined(LIBYUV_DISABLE_NEON) && !defined(__aarch64__) && \
341 (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
342 #define HAS_ABGRTOUVROW_NEON
343 #define HAS_ABGRTOYROW_NEON
344 #define HAS_ARGB1555TOARGBROW_NEON
345 #define HAS_ARGB1555TOUVROW_NEON
346 #define HAS_ARGB1555TOYROW_NEON
347 #define HAS_ARGB4444TOARGBROW_NEON
348 #define HAS_ARGB4444TOUVROW_NEON
349 #define HAS_ARGB4444TOYROW_NEON
350 #define HAS_ARGBTOARGB1555ROW_NEON
351 #define HAS_ARGBTOARGB4444ROW_NEON
352 #define HAS_ARGBTOBAYERROW_NEON
353 #define HAS_ARGBTOBAYERGGROW_NEON
354 #define HAS_ARGBTORAWROW_NEON
355 #define HAS_ARGBTORGB24ROW_NEON
356 #define HAS_ARGBTORGB565ROW_NEON
357 #define HAS_ARGBTOUV411ROW_NEON
358 #define HAS_ARGBTOUV422ROW_NEON
359 #define HAS_ARGBTOUV444ROW_NEON
360 #define HAS_ARGBTOUVROW_NEON
361 #define HAS_ARGBTOUVJROW_NEON
362 #define HAS_ARGBTOYROW_NEON
363 #define HAS_ARGBTOYJROW_NEON
364 #define HAS_BGRATOUVROW_NEON
365 #define HAS_BGRATOYROW_NEON
366 #define HAS_COPYROW_NEON
367 #define HAS_I400TOARGBROW_NEON
368 #define HAS_I411TOARGBROW_NEON
369 #define HAS_I422TOABGRROW_NEON
370 #define HAS_I422TOARGB1555ROW_NEON
371 #define HAS_I422TOARGB4444ROW_NEON
372 #define HAS_I422TOARGBROW_NEON
373 #define HAS_I422TOBGRAROW_NEON
374 #define HAS_I422TORAWROW_NEON
375 #define HAS_I422TORGB24ROW_NEON
376 #define HAS_I422TORGB565ROW_NEON
377 #define HAS_I422TORGBAROW_NEON
378 #define HAS_I422TOUYVYROW_NEON
379 #define HAS_I422TOYUY2ROW_NEON
380 #define HAS_I444TOARGBROW_NEON
381 #define HAS_MERGEUVROW_NEON
382 #define HAS_MIRRORROW_NEON
383 #define HAS_MIRRORUVROW_NEON
384 #define HAS_NV12TOARGBROW_NEON
385 #define HAS_NV12TORGB565ROW_NEON
386 #define HAS_NV21TOARGBROW_NEON
387 #define HAS_NV21TORGB565ROW_NEON
388 #define HAS_RAWTOARGBROW_NEON
389 #define HAS_RAWTOUVROW_NEON
390 #define HAS_RAWTOYROW_NEON
391 #define HAS_RGB24TOARGBROW_NEON
392 #define HAS_RGB24TOUVROW_NEON
393 #define HAS_RGB24TOYROW_NEON
394 #define HAS_RGB565TOARGBROW_NEON
395 #define HAS_RGB565TOUVROW_NEON
396 #define HAS_RGB565TOYROW_NEON
397 #define HAS_RGBATOUVROW_NEON
398 #define HAS_RGBATOYROW_NEON
399 #define HAS_SETROW_NEON
400 #define HAS_SPLITUVROW_NEON
401 #define HAS_UYVYTOARGBROW_NEON
402 #define HAS_UYVYTOUV422ROW_NEON
403 #define HAS_UYVYTOUVROW_NEON
404 #define HAS_UYVYTOYROW_NEON
405 #define HAS_YTOARGBROW_NEON
406 #define HAS_YUY2TOARGBROW_NEON
407 #define HAS_YUY2TOUV422ROW_NEON
408 #define HAS_YUY2TOUVROW_NEON
409 #define HAS_YUY2TOYROW_NEON
412 #define HAS_ARGBADDROW_NEON
413 #define HAS_ARGBATTENUATEROW_NEON
414 #define HAS_ARGBBLENDROW_NEON
415 #define HAS_ARGBGRAYROW_NEON
416 #define HAS_ARGBMIRRORROW_NEON
417 #define HAS_ARGBMULTIPLYROW_NEON
418 #define HAS_ARGBQUANTIZEROW_NEON
419 #define HAS_ARGBSEPIAROW_NEON
420 #define HAS_ARGBSHADEROW_NEON
421 #define HAS_ARGBSUBTRACTROW_NEON
422 #define HAS_SOBELROW_NEON
423 #define HAS_SOBELTOPLANEROW_NEON
424 #define HAS_SOBELXYROW_NEON
425 #define HAS_SOBELXROW_NEON
426 #define HAS_SOBELYROW_NEON
427 #define HAS_INTERPOLATEROW_NEON
428 // TODO(fbarchard): Investigate neon unittest failure.
429 // #define HAS_ARGBCOLORMATRIXROW_NEON
432 // The following are available on Mips platforms:
433 #if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \
434 (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6)
435 #define HAS_COPYROW_MIPS
436 #if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
437 #define HAS_I422TOABGRROW_MIPS_DSPR2
438 #define HAS_I422TOARGBROW_MIPS_DSPR2
439 #define HAS_I422TOBGRAROW_MIPS_DSPR2
440 #define HAS_INTERPOLATEROWS_MIPS_DSPR2
441 #define HAS_MIRRORROW_MIPS_DSPR2
442 #define HAS_MIRRORUVROW_MIPS_DSPR2
443 #define HAS_SPLITUVROW_MIPS_DSPR2
447 #if defined(_MSC_VER) && !defined(__CLR_VER)
448 #define SIMD_ALIGNED(var) __declspec(align(16)) var
449 typedef __declspec(align(16)) int16 vec16[8];
450 typedef __declspec(align(16)) int32 vec32[4];
451 typedef __declspec(align(16)) int8 vec8[16];
452 typedef __declspec(align(16)) uint16 uvec16[8];
453 typedef __declspec(align(16)) uint32 uvec32[4];
454 typedef __declspec(align(16)) uint8 uvec8[16];
455 typedef __declspec(align(32)) int16 lvec16[16];
456 typedef __declspec(align(32)) int32 lvec32[8];
457 typedef __declspec(align(32)) int8 lvec8[32];
458 typedef __declspec(align(32)) uint16 ulvec16[16];
459 typedef __declspec(align(32)) uint32 ulvec32[8];
460 typedef __declspec(align(32)) uint8 ulvec8[32];
462 #elif defined(__GNUC__)
463 // Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
464 #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
465 typedef int16 __attribute__((vector_size(16))) vec16;
466 typedef int32 __attribute__((vector_size(16))) vec32;
467 typedef int8 __attribute__((vector_size(16))) vec8;
468 typedef uint16 __attribute__((vector_size(16))) uvec16;
469 typedef uint32 __attribute__((vector_size(16))) uvec32;
470 typedef uint8 __attribute__((vector_size(16))) uvec8;
472 #define SIMD_ALIGNED(var) var
473 typedef int16 vec16[8];
474 typedef int32 vec32[4];
475 typedef int8 vec8[16];
476 typedef uint16 uvec16[8];
477 typedef uint32 uvec32[4];
478 typedef uint8 uvec8[16];
481 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__)
484 #define OMITFP __attribute__((optimize("omit-frame-pointer")))
487 // NaCL macros for GCC x86 and x64.
488 #if defined(__native_client__)
489 #define LABELALIGN ".p2align 5\n"
491 #define LABELALIGN ".p2align 2\n"
493 #if defined(__native_client__) && defined(__x86_64__)
494 #define BUNDLELOCK ".bundle_lock\n"
495 #define BUNDLEUNLOCK ".bundle_unlock\n"
496 #define BUNDLEALIGN "\n"
497 #define MEMACCESS(base) "%%nacl:(%%r15,%q" #base ")"
498 #define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")"
499 #define MEMLEA(offset, base) #offset "(%q" #base ")"
500 #define MEMLEA3(offset, index, scale) \
501 #offset "(,%q" #index "," #scale ")"
502 #define MEMLEA4(offset, base, index, scale) \
503 #offset "(%q" #base ",%q" #index "," #scale ")"
504 #define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15"
505 #define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15"
506 #define MEMOPREG(opcode, offset, base, index, scale, reg) \
508 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
509 #opcode " (%%r15,%%r14),%%" #reg "\n" \
511 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \
513 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
514 #opcode " %%" #reg ",(%%r15,%%r14)\n" \
516 #define MEMOPARG(opcode, offset, base, index, scale, arg) \
518 "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
519 #opcode " (%%r15,%%r14),%" #arg "\n" \
521 #else // defined(__native_client__) && defined(__x86_64__)
522 #define BUNDLEALIGN "\n"
523 #define MEMACCESS(base) "(%" #base ")"
524 #define MEMACCESS2(offset, base) #offset "(%" #base ")"
525 #define MEMLEA(offset, base) #offset "(%" #base ")"
526 #define MEMLEA3(offset, index, scale) \
527 #offset "(,%" #index "," #scale ")"
528 #define MEMLEA4(offset, base, index, scale) \
529 #offset "(%" #base ",%" #index "," #scale ")"
530 #define MEMMOVESTRING(s, d)
531 #define MEMSTORESTRING(reg, d)
532 #define MEMOPREG(opcode, offset, base, index, scale, reg) \
533 #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n"
534 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \
535 #opcode " %%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n"
536 #define MEMOPARG(opcode, offset, base, index, scale, arg) \
537 #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n"
538 #endif // defined(__native_client__) && defined(__x86_64__)
540 #if defined(__arm__) || defined(__aarch64__)
542 #if defined(__native_client__)
543 #define MEMACCESS(base) ".p2align 3\nbic %" #base ", #0xc0000000\n"
545 #define MEMACCESS(base) "\n"
549 void I444ToARGBRow_NEON(const uint8* src_y,
554 void I422ToARGBRow_NEON(const uint8* src_y,
559 void I411ToARGBRow_NEON(const uint8* src_y,
564 void I422ToBGRARow_NEON(const uint8* src_y,
569 void I422ToABGRRow_NEON(const uint8* src_y,
574 void I422ToRGBARow_NEON(const uint8* src_y,
579 void I422ToRGB24Row_NEON(const uint8* src_y,
584 void I422ToRAWRow_NEON(const uint8* src_y,
589 void I422ToRGB565Row_NEON(const uint8* src_y,
594 void I422ToARGB1555Row_NEON(const uint8* src_y,
599 void I422ToARGB4444Row_NEON(const uint8* src_y,
604 void NV12ToARGBRow_NEON(const uint8* src_y,
608 void NV21ToARGBRow_NEON(const uint8* src_y,
612 void NV12ToRGB565Row_NEON(const uint8* src_y,
616 void NV21ToRGB565Row_NEON(const uint8* src_y,
620 void YUY2ToARGBRow_NEON(const uint8* src_yuy2,
623 void UYVYToARGBRow_NEON(const uint8* src_uyvy,
627 void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
628 void ARGBToYRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
629 void ARGBToYRow_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
630 void ARGBToYJRow_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
631 void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
632 void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
633 void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int pix);
634 void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int pix);
635 void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int pix);
636 void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int pix);
637 void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int pix);
638 void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int pix);
639 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int pix);
640 void ARGBToUV444Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
642 void ARGBToUV422Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
644 void ARGBToUV411Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
646 void ARGBToUVRow_NEON(const uint8* src_argb, int src_stride_argb,
647 uint8* dst_u, uint8* dst_v, int pix);
648 void ARGBToUVJRow_NEON(const uint8* src_argb, int src_stride_argb,
649 uint8* dst_u, uint8* dst_v, int pix);
650 void BGRAToUVRow_NEON(const uint8* src_bgra, int src_stride_bgra,
651 uint8* dst_u, uint8* dst_v, int pix);
652 void ABGRToUVRow_NEON(const uint8* src_abgr, int src_stride_abgr,
653 uint8* dst_u, uint8* dst_v, int pix);
654 void RGBAToUVRow_NEON(const uint8* src_rgba, int src_stride_rgba,
655 uint8* dst_u, uint8* dst_v, int pix);
656 void RGB24ToUVRow_NEON(const uint8* src_rgb24, int src_stride_rgb24,
657 uint8* dst_u, uint8* dst_v, int pix);
658 void RAWToUVRow_NEON(const uint8* src_raw, int src_stride_raw,
659 uint8* dst_u, uint8* dst_v, int pix);
660 void RGB565ToUVRow_NEON(const uint8* src_rgb565, int src_stride_rgb565,
661 uint8* dst_u, uint8* dst_v, int pix);
662 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, int src_stride_argb1555,
663 uint8* dst_u, uint8* dst_v, int pix);
664 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, int src_stride_argb4444,
665 uint8* dst_u, uint8* dst_v, int pix);
666 void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int pix);
667 void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int pix);
668 void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int pix);
669 void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int pix);
670 void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int pix);
671 void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int pix);
672 void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int pix);
673 void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int pix);
674 void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int pix);
675 void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int pix);
676 void BGRAToYRow_C(const uint8* src_bgra, uint8* dst_y, int pix);
677 void ABGRToYRow_C(const uint8* src_abgr, uint8* dst_y, int pix);
678 void RGBAToYRow_C(const uint8* src_rgba, uint8* dst_y, int pix);
679 void RGB24ToYRow_C(const uint8* src_rgb24, uint8* dst_y, int pix);
680 void RAWToYRow_C(const uint8* src_raw, uint8* dst_y, int pix);
681 void RGB565ToYRow_C(const uint8* src_rgb565, uint8* dst_y, int pix);
682 void ARGB1555ToYRow_C(const uint8* src_argb1555, uint8* dst_y, int pix);
683 void ARGB4444ToYRow_C(const uint8* src_argb4444, uint8* dst_y, int pix);
684 void ARGBToYRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
685 void ARGBToYJRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
686 void BGRAToYRow_Any_SSSE3(const uint8* src_bgra, uint8* dst_y, int pix);
687 void ABGRToYRow_Any_SSSE3(const uint8* src_abgr, uint8* dst_y, int pix);
688 void RGBAToYRow_Any_SSSE3(const uint8* src_rgba, uint8* dst_y, int pix);
689 void RGB24ToYRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_y, int pix);
690 void RAWToYRow_Any_SSSE3(const uint8* src_raw, uint8* dst_y, int pix);
691 void ARGBToYRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int pix);
692 void ARGBToYJRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int pix);
693 void BGRAToYRow_Any_NEON(const uint8* src_bgra, uint8* dst_y, int pix);
694 void ABGRToYRow_Any_NEON(const uint8* src_abgr, uint8* dst_y, int pix);
695 void RGBAToYRow_Any_NEON(const uint8* src_rgba, uint8* dst_y, int pix);
696 void RGB24ToYRow_Any_NEON(const uint8* src_rgb24, uint8* dst_y, int pix);
697 void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int pix);
698 void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int pix);
699 void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, uint8* dst_y, int pix);
700 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, uint8* dst_y, int pix);
702 void ARGBToUVRow_AVX2(const uint8* src_argb, int src_stride_argb,
703 uint8* dst_u, uint8* dst_v, int width);
704 void ARGBToUVRow_Any_AVX2(const uint8* src_argb, int src_stride_argb,
705 uint8* dst_u, uint8* dst_v, int width);
706 void ARGBToUVRow_SSSE3(const uint8* src_argb, int src_stride_argb,
707 uint8* dst_u, uint8* dst_v, int width);
708 void ARGBToUVJRow_SSSE3(const uint8* src_argb, int src_stride_argb,
709 uint8* dst_u, uint8* dst_v, int width);
710 void BGRAToUVRow_SSSE3(const uint8* src_bgra, int src_stride_bgra,
711 uint8* dst_u, uint8* dst_v, int width);
712 void ABGRToUVRow_SSSE3(const uint8* src_abgr, int src_stride_abgr,
713 uint8* dst_u, uint8* dst_v, int width);
714 void RGBAToUVRow_SSSE3(const uint8* src_rgba, int src_stride_rgba,
715 uint8* dst_u, uint8* dst_v, int width);
716 void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb,
717 uint8* dst_u, uint8* dst_v, int width);
718 void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb,
719 uint8* dst_u, uint8* dst_v, int width);
720 void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, int src_stride_bgra,
721 uint8* dst_u, uint8* dst_v, int width);
722 void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, int src_stride_abgr,
723 uint8* dst_u, uint8* dst_v, int width);
724 void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, int src_stride_rgba,
725 uint8* dst_u, uint8* dst_v, int width);
726 void ARGBToUV444Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
728 void ARGBToUV422Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
730 void ARGBToUV411Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
732 void ARGBToUVRow_Any_NEON(const uint8* src_argb, int src_stride_argb,
733 uint8* dst_u, uint8* dst_v, int pix);
734 void ARGBToUVJRow_Any_NEON(const uint8* src_argb, int src_stride_argb,
735 uint8* dst_u, uint8* dst_v, int pix);
736 void BGRAToUVRow_Any_NEON(const uint8* src_bgra, int src_stride_bgra,
737 uint8* dst_u, uint8* dst_v, int pix);
738 void ABGRToUVRow_Any_NEON(const uint8* src_abgr, int src_stride_abgr,
739 uint8* dst_u, uint8* dst_v, int pix);
740 void RGBAToUVRow_Any_NEON(const uint8* src_rgba, int src_stride_rgba,
741 uint8* dst_u, uint8* dst_v, int pix);
742 void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, int src_stride_rgb24,
743 uint8* dst_u, uint8* dst_v, int pix);
744 void RAWToUVRow_Any_NEON(const uint8* src_raw, int src_stride_raw,
745 uint8* dst_u, uint8* dst_v, int pix);
746 void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, int src_stride_rgb565,
747 uint8* dst_u, uint8* dst_v, int pix);
748 void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555,
749 int src_stride_argb1555,
750 uint8* dst_u, uint8* dst_v, int pix);
751 void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444,
752 int src_stride_argb4444,
753 uint8* dst_u, uint8* dst_v, int pix);
754 void ARGBToUVRow_C(const uint8* src_argb, int src_stride_argb,
755 uint8* dst_u, uint8* dst_v, int width);
756 void ARGBToUVJRow_C(const uint8* src_argb, int src_stride_argb,
757 uint8* dst_u, uint8* dst_v, int width);
758 void BGRAToUVRow_C(const uint8* src_bgra, int src_stride_bgra,
759 uint8* dst_u, uint8* dst_v, int width);
760 void ABGRToUVRow_C(const uint8* src_abgr, int src_stride_abgr,
761 uint8* dst_u, uint8* dst_v, int width);
762 void RGBAToUVRow_C(const uint8* src_rgba, int src_stride_rgba,
763 uint8* dst_u, uint8* dst_v, int width);
764 void RGB24ToUVRow_C(const uint8* src_rgb24, int src_stride_rgb24,
765 uint8* dst_u, uint8* dst_v, int width);
766 void RAWToUVRow_C(const uint8* src_raw, int src_stride_raw,
767 uint8* dst_u, uint8* dst_v, int width);
768 void RGB565ToUVRow_C(const uint8* src_rgb565, int src_stride_rgb565,
769 uint8* dst_u, uint8* dst_v, int width);
770 void ARGB1555ToUVRow_C(const uint8* src_argb1555, int src_stride_argb1555,
771 uint8* dst_u, uint8* dst_v, int width);
772 void ARGB4444ToUVRow_C(const uint8* src_argb4444, int src_stride_argb4444,
773 uint8* dst_u, uint8* dst_v, int width);
775 void ARGBToUV444Row_SSSE3(const uint8* src_argb,
776 uint8* dst_u, uint8* dst_v, int width);
777 void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb,
778 uint8* dst_u, uint8* dst_v, int width);
780 void ARGBToUV422Row_SSSE3(const uint8* src_argb,
781 uint8* dst_u, uint8* dst_v, int width);
782 void ARGBToUV422Row_Any_SSSE3(const uint8* src_argb,
783 uint8* dst_u, uint8* dst_v, int width);
785 void ARGBToUV444Row_C(const uint8* src_argb,
786 uint8* dst_u, uint8* dst_v, int width);
787 void ARGBToUV422Row_C(const uint8* src_argb,
788 uint8* dst_u, uint8* dst_v, int width);
789 void ARGBToUV411Row_C(const uint8* src_argb,
790 uint8* dst_u, uint8* dst_v, int width);
792 void MirrorRow_AVX2(const uint8* src, uint8* dst, int width);
793 void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width);
794 void MirrorRow_SSE2(const uint8* src, uint8* dst, int width);
795 void MirrorRow_NEON(const uint8* src, uint8* dst, int width);
796 void MirrorRow_MIPS_DSPR2(const uint8* src, uint8* dst, int width);
797 void MirrorRow_C(const uint8* src, uint8* dst, int width);
799 void MirrorUVRow_SSSE3(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
801 void MirrorUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
803 void MirrorUVRow_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
805 void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
808 void ARGBMirrorRow_AVX2(const uint8* src, uint8* dst, int width);
809 void ARGBMirrorRow_SSSE3(const uint8* src, uint8* dst, int width);
810 void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width);
811 void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width);
813 void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
814 void SplitUVRow_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
815 void SplitUVRow_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
816 void SplitUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
817 void SplitUVRow_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
819 void SplitUVRow_Any_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
821 void SplitUVRow_Any_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
823 void SplitUVRow_Any_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
825 void SplitUVRow_Any_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
828 void MergeUVRow_C(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
830 void MergeUVRow_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
832 void MergeUVRow_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
834 void MergeUVRow_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
836 void MergeUVRow_Any_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
838 void MergeUVRow_Any_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
840 void MergeUVRow_Any_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
843 void CopyRow_SSE2(const uint8* src, uint8* dst, int count);
844 void CopyRow_AVX(const uint8* src, uint8* dst, int count);
845 void CopyRow_ERMS(const uint8* src, uint8* dst, int count);
846 void CopyRow_X86(const uint8* src, uint8* dst, int count);
847 void CopyRow_NEON(const uint8* src, uint8* dst, int count);
848 void CopyRow_MIPS(const uint8* src, uint8* dst, int count);
849 void CopyRow_C(const uint8* src, uint8* dst, int count);
851 void CopyRow_16_C(const uint16* src, uint16* dst, int count);
853 void ARGBCopyAlphaRow_C(const uint8* src_argb, uint8* dst_argb, int width);
854 void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
855 void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
857 void ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width);
858 void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
859 void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
861 void SetRow_X86(uint8* dst, uint32 v32, int count);
862 void ARGBSetRows_X86(uint8* dst, uint32 v32, int width,
863 int dst_stride, int height);
864 void SetRow_NEON(uint8* dst, uint32 v32, int count);
865 void ARGBSetRows_NEON(uint8* dst, uint32 v32, int width,
866 int dst_stride, int height);
867 void SetRow_C(uint8* dst, uint32 v32, int count);
868 void ARGBSetRows_C(uint8* dst, uint32 v32, int width, int dst_stride,
871 // ARGBShufflers for BGRAToARGB etc.
872 void ARGBShuffleRow_C(const uint8* src_argb, uint8* dst_argb,
873 const uint8* shuffler, int pix);
874 void ARGBShuffleRow_SSE2(const uint8* src_argb, uint8* dst_argb,
875 const uint8* shuffler, int pix);
876 void ARGBShuffleRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
877 const uint8* shuffler, int pix);
878 void ARGBShuffleRow_AVX2(const uint8* src_argb, uint8* dst_argb,
879 const uint8* shuffler, int pix);
880 void ARGBShuffleRow_NEON(const uint8* src_argb, uint8* dst_argb,
881 const uint8* shuffler, int pix);
882 void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
883 const uint8* shuffler, int pix);
884 void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb,
885 const uint8* shuffler, int pix);
886 void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
887 const uint8* shuffler, int pix);
888 void ARGBShuffleRow_Any_NEON(const uint8* src_argb, uint8* dst_argb,
889 const uint8* shuffler, int pix);
891 void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix);
892 void RAWToARGBRow_SSSE3(const uint8* src_raw, uint8* dst_argb, int pix);
893 void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int pix);
894 void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, uint8* dst_argb,
896 void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, uint8* dst_argb,
899 void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int pix);
900 void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int pix);
901 void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int pix);
902 void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, uint8* dst_argb,
904 void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, uint8* dst_argb,
906 void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int pix);
907 void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int pix);
908 void RGB565ToARGBRow_C(const uint8* src_rgb, uint8* dst_argb, int pix);
909 void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int pix);
910 void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int pix);
911 void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix);
912 void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int pix);
913 void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, uint8* dst_argb,
915 void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, uint8* dst_argb,
917 void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, uint8* dst_argb,
919 void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, uint8* dst_argb, int pix);
920 void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int pix);
921 void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, uint8* dst_argb,
923 void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, uint8* dst_argb,
925 void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444, uint8* dst_argb,
928 void ARGBToRGB24Row_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
929 void ARGBToRAWRow_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
930 void ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
931 void ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
932 void ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
934 void ARGBToRGB24Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
935 void ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
936 void ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
937 void ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
938 void ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
940 void ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int pix);
941 void ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
942 void ARGBToRAWRow_C(const uint8* src_argb, uint8* dst_rgb, int pix);
943 void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
944 void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
945 void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
947 void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
948 void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int pix);
949 void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int pix);
950 void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
951 void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int pix);
953 void I444ToARGBRow_C(const uint8* src_y,
958 void I422ToARGBRow_C(const uint8* src_y,
963 void I411ToARGBRow_C(const uint8* src_y,
968 void NV12ToARGBRow_C(const uint8* src_y,
972 void NV21ToRGB565Row_C(const uint8* src_y,
976 void NV12ToRGB565Row_C(const uint8* src_y,
980 void NV21ToARGBRow_C(const uint8* src_y,
984 void YUY2ToARGBRow_C(const uint8* src_yuy2,
987 void UYVYToARGBRow_C(const uint8* src_uyvy,
990 void I422ToBGRARow_C(const uint8* src_y,
995 void I422ToABGRRow_C(const uint8* src_y,
1000 void I422ToRGBARow_C(const uint8* src_y,
1005 void I422ToRGB24Row_C(const uint8* src_y,
1010 void I422ToRAWRow_C(const uint8* src_y,
1015 void I422ToARGB4444Row_C(const uint8* src_y,
1018 uint8* dst_argb4444,
1020 void I422ToARGB1555Row_C(const uint8* src_y,
1023 uint8* dst_argb4444,
1025 void I422ToRGB565Row_C(const uint8* src_y,
1030 void YToARGBRow_C(const uint8* src_y,
1033 void I422ToARGBRow_AVX2(const uint8* src_y,
1038 void I422ToBGRARow_AVX2(const uint8* src_y,
1043 void I444ToARGBRow_SSSE3(const uint8* src_y,
1048 void I422ToARGBRow_SSSE3(const uint8* src_y,
1053 void I411ToARGBRow_SSSE3(const uint8* src_y,
1058 void NV12ToARGBRow_SSSE3(const uint8* src_y,
1059 const uint8* src_uv,
1062 void NV21ToARGBRow_SSSE3(const uint8* src_y,
1063 const uint8* src_vu,
1066 void NV12ToRGB565Row_SSSE3(const uint8* src_y,
1067 const uint8* src_uv,
1070 void NV21ToRGB565Row_SSSE3(const uint8* src_y,
1071 const uint8* src_vu,
1074 void YUY2ToARGBRow_SSSE3(const uint8* src_yuy2,
1077 void UYVYToARGBRow_SSSE3(const uint8* src_uyvy,
1080 void I422ToBGRARow_SSSE3(const uint8* src_y,
1085 void I422ToABGRRow_SSSE3(const uint8* src_y,
1090 void I422ToRGBARow_SSSE3(const uint8* src_y,
1095 void I422ToARGB4444Row_SSSE3(const uint8* src_y,
1100 void I422ToARGB1555Row_SSSE3(const uint8* src_y,
1105 void I422ToRGB565Row_SSSE3(const uint8* src_y,
1110 void I422ToRGB24Row_SSSE3(const uint8* src_y,
1115 void I422ToRAWRow_SSSE3(const uint8* src_y,
1120 void I422ToARGBRow_Any_AVX2(const uint8* src_y,
1125 void I422ToBGRARow_Any_AVX2(const uint8* src_y,
1130 void I444ToARGBRow_Any_SSSE3(const uint8* src_y,
1135 void I422ToARGBRow_Any_SSSE3(const uint8* src_y,
1140 void I411ToARGBRow_Any_SSSE3(const uint8* src_y,
1145 void NV12ToARGBRow_Any_SSSE3(const uint8* src_y,
1146 const uint8* src_uv,
1149 void NV21ToARGBRow_Any_SSSE3(const uint8* src_y,
1150 const uint8* src_vu,
1153 void NV12ToRGB565Row_Any_SSSE3(const uint8* src_y,
1154 const uint8* src_uv,
1157 void NV21ToRGB565Row_Any_SSSE3(const uint8* src_y,
1158 const uint8* src_vu,
1161 void YUY2ToARGBRow_Any_SSSE3(const uint8* src_yuy2,
1164 void UYVYToARGBRow_Any_SSSE3(const uint8* src_uyvy,
1167 void I422ToBGRARow_Any_SSSE3(const uint8* src_y,
1172 void I422ToABGRRow_Any_SSSE3(const uint8* src_y,
1177 void I422ToRGBARow_Any_SSSE3(const uint8* src_y,
1182 void I422ToARGB4444Row_Any_SSSE3(const uint8* src_y,
1187 void I422ToARGB1555Row_Any_SSSE3(const uint8* src_y,
1192 void I422ToRGB565Row_Any_SSSE3(const uint8* src_y,
1197 void I422ToRGB24Row_Any_SSSE3(const uint8* src_y,
1202 void I422ToRAWRow_Any_SSSE3(const uint8* src_y,
1207 void YToARGBRow_SSE2(const uint8* src_y,
1210 void YToARGBRow_NEON(const uint8* src_y,
1213 void YToARGBRow_Any_SSE2(const uint8* src_y,
1216 void YToARGBRow_Any_NEON(const uint8* src_y,
1220 // ARGB preattenuated alpha blend.
1221 void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1,
1222 uint8* dst_argb, int width);
1223 void ARGBBlendRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1224 uint8* dst_argb, int width);
1225 void ARGBBlendRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1226 uint8* dst_argb, int width);
1227 void ARGBBlendRow_C(const uint8* src_argb, const uint8* src_argb1,
1228 uint8* dst_argb, int width);
1230 // ARGB multiply images. Same API as Blend, but these require
1231 // pointer and width alignment for SSE2.
1232 void ARGBMultiplyRow_C(const uint8* src_argb, const uint8* src_argb1,
1233 uint8* dst_argb, int width);
1234 void ARGBMultiplyRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1235 uint8* dst_argb, int width);
1236 void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
1237 uint8* dst_argb, int width);
1238 void ARGBMultiplyRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
1239 uint8* dst_argb, int width);
1240 void ARGBMultiplyRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
1241 uint8* dst_argb, int width);
1242 void ARGBMultiplyRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1243 uint8* dst_argb, int width);
1244 void ARGBMultiplyRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
1245 uint8* dst_argb, int width);
1248 void ARGBAddRow_C(const uint8* src_argb, const uint8* src_argb1,
1249 uint8* dst_argb, int width);
1250 void ARGBAddRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1251 uint8* dst_argb, int width);
1252 void ARGBAddRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
1253 uint8* dst_argb, int width);
1254 void ARGBAddRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
1255 uint8* dst_argb, int width);
1256 void ARGBAddRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
1257 uint8* dst_argb, int width);
1258 void ARGBAddRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1259 uint8* dst_argb, int width);
1260 void ARGBAddRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
1261 uint8* dst_argb, int width);
1263 // ARGB subtract images. Same API as Blend, but these require
1264 // pointer and width alignment for SSE2.
1265 void ARGBSubtractRow_C(const uint8* src_argb, const uint8* src_argb1,
1266 uint8* dst_argb, int width);
1267 void ARGBSubtractRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1268 uint8* dst_argb, int width);
1269 void ARGBSubtractRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
1270 uint8* dst_argb, int width);
1271 void ARGBSubtractRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
1272 uint8* dst_argb, int width);
1273 void ARGBSubtractRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
1274 uint8* dst_argb, int width);
1275 void ARGBSubtractRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1276 uint8* dst_argb, int width);
1277 void ARGBSubtractRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
1278 uint8* dst_argb, int width);
1280 void ARGBToRGB24Row_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
1281 void ARGBToRAWRow_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
1282 void ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1283 void ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1284 void ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1286 void ARGBToRGB24Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1287 void ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1288 void ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1289 void ARGBToARGB1555Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1290 void ARGBToARGB4444Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1292 void I444ToARGBRow_Any_NEON(const uint8* src_y,
1297 void I422ToARGBRow_Any_NEON(const uint8* src_y,
1302 void I411ToARGBRow_Any_NEON(const uint8* src_y,
1307 void I422ToBGRARow_Any_NEON(const uint8* src_y,
1312 void I422ToABGRRow_Any_NEON(const uint8* src_y,
1317 void I422ToRGBARow_Any_NEON(const uint8* src_y,
1322 void I422ToRGB24Row_Any_NEON(const uint8* src_y,
1327 void I422ToRAWRow_Any_NEON(const uint8* src_y,
1332 void I422ToARGB4444Row_Any_NEON(const uint8* src_y,
1337 void I422ToARGB1555Row_Any_NEON(const uint8* src_y,
1342 void I422ToRGB565Row_Any_NEON(const uint8* src_y,
1347 void NV12ToARGBRow_Any_NEON(const uint8* src_y,
1348 const uint8* src_uv,
1351 void NV21ToARGBRow_Any_NEON(const uint8* src_y,
1352 const uint8* src_uv,
1355 void NV12ToRGB565Row_Any_NEON(const uint8* src_y,
1356 const uint8* src_uv,
1359 void NV21ToRGB565Row_Any_NEON(const uint8* src_y,
1360 const uint8* src_uv,
1363 void YUY2ToARGBRow_Any_NEON(const uint8* src_yuy2,
1366 void UYVYToARGBRow_Any_NEON(const uint8* src_uyvy,
1369 void I422ToARGBRow_MIPS_DSPR2(const uint8* src_y,
1374 void I422ToBGRARow_MIPS_DSPR2(const uint8* src_y,
1379 void I422ToABGRRow_MIPS_DSPR2(const uint8* src_y,
1384 void I422ToARGBRow_MIPS_DSPR2(const uint8* src_y,
1389 void I422ToBGRARow_MIPS_DSPR2(const uint8* src_y,
1394 void I422ToABGRRow_MIPS_DSPR2(const uint8* src_y,
1400 void YUY2ToYRow_AVX2(const uint8* src_yuy2, uint8* dst_y, int pix);
1401 void YUY2ToUVRow_AVX2(const uint8* src_yuy2, int stride_yuy2,
1402 uint8* dst_u, uint8* dst_v, int pix);
1403 void YUY2ToUV422Row_AVX2(const uint8* src_yuy2,
1404 uint8* dst_u, uint8* dst_v, int pix);
1405 void YUY2ToYRow_SSE2(const uint8* src_yuy2, uint8* dst_y, int pix);
1406 void YUY2ToUVRow_SSE2(const uint8* src_yuy2, int stride_yuy2,
1407 uint8* dst_u, uint8* dst_v, int pix);
1408 void YUY2ToUV422Row_SSE2(const uint8* src_yuy2,
1409 uint8* dst_u, uint8* dst_v, int pix);
1410 void YUY2ToYRow_NEON(const uint8* src_yuy2, uint8* dst_y, int pix);
1411 void YUY2ToUVRow_NEON(const uint8* src_yuy2, int stride_yuy2,
1412 uint8* dst_u, uint8* dst_v, int pix);
1413 void YUY2ToUV422Row_NEON(const uint8* src_yuy2,
1414 uint8* dst_u, uint8* dst_v, int pix);
1415 void YUY2ToYRow_C(const uint8* src_yuy2, uint8* dst_y, int pix);
1416 void YUY2ToUVRow_C(const uint8* src_yuy2, int stride_yuy2,
1417 uint8* dst_u, uint8* dst_v, int pix);
1418 void YUY2ToUV422Row_C(const uint8* src_yuy2,
1419 uint8* dst_u, uint8* dst_v, int pix);
1420 void YUY2ToYRow_Any_AVX2(const uint8* src_yuy2, uint8* dst_y, int pix);
1421 void YUY2ToUVRow_Any_AVX2(const uint8* src_yuy2, int stride_yuy2,
1422 uint8* dst_u, uint8* dst_v, int pix);
1423 void YUY2ToUV422Row_Any_AVX2(const uint8* src_yuy2,
1424 uint8* dst_u, uint8* dst_v, int pix);
1425 void YUY2ToYRow_Any_SSE2(const uint8* src_yuy2, uint8* dst_y, int pix);
1426 void YUY2ToUVRow_Any_SSE2(const uint8* src_yuy2, int stride_yuy2,
1427 uint8* dst_u, uint8* dst_v, int pix);
1428 void YUY2ToUV422Row_Any_SSE2(const uint8* src_yuy2,
1429 uint8* dst_u, uint8* dst_v, int pix);
1430 void YUY2ToYRow_Any_NEON(const uint8* src_yuy2, uint8* dst_y, int pix);
1431 void YUY2ToUVRow_Any_NEON(const uint8* src_yuy2, int stride_yuy2,
1432 uint8* dst_u, uint8* dst_v, int pix);
1433 void YUY2ToUV422Row_Any_NEON(const uint8* src_yuy2,
1434 uint8* dst_u, uint8* dst_v, int pix);
1435 void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1436 void UYVYToUVRow_AVX2(const uint8* src_uyvy, int stride_uyvy,
1437 uint8* dst_u, uint8* dst_v, int pix);
1438 void UYVYToUV422Row_AVX2(const uint8* src_uyvy,
1439 uint8* dst_u, uint8* dst_v, int pix);
1440 void UYVYToYRow_SSE2(const uint8* src_uyvy, uint8* dst_y, int pix);
1441 void UYVYToUVRow_SSE2(const uint8* src_uyvy, int stride_uyvy,
1442 uint8* dst_u, uint8* dst_v, int pix);
1443 void UYVYToUV422Row_SSE2(const uint8* src_uyvy,
1444 uint8* dst_u, uint8* dst_v, int pix);
1445 void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1446 void UYVYToUVRow_AVX2(const uint8* src_uyvy, int stride_uyvy,
1447 uint8* dst_u, uint8* dst_v, int pix);
1448 void UYVYToUV422Row_AVX2(const uint8* src_uyvy,
1449 uint8* dst_u, uint8* dst_v, int pix);
1450 void UYVYToYRow_NEON(const uint8* src_uyvy, uint8* dst_y, int pix);
1451 void UYVYToUVRow_NEON(const uint8* src_uyvy, int stride_uyvy,
1452 uint8* dst_u, uint8* dst_v, int pix);
1453 void UYVYToUV422Row_NEON(const uint8* src_uyvy,
1454 uint8* dst_u, uint8* dst_v, int pix);
1456 void UYVYToYRow_C(const uint8* src_uyvy, uint8* dst_y, int pix);
1457 void UYVYToUVRow_C(const uint8* src_uyvy, int stride_uyvy,
1458 uint8* dst_u, uint8* dst_v, int pix);
1459 void UYVYToUV422Row_C(const uint8* src_uyvy,
1460 uint8* dst_u, uint8* dst_v, int pix);
1461 void UYVYToYRow_Any_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1462 void UYVYToUVRow_Any_AVX2(const uint8* src_uyvy, int stride_uyvy,
1463 uint8* dst_u, uint8* dst_v, int pix);
1464 void UYVYToUV422Row_Any_AVX2(const uint8* src_uyvy,
1465 uint8* dst_u, uint8* dst_v, int pix);
1466 void UYVYToYRow_Any_SSE2(const uint8* src_uyvy, uint8* dst_y, int pix);
1467 void UYVYToUVRow_Any_SSE2(const uint8* src_uyvy, int stride_uyvy,
1468 uint8* dst_u, uint8* dst_v, int pix);
1469 void UYVYToUV422Row_Any_SSE2(const uint8* src_uyvy,
1470 uint8* dst_u, uint8* dst_v, int pix);
1471 void UYVYToYRow_Any_NEON(const uint8* src_uyvy, uint8* dst_y, int pix);
1472 void UYVYToUVRow_Any_NEON(const uint8* src_uyvy, int stride_uyvy,
1473 uint8* dst_u, uint8* dst_v, int pix);
1474 void UYVYToUV422Row_Any_NEON(const uint8* src_uyvy,
1475 uint8* dst_u, uint8* dst_v, int pix);
1477 void ARGBToBayerRow_C(const uint8* src_argb, uint8* dst_bayer,
1478 uint32 selector, int pix);
1479 void ARGBToBayerRow_SSSE3(const uint8* src_argb, uint8* dst_bayer,
1480 uint32 selector, int pix);
1481 void ARGBToBayerRow_NEON(const uint8* src_argb, uint8* dst_bayer,
1482 uint32 selector, int pix);
1483 void ARGBToBayerRow_Any_SSSE3(const uint8* src_argb, uint8* dst_bayer,
1484 uint32 selector, int pix);
1485 void ARGBToBayerRow_Any_NEON(const uint8* src_argb, uint8* dst_bayer,
1486 uint32 selector, int pix);
1487 void ARGBToBayerGGRow_C(const uint8* src_argb, uint8* dst_bayer,
1488 uint32 /* selector */, int pix);
1489 void ARGBToBayerGGRow_SSE2(const uint8* src_argb, uint8* dst_bayer,
1490 uint32 /* selector */, int pix);
1491 void ARGBToBayerGGRow_NEON(const uint8* src_argb, uint8* dst_bayer,
1492 uint32 /* selector */, int pix);
1493 void ARGBToBayerGGRow_Any_SSE2(const uint8* src_argb, uint8* dst_bayer,
1494 uint32 /* selector */, int pix);
1495 void ARGBToBayerGGRow_Any_NEON(const uint8* src_argb, uint8* dst_bayer,
1496 uint32 /* selector */, int pix);
1498 void I422ToYUY2Row_C(const uint8* src_y,
1501 uint8* dst_yuy2, int width);
1502 void I422ToUYVYRow_C(const uint8* src_y,
1505 uint8* dst_uyvy, int width);
1506 void I422ToYUY2Row_SSE2(const uint8* src_y,
1509 uint8* dst_yuy2, int width);
1510 void I422ToUYVYRow_SSE2(const uint8* src_y,
1513 uint8* dst_uyvy, int width);
1514 void I422ToYUY2Row_Any_SSE2(const uint8* src_y,
1517 uint8* dst_yuy2, int width);
1518 void I422ToUYVYRow_Any_SSE2(const uint8* src_y,
1521 uint8* dst_uyvy, int width);
1522 void I422ToYUY2Row_NEON(const uint8* src_y,
1525 uint8* dst_yuy2, int width);
1526 void I422ToUYVYRow_NEON(const uint8* src_y,
1529 uint8* dst_uyvy, int width);
1530 void I422ToYUY2Row_Any_NEON(const uint8* src_y,
1533 uint8* dst_yuy2, int width);
1534 void I422ToUYVYRow_Any_NEON(const uint8* src_y,
1537 uint8* dst_uyvy, int width);
1539 // Effects related row functions.
1540 void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
1541 void ARGBAttenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
1542 void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
1543 void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
1544 void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
1545 void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
1547 void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb,
1549 void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
1551 void ARGBAttenuateRow_Any_NEON(const uint8* src_argb, uint8* dst_argb,
1554 // Inverse table for unattenuate, shared by C and SSE2.
1555 extern const uint32 fixed_invtbl8[256];
1556 void ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
1557 void ARGBUnattenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
1558 void ARGBUnattenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
1559 void ARGBUnattenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
1561 void ARGBUnattenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
1564 void ARGBGrayRow_C(const uint8* src_argb, uint8* dst_argb, int width);
1565 void ARGBGrayRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
1566 void ARGBGrayRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
1568 void ARGBSepiaRow_C(uint8* dst_argb, int width);
1569 void ARGBSepiaRow_SSSE3(uint8* dst_argb, int width);
1570 void ARGBSepiaRow_NEON(uint8* dst_argb, int width);
1572 void ARGBColorMatrixRow_C(const uint8* src_argb, uint8* dst_argb,
1573 const int8* matrix_argb, int width);
1574 void ARGBColorMatrixRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
1575 const int8* matrix_argb, int width);
1576 void ARGBColorMatrixRow_NEON(const uint8* src_argb, uint8* dst_argb,
1577 const int8* matrix_argb, int width);
1579 void ARGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
1580 void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
1582 void RGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
1583 void RGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
1585 void ARGBQuantizeRow_C(uint8* dst_argb, int scale, int interval_size,
1586 int interval_offset, int width);
1587 void ARGBQuantizeRow_SSE2(uint8* dst_argb, int scale, int interval_size,
1588 int interval_offset, int width);
1589 void ARGBQuantizeRow_NEON(uint8* dst_argb, int scale, int interval_size,
1590 int interval_offset, int width);
1592 void ARGBShadeRow_C(const uint8* src_argb, uint8* dst_argb, int width,
1594 void ARGBShadeRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width,
1596 void ARGBShadeRow_NEON(const uint8* src_argb, uint8* dst_argb, int width,
1600 void CumulativeSumToAverageRow_SSE2(const int32* topleft, const int32* botleft,
1601 int width, int area, uint8* dst, int count);
1602 void ComputeCumulativeSumRow_SSE2(const uint8* row, int32* cumsum,
1603 const int32* previous_cumsum, int width);
1605 void CumulativeSumToAverageRow_C(const int32* topleft, const int32* botleft,
1606 int width, int area, uint8* dst, int count);
1607 void ComputeCumulativeSumRow_C(const uint8* row, int32* cumsum,
1608 const int32* previous_cumsum, int width);
1611 void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
1612 uint8* dst_argb, const float* uv_dudv, int width);
1614 void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
1615 uint8* dst_argb, const float* uv_dudv, int width);
1617 // Used for I420Scale, ARGBScale, and ARGBInterpolate.
1618 void InterpolateRow_C(uint8* dst_ptr, const uint8* src_ptr,
1619 ptrdiff_t src_stride_ptr,
1620 int width, int source_y_fraction);
1621 void InterpolateRow_SSE2(uint8* dst_ptr, const uint8* src_ptr,
1622 ptrdiff_t src_stride_ptr, int width,
1623 int source_y_fraction);
1624 void InterpolateRow_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
1625 ptrdiff_t src_stride_ptr, int width,
1626 int source_y_fraction);
1627 void InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr,
1628 ptrdiff_t src_stride_ptr, int width,
1629 int source_y_fraction);
1630 void InterpolateRow_NEON(uint8* dst_ptr, const uint8* src_ptr,
1631 ptrdiff_t src_stride_ptr, int width,
1632 int source_y_fraction);
1633 void InterpolateRows_MIPS_DSPR2(uint8* dst_ptr, const uint8* src_ptr,
1634 ptrdiff_t src_stride_ptr, int width,
1635 int source_y_fraction);
1636 void InterpolateRow_Any_NEON(uint8* dst_ptr, const uint8* src_ptr,
1637 ptrdiff_t src_stride_ptr, int width,
1638 int source_y_fraction);
1639 void InterpolateRow_Any_SSE2(uint8* dst_ptr, const uint8* src_ptr,
1640 ptrdiff_t src_stride_ptr, int width,
1641 int source_y_fraction);
1642 void InterpolateRow_Any_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
1643 ptrdiff_t src_stride_ptr, int width,
1644 int source_y_fraction);
1645 void InterpolateRow_Any_AVX2(uint8* dst_ptr, const uint8* src_ptr,
1646 ptrdiff_t src_stride_ptr, int width,
1647 int source_y_fraction);
1648 void InterpolateRows_Any_MIPS_DSPR2(uint8* dst_ptr, const uint8* src_ptr,
1649 ptrdiff_t src_stride_ptr, int width,
1650 int source_y_fraction);
1652 void InterpolateRow_16_C(uint16* dst_ptr, const uint16* src_ptr,
1653 ptrdiff_t src_stride_ptr,
1654 int width, int source_y_fraction);
1657 void SobelXRow_C(const uint8* src_y0, const uint8* src_y1, const uint8* src_y2,
1658 uint8* dst_sobelx, int width);
1659 void SobelXRow_SSE2(const uint8* src_y0, const uint8* src_y1,
1660 const uint8* src_y2, uint8* dst_sobelx, int width);
1661 void SobelXRow_NEON(const uint8* src_y0, const uint8* src_y1,
1662 const uint8* src_y2, uint8* dst_sobelx, int width);
1663 void SobelYRow_C(const uint8* src_y0, const uint8* src_y1,
1664 uint8* dst_sobely, int width);
1665 void SobelYRow_SSE2(const uint8* src_y0, const uint8* src_y1,
1666 uint8* dst_sobely, int width);
1667 void SobelYRow_NEON(const uint8* src_y0, const uint8* src_y1,
1668 uint8* dst_sobely, int width);
1669 void SobelRow_C(const uint8* src_sobelx, const uint8* src_sobely,
1670 uint8* dst_argb, int width);
1671 void SobelRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
1672 uint8* dst_argb, int width);
1673 void SobelRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
1674 uint8* dst_argb, int width);
1675 void SobelToPlaneRow_C(const uint8* src_sobelx, const uint8* src_sobely,
1676 uint8* dst_y, int width);
1677 void SobelToPlaneRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
1678 uint8* dst_y, int width);
1679 void SobelToPlaneRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
1680 uint8* dst_y, int width);
1681 void SobelXYRow_C(const uint8* src_sobelx, const uint8* src_sobely,
1682 uint8* dst_argb, int width);
1683 void SobelXYRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
1684 uint8* dst_argb, int width);
1685 void SobelXYRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
1686 uint8* dst_argb, int width);
1688 void ARGBPolynomialRow_C(const uint8* src_argb,
1689 uint8* dst_argb, const float* poly,
1691 void ARGBPolynomialRow_SSE2(const uint8* src_argb,
1692 uint8* dst_argb, const float* poly,
1694 void ARGBPolynomialRow_AVX2(const uint8* src_argb,
1695 uint8* dst_argb, const float* poly,
1698 void ARGBLumaColorTableRow_C(const uint8* src_argb, uint8* dst_argb, int width,
1699 const uint8* luma, uint32 lumacoeff);
1700 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
1702 const uint8* luma, uint32 lumacoeff);
1706 } // namespace libyuv
1709 #endif // INCLUDE_LIBYUV_ROW_H_ NOLINT