1aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org/*
2b0c97975894a5eebebf9d93147cdd941a3accb63fbarchard@google.com *  Copyright 2011 The LibYuv Project Authors. All rights reserved.
3aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org *
4aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org *  Use of this source code is governed by a BSD-style license
5aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org *  that can be found in the LICENSE file in the root of the source
6aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org *  tree. An additional intellectual property rights grant can be found
7cde587092fef0dbed2c35602f30b79e7b892e766fbarchard@google.com *  in the file PATENTS. All contributing project authors may
8aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org *  be found in the AUTHORS file in the root of the source tree.
9aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org */
10aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org
11142f6c4ed5eaeec0176f255e64bac8d8c70b42e1fbarchard@google.com#ifndef INCLUDE_LIBYUV_ROW_H_  // NOLINT
12142f6c4ed5eaeec0176f255e64bac8d8c70b42e1fbarchard@google.com#define INCLUDE_LIBYUV_ROW_H_
13aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org
14ae9a1388a71a3154ef7d6f753c8e568c97554fc0fbarchard@google.com#include <stdlib.h>  // For malloc.
15ae9a1388a71a3154ef7d6f753c8e568c97554fc0fbarchard@google.com
166b6eb8cd362be377ebb6d4ee1d3590f886ea1805fbarchard@google.com#include "libyuv/basic_types.h"
176b6eb8cd362be377ebb6d4ee1d3590f886ea1805fbarchard@google.com
18e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com#ifdef __cplusplus
19e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comnamespace libyuv {
20e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comextern "C" {
21e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com#endif
22e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com
231c5136d0699d8705971d765902ae692759f15d21fbarchard@google.com#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
24b61497636a648c771ac55d184a80b17aca7414f5fbarchard@google.com
25a1f5254a955c5c32484b56822596a4e3368e8eb7fbarchard@google.com#ifdef __cplusplus
26ae9a1388a71a3154ef7d6f753c8e568c97554fc0fbarchard@google.com#define align_buffer_64(var, size)                                             \
27ecf5a1446eca7ce9f66600cb08ad7a6e032eac91fbarchard@google.com  uint8* var##_mem = reinterpret_cast<uint8*>(malloc((size) + 63));            \
28ecf5a1446eca7ce9f66600cb08ad7a6e032eac91fbarchard@google.com  uint8* var = reinterpret_cast<uint8*>                                        \
29ecf5a1446eca7ce9f66600cb08ad7a6e032eac91fbarchard@google.com      ((reinterpret_cast<intptr_t>(var##_mem) + 63) & ~63)
30a1f5254a955c5c32484b56822596a4e3368e8eb7fbarchard@google.com#else
31a1f5254a955c5c32484b56822596a4e3368e8eb7fbarchard@google.com#define align_buffer_64(var, size)                                             \
32ecf5a1446eca7ce9f66600cb08ad7a6e032eac91fbarchard@google.com  uint8* var##_mem = (uint8*)(malloc((size) + 63));               /* NOLINT */ \
33ecf5a1446eca7ce9f66600cb08ad7a6e032eac91fbarchard@google.com  uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63)       /* NOLINT */
34a1f5254a955c5c32484b56822596a4e3368e8eb7fbarchard@google.com#endif
35ae9a1388a71a3154ef7d6f753c8e568c97554fc0fbarchard@google.com
36ae9a1388a71a3154ef7d6f753c8e568c97554fc0fbarchard@google.com#define free_aligned_buffer_64(var) \
37ae9a1388a71a3154ef7d6f753c8e568c97554fc0fbarchard@google.com  free(var##_mem);  \
38ae9a1388a71a3154ef7d6f753c8e568c97554fc0fbarchard@google.com  var = 0
39ae9a1388a71a3154ef7d6f753c8e568c97554fc0fbarchard@google.com
402c8108e6c2c6fa0c62670a70be7ef6f59cf03848fbarchard@google.com#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
41f8a86cb095e919b7009df9af6a68b604254de604fbarchard@google.com    defined(TARGET_IPHONE_SIMULATOR)
4283a63e65a6bcbf59f7dc617d0c7275d50625884cfbarchard@google.com#define LIBYUV_DISABLE_X86
43d93d4486eb6cefba07f4707db5cce5509dc0145dfbarchard@google.com#endif
44da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com// True if compiling for SSSE3 as a requirement.
45da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com#if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3))
46da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com#define LIBYUV_SSSE3_ONLY
47da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com#endif
48d93d4486eb6cefba07f4707db5cce5509dc0145dfbarchard@google.com
4955b911ce7b1aed54d310958b2beb1504430f1171fbarchard@google.com// Enable for NaCL pepper 33 for bundle and AVX2 support.
506b6eb8cd362be377ebb6d4ee1d3590f886ea1805fbarchard@google.com//  #define NEW_BINUTILS
5155b911ce7b1aed54d310958b2beb1504430f1171fbarchard@google.com
529cd5bc0ceb4664074b7388472678e4ac504c2639fbarchard@google.com// The following are available on all x86 platforms:
5383a63e65a6bcbf59f7dc617d0c7275d50625884cfbarchard@google.com#if !defined(LIBYUV_DISABLE_X86) && \
54d2f4413d29d15b94d971630ba555dd0cd8fcc8c2fbarchard@google.com    (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
55abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com// Effects:
56abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com#define HAS_ARGBADDROW_SSE2
576f61eb67097b1602c957b5af87a4736e314d7e17fbarchard@google.com#define HAS_ARGBAFFINEROW_SSE2
58008ecea4fe387388255f9d5ffcd8f11cc462b64bfbarchard@google.com#define HAS_ARGBATTENUATEROW_SSSE3
59abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com#define HAS_ARGBBLENDROW_SSSE3
60b8ffdc9e574a1552955dbb62369082c7a475e9fafbarchard@google.com#define HAS_ARGBCOLORMATRIXROW_SSSE3
61e37aed6f422fe326395f5cd419f44874bf9ca939fbarchard@google.com#define HAS_ARGBCOLORTABLEROW_X86
62e37aed6f422fe326395f5cd419f44874bf9ca939fbarchard@google.com#define HAS_ARGBCOPYALPHAROW_SSE2
63e37aed6f422fe326395f5cd419f44874bf9ca939fbarchard@google.com#define HAS_ARGBCOPYYTOALPHAROW_SSE2
64b8ffdc9e574a1552955dbb62369082c7a475e9fafbarchard@google.com#define HAS_ARGBGRAYROW_SSSE3
65e37aed6f422fe326395f5cd419f44874bf9ca939fbarchard@google.com#define HAS_ARGBLUMACOLORTABLEROW_SSSE3
669335518f4127167ee54b0872ab715c674be06005fbarchard@google.com#define HAS_ARGBMIRRORROW_SSSE3
67abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com#define HAS_ARGBMULTIPLYROW_SSE2
68acce9ed482006b1aa14f2dac4b19b6b24d4f5312fbarchard@google.com#define HAS_ARGBPOLYNOMIALROW_SSE2
69b8ffdc9e574a1552955dbb62369082c7a475e9fafbarchard@google.com#define HAS_ARGBQUANTIZEROW_SSE2
70b8ffdc9e574a1552955dbb62369082c7a475e9fafbarchard@google.com#define HAS_ARGBSEPIAROW_SSSE3
71abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com#define HAS_ARGBSHADEROW_SSE2
72abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com#define HAS_ARGBSUBTRACTROW_SSE2
73607dc47533cab251f63fdd315bd365fb265a5a36nfullagar@google.com#define HAS_ARGBTOUVROW_SSSE3
74bb5ea8e4df7aba47d39a0b6e74ce7cc85e5c8c3afbarchard@google.com#define HAS_ARGBUNATTENUATEROW_SSE2
759335518f4127167ee54b0872ab715c674be06005fbarchard@google.com#define HAS_COMPUTECUMULATIVESUMROW_SSE2
76e9a27403d4a681ff92860044927a159bc60a8976nfullagar@google.com#define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
77f78509b3bef818ab9cbda152efc6a614aaa967a1nfullagar@google.com#define HAS_INTERPOLATEROW_SSE2
78f78509b3bef818ab9cbda152efc6a614aaa967a1nfullagar@google.com#define HAS_INTERPOLATEROW_SSSE3
79e37aed6f422fe326395f5cd419f44874bf9ca939fbarchard@google.com#define HAS_RGBCOLORTABLEROW_X86
801c710a06062e47934697ef83bd6538eb84dfc3f9nfullagar@google.com#define HAS_SOBELROW_SSE2
818be4b289c799356d84c68c4eb4b5403285096693fbarchard@google.com#define HAS_SOBELTOPLANEROW_SSE2
82092099507e44e9f429ec52956a20b28db634b910fbarchard@google.com#define HAS_SOBELXROW_SSE2
831c710a06062e47934697ef83bd6538eb84dfc3f9nfullagar@google.com#define HAS_SOBELXYROW_SSE2
84092099507e44e9f429ec52956a20b28db634b910fbarchard@google.com#define HAS_SOBELYROW_SSE2
85abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com
86abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com// Conversions:
87607dc47533cab251f63fdd315bd365fb265a5a36nfullagar@google.com#define HAS_ABGRTOUVROW_SSSE3
888b0cdb4a6e3bc468b1901dcfff7acc93bbb6a981fbarchard@google.com#define HAS_ABGRTOYROW_SSSE3
8967e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_ARGB1555TOARGBROW_SSE2
9067e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_ARGB4444TOARGBROW_SSE2
918b0cdb4a6e3bc468b1901dcfff7acc93bbb6a981fbarchard@google.com#define HAS_ARGBSHUFFLEROW_SSE2
929335518f4127167ee54b0872ab715c674be06005fbarchard@google.com#define HAS_ARGBSHUFFLEROW_SSSE3
9367e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_ARGBTOARGB1555ROW_SSE2
9467e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_ARGBTOARGB4444ROW_SSE2
9508b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.com#define HAS_ARGBTOBAYERGGROW_SSE2
96e37aed6f422fe326395f5cd419f44874bf9ca939fbarchard@google.com#define HAS_ARGBTOBAYERROW_SSSE3
9767e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_ARGBTORAWROW_SSSE3
9867e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_ARGBTORGB24ROW_SSSE3
9967e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_ARGBTORGB565ROW_SSE2
1008b0cdb4a6e3bc468b1901dcfff7acc93bbb6a981fbarchard@google.com#define HAS_ARGBTOUV422ROW_SSSE3
1018b0cdb4a6e3bc468b1901dcfff7acc93bbb6a981fbarchard@google.com#define HAS_ARGBTOUV444ROW_SSSE3
1028b0cdb4a6e3bc468b1901dcfff7acc93bbb6a981fbarchard@google.com#define HAS_ARGBTOUVJROW_SSSE3
103c4a70492c0f2f5b8da259046b951ae0a141bc60efbarchard@google.com#define HAS_ARGBTOYJROW_SSSE3
104c4a70492c0f2f5b8da259046b951ae0a141bc60efbarchard@google.com#define HAS_ARGBTOYROW_SSSE3
105607dc47533cab251f63fdd315bd365fb265a5a36nfullagar@google.com#define HAS_BGRATOUVROW_SSSE3
1068b0cdb4a6e3bc468b1901dcfff7acc93bbb6a981fbarchard@google.com#define HAS_BGRATOYROW_SSSE3
10722402bfa6ff24f4115eefe6ff0e3866acc466e10nfullagar@google.com#define HAS_COPYROW_ERMS
108c140b9d150bb40ff79a2a53ad560494b67fb115ffbarchard@google.com#define HAS_COPYROW_SSE2
109c4a70492c0f2f5b8da259046b951ae0a141bc60efbarchard@google.com#define HAS_COPYROW_X86
1108b0cdb4a6e3bc468b1901dcfff7acc93bbb6a981fbarchard@google.com#define HAS_HALFROW_SSE2
1119335518f4127167ee54b0872ab715c674be06005fbarchard@google.com#define HAS_I400TOARGBROW_SSE2
112797e9ef871912dc927b80edeffdee0c614142a51fbarchard@google.com#define HAS_I411TOARGBROW_SSSE3
11367e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_I422TOARGB1555ROW_SSSE3
114797e9ef871912dc927b80edeffdee0c614142a51fbarchard@google.com#define HAS_I422TOABGRROW_SSSE3
115522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TOARGB1555ROW_SSSE3
116522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TOARGB4444ROW_SSSE3
1172d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com#define HAS_I422TOARGBROW_SSSE3
1182d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com#define HAS_I422TOBGRAROW_SSSE3
1194de0c439aae9f2d40246dfebce82c18a159ebdc8fbarchard@google.com#define HAS_I422TORAWROW_SSSE3
1204de0c439aae9f2d40246dfebce82c18a159ebdc8fbarchard@google.com#define HAS_I422TORGB24ROW_SSSE3
121522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TORGB565ROW_SSSE3
122e91bdaca3674830570cbb2aaab6d5c939f56dee4fbarchard@google.com#define HAS_I422TORGBAROW_SSSE3
123522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TOUYVYROW_SSE2
124522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TOYUY2ROW_SSE2
125d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com#define HAS_I444TOARGBROW_SSSE3
126f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com#define HAS_MERGEUVROW_SSE2
12767e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_MIRRORROW_SSE2
12842831e0aae4c786e40302ac03bf5d679796b5c3ffbarchard@google.com#define HAS_MIRRORROW_SSSE3
12967e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_MIRRORROW_UV_SSSE3
130f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com#define HAS_MIRRORUVROW_SSSE3
131797e9ef871912dc927b80edeffdee0c614142a51fbarchard@google.com#define HAS_NV12TOARGBROW_SSSE3
1329f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com#define HAS_NV12TORGB565ROW_SSSE3
133522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_NV21TOARGBROW_SSSE3
1349f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com#define HAS_NV21TORGB565ROW_SSSE3
135da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com#define HAS_RAWTOARGBROW_SSSE3
136522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RAWTOYROW_SSSE3
137da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com#define HAS_RGB24TOARGBROW_SSSE3
138522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RGB24TOYROW_SSSE3
139da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com#define HAS_RGB565TOARGBROW_SSE2
14067e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_RGBATOUVROW_SSSE3
14167e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_RGBATOYROW_SSSE3
14267e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_SETROW_X86
143f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com#define HAS_SPLITUVROW_SSE2
144522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_UYVYTOARGBROW_SSSE3
145dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com#define HAS_UYVYTOUV422ROW_SSE2
14667e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_UYVYTOUVROW_SSE2
14767e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_UYVYTOYROW_SSE2
148da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com#define HAS_YTOARGBROW_SSE2
149522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_YUY2TOARGBROW_SSSE3
15067e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_YUY2TOUV422ROW_SSE2
15167e64196680c90f5814021c7faacaf3b592db9cbfbarchard@google.com#define HAS_YUY2TOUVROW_SSE2
152da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com#define HAS_YUY2TOYROW_SSE2
1539cd5bc0ceb4664074b7388472678e4ac504c2639fbarchard@google.com#endif
154da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com
155a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com// GCC >= 4.7.0 required for AVX2.
156529558453f6d1f5b828cf79dc9c6020f6bd7164dfbarchard@google.com#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
157529558453f6d1f5b828cf79dc9c6020f6bd7164dfbarchard@google.com#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
158529558453f6d1f5b828cf79dc9c6020f6bd7164dfbarchard@google.com#define GCC_HAS_AVX2 1
159529558453f6d1f5b828cf79dc9c6020f6bd7164dfbarchard@google.com#endif  // GNUC >= 4.7
160529558453f6d1f5b828cf79dc9c6020f6bd7164dfbarchard@google.com#endif  // __GNUC__
161e812e86ea9a5b5206a34ec8a92792dd7ec980c51fbarchard@google.com
162a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com// clang >= 3.4.0 required for AVX2.
163e812e86ea9a5b5206a34ec8a92792dd7ec980c51fbarchard@google.com#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
164e812e86ea9a5b5206a34ec8a92792dd7ec980c51fbarchard@google.com#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
165e812e86ea9a5b5206a34ec8a92792dd7ec980c51fbarchard@google.com#define CLANG_HAS_AVX2 1
166a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com#endif  // clang >= 3.4
167a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com#endif  // __clang__
168e812e86ea9a5b5206a34ec8a92792dd7ec980c51fbarchard@google.com
169a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com// Visual C 2012 required for AVX2.
170a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com#if defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1700
171a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com#define VISUALC_HAS_AVX2 1
172a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com#endif  // VisualStudio >= 2012
173a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com
1749cd5bc0ceb4664074b7388472678e4ac504c2639fbarchard@google.com// The following are available on all x86 platforms, but
175a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com// require VS2012, clang 3.4 or gcc 4.7.
1769cd5bc0ceb4664074b7388472678e4ac504c2639fbarchard@google.com// The code supports NaCL but requires a new compiler and validator.
177a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com#if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \
178a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com    defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
1793cb6071cb9f4df703be38ef5d94749d2edbcf05afbarchard@google.com// Effects:
1803cb6071cb9f4df703be38ef5d94749d2edbcf05afbarchard@google.com#define HAS_ARGBPOLYNOMIALROW_AVX2
181b99bcab7f77ebc724ed451c04e72b589a3d4acbbfbarchard@google.com#define HAS_ARGBSHUFFLEROW_AVX2
182fb99c030088a3d778b59f77b1950af2e00f53180fbarchard@google.com#define HAS_ARGBCOPYALPHAROW_AVX2
183fb99c030088a3d778b59f77b1950af2e00f53180fbarchard@google.com#define HAS_ARGBCOPYYTOALPHAROW_AVX2
1843cb6071cb9f4df703be38ef5d94749d2edbcf05afbarchard@google.com#endif
1853cb6071cb9f4df703be38ef5d94749d2edbcf05afbarchard@google.com
186a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com// The following are require VS2012.
187db694edfc2dcdede9adad7febc4e4b7f9506eee8fbarchard@google.com// TODO(fbarchard): Port to gcc.
188a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com#if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
189551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.com#define HAS_ARGBTOUVROW_AVX2
19091c50c3a7d8736aa5834d6c54ae1c6bbea581e1ffbarchard@google.com#define HAS_ARGBTOYJROW_AVX2
191c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com#define HAS_ARGBTOYROW_AVX2
1924db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_HALFROW_AVX2
193c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com#define HAS_I422TOARGBROW_AVX2
1946da76f3b34e80da2ffebff92d57fd08a93964942fbarchard@google.com#define HAS_INTERPOLATEROW_AVX2
195b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com#define HAS_MERGEUVROW_AVX2
1964db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_MIRRORROW_AVX2
1974db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_SPLITUVROW_AVX2
198b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com#define HAS_UYVYTOUV422ROW_AVX2
199b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com#define HAS_UYVYTOUVROW_AVX2
200b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com#define HAS_UYVYTOYROW_AVX2
2014db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_YUY2TOUV422ROW_AVX2
2024db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_YUY2TOUVROW_AVX2
2034db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_YUY2TOYROW_AVX2
204d5ee3dc9123c9fa4e90ec6b90a5c45f8434cac3ffbarchard@google.com
205abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com// Effects:
2064db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_ARGBADDROW_AVX2
207d5ee3dc9123c9fa4e90ec6b90a5c45f8434cac3ffbarchard@google.com#define HAS_ARGBATTENUATEROW_AVX2
2084db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_ARGBMIRRORROW_AVX2
20951d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.com#define HAS_ARGBMULTIPLYROW_AVX2
21051d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.com#define HAS_ARGBSUBTRACTROW_AVX2
2114db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_ARGBUNATTENUATEROW_AVX2
212a1b5a27f795aa00d164f6ed486b3e050ffc07345fbarchard@google.com#endif  // defined(VISUALC_HAS_AVX2)
213e442dc4c2a896e85419628e3b7d97c4dfbe71c9dfbarchard@google.com
214abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com// The following are Yasm x86 only:
215db694edfc2dcdede9adad7febc4e4b7f9506eee8fbarchard@google.com// TODO(fbarchard): Port AVX2 to inline.
21683a63e65a6bcbf59f7dc617d0c7275d50625884cfbarchard@google.com#if !defined(LIBYUV_DISABLE_X86) && defined(HAVE_YASM)
217db694edfc2dcdede9adad7febc4e4b7f9506eee8fbarchard@google.com    (defined(_M_IX86) || defined(_M_X64) || \
218db694edfc2dcdede9adad7febc4e4b7f9506eee8fbarchard@google.com    defined(__x86_64__) || defined(__i386__))
2194db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_MERGEUVROW_AVX2
2204db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_MERGEUVROW_MMX
221f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com#define HAS_SPLITUVROW_AVX2
222f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com#define HAS_SPLITUVROW_MMX
223db694edfc2dcdede9adad7febc4e4b7f9506eee8fbarchard@google.com#define HAS_UYVYTOYROW_AVX2
224db694edfc2dcdede9adad7febc4e4b7f9506eee8fbarchard@google.com#define HAS_UYVYTOYROW_MMX
2254db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_YUY2TOYROW_AVX2
2264db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_YUY2TOYROW_MMX
227db694edfc2dcdede9adad7febc4e4b7f9506eee8fbarchard@google.com#endif
228db694edfc2dcdede9adad7febc4e4b7f9506eee8fbarchard@google.com
229e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com// The following are disabled when SSSE3 is available:
23083a63e65a6bcbf59f7dc617d0c7275d50625884cfbarchard@google.com#if !defined(LIBYUV_DISABLE_X86) && \
231da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com    (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) && \
232da5cc4274b69efe633293a489e7c9550733daf5cfbarchard@google.com    !defined(LIBYUV_SSSE3_ONLY)
2339bcc9a25355841f844e9fae3ba40522447312a66fbarchard@google.com#define HAS_ARGBBLENDROW_SSE2
234f8a86cb095e919b7009df9af6a68b604254de604fbarchard@google.com#define HAS_ARGBATTENUATEROW_SSE2
23564ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_MIRRORROW_SSE2
236f2c86d01cc46b0851e0bf88429dd064b8c8b0dbafbarchard@google.com#endif
237f2c86d01cc46b0851e0bf88429dd064b8c8b0dbafbarchard@google.com
238abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com// The following are available on Neon platforms:
23914f657b44a6fa2e19573684bea7203cd18975a6efbarchard@google.com#if !defined(LIBYUV_DISABLE_NEON) && \
24037ad8b650717568e34a5ac807b63cc9f072c96b6fbarchard@google.com    (defined(__ARM_NEON__) || defined(LIBYUV_NEON)) && \
24137ad8b650717568e34a5ac807b63cc9f072c96b6fbarchard@google.com    !defined(__native_client__)
242522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ABGRTOUVROW_NEON
243522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ABGRTOYROW_NEON
244522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGB1555TOARGBROW_NEON
245522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGB1555TOUVROW_NEON
246522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGB1555TOYROW_NEON
247522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGB4444TOARGBROW_NEON
248522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGB4444TOUVROW_NEON
249522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGB4444TOYROW_NEON
250522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGBTOARGB1555ROW_NEON
251522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGBTOARGB4444ROW_NEON
2528d37dd5c205216e0ad13c5091061908cb981c5f9fbarchard@google.com#define HAS_ARGBTOBAYERROW_NEON
253c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com#define HAS_ARGBTOBAYERGGROW_NEON
2549de8867ab636128ff667fdf50d3ede83e861d97afbarchard@google.com#define HAS_ARGBTORAWROW_NEON
2559de8867ab636128ff667fdf50d3ede83e861d97afbarchard@google.com#define HAS_ARGBTORGB24ROW_NEON
256522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGBTORGB565ROW_NEON
257522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGBTOUV411ROW_NEON
258522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGBTOUV422ROW_NEON
259522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGBTOUV444ROW_NEON
260522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGBTOUVROW_NEON
261050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.com#define HAS_ARGBTOUVJROW_NEON
262522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_ARGBTOYROW_NEON
263cfaa66c04154eec91951e2596cfe55eb6f2f749efbarchard@google.com#define HAS_ARGBTOYJROW_NEON
264522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_BGRATOUVROW_NEON
265522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_BGRATOYROW_NEON
2660b9a65b0dcdcc433fa05ea33b476095f246f05b7fbarchard@google.com#define HAS_COPYROW_NEON
267e91bdaca3674830570cbb2aaab6d5c939f56dee4fbarchard@google.com#define HAS_HALFROW_NEON
268522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I400TOARGBROW_NEON
269522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I411TOARGBROW_NEON
27064ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_I422TOABGRROW_NEON
271522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TOARGB1555ROW_NEON
272522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TOARGB4444ROW_NEON
273e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com#define HAS_I422TOARGBROW_NEON
274e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com#define HAS_I422TOBGRAROW_NEON
27564ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_I422TORAWROW_NEON
27664ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_I422TORGB24ROW_NEON
27715449263c4bba75bc396dc3d60266efee6ab6c66fbarchard@google.com#define HAS_I422TORGB565ROW_NEON
2782d61b7495dadc22eb1fa6aae29271f0f01bfdc02fbarchard@google.com#define HAS_I422TORGBAROW_NEON
279522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TOUYVYROW_NEON
280522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I422TOYUY2ROW_NEON
281522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_I444TOARGBROW_NEON
282f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com#define HAS_MERGEUVROW_NEON
28364ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_MIRRORROW_NEON
2843e46444727a0524d2f1d81117e0b1404148ac910fbarchard@google.com#define HAS_MIRRORUVROW_NEON
2859de8867ab636128ff667fdf50d3ede83e861d97afbarchard@google.com#define HAS_NV12TOARGBROW_NEON
2869f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com#define HAS_NV12TORGB565ROW_NEON
287522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_NV21TOARGBROW_NEON
2889f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com#define HAS_NV21TORGB565ROW_NEON
289c7277d08e8d33d470b0f4a5e9c3c58f5f250f114fbarchard@google.com#define HAS_RAWTOARGBROW_NEON
290522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RAWTOUVROW_NEON
291522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RAWTOYROW_NEON
292c7277d08e8d33d470b0f4a5e9c3c58f5f250f114fbarchard@google.com#define HAS_RGB24TOARGBROW_NEON
293522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RGB24TOUVROW_NEON
294522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RGB24TOYROW_NEON
295522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RGB565TOARGBROW_NEON
296522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RGB565TOUVROW_NEON
297522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RGB565TOYROW_NEON
298522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RGBATOUVROW_NEON
299522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_RGBATOYROW_NEON
30064ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_SETROW_NEON
301f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com#define HAS_SPLITUVROW_NEON
302522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_UYVYTOARGBROW_NEON
303cc206dee46f09369d5b4dad79ec662fd4289959cfbarchard@google.com#define HAS_UYVYTOUV422ROW_NEON
304cc206dee46f09369d5b4dad79ec662fd4289959cfbarchard@google.com#define HAS_UYVYTOUVROW_NEON
305cc206dee46f09369d5b4dad79ec662fd4289959cfbarchard@google.com#define HAS_UYVYTOYROW_NEON
306522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_YTOARGBROW_NEON
307522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com#define HAS_YUY2TOARGBROW_NEON
30864ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_YUY2TOUV422ROW_NEON
30964ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_YUY2TOUVROW_NEON
31064ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com#define HAS_YUY2TOYROW_NEON
311b5491759b45de37df781d4408a0c46abf6d4ae08fbarchard@google.com
312abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com// Effects:
313512bec91edaea60129d08c2d8053653b9fe51db4fbarchard@google.com#define HAS_ARGBADDROW_NEON
3141d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.com#define HAS_ARGBATTENUATEROW_NEON
315512bec91edaea60129d08c2d8053653b9fe51db4fbarchard@google.com#define HAS_ARGBBLENDROW_NEON
31682375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.com#define HAS_ARGBGRAYROW_NEON
3175659ebc0c069742fb1fcd6237313ee671d85caa2fbarchard@google.com#define HAS_ARGBMIRRORROW_NEON
318b3446fc50c37399706f09235d0a79e7ca54c218efbarchard@google.com#define HAS_ARGBMULTIPLYROW_NEON
319512bec91edaea60129d08c2d8053653b9fe51db4fbarchard@google.com#define HAS_ARGBQUANTIZEROW_NEON
32087adfaa61ea7704874ad3494a3bce3e7364b146afbarchard@google.com#define HAS_ARGBSEPIAROW_NEON
321578c88a9f7114b3ede887b3c6d9a11d8d06b043bfbarchard@google.com#define HAS_ARGBSHADEROW_NEON
322512bec91edaea60129d08c2d8053653b9fe51db4fbarchard@google.com#define HAS_ARGBSUBTRACTROW_NEON
323c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com#define HAS_SOBELROW_NEON
3248be4b289c799356d84c68c4eb4b5403285096693fbarchard@google.com#define HAS_SOBELTOPLANEROW_NEON
325c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com#define HAS_SOBELXYROW_NEON
326c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com#define HAS_SOBELXROW_NEON
327c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com#define HAS_SOBELYROW_NEON
328b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com#define HAS_INTERPOLATEROW_NEON
329b846eb4f6e171e6285caa7c83186db4ec94d624dfbarchard@google.com// TODO(fbarchard): Investigate neon unittest failure.
330b846eb4f6e171e6285caa7c83186db4ec94d624dfbarchard@google.com// #define HAS_ARGBCOLORMATRIXROW_NEON
331fe5ff7ed5451496281697bda9cb85084c532926cfbarchard@google.com#endif
332b61497636a648c771ac55d184a80b17aca7414f5fbarchard@google.com
333abfeea9b81084185b0d3abc8fe5b5c4f496a0c18fbarchard@google.com// The following are available on Mips platforms:
33483a63e65a6bcbf59f7dc617d0c7275d50625884cfbarchard@google.com#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__)
3356c1b2d38c685e769cf7db2806e27c8ec4c028fe3fbarchard@google.com#define HAS_COPYROW_MIPS
336ca41005256d8b16fef98bc3383c44c4a3b79bb44fbarchard@google.com#if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
3374db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_I422TOABGRROW_MIPS_DSPR2
3386c1b2d38c685e769cf7db2806e27c8ec4c028fe3fbarchard@google.com#define HAS_I422TOARGBROW_MIPS_DSPR2
3396c1b2d38c685e769cf7db2806e27c8ec4c028fe3fbarchard@google.com#define HAS_I422TOBGRAROW_MIPS_DSPR2
340b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com#define HAS_INTERPOLATEROWS_MIPS_DSPR2
3414db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_MIRRORROW_MIPS_DSPR2
3424db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_MIRRORUVROW_MIPS_DSPR2
3434db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.com#define HAS_SPLITUVROW_MIPS_DSPR2
344ca41005256d8b16fef98bc3383c44c4a3b79bb44fbarchard@google.com#endif
345ca41005256d8b16fef98bc3383c44c4a3b79bb44fbarchard@google.com#endif
346ca41005256d8b16fef98bc3383c44c4a3b79bb44fbarchard@google.com
347133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.com#if defined(_MSC_VER) && !defined(__CLR_VER)
348ccd6d9b2de6af7985775a2e5537190cf5794dd44fbarchard@google.com#define SIMD_ALIGNED(var) __declspec(align(16)) var
349299c97412c7491807d7ffbd1559c2af76c73c7e0fbarchard@google.comtypedef __declspec(align(16)) int16 vec16[8];
350f51e87912eebc959ac6b9d1ab44978e0e056ca74fbarchard@google.comtypedef __declspec(align(16)) int32 vec32[4];
3514db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef __declspec(align(16)) int8 vec8[16];
3524db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef __declspec(align(16)) uint16 uvec16[8];
3534d3bd8343b8488f978f42112ed4fa3834fbadd77fbarchard@google.comtypedef __declspec(align(16)) uint32 uvec32[4];
3544db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef __declspec(align(16)) uint8 uvec8[16];
355551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.comtypedef __declspec(align(32)) int16 lvec16[16];
356551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.comtypedef __declspec(align(32)) int32 lvec32[8];
3574db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef __declspec(align(32)) int8 lvec8[32];
3584db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef __declspec(align(32)) uint16 ulvec16[16];
359551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.comtypedef __declspec(align(32)) uint32 ulvec32[8];
3604db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef __declspec(align(32)) uint8 ulvec8[32];
361551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.com
362133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.com#elif defined(__GNUC__)
363ae0091e3a74603b23c91f417c8ea023cd43e7e9cfbarchard@google.com// Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
364ccd6d9b2de6af7985775a2e5537190cf5794dd44fbarchard@google.com#define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
365299c97412c7491807d7ffbd1559c2af76c73c7e0fbarchard@google.comtypedef int16 __attribute__((vector_size(16))) vec16;
366f51e87912eebc959ac6b9d1ab44978e0e056ca74fbarchard@google.comtypedef int32 __attribute__((vector_size(16))) vec32;
3674db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef int8 __attribute__((vector_size(16))) vec8;
3684db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef uint16 __attribute__((vector_size(16))) uvec16;
3694d3bd8343b8488f978f42112ed4fa3834fbadd77fbarchard@google.comtypedef uint32 __attribute__((vector_size(16))) uvec32;
3704db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef uint8 __attribute__((vector_size(16))) uvec8;
371133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.com#else
372133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.com#define SIMD_ALIGNED(var) var
373133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.comtypedef int16 vec16[8];
374133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.comtypedef int32 vec32[4];
3754db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef int8 vec8[16];
3764db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef uint16 uvec16[8];
377133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.comtypedef uint32 uvec32[4];
3784db105148e0e94aad0e5c5c2132e635fdd5b4acefbarchard@google.comtypedef uint8 uvec8[16];
379ccd6d9b2de6af7985775a2e5537190cf5794dd44fbarchard@google.com#endif
380ccd6d9b2de6af7985775a2e5537190cf5794dd44fbarchard@google.com
38193fdfd19febc47b03b9c1bfcc77dcadc3c031a8ffbarchard@google.com#if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__)
3829c02ba532f96893c733c1efdc1366d89b0ef305dfbarchard@google.com#define OMITFP
3839c02ba532f96893c733c1efdc1366d89b0ef305dfbarchard@google.com#else
3849c02ba532f96893c733c1efdc1366d89b0ef305dfbarchard@google.com#define OMITFP __attribute__((optimize("omit-frame-pointer")))
3859c02ba532f96893c733c1efdc1366d89b0ef305dfbarchard@google.com#endif
3869c02ba532f96893c733c1efdc1366d89b0ef305dfbarchard@google.com
387b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com// NaCL macros for GCC x86 and x64.
388b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com
389b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com// TODO(nfullagar): When pepper_33 toolchain is distributed, default to
390b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com// NEW_BINUTILS and remove all BUNDLEALIGN occurances.
39155b911ce7b1aed54d310958b2beb1504430f1171fbarchard@google.com#if defined(__native_client__)
39255b911ce7b1aed54d310958b2beb1504430f1171fbarchard@google.com#define LABELALIGN ".p2align 5\n"
39355b911ce7b1aed54d310958b2beb1504430f1171fbarchard@google.com#else
39455b911ce7b1aed54d310958b2beb1504430f1171fbarchard@google.com#define LABELALIGN ".p2align 2\n"
39555b911ce7b1aed54d310958b2beb1504430f1171fbarchard@google.com#endif
396b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#if defined(__native_client__) && defined(__x86_64__)
397b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#if defined(NEW_BINUTILS)
398b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define BUNDLELOCK ".bundle_lock\n"
399b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define BUNDLEUNLOCK ".bundle_unlock\n"
400b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define BUNDLEALIGN "\n"
401b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#else
402b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define BUNDLELOCK "\n"
403b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define BUNDLEUNLOCK "\n"
404b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define BUNDLEALIGN ".p2align 5\n"
405b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#endif
406b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMACCESS(base) "%%nacl:(%%r15,%q" #base ")"
407b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")"
408b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMLEA(offset, base) #offset "(%q" #base ")"
409b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMLEA3(offset, index, scale) \
410b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #offset "(,%q" #index "," #scale ")"
411b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMLEA4(offset, base, index, scale) \
412b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #offset "(%q" #base ",%q" #index "," #scale ")"
413b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15"
414b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15"
415b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMOPREG(opcode, offset, base, index, scale, reg) \
416b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    BUNDLELOCK \
417b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
418b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #opcode " (%%r15,%%r14),%%" #reg "\n" \
419b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    BUNDLEUNLOCK
420b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMOPMEM(opcode, reg, offset, base, index, scale) \
421b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    BUNDLELOCK \
422b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
423b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #opcode " %%" #reg ",(%%r15,%%r14)\n" \
424b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    BUNDLEUNLOCK
425b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMOPARG(opcode, offset, base, index, scale, arg) \
426b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    BUNDLELOCK \
427b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
428b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #opcode " (%%r15,%%r14),%" #arg "\n" \
429b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    BUNDLEUNLOCK
430b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#else
431b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define BUNDLEALIGN "\n"
432b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMACCESS(base) "(%" #base ")"
433b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMACCESS2(offset, base) #offset "(%" #base ")"
434b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMLEA(offset, base) #offset "(%" #base ")"
435b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMLEA3(offset, index, scale) \
436b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #offset "(,%" #index "," #scale ")"
437b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMLEA4(offset, base, index, scale) \
438b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #offset "(%" #base ",%" #index "," #scale ")"
439b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMMOVESTRING(s, d)
440b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMSTORESTRING(reg, d)
441b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMOPREG(opcode, offset, base, index, scale, reg) \
442b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n"
443b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMOPMEM(opcode, reg, offset, base, index, scale) \
444b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #opcode " %%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n"
445b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#define MEMOPARG(opcode, offset, base, index, scale, arg) \
446b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com    #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n"
447b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com#endif
448b14f46fa30eb5c96bc858e04645aeddb7a19f563fbarchard@google.com
449bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I444ToARGBRow_NEON(const uint8* src_y,
450bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
451bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
452bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_argb,
453b883ce6e2c15627ab9fa95e1bb6eca0dc399d364fbarchard@google.com                        int width);
454bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGBRow_NEON(const uint8* src_y,
455bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
456bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
457bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_argb,
458e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                        int width);
459bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I411ToARGBRow_NEON(const uint8* src_y,
460bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
461bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
462bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_argb,
463b883ce6e2c15627ab9fa95e1bb6eca0dc399d364fbarchard@google.com                        int width);
464bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToBGRARow_NEON(const uint8* src_y,
465bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
466bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
467bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_bgra,
468e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                        int width);
469bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToABGRRow_NEON(const uint8* src_y,
470bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
471bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
472bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_abgr,
473e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                        int width);
474bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGBARow_NEON(const uint8* src_y,
475bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
476bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
477bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_rgba,
478d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com                        int width);
479bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB24Row_NEON(const uint8* src_y,
480bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
481bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
482bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_rgb24,
48364ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                         int width);
484bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRAWRow_NEON(const uint8* src_y,
485bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       const uint8* src_u,
486bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       const uint8* src_v,
487bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       uint8* dst_raw,
48864ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                       int width);
489bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB565Row_NEON(const uint8* src_y,
490bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          const uint8* src_u,
491bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          const uint8* src_v,
492bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          uint8* dst_rgb565,
493bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          int width);
494bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB1555Row_NEON(const uint8* src_y,
495bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
496bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
497bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb1555,
498af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                            int width);
499bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB4444Row_NEON(const uint8* src_y,
500bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
501bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
502bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb4444,
503af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                            int width);
504bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToARGBRow_NEON(const uint8* src_y,
505bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_uv,
506bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_argb,
50764ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                        int width);
508bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToARGBRow_NEON(const uint8* src_y,
509bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_vu,
510bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_argb,
51164ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                        int width);
512bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToRGB565Row_NEON(const uint8* src_y,
513bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          const uint8* src_uv,
514bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          uint8* dst_rgb565,
5159f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                          int width);
516bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToRGB565Row_NEON(const uint8* src_y,
517bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          const uint8* src_vu,
518bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          uint8* dst_rgb565,
5199f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                          int width);
520bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YUY2ToARGBRow_NEON(const uint8* src_yuy2,
521bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_argb,
522793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                        int width);
523bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid UYVYToARGBRow_NEON(const uint8* src_uyvy,
524bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_argb,
525793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                        int width);
5266011ff73535b9b9f3cda016a6b325f8a03144dc1frkoenig@google.com
527551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.comvoid ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
528551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.comvoid ARGBToYRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
5299394ed99fcc9802a068ba4a44c36aed79ce87157fbarchard@google.comvoid ARGBToYRow_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
53091c50c3a7d8736aa5834d6c54ae1c6bbea581e1ffbarchard@google.comvoid ARGBToYJRow_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
53191c50c3a7d8736aa5834d6c54ae1c6bbea581e1ffbarchard@google.comvoid ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int pix);
532cfaa66c04154eec91951e2596cfe55eb6f2f749efbarchard@google.comvoid ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
533bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int pix);
534bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int pix);
535bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int pix);
536bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int pix);
537bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int pix);
538b5b27d131adf623aa98109fe4196cd492c2d8b60fbarchard@google.comvoid ARGBToYRow_Unaligned_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
539cfaa66c04154eec91951e2596cfe55eb6f2f749efbarchard@google.comvoid ARGBToYJRow_Unaligned_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
540bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToYRow_Unaligned_SSSE3(const uint8* src_bgra, uint8* dst_y, int pix);
541bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToYRow_Unaligned_SSSE3(const uint8* src_abgr, uint8* dst_y, int pix);
542bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToYRow_Unaligned_SSSE3(const uint8* src_rgba, uint8* dst_y, int pix);
543bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB24ToYRow_Unaligned_SSSE3(const uint8* src_rgb24, uint8* dst_y, int pix);
544bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToYRow_Unaligned_SSSE3(const uint8* src_raw, uint8* dst_y, int pix);
545bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int pix);
546cfaa66c04154eec91951e2596cfe55eb6f2f749efbarchard@google.comvoid ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int pix);
547c673f426de5fd73ee9214678fa5356328cb1fbcbfbarchard@google.comvoid ARGBToUV444Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
548c673f426de5fd73ee9214678fa5356328cb1fbcbfbarchard@google.com                         int pix);
549c4f443f8fe38f6bd447a1393ad63cf6a09887afcfbarchard@google.comvoid ARGBToUV422Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
550c4f443f8fe38f6bd447a1393ad63cf6a09887afcfbarchard@google.com                         int pix);
55176e851792cbdeb41c6e56be26e3a9c4d9fd1771cfbarchard@google.comvoid ARGBToUV411Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
55276e851792cbdeb41c6e56be26e3a9c4d9fd1771cfbarchard@google.com                         int pix);
553dd2d512e5afad7536e3a010c0193ca1b43c14985fbarchard@google.comvoid ARGBToUVRow_NEON(const uint8* src_argb, int src_stride_argb,
554dd2d512e5afad7536e3a010c0193ca1b43c14985fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
555050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.comvoid ARGBToUVJRow_NEON(const uint8* src_argb, int src_stride_argb,
556050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.com                       uint8* dst_u, uint8* dst_v, int pix);
55795730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid BGRAToUVRow_NEON(const uint8* src_bgra, int src_stride_bgra,
55895730719503137a7db61a105bec02220f9ed159efbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
55995730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid ABGRToUVRow_NEON(const uint8* src_abgr, int src_stride_abgr,
56095730719503137a7db61a105bec02220f9ed159efbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
56195730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid RGBAToUVRow_NEON(const uint8* src_rgba, int src_stride_rgba,
56295730719503137a7db61a105bec02220f9ed159efbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
56395730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid RGB24ToUVRow_NEON(const uint8* src_rgb24, int src_stride_rgb24,
56495730719503137a7db61a105bec02220f9ed159efbarchard@google.com                       uint8* dst_u, uint8* dst_v, int pix);
56595730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid RAWToUVRow_NEON(const uint8* src_raw, int src_stride_raw,
56695730719503137a7db61a105bec02220f9ed159efbarchard@google.com                     uint8* dst_u, uint8* dst_v, int pix);
567f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.comvoid RGB565ToUVRow_NEON(const uint8* src_rgb565, int src_stride_rgb565,
568f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.com                        uint8* dst_u, uint8* dst_v, int pix);
569522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGB1555ToUVRow_NEON(const uint8* src_argb1555, int src_stride_argb1555,
570522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
571522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGB4444ToUVRow_NEON(const uint8* src_argb4444, int src_stride_argb4444,
572522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
573bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int pix);
574bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int pix);
575bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int pix);
576bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int pix);
577bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int pix);
578bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int pix);
5791dee6250936424ced8722329369da75935d61580fbarchard@google.comvoid ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int pix);
5801dee6250936424ced8722329369da75935d61580fbarchard@google.comvoid ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int pix);
581bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int pix);
582cfaa66c04154eec91951e2596cfe55eb6f2f749efbarchard@google.comvoid ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int pix);
583bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToYRow_C(const uint8* src_bgra, uint8* dst_y, int pix);
584bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToYRow_C(const uint8* src_abgr, uint8* dst_y, int pix);
585bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToYRow_C(const uint8* src_rgba, uint8* dst_y, int pix);
586bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB24ToYRow_C(const uint8* src_rgb24, uint8* dst_y, int pix);
587bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToYRow_C(const uint8* src_raw, uint8* dst_y, int pix);
588bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB565ToYRow_C(const uint8* src_rgb565, uint8* dst_y, int pix);
5891dee6250936424ced8722329369da75935d61580fbarchard@google.comvoid ARGB1555ToYRow_C(const uint8* src_argb1555, uint8* dst_y, int pix);
5901dee6250936424ced8722329369da75935d61580fbarchard@google.comvoid ARGB4444ToYRow_C(const uint8* src_argb4444, uint8* dst_y, int pix);
591bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToYRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
592cfaa66c04154eec91951e2596cfe55eb6f2f749efbarchard@google.comvoid ARGBToYJRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int pix);
593bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToYRow_Any_SSSE3(const uint8* src_bgra, uint8* dst_y, int pix);
594bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToYRow_Any_SSSE3(const uint8* src_abgr, uint8* dst_y, int pix);
595bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToYRow_Any_SSSE3(const uint8* src_rgba, uint8* dst_y, int pix);
596bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB24ToYRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_y, int pix);
597bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToYRow_Any_SSSE3(const uint8* src_raw, uint8* dst_y, int pix);
598bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToYRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int pix);
599cfaa66c04154eec91951e2596cfe55eb6f2f749efbarchard@google.comvoid ARGBToYJRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int pix);
600bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToYRow_Any_NEON(const uint8* src_bgra, uint8* dst_y, int pix);
601bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToYRow_Any_NEON(const uint8* src_abgr, uint8* dst_y, int pix);
602bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToYRow_Any_NEON(const uint8* src_rgba, uint8* dst_y, int pix);
603bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB24ToYRow_Any_NEON(const uint8* src_rgb24, uint8* dst_y, int pix);
604bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int pix);
605bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int pix);
6061dee6250936424ced8722329369da75935d61580fbarchard@google.comvoid ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, uint8* dst_y, int pix);
6071dee6250936424ced8722329369da75935d61580fbarchard@google.comvoid ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, uint8* dst_y, int pix);
608b5b27d131adf623aa98109fe4196cd492c2d8b60fbarchard@google.com
609551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.comvoid ARGBToUVRow_AVX2(const uint8* src_argb, int src_stride_argb,
610551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int width);
611551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.comvoid ARGBToUVRow_Any_AVX2(const uint8* src_argb, int src_stride_argb,
612551d2b297e6a071fe58a8f2da2cb69cc0ec56ed8fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int width);
613bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUVRow_SSSE3(const uint8* src_argb, int src_stride_argb,
6149394ed99fcc9802a068ba4a44c36aed79ce87157fbarchard@google.com                       uint8* dst_u, uint8* dst_v, int width);
615050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.comvoid ARGBToUVJRow_SSSE3(const uint8* src_argb, int src_stride_argb,
616050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.com                        uint8* dst_u, uint8* dst_v, int width);
617bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToUVRow_SSSE3(const uint8* src_bgra, int src_stride_bgra,
6189394ed99fcc9802a068ba4a44c36aed79ce87157fbarchard@google.com                       uint8* dst_u, uint8* dst_v, int width);
619bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToUVRow_SSSE3(const uint8* src_abgr, int src_stride_abgr,
6209394ed99fcc9802a068ba4a44c36aed79ce87157fbarchard@google.com                       uint8* dst_u, uint8* dst_v, int width);
621bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToUVRow_SSSE3(const uint8* src_rgba, int src_stride_rgba,
622d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com                       uint8* dst_u, uint8* dst_v, int width);
623bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUVRow_Unaligned_SSSE3(const uint8* src_argb, int src_stride_argb,
624b5b27d131adf623aa98109fe4196cd492c2d8b60fbarchard@google.com                                 uint8* dst_u, uint8* dst_v, int width);
625050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.comvoid ARGBToUVJRow_Unaligned_SSSE3(const uint8* src_argb, int src_stride_argb,
626050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.com                                  uint8* dst_u, uint8* dst_v, int width);
627bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToUVRow_Unaligned_SSSE3(const uint8* src_bgra, int src_stride_bgra,
628b5b27d131adf623aa98109fe4196cd492c2d8b60fbarchard@google.com                                 uint8* dst_u, uint8* dst_v, int width);
629bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToUVRow_Unaligned_SSSE3(const uint8* src_abgr, int src_stride_abgr,
630d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com                                 uint8* dst_u, uint8* dst_v, int width);
631bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToUVRow_Unaligned_SSSE3(const uint8* src_rgba, int src_stride_rgba,
632f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.com                                 uint8* dst_u, uint8* dst_v, int width);
633bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUVRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb,
634bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           uint8* dst_u, uint8* dst_v, int width);
635050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.comvoid ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb,
636050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.com                            uint8* dst_u, uint8* dst_v, int width);
637bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, int src_stride_bgra,
638bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           uint8* dst_u, uint8* dst_v, int width);
639bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, int src_stride_abgr,
640bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           uint8* dst_u, uint8* dst_v, int width);
641bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, int src_stride_rgba,
6423e46444727a0524d2f1d81117e0b1404148ac910fbarchard@google.com                           uint8* dst_u, uint8* dst_v, int width);
643522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGBToUV444Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
644522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                             int pix);
645522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGBToUV422Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
646522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                             int pix);
647522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGBToUV411Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
648522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                             int pix);
649f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.comvoid ARGBToUVRow_Any_NEON(const uint8* src_argb, int src_stride_argb,
650f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
651050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.comvoid ARGBToUVJRow_Any_NEON(const uint8* src_argb, int src_stride_argb,
652050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.com                           uint8* dst_u, uint8* dst_v, int pix);
65395730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid BGRAToUVRow_Any_NEON(const uint8* src_bgra, int src_stride_bgra,
65495730719503137a7db61a105bec02220f9ed159efbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
65595730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid ABGRToUVRow_Any_NEON(const uint8* src_abgr, int src_stride_abgr,
65695730719503137a7db61a105bec02220f9ed159efbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
65795730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid RGBAToUVRow_Any_NEON(const uint8* src_rgba, int src_stride_rgba,
65895730719503137a7db61a105bec02220f9ed159efbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
65995730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, int src_stride_rgb24,
66095730719503137a7db61a105bec02220f9ed159efbarchard@google.com                           uint8* dst_u, uint8* dst_v, int pix);
66195730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid RAWToUVRow_Any_NEON(const uint8* src_raw, int src_stride_raw,
66295730719503137a7db61a105bec02220f9ed159efbarchard@google.com                         uint8* dst_u, uint8* dst_v, int pix);
663f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.comvoid RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, int src_stride_rgb565,
664f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.com                            uint8* dst_u, uint8* dst_v, int pix);
665522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555,
666522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                              int src_stride_argb1555,
667522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                              uint8* dst_u, uint8* dst_v, int pix);
668522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444,
669522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                              int src_stride_argb4444,
670522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                              uint8* dst_u, uint8* dst_v, int pix);
671bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUVRow_C(const uint8* src_argb, int src_stride_argb,
672bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                   uint8* dst_u, uint8* dst_v, int width);
673050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.comvoid ARGBToUVJRow_C(const uint8* src_argb, int src_stride_argb,
674050b39a5cbf6c0f529531aafba36f2c846a139b1fbarchard@google.com                    uint8* dst_u, uint8* dst_v, int width);
675bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid BGRAToUVRow_C(const uint8* src_bgra, int src_stride_bgra,
676bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                   uint8* dst_u, uint8* dst_v, int width);
677bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ABGRToUVRow_C(const uint8* src_abgr, int src_stride_abgr,
678bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                   uint8* dst_u, uint8* dst_v, int width);
679bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGBAToUVRow_C(const uint8* src_rgba, int src_stride_rgba,
680bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                   uint8* dst_u, uint8* dst_v, int width);
68195730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid RGB24ToUVRow_C(const uint8* src_rgb24, int src_stride_rgb24,
68295730719503137a7db61a105bec02220f9ed159efbarchard@google.com                    uint8* dst_u, uint8* dst_v, int width);
68395730719503137a7db61a105bec02220f9ed159efbarchard@google.comvoid RAWToUVRow_C(const uint8* src_raw, int src_stride_raw,
68495730719503137a7db61a105bec02220f9ed159efbarchard@google.com                  uint8* dst_u, uint8* dst_v, int width);
685f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.comvoid RGB565ToUVRow_C(const uint8* src_rgb565, int src_stride_rgb565,
686f1daa3db65a41d5d0766c8309ce5a2ef43bf8bb1fbarchard@google.com                     uint8* dst_u, uint8* dst_v, int width);
687522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGB1555ToUVRow_C(const uint8* src_argb1555, int src_stride_argb1555,
688522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                       uint8* dst_u, uint8* dst_v, int width);
689522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.comvoid ARGB4444ToUVRow_C(const uint8* src_argb4444, int src_stride_argb4444,
690522d757c9257056020f058acc5a7c63e401ce019fbarchard@google.com                       uint8* dst_u, uint8* dst_v, int width);
691a7d977ceae6215332f359ab289a93460a24dc1e0fbarchard@google.com
69241e972ec31e83b531f4cef30b5be63ffa6aa3cfdfbarchard@google.comvoid ARGBToUV444Row_SSSE3(const uint8* src_argb,
69341e972ec31e83b531f4cef30b5be63ffa6aa3cfdfbarchard@google.com                          uint8* dst_u, uint8* dst_v, int width);
69441e972ec31e83b531f4cef30b5be63ffa6aa3cfdfbarchard@google.comvoid ARGBToUV444Row_Unaligned_SSSE3(const uint8* src_argb,
69541e972ec31e83b531f4cef30b5be63ffa6aa3cfdfbarchard@google.com                                    uint8* dst_u, uint8* dst_v, int width);
69641e972ec31e83b531f4cef30b5be63ffa6aa3cfdfbarchard@google.comvoid ARGBToUV444Row_Any_SSSE3(const uint8* src_argb,
69741e972ec31e83b531f4cef30b5be63ffa6aa3cfdfbarchard@google.com                              uint8* dst_u, uint8* dst_v, int width);
69841e972ec31e83b531f4cef30b5be63ffa6aa3cfdfbarchard@google.com
699bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUV422Row_SSSE3(const uint8* src_argb,
700bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int width);
701bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUV422Row_Unaligned_SSSE3(const uint8* src_argb,
702bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                    uint8* dst_u, uint8* dst_v, int width);
703bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUV422Row_Any_SSSE3(const uint8* src_argb,
704bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_u, uint8* dst_v, int width);
705bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com
706bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUV444Row_C(const uint8* src_argb,
707bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int width);
708bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUV422Row_C(const uint8* src_argb,
709bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int width);
710bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBToUV411Row_C(const uint8* src_argb,
711bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int width);
7120908a701e90dc15d973784f6245131aa65a66f52fbarchard@google.com
7132007dca6dcfee6828f604068d7d17842fbe5d646fbarchard@google.comvoid MirrorRow_AVX2(const uint8* src, uint8* dst, int width);
71442831e0aae4c786e40302ac03bf5d679796b5c3ffbarchard@google.comvoid MirrorRow_SSSE3(const uint8* src, uint8* dst, int width);
71542831e0aae4c786e40302ac03bf5d679796b5c3ffbarchard@google.comvoid MirrorRow_SSE2(const uint8* src, uint8* dst, int width);
71642831e0aae4c786e40302ac03bf5d679796b5c3ffbarchard@google.comvoid MirrorRow_NEON(const uint8* src, uint8* dst, int width);
7176c1b2d38c685e769cf7db2806e27c8ec4c028fe3fbarchard@google.comvoid MirrorRow_MIPS_DSPR2(const uint8* src, uint8* dst, int width);
71842831e0aae4c786e40302ac03bf5d679796b5c3ffbarchard@google.comvoid MirrorRow_C(const uint8* src, uint8* dst, int width);
71912d048335db029aa66396d2fc09be0612afe8b59fbarchard@google.com
720bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid MirrorUVRow_SSSE3(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
721bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       int width);
722bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid MirrorUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
723bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                      int width);
7243e46444727a0524d2f1d81117e0b1404148ac910fbarchard@google.comvoid MirrorUVRow_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
7253e46444727a0524d2f1d81117e0b1404148ac910fbarchard@google.com                            int width);
726bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
727bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                   int width);
72816a96645b4987fddbcf726dea2fcf5dc87ca10e1fbarchard@google.com
72951398e0be5004b8818df4a4ccda9fe77bcfaf141fbarchard@google.comvoid ARGBMirrorRow_AVX2(const uint8* src, uint8* dst, int width);
73027d42c7ff6452c53643bc57ee8b7b17afbe8dfd0fbarchard@google.comvoid ARGBMirrorRow_SSSE3(const uint8* src, uint8* dst, int width);
7313e46444727a0524d2f1d81117e0b1404148ac910fbarchard@google.comvoid ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width);
73227d42c7ff6452c53643bc57ee8b7b17afbe8dfd0fbarchard@google.comvoid ARGBMirrorRow_C(const uint8* src, uint8* dst, int width);
73327d42c7ff6452c53643bc57ee8b7b17afbe8dfd0fbarchard@google.com
734f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
735f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
736f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
737f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int pix);
738f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
739f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                           int pix);
740f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_Unaligned_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
741f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                               int pix);
742f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_Unaligned_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u,
743f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                                     uint8* dst_v, int pix);
744f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_Any_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
745f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                         int pix);
746f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_Any_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
747f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                         int pix);
748f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_Any_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
749f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                         int pix);
750f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SplitUVRow_Any_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
751f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                               int pix);
7522d11d43a6e21865b904705acce6535ae4c2d3caffbarchard@google.com
753f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid MergeUVRow_C(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
75462a961bee72e48e4fa14365bd7444c9280540b6ffbarchard@google.com                  int width);
755f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid MergeUVRow_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
756f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                     int width);
757f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid MergeUVRow_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
758f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                     int width);
759f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid MergeUVRow_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
760f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                     int width);
761f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid MergeUVRow_Unaligned_SSE2(const uint8* src_u, const uint8* src_v,
762f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                               uint8* dst_uv, int width);
763f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid MergeUVRow_Any_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
764f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                         int width);
765f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid MergeUVRow_Any_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
766f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                         int width);
767f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid MergeUVRow_Any_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
768f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                         int width);
76962a961bee72e48e4fa14365bd7444c9280540b6ffbarchard@google.com
77019932f8dbc5ca3123d87b5b8369e7d7bf3469a97fbarchard@google.comvoid CopyRow_SSE2(const uint8* src, uint8* dst, int count);
771aa7988ff733b13d7bfd3c755bf0c18f93b9e8f6efbarchard@google.comvoid CopyRow_ERMS(const uint8* src, uint8* dst, int count);
77219932f8dbc5ca3123d87b5b8369e7d7bf3469a97fbarchard@google.comvoid CopyRow_X86(const uint8* src, uint8* dst, int count);
77319932f8dbc5ca3123d87b5b8369e7d7bf3469a97fbarchard@google.comvoid CopyRow_NEON(const uint8* src, uint8* dst, int count);
7746c1b2d38c685e769cf7db2806e27c8ec4c028fe3fbarchard@google.comvoid CopyRow_MIPS(const uint8* src, uint8* dst, int count);
77519932f8dbc5ca3123d87b5b8369e7d7bf3469a97fbarchard@google.comvoid CopyRow_C(const uint8* src, uint8* dst, int count);
77619932f8dbc5ca3123d87b5b8369e7d7bf3469a97fbarchard@google.com
777b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.comvoid CopyRow_16_C(const uint16* src, uint16* dst, int count);
778b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.com
779adef267edfb3539cd773692d6fa4050ffd092f55fbarchard@google.comvoid ARGBCopyAlphaRow_C(const uint8* src_argb, uint8* dst_argb, int width);
780adef267edfb3539cd773692d6fa4050ffd092f55fbarchard@google.comvoid ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
781adef267edfb3539cd773692d6fa4050ffd092f55fbarchard@google.comvoid ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
782adef267edfb3539cd773692d6fa4050ffd092f55fbarchard@google.com
783adef267edfb3539cd773692d6fa4050ffd092f55fbarchard@google.comvoid ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width);
784adef267edfb3539cd773692d6fa4050ffd092f55fbarchard@google.comvoid ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
785adef267edfb3539cd773692d6fa4050ffd092f55fbarchard@google.comvoid ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
7867f67961ec53f0ad12f827905fc4a4cc880f00931fbarchard@google.com
787f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SetRow_X86(uint8* dst, uint32 v32, int count);
788f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid ARGBSetRows_X86(uint8* dst, uint32 v32, int width,
789f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                     int dst_stride, int height);
790f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SetRow_NEON(uint8* dst, uint32 v32, int count);
791f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid ARGBSetRows_NEON(uint8* dst, uint32 v32, int width,
792f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                      int dst_stride, int height);
793f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid SetRow_C(uint8* dst, uint32 v32, int count);
794f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid ARGBSetRows_C(uint8* dst, uint32 v32, int width, int dst_stride,
795f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                   int height);
79664ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com
7971096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com// ARGBShufflers for BGRAToARGB etc.
7981096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.comvoid ARGBShuffleRow_C(const uint8* src_argb, uint8* dst_argb,
7991096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com                      const uint8* shuffler, int pix);
800212a1a5000dbdd6bcff7ec355fa2bfa6a00183f8fbarchard@google.comvoid ARGBShuffleRow_SSE2(const uint8* src_argb, uint8* dst_argb,
801212a1a5000dbdd6bcff7ec355fa2bfa6a00183f8fbarchard@google.com                         const uint8* shuffler, int pix);
8021096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.comvoid ARGBShuffleRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
8031096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com                          const uint8* shuffler, int pix);
8041096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.comvoid ARGBShuffleRow_AVX2(const uint8* src_argb, uint8* dst_argb,
8051096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com                         const uint8* shuffler, int pix);
8061096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.comvoid ARGBShuffleRow_NEON(const uint8* src_argb, uint8* dst_argb,
8071096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com                         const uint8* shuffler, int pix);
8081096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.comvoid ARGBShuffleRow_Unaligned_SSSE3(const uint8* src_argb, uint8* dst_argb,
8091096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com                                    const uint8* shuffler, int pix);
810212a1a5000dbdd6bcff7ec355fa2bfa6a00183f8fbarchard@google.comvoid ARGBShuffleRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
811212a1a5000dbdd6bcff7ec355fa2bfa6a00183f8fbarchard@google.com                             const uint8* shuffler, int pix);
8121096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.comvoid ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb,
8131096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com                              const uint8* shuffler, int pix);
8141096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.comvoid ARGBShuffleRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
8151096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com                             const uint8* shuffler, int pix);
8161096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.comvoid ARGBShuffleRow_Any_NEON(const uint8* src_argb, uint8* dst_argb,
8171096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com                             const uint8* shuffler, int pix);
8181096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com
819ba1f52692605bbf8fedb8a915275c71fa186d291fbarchard@google.comvoid RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix);
820bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToARGBRow_SSSE3(const uint8* src_raw, uint8* dst_argb, int pix);
821bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int pix);
822bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, uint8* dst_argb,
823bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            int pix);
824bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, uint8* dst_argb,
825bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            int pix);
8261096543eaa1e596a93ba5d3863e637dc489e32ccfbarchard@google.com
827797e9ef871912dc927b80edeffdee0c614142a51fbarchard@google.comvoid RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int pix);
828bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int pix);
829bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int pix);
830bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, uint8* dst_argb,
831bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            int pix);
832bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, uint8* dst_argb,
833bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            int pix);
834ba1f52692605bbf8fedb8a915275c71fa186d291fbarchard@google.comvoid RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int pix);
835bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int pix);
836a7d977ceae6215332f359ab289a93460a24dc1e0fbarchard@google.comvoid RGB565ToARGBRow_C(const uint8* src_rgb, uint8* dst_argb, int pix);
837a7d977ceae6215332f359ab289a93460a24dc1e0fbarchard@google.comvoid ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int pix);
838a7d977ceae6215332f359ab289a93460a24dc1e0fbarchard@google.comvoid ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int pix);
839bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix);
840bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int pix);
841bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, uint8* dst_argb,
842bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              int pix);
843bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, uint8* dst_argb,
844bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                int pix);
845bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, uint8* dst_argb,
846bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                int pix);
847bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, uint8* dst_argb, int pix);
848bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int pix);
849bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, uint8* dst_argb,
850bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              int pix);
851bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, uint8* dst_argb,
852bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                int pix);
853bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444, uint8* dst_argb,
854bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                int pix);
855bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com
8569eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToRGB24Row_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
8579eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToRAWRow_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
8589eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
8599eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
8609eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
8619eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.com
86264961c01b200a77b4af9629bf1215358ec056f0afbarchard@google.comvoid ARGBToRGB24Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
8635808cb22ce60bf963e15bfb1a0958cb362f5efbcfbarchard@google.comvoid ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
8641bdcc4c3e3d9207252b57b0b7f99b4113caa7d34fbarchard@google.comvoid ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
8651bdcc4c3e3d9207252b57b0b7f99b4113caa7d34fbarchard@google.comvoid ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
866c389e8e3b14bcdbb4dce7a5667abba98a65cf1b6fbarchard@google.comvoid ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
86764961c01b200a77b4af9629bf1215358ec056f0afbarchard@google.com
868a2cc341b6c18dd40e67de88f194a466d75d8b1e0fbarchard@google.comvoid ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int pix);
8699eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
8709eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToRAWRow_C(const uint8* src_argb, uint8* dst_rgb, int pix);
8719eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
8729eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
8739eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.comvoid ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
8749eefb2e8dd2c40a8b6bd0f02d794fe78332fc08ffbarchard@google.com
875b61497636a648c771ac55d184a80b17aca7414f5fbarchard@google.comvoid I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
87600b69a2fe66183be5f72cb80c59f22e137b45359fbarchard@google.comvoid I400ToARGBRow_Unaligned_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
87700b69a2fe66183be5f72cb80c59f22e137b45359fbarchard@google.comvoid I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int pix);
878b61497636a648c771ac55d184a80b17aca7414f5fbarchard@google.comvoid I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int pix);
87900b69a2fe66183be5f72cb80c59f22e137b45359fbarchard@google.comvoid I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
88000b69a2fe66183be5f72cb80c59f22e137b45359fbarchard@google.comvoid I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int pix);
881b61497636a648c771ac55d184a80b17aca7414f5fbarchard@google.com
882bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I444ToARGBRow_C(const uint8* src_y,
883bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_u,
884bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_v,
885bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
886e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                     int width);
887bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGBRow_C(const uint8* src_y,
888bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_u,
889bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_v,
890bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
891e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                     int width);
892bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I411ToARGBRow_C(const uint8* src_y,
893bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_u,
894bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_v,
895bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
896e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                     int width);
897bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToARGBRow_C(const uint8* src_y,
898bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_uv,
899bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
9002d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                     int width);
901bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToRGB565Row_C(const uint8* src_y,
902bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       const uint8* src_vu,
903bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       uint8* dst_argb,
9049f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                       int width);
905bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToRGB565Row_C(const uint8* src_y,
906bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       const uint8* src_uv,
907bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       uint8* dst_argb,
9089f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                       int width);
909bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToARGBRow_C(const uint8* src_y,
910bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_vu,
911bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
9122d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                     int width);
913bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YUY2ToARGBRow_C(const uint8* src_yuy2,
914bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
915793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                     int width);
916bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid UYVYToARGBRow_C(const uint8* src_uyvy,
917bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
918793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                     int width);
919bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToBGRARow_C(const uint8* src_y,
920bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_u,
921bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_v,
922bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_bgra,
923952a507ca6967558c2ae773321e003b6f2bb943afbarchard@google.com                     int width);
924bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToABGRRow_C(const uint8* src_y,
925bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_u,
926bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_v,
927bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_abgr,
928e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com                     int width);
929bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGBARow_C(const uint8* src_y,
930bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_u,
931bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_v,
932bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_rgba,
933d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com                     int width);
934bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB24Row_C(const uint8* src_y,
935bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                      const uint8* src_u,
936bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                      const uint8* src_v,
937bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                      uint8* dst_rgb24,
93864ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                      int width);
939bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRAWRow_C(const uint8* src_y,
940bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                    const uint8* src_u,
941bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                    const uint8* src_v,
942bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                    uint8* dst_raw,
94364ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                    int width);
944bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB4444Row_C(const uint8* src_y,
945bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
946bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
947bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb4444,
948af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                         int width);
949bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB1555Row_C(const uint8* src_y,
950bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
951bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
952bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb4444,
953af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                         int width);
954bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB565Row_C(const uint8* src_y,
955bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       const uint8* src_u,
956bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                       const uint8* src_v,
95715449263c4bba75bc396dc3d60266efee6ab6c66fbarchard@google.com                       uint8* dst_rgb565,
95815449263c4bba75bc396dc3d60266efee6ab6c66fbarchard@google.com                       int width);
959bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YToARGBRow_C(const uint8* src_y,
960bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                  uint8* dst_argb,
961952a507ca6967558c2ae773321e003b6f2bb943afbarchard@google.com                  int width);
962c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.comvoid I422ToARGBRow_AVX2(const uint8* src_y,
963c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com                        const uint8* src_u,
964c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com                        const uint8* src_v,
965c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com                        uint8* dst_argb,
966c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com                        int width);
967bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I444ToARGBRow_SSSE3(const uint8* src_y,
968bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
969bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
970bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb,
971e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com                         int width);
972bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGBRow_SSSE3(const uint8* src_y,
973bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
974bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
975bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb,
976e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                         int width);
977bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I411ToARGBRow_SSSE3(const uint8* src_y,
978bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
979bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
980bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb,
9812d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                         int width);
982bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToARGBRow_SSSE3(const uint8* src_y,
983bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_uv,
984bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb,
9852d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                         int width);
986bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToARGBRow_SSSE3(const uint8* src_y,
987bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_vu,
988bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb,
989e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                         int width);
990bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToRGB565Row_SSSE3(const uint8* src_y,
991bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           const uint8* src_uv,
992bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           uint8* dst_argb,
9939f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                           int width);
994bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToRGB565Row_SSSE3(const uint8* src_y,
995bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           const uint8* src_vu,
996bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           uint8* dst_argb,
9979f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                           int width);
998bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YUY2ToARGBRow_SSSE3(const uint8* src_yuy2,
999bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb,
1000793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                         int width);
1001bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid UYVYToARGBRow_SSSE3(const uint8* src_uyvy,
1002bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_argb,
1003793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                         int width);
1004bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToBGRARow_SSSE3(const uint8* src_y,
1005bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
1006bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
1007bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_bgra,
1008e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                         int width);
1009bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToABGRRow_SSSE3(const uint8* src_y,
1010bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
1011bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
1012bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_abgr,
1013e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com                         int width);
1014bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGBARow_SSSE3(const uint8* src_y,
1015bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_u,
1016bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         const uint8* src_v,
1017bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                         uint8* dst_rgba,
1018d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com                         int width);
1019bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB4444Row_SSSE3(const uint8* src_y,
1020bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1021bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1022bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
1023af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                             int width);
1024bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB1555Row_SSSE3(const uint8* src_y,
1025bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1026bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1027bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
1028af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                             int width);
1029bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB565Row_SSSE3(const uint8* src_y,
1030bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           const uint8* src_u,
1031bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           const uint8* src_v,
1032bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           uint8* dst_argb,
103315449263c4bba75bc396dc3d60266efee6ab6c66fbarchard@google.com                           int width);
1034827de16bb1fa9fc5cb7237a8c32378cc3e30ae2dfbarchard@google.com// RGB24/RAW are unaligned.
1035bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB24Row_SSSE3(const uint8* src_y,
1036bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          const uint8* src_u,
1037bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          const uint8* src_v,
1038bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                          uint8* dst_rgb24,
1039827de16bb1fa9fc5cb7237a8c32378cc3e30ae2dfbarchard@google.com                          int width);
1040bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRAWRow_SSSE3(const uint8* src_y,
1041bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
1042bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
1043bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_raw,
1044827de16bb1fa9fc5cb7237a8c32378cc3e30ae2dfbarchard@google.com                        int width);
1045827de16bb1fa9fc5cb7237a8c32378cc3e30ae2dfbarchard@google.com
1046bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I444ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1047bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_u,
1048bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_v,
1049bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_argb,
1050952a507ca6967558c2ae773321e003b6f2bb943afbarchard@google.com                                   int width);
1051bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1052bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_u,
1053bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_v,
1054bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_argb,
1055952a507ca6967558c2ae773321e003b6f2bb943afbarchard@google.com                                   int width);
1056bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I411ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1057bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_u,
1058bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_v,
1059bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_argb,
10602d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                                   int width);
1061bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1062bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_uv,
1063bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_argb,
10642d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                                   int width);
1065bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToARGBRow_Unaligned_SSSE3(const uint8* src_y,
1066bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_vu,
1067bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_argb,
1068952a507ca6967558c2ae773321e003b6f2bb943afbarchard@google.com                                   int width);
1069bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YUY2ToARGBRow_Unaligned_SSSE3(const uint8* src_yuy2,
1070bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_argb,
1071793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                                   int width);
1072bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid UYVYToARGBRow_Unaligned_SSSE3(const uint8* src_uyvy,
1073bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_argb,
1074793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                                   int width);
1075bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToBGRARow_Unaligned_SSSE3(const uint8* src_y,
1076bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_u,
1077bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_v,
1078bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_bgra,
1079e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com                                   int width);
1080bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToABGRRow_Unaligned_SSSE3(const uint8* src_y,
1081bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_u,
1082bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_v,
1083bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_abgr,
1084e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com                                   int width);
1085bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGBARow_Unaligned_SSSE3(const uint8* src_y,
1086bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_u,
1087bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   const uint8* src_v,
1088bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                   uint8* dst_rgba,
1089d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com                                   int width);
1090c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.comvoid I422ToARGBRow_Any_AVX2(const uint8* src_y,
1091c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com                            const uint8* src_u,
1092c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com                            const uint8* src_v,
1093c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com                            uint8* dst_argb,
1094c297d103f199dc8c9565ea0f35bdb0832a9d10b8fbarchard@google.com                            int width);
1095bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I444ToARGBRow_Any_SSSE3(const uint8* src_y,
1096bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1097bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1098bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
1099e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com                             int width);
1100bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGBRow_Any_SSSE3(const uint8* src_y,
1101bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1102bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1103bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
1104e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                             int width);
1105bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I411ToARGBRow_Any_SSSE3(const uint8* src_y,
1106bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1107bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1108bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
1109e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                             int width);
1110bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToARGBRow_Any_SSSE3(const uint8* src_y,
1111bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_uv,
1112bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
11132d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                             int width);
1114bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToARGBRow_Any_SSSE3(const uint8* src_y,
1115bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_vu,
1116bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
11172d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                             int width);
1118bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToRGB565Row_Any_SSSE3(const uint8* src_y,
1119bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                               const uint8* src_uv,
1120bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                               uint8* dst_argb,
11219f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                               int width);
1122bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToRGB565Row_Any_SSSE3(const uint8* src_y,
1123bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                               const uint8* src_vu,
1124bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                               uint8* dst_argb,
11259f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                               int width);
1126bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YUY2ToARGBRow_Any_SSSE3(const uint8* src_yuy2,
1127bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
1128793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                             int width);
1129bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid UYVYToARGBRow_Any_SSSE3(const uint8* src_uyvy,
1130bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
1131793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                             int width);
1132bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToBGRARow_Any_SSSE3(const uint8* src_y,
1133bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1134bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1135bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_bgra,
1136e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                             int width);
1137bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToABGRRow_Any_SSSE3(const uint8* src_y,
1138bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1139bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1140bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_abgr,
1141e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com                             int width);
1142bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGBARow_Any_SSSE3(const uint8* src_y,
1143bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1144bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1145bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_rgba,
1146d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com                             int width);
1147bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB4444Row_Any_SSSE3(const uint8* src_y,
1148bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                 const uint8* src_u,
1149bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                 const uint8* src_v,
1150bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                 uint8* dst_rgba,
1151af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                                 int width);
1152bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB1555Row_Any_SSSE3(const uint8* src_y,
1153bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                 const uint8* src_u,
1154bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                 const uint8* src_v,
1155bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                 uint8* dst_rgba,
1156af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                                 int width);
1157bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB565Row_Any_SSSE3(const uint8* src_y,
1158bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                               const uint8* src_u,
1159bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                               const uint8* src_v,
1160bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                               uint8* dst_rgba,
116115449263c4bba75bc396dc3d60266efee6ab6c66fbarchard@google.com                               int width);
1162827de16bb1fa9fc5cb7237a8c32378cc3e30ae2dfbarchard@google.com// RGB24/RAW are unaligned.
1163bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB24Row_Any_SSSE3(const uint8* src_y,
1164bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_u,
1165bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_v,
1166bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
1167827de16bb1fa9fc5cb7237a8c32378cc3e30ae2dfbarchard@google.com                              int width);
1168bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRAWRow_Any_SSSE3(const uint8* src_y,
1169bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1170bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1171bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1172827de16bb1fa9fc5cb7237a8c32378cc3e30ae2dfbarchard@google.com                            int width);
1173bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YToARGBRow_SSE2(const uint8* src_y,
1174bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
11752d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                     int width);
1176bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YToARGBRow_NEON(const uint8* src_y,
1177bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_argb,
117830859f75f28c2435753d33eb7a48ccab169feb6dfbarchard@google.com                     int width);
11791d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.comvoid YToARGBRow_Any_SSE2(const uint8* src_y,
11801d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.com                         uint8* dst_argb,
11811d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.com                         int width);
11821d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.comvoid YToARGBRow_Any_NEON(const uint8* src_y,
11831d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.com                         uint8* dst_argb,
11841d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.com                         int width);
11852d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com
11862d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com// ARGB preattenuated alpha blend.
1187bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1,
11882d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                        uint8* dst_argb, int width);
1189bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBBlendRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1190bac5f2c3ee12535817448e606c7a7704bbae8321fbarchard@google.com                       uint8* dst_argb, int width);
11918f506332af217882648eed166a257557855b9fdbfbarchard@google.comvoid ARGBBlendRow_NEON(const uint8* src_argb, const uint8* src_argb1,
11928f506332af217882648eed166a257557855b9fdbfbarchard@google.com                       uint8* dst_argb, int width);
1193bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid ARGBBlendRow_C(const uint8* src_argb, const uint8* src_argb1,
11942d9fe08225ab28f62b515b2b914accc6a7b060fbfbarchard@google.com                    uint8* dst_argb, int width);
1195e214fe3f070d47d34e3cfbf4431994f97c9e0d1bfbarchard@google.com
1196573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com// ARGB multiply images. Same API as Blend, but these require
11978fa76349948802d728dd244a7b54051d751d8696fbarchard@google.com// pointer and width alignment for SSE2.
11988fa76349948802d728dd244a7b54051d751d8696fbarchard@google.comvoid ARGBMultiplyRow_C(const uint8* src_argb, const uint8* src_argb1,
11998fa76349948802d728dd244a7b54051d751d8696fbarchard@google.com                       uint8* dst_argb, int width);
12008fa76349948802d728dd244a7b54051d751d8696fbarchard@google.comvoid ARGBMultiplyRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
12018fa76349948802d728dd244a7b54051d751d8696fbarchard@google.com                          uint8* dst_argb, int width);
12028fa76349948802d728dd244a7b54051d751d8696fbarchard@google.comvoid ARGBMultiplyRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
12038fa76349948802d728dd244a7b54051d751d8696fbarchard@google.com                              uint8* dst_argb, int width);
120451d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.comvoid ARGBMultiplyRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
120551d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.com                          uint8* dst_argb, int width);
120651d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.comvoid ARGBMultiplyRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
120751d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.com                              uint8* dst_argb, int width);
12085b0f7e1132bbf79dc3d70dcf225646fcbc5875e2fbarchard@google.comvoid ARGBMultiplyRow_NEON(const uint8* src_argb, const uint8* src_argb1,
12095b0f7e1132bbf79dc3d70dcf225646fcbc5875e2fbarchard@google.com                          uint8* dst_argb, int width);
12105b0f7e1132bbf79dc3d70dcf225646fcbc5875e2fbarchard@google.comvoid ARGBMultiplyRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
12115b0f7e1132bbf79dc3d70dcf225646fcbc5875e2fbarchard@google.com                              uint8* dst_argb, int width);
12128fa76349948802d728dd244a7b54051d751d8696fbarchard@google.com
121383e1b17cc0b1840c7b5e361fa19e7263fca2b32bfbarchard@google.com// ARGB add images.
121483e1b17cc0b1840c7b5e361fa19e7263fca2b32bfbarchard@google.comvoid ARGBAddRow_C(const uint8* src_argb, const uint8* src_argb1,
121583e1b17cc0b1840c7b5e361fa19e7263fca2b32bfbarchard@google.com                  uint8* dst_argb, int width);
121683e1b17cc0b1840c7b5e361fa19e7263fca2b32bfbarchard@google.comvoid ARGBAddRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
121783e1b17cc0b1840c7b5e361fa19e7263fca2b32bfbarchard@google.com                     uint8* dst_argb, int width);
121883e1b17cc0b1840c7b5e361fa19e7263fca2b32bfbarchard@google.comvoid ARGBAddRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
121983e1b17cc0b1840c7b5e361fa19e7263fca2b32bfbarchard@google.com                         uint8* dst_argb, int width);
122051d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.comvoid ARGBAddRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
122151d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.com                     uint8* dst_argb, int width);
122251d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.comvoid ARGBAddRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
122351d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.com                         uint8* dst_argb, int width);
12245b0f7e1132bbf79dc3d70dcf225646fcbc5875e2fbarchard@google.comvoid ARGBAddRow_NEON(const uint8* src_argb, const uint8* src_argb1,
12255b0f7e1132bbf79dc3d70dcf225646fcbc5875e2fbarchard@google.com                     uint8* dst_argb, int width);
12265b0f7e1132bbf79dc3d70dcf225646fcbc5875e2fbarchard@google.comvoid ARGBAddRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
12275b0f7e1132bbf79dc3d70dcf225646fcbc5875e2fbarchard@google.com                         uint8* dst_argb, int width);
122883e1b17cc0b1840c7b5e361fa19e7263fca2b32bfbarchard@google.com
1229573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com// ARGB subtract images. Same API as Blend, but these require
1230573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com// pointer and width alignment for SSE2.
1231573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.comvoid ARGBSubtractRow_C(const uint8* src_argb, const uint8* src_argb1,
1232573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com                       uint8* dst_argb, int width);
1233573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.comvoid ARGBSubtractRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1234573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com                          uint8* dst_argb, int width);
1235573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.comvoid ARGBSubtractRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
1236573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com                              uint8* dst_argb, int width);
123751d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.comvoid ARGBSubtractRow_AVX2(const uint8* src_argb, const uint8* src_argb1,
123851d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.com                          uint8* dst_argb, int width);
123951d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.comvoid ARGBSubtractRow_Any_AVX2(const uint8* src_argb, const uint8* src_argb1,
124051d3e236cb5923c60ba818b6e825c2658b565afefbarchard@google.com                              uint8* dst_argb, int width);
1241573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.comvoid ARGBSubtractRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1242573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com                          uint8* dst_argb, int width);
1243573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.comvoid ARGBSubtractRow_Any_NEON(const uint8* src_argb, const uint8* src_argb1,
1244573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com                              uint8* dst_argb, int width);
1245573a883dd65c94a10422e6e9e0d453e2a5d45227fbarchard@google.com
1246e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid ARGBToRGB24Row_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
1247e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid ARGBToRAWRow_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int pix);
1248e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1249e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1250e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
1251e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com
125264961c01b200a77b4af9629bf1215358ec056f0afbarchard@google.comvoid ARGBToRGB24Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
12535808cb22ce60bf963e15bfb1a0958cb362f5efbcfbarchard@google.comvoid ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
12541bdcc4c3e3d9207252b57b0b7f99b4113caa7d34fbarchard@google.comvoid ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
12551bdcc4c3e3d9207252b57b0b7f99b4113caa7d34fbarchard@google.comvoid ARGBToARGB1555Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
1256c389e8e3b14bcdbb4dce7a5667abba98a65cf1b6fbarchard@google.comvoid ARGBToARGB4444Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
125764961c01b200a77b4af9629bf1215358ec056f0afbarchard@google.com
1258bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I444ToARGBRow_Any_NEON(const uint8* src_y,
1259bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1260bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1261bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1262b883ce6e2c15627ab9fa95e1bb6eca0dc399d364fbarchard@google.com                            int width);
1263bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGBRow_Any_NEON(const uint8* src_y,
1264bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1265bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1266bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1267e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                            int width);
1268bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I411ToARGBRow_Any_NEON(const uint8* src_y,
1269bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1270bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1271bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1272b883ce6e2c15627ab9fa95e1bb6eca0dc399d364fbarchard@google.com                            int width);
1273bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToBGRARow_Any_NEON(const uint8* src_y,
1274bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1275bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1276bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1277e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                            int width);
1278bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToABGRRow_Any_NEON(const uint8* src_y,
1279bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1280bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1281bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1282e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                            int width);
1283bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGBARow_Any_NEON(const uint8* src_y,
1284bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1285bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1286bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1287d5a27f0533d42bd0e241b0a7887abe1a3d9c0633fbarchard@google.com                            int width);
1288bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB24Row_Any_NEON(const uint8* src_y,
1289bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_u,
1290bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             const uint8* src_v,
1291bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                             uint8* dst_argb,
129264ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                             int width);
1293bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRAWRow_Any_NEON(const uint8* src_y,
1294bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           const uint8* src_u,
1295bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           const uint8* src_v,
1296bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                           uint8* dst_argb,
129764ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                           int width);
1298bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB4444Row_Any_NEON(const uint8* src_y,
1299bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                const uint8* src_u,
1300bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                const uint8* src_v,
1301bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                uint8* dst_argb,
1302af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                                int width);
1303bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGB1555Row_Any_NEON(const uint8* src_y,
1304bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                const uint8* src_u,
1305bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                const uint8* src_v,
1306bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                                uint8* dst_argb,
1307af1aa56f0b4a5fcac6c36a1a0c02b6917f2c14f2fbarchard@google.com                                int width);
1308bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToRGB565Row_Any_NEON(const uint8* src_y,
1309bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_u,
1310bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_v,
1311bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
131215449263c4bba75bc396dc3d60266efee6ab6c66fbarchard@google.com                              int width);
1313bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToARGBRow_Any_NEON(const uint8* src_y,
1314bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_uv,
1315bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
131664ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                            int width);
1317bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToARGBRow_Any_NEON(const uint8* src_y,
1318bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_uv,
1319bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
132064ce0ab544591b1e26ae6d276932cacdb8137071fbarchard@google.com                            int width);
1321bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV12ToRGB565Row_Any_NEON(const uint8* src_y,
1322bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_uv,
1323bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
13249f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                              int width);
1325bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid NV21ToRGB565Row_Any_NEON(const uint8* src_y,
1326bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_uv,
1327bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
13289f2d404145e8a69d209eb130975442ab3f29d5a7fbarchard@google.com                              int width);
1329bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid YUY2ToARGBRow_Any_NEON(const uint8* src_yuy2,
1330bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1331793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                            int width);
1332bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid UYVYToARGBRow_Any_NEON(const uint8* src_uyvy,
1333bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_argb,
1334793e5a06ffe55a911f8aa3f4731ae681039952bcfbarchard@google.com                            int width);
1335bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGBRow_MIPS_DSPR2(const uint8* src_y,
1336bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_u,
1337bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_v,
1338bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
13396c1b2d38c685e769cf7db2806e27c8ec4c028fe3fbarchard@google.com                              int width);
1340bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToBGRARow_MIPS_DSPR2(const uint8* src_y,
1341bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_u,
1342bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_v,
1343bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
13446c1b2d38c685e769cf7db2806e27c8ec4c028fe3fbarchard@google.com                              int width);
1345bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToABGRRow_MIPS_DSPR2(const uint8* src_y,
1346bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_u,
1347bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_v,
1348bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
13496c1b2d38c685e769cf7db2806e27c8ec4c028fe3fbarchard@google.com                              int width);
1350bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToARGBRow_MIPS_DSPR2(const uint8* src_y,
1351bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_u,
1352bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_v,
1353bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
135400b69a2fe66183be5f72cb80c59f22e137b45359fbarchard@google.com                              int width);
1355bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToBGRARow_MIPS_DSPR2(const uint8* src_y,
1356bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_u,
1357bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_v,
1358bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
135900b69a2fe66183be5f72cb80c59f22e137b45359fbarchard@google.com                              int width);
1360bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToABGRRow_MIPS_DSPR2(const uint8* src_y,
1361bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_u,
1362bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              const uint8* src_v,
1363bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                              uint8* dst_argb,
136400b69a2fe66183be5f72cb80c59f22e137b45359fbarchard@google.com                              int width);
1365e0d8648b6ab861cfcf03513439fad8ae39ba50c2fbarchard@google.com
1366b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid YUY2ToYRow_AVX2(const uint8* src_yuy2, uint8* dst_y, int pix);
1367b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid YUY2ToUVRow_AVX2(const uint8* src_yuy2, int stride_yuy2,
1368b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1369b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid YUY2ToUV422Row_AVX2(const uint8* src_yuy2,
1370b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                         uint8* dst_u, uint8* dst_v, int pix);
1371e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid YUY2ToYRow_SSE2(const uint8* src_yuy2, uint8* dst_y, int pix);
1372e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid YUY2ToUVRow_SSE2(const uint8* src_yuy2, int stride_yuy2,
1373c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1374c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid YUY2ToUV422Row_SSE2(const uint8* src_yuy2,
1375c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                         uint8* dst_u, uint8* dst_v, int pix);
1376e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid YUY2ToYRow_Unaligned_SSE2(const uint8* src_yuy2,
1377e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                               uint8* dst_y, int pix);
1378e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid YUY2ToUVRow_Unaligned_SSE2(const uint8* src_yuy2, int stride_yuy2,
1379c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                                uint8* dst_u, uint8* dst_v, int pix);
1380c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid YUY2ToUV422Row_Unaligned_SSE2(const uint8* src_yuy2,
1381c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                                   uint8* dst_u, uint8* dst_v, int pix);
1382dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid YUY2ToYRow_NEON(const uint8* src_yuy2, uint8* dst_y, int pix);
1383dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid YUY2ToUVRow_NEON(const uint8* src_yuy2, int stride_yuy2,
1384dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1385dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid YUY2ToUV422Row_NEON(const uint8* src_yuy2,
1386dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com                         uint8* dst_u, uint8* dst_v, int pix);
1387c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid YUY2ToYRow_C(const uint8* src_yuy2, uint8* dst_y, int pix);
1388c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid YUY2ToUVRow_C(const uint8* src_yuy2, int stride_yuy2,
1389c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                   uint8* dst_u, uint8* dst_v, int pix);
1390c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid YUY2ToUV422Row_C(const uint8* src_yuy2,
1391c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1392b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid YUY2ToYRow_Any_AVX2(const uint8* src_yuy2, uint8* dst_y, int pix);
1393b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid YUY2ToUVRow_Any_AVX2(const uint8* src_yuy2, int stride_yuy2,
1394b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
1395b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid YUY2ToUV422Row_Any_AVX2(const uint8* src_yuy2,
1396b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                             uint8* dst_u, uint8* dst_v, int pix);
1397c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid YUY2ToYRow_Any_SSE2(const uint8* src_yuy2, uint8* dst_y, int pix);
1398c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid YUY2ToUVRow_Any_SSE2(const uint8* src_yuy2, int stride_yuy2,
1399c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
1400c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid YUY2ToUV422Row_Any_SSE2(const uint8* src_yuy2,
1401c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                             uint8* dst_u, uint8* dst_v, int pix);
1402dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid YUY2ToYRow_Any_NEON(const uint8* src_yuy2, uint8* dst_y, int pix);
1403dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid YUY2ToUVRow_Any_NEON(const uint8* src_yuy2, int stride_yuy2,
1404dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
1405dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid YUY2ToUV422Row_Any_NEON(const uint8* src_yuy2,
1406dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com                             uint8* dst_u, uint8* dst_v, int pix);
1407b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1408b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToUVRow_AVX2(const uint8* src_uyvy, int stride_uyvy,
1409b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1410b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToUV422Row_AVX2(const uint8* src_uyvy,
1411b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                         uint8* dst_u, uint8* dst_v, int pix);
1412e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid UYVYToYRow_SSE2(const uint8* src_uyvy, uint8* dst_y, int pix);
1413e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid UYVYToUVRow_SSE2(const uint8* src_uyvy, int stride_uyvy,
1414c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1415c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid UYVYToUV422Row_SSE2(const uint8* src_uyvy,
1416c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                         uint8* dst_u, uint8* dst_v, int pix);
1417e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid UYVYToYRow_Unaligned_SSE2(const uint8* src_uyvy,
1418e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.com                               uint8* dst_y, int pix);
1419e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid UYVYToUVRow_Unaligned_SSE2(const uint8* src_uyvy, int stride_uyvy,
1420c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                                uint8* dst_u, uint8* dst_v, int pix);
1421c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid UYVYToUV422Row_Unaligned_SSE2(const uint8* src_uyvy,
1422c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                                   uint8* dst_u, uint8* dst_v, int pix);
1423b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1424b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToUVRow_AVX2(const uint8* src_uyvy, int stride_uyvy,
1425b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1426b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToUV422Row_AVX2(const uint8* src_uyvy,
1427b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                         uint8* dst_u, uint8* dst_v, int pix);
1428dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid UYVYToYRow_NEON(const uint8* src_uyvy, uint8* dst_y, int pix);
1429dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid UYVYToUVRow_NEON(const uint8* src_uyvy, int stride_uyvy,
1430dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1431dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid UYVYToUV422Row_NEON(const uint8* src_uyvy,
1432dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com                         uint8* dst_u, uint8* dst_v, int pix);
1433dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com
1434e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid UYVYToYRow_C(const uint8* src_uyvy, uint8* dst_y, int pix);
1435c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid UYVYToUVRow_C(const uint8* src_uyvy, int stride_uyvy,
1436c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                   uint8* dst_u, uint8* dst_v, int pix);
1437c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid UYVYToUV422Row_C(const uint8* src_uyvy,
1438c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                      uint8* dst_u, uint8* dst_v, int pix);
1439b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToYRow_Any_AVX2(const uint8* src_uyvy, uint8* dst_y, int pix);
1440b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToUVRow_Any_AVX2(const uint8* src_uyvy, int stride_uyvy,
1441b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
1442b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.comvoid UYVYToUV422Row_Any_AVX2(const uint8* src_uyvy,
1443b444bae883e97c1e4579f2e1148cf14f9c7c18fbfbarchard@google.com                             uint8* dst_u, uint8* dst_v, int pix);
1444e5f3fd4cc870b9b22112b3b2f25af06e067c8b7dfbarchard@google.comvoid UYVYToYRow_Any_SSE2(const uint8* src_uyvy, uint8* dst_y, int pix);
1445c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid UYVYToUVRow_Any_SSE2(const uint8* src_uyvy, int stride_uyvy,
1446c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
1447c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.comvoid UYVYToUV422Row_Any_SSE2(const uint8* src_uyvy,
1448c704f789e9305890d865e6334f57a9febbc83e45fbarchard@google.com                             uint8* dst_u, uint8* dst_v, int pix);
1449dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid UYVYToYRow_Any_NEON(const uint8* src_uyvy, uint8* dst_y, int pix);
1450dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid UYVYToUVRow_Any_NEON(const uint8* src_uyvy, int stride_uyvy,
1451dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com                          uint8* dst_u, uint8* dst_v, int pix);
1452dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.comvoid UYVYToUV422Row_Any_NEON(const uint8* src_uyvy,
1453dddf94c343c9a6413468a334e9fd965e4b1b3eb7fbarchard@google.com                             uint8* dst_u, uint8* dst_v, int pix);
1454ba03e4d99e3fd8cd07ce6a1b49a33fe2450c15e8fbarchard@google.com
1455bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid HalfRow_C(const uint8* src_uv, int src_uv_stride,
1456bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com               uint8* dst_uv, int pix);
1457bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid HalfRow_SSE2(const uint8* src_uv, int src_uv_stride,
1458bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                  uint8* dst_uv, int pix);
1459e1bb5d94302dfa31c305bd8d0e3083a70cac5d77fbarchard@google.comvoid HalfRow_AVX2(const uint8* src_uv, int src_uv_stride,
1460e1bb5d94302dfa31c305bd8d0e3083a70cac5d77fbarchard@google.com                  uint8* dst_uv, int pix);
1461bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid HalfRow_NEON(const uint8* src_uv, int src_uv_stride,
1462bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                  uint8* dst_uv, int pix);
1463bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com
1464b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.comvoid HalfRow_16_C(const uint16* src_uv, int src_uv_stride,
1465b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.com                  uint16* dst_uv, int pix);
1466b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.com
1467c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid ARGBToBayerRow_C(const uint8* src_argb, uint8* dst_bayer,
1468c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                      uint32 selector, int pix);
1469c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid ARGBToBayerRow_SSSE3(const uint8* src_argb, uint8* dst_bayer,
1470c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                          uint32 selector, int pix);
1471c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid ARGBToBayerRow_NEON(const uint8* src_argb, uint8* dst_bayer,
1472c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                         uint32 selector, int pix);
1473c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid ARGBToBayerRow_Any_SSSE3(const uint8* src_argb, uint8* dst_bayer,
1474c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                              uint32 selector, int pix);
1475c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid ARGBToBayerRow_Any_NEON(const uint8* src_argb, uint8* dst_bayer,
1476c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                             uint32 selector, int pix);
147708b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.comvoid ARGBToBayerGGRow_C(const uint8* src_argb, uint8* dst_bayer,
147808b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.com                        uint32 /* selector */, int pix);
147908b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.comvoid ARGBToBayerGGRow_SSE2(const uint8* src_argb, uint8* dst_bayer,
148008b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.com                           uint32 /* selector */, int pix);
1481c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid ARGBToBayerGGRow_NEON(const uint8* src_argb, uint8* dst_bayer,
1482c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                           uint32 /* selector */, int pix);
148308b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.comvoid ARGBToBayerGGRow_Any_SSE2(const uint8* src_argb, uint8* dst_bayer,
148408b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.com                               uint32 /* selector */, int pix);
148508b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.comvoid ARGBToBayerGGRow_Any_NEON(const uint8* src_argb, uint8* dst_bayer,
148608b24a4232600b2f9f21584f34f6868d8c15c215fbarchard@google.com                               uint32 /* selector */, int pix);
1487bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com
1488bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToYUY2Row_C(const uint8* src_y,
1489bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_u,
1490bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_v,
1491bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_yuy2, int width);
1492bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToUYVYRow_C(const uint8* src_y,
1493bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_u,
1494bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     const uint8* src_v,
1495bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                     uint8* dst_uyvy, int width);
1496bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToYUY2Row_SSE2(const uint8* src_y,
1497bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
1498bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
1499bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_yuy2, int width);
1500bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToUYVYRow_SSE2(const uint8* src_y,
1501bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
1502bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
1503bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_uyvy, int width);
1504bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToYUY2Row_Any_SSE2(const uint8* src_y,
1505bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1506bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1507bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_yuy2, int width);
1508bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToUYVYRow_Any_SSE2(const uint8* src_y,
1509bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1510bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1511bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_uyvy, int width);
1512bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToYUY2Row_NEON(const uint8* src_y,
1513bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
1514bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
1515bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_yuy2, int width);
1516bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToUYVYRow_NEON(const uint8* src_y,
1517bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_u,
1518bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        const uint8* src_v,
1519bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                        uint8* dst_uyvy, int width);
1520bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToYUY2Row_Any_NEON(const uint8* src_y,
1521bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1522bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1523bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_yuy2, int width);
1524bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.comvoid I422ToUYVYRow_Any_NEON(const uint8* src_y,
1525bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_u,
1526bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            const uint8* src_v,
1527bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com                            uint8* dst_uyvy, int width);
1528bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com
1529bdf7cb591452611090922e690d5104a7d8c6b1e5fbarchard@google.com// Effects related row functions.
15308ed54222e723037322579f15c36d4faddb924e91fbarchard@google.comvoid ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
15318ed54222e723037322579f15c36d4faddb924e91fbarchard@google.comvoid ARGBAttenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
1532f2c86d01cc46b0851e0bf88429dd064b8c8b0dbafbarchard@google.comvoid ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
1533d5ee3dc9123c9fa4e90ec6b90a5c45f8434cac3ffbarchard@google.comvoid ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
15341d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.comvoid ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
15351d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.comvoid ARGBAttenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
15361d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.com                               int width);
15371d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.comvoid ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb,
15381d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.com                                int width);
1539c0d9c3469062e20430685565a3e4bb1d7042d147fbarchard@google.comvoid ARGBAttenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
1540c0d9c3469062e20430685565a3e4bb1d7042d147fbarchard@google.com                               int width);
15411d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.comvoid ARGBAttenuateRow_Any_NEON(const uint8* src_argb, uint8* dst_argb,
15421d160cb99f2b05df80c4555bd769825ad1175dc9fbarchard@google.com                               int width);
15438ed54222e723037322579f15c36d4faddb924e91fbarchard@google.com
15449c02ba532f96893c733c1efdc1366d89b0ef305dfbarchard@google.com// Inverse table for unattenuate, shared by C and SSE2.
1545bb5ea8e4df7aba47d39a0b6e74ce7cc85e5c8c3afbarchard@google.comextern const uint32 fixed_invtbl8[256];
1546810cd91079505f04cfec7481b51d04f08250d982fbarchard@google.comvoid ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
1547810cd91079505f04cfec7481b51d04f08250d982fbarchard@google.comvoid ARGBUnattenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
15483c7bb050bd54264f360ced29c1cd2777483bd6f0fbarchard@google.comvoid ARGBUnattenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
1549c0d9c3469062e20430685565a3e4bb1d7042d147fbarchard@google.comvoid ARGBUnattenuateRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb,
1550c0d9c3469062e20430685565a3e4bb1d7042d147fbarchard@google.com                                 int width);
1551c0d9c3469062e20430685565a3e4bb1d7042d147fbarchard@google.comvoid ARGBUnattenuateRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb,
1552c0d9c3469062e20430685565a3e4bb1d7042d147fbarchard@google.com                                 int width);
1553810cd91079505f04cfec7481b51d04f08250d982fbarchard@google.com
1554eeac2903ef22110d475c50ef9bfd7826d3183a5efbarchard@google.comvoid ARGBGrayRow_C(const uint8* src_argb, uint8* dst_argb, int width);
1555eeac2903ef22110d475c50ef9bfd7826d3183a5efbarchard@google.comvoid ARGBGrayRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
155682375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.comvoid ARGBGrayRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
1557ffaea7eee38e593a3e63553ffa90e554ba81fe30fbarchard@google.com
1558221e602f8a726f7457a0d521b5bcca05d89215bbfbarchard@google.comvoid ARGBSepiaRow_C(uint8* dst_argb, int width);
1559221e602f8a726f7457a0d521b5bcca05d89215bbfbarchard@google.comvoid ARGBSepiaRow_SSSE3(uint8* dst_argb, int width);
156082375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.comvoid ARGBSepiaRow_NEON(uint8* dst_argb, int width);
1561221e602f8a726f7457a0d521b5bcca05d89215bbfbarchard@google.com
1562c99db063e24d6180740d4adc29e84159096eef2dfbarchard@google.comvoid ARGBColorMatrixRow_C(const uint8* src_argb, uint8* dst_argb,
1563c99db063e24d6180740d4adc29e84159096eef2dfbarchard@google.com                          const int8* matrix_argb, int width);
1564c99db063e24d6180740d4adc29e84159096eef2dfbarchard@google.comvoid ARGBColorMatrixRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
1565c99db063e24d6180740d4adc29e84159096eef2dfbarchard@google.com                              const int8* matrix_argb, int width);
1566c99db063e24d6180740d4adc29e84159096eef2dfbarchard@google.comvoid ARGBColorMatrixRow_NEON(const uint8* src_argb, uint8* dst_argb,
1567c99db063e24d6180740d4adc29e84159096eef2dfbarchard@google.com                             const int8* matrix_argb, int width);
1568e442dc4c2a896e85419628e3b7d97c4dfbe71c9dfbarchard@google.com
1569e442dc4c2a896e85419628e3b7d97c4dfbe71c9dfbarchard@google.comvoid ARGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
157081b804e35c0346ee2fc5f8d11945eab9a88fdb10fbarchard@google.comvoid ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
157181b804e35c0346ee2fc5f8d11945eab9a88fdb10fbarchard@google.com
15725520710ef7ce306357ab35c501f776b1fb0266e8fbarchard@google.comvoid RGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
15735520710ef7ce306357ab35c501f776b1fb0266e8fbarchard@google.comvoid RGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
15745520710ef7ce306357ab35c501f776b1fb0266e8fbarchard@google.com
157581b804e35c0346ee2fc5f8d11945eab9a88fdb10fbarchard@google.comvoid ARGBQuantizeRow_C(uint8* dst_argb, int scale, int interval_size,
157681b804e35c0346ee2fc5f8d11945eab9a88fdb10fbarchard@google.com                       int interval_offset, int width);
157781b804e35c0346ee2fc5f8d11945eab9a88fdb10fbarchard@google.comvoid ARGBQuantizeRow_SSE2(uint8* dst_argb, int scale, int interval_size,
157881b804e35c0346ee2fc5f8d11945eab9a88fdb10fbarchard@google.com                          int interval_offset, int width);
1579ef60ab0db435c8e0bd1f63dc9aedb5ad880424a9fbarchard@google.comvoid ARGBQuantizeRow_NEON(uint8* dst_argb, int scale, int interval_size,
1580ef60ab0db435c8e0bd1f63dc9aedb5ad880424a9fbarchard@google.com                          int interval_offset, int width);
1581e442dc4c2a896e85419628e3b7d97c4dfbe71c9dfbarchard@google.com
158282375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.comvoid ARGBShadeRow_C(const uint8* src_argb, uint8* dst_argb, int width,
158382375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.com                    uint32 value);
158482375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.comvoid ARGBShadeRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width,
158582375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.com                       uint32 value);
158682375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.comvoid ARGBShadeRow_NEON(const uint8* src_argb, uint8* dst_argb, int width,
158782375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.com                       uint32 value);
158882375d6de22e6fdc09f9b74dfe036ec172c3af73fbarchard@google.com
1589f51e87912eebc959ac6b9d1ab44978e0e056ca74fbarchard@google.com// Used for blur.
1590f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid CumulativeSumToAverageRow_SSE2(const int32* topleft, const int32* botleft,
1591f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                                    int width, int area, uint8* dst, int count);
1592f51e87912eebc959ac6b9d1ab44978e0e056ca74fbarchard@google.comvoid ComputeCumulativeSumRow_SSE2(const uint8* row, int32* cumsum,
1593133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.com                                  const int32* previous_cumsum, int width);
1594f51e87912eebc959ac6b9d1ab44978e0e056ca74fbarchard@google.com
1595f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.comvoid CumulativeSumToAverageRow_C(const int32* topleft, const int32* botleft,
1596f08ac6bb095348565b5259f2fab95f259ef47edefbarchard@google.com                                 int width, int area, uint8* dst, int count);
1597f51e87912eebc959ac6b9d1ab44978e0e056ca74fbarchard@google.comvoid ComputeCumulativeSumRow_C(const uint8* row, int32* cumsum,
1598133adc46470722b24fdac30d7537d5009e61ef0cfbarchard@google.com                               const int32* previous_cumsum, int width);
1599f51e87912eebc959ac6b9d1ab44978e0e056ca74fbarchard@google.com
1600fc7314e86bc7a1a88b38b815e881183521801ea9fbarchard@google.comLIBYUV_API
160192e51c7a69078f3b6b9a080eb99e0f8155d9d7d1fbarchard@google.comvoid ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
160292e51c7a69078f3b6b9a080eb99e0f8155d9d7d1fbarchard@google.com                     uint8* dst_argb, const float* uv_dudv, int width);
1603fc7314e86bc7a1a88b38b815e881183521801ea9fbarchard@google.comLIBYUV_API
1604864f828a0167bde25b0d24d6b865aa514919fcc9fbarchard@google.comvoid ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
1605864f828a0167bde25b0d24d6b865aa514919fcc9fbarchard@google.com                        uint8* dst_argb, const float* uv_dudv, int width);
1606c4c578e327a9dbc9dafe113634612e9a349a8c1ffbarchard@google.com
1607b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com// Used for I420Scale, ARGBScale, and ARGBInterpolate.
1608b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_C(uint8* dst_ptr, const uint8* src_ptr,
1609b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                      ptrdiff_t src_stride_ptr,
1610b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                      int width, int source_y_fraction);
1611b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_SSE2(uint8* dst_ptr, const uint8* src_ptr,
1612b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                         ptrdiff_t src_stride_ptr, int width,
1613b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                         int source_y_fraction);
1614b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
1615b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                          ptrdiff_t src_stride_ptr, int width,
1616b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                          int source_y_fraction);
16172154de414c1ac41fb434348964c728ccc077ffd3fbarchard@google.comvoid InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr,
16182154de414c1ac41fb434348964c728ccc077ffd3fbarchard@google.com                         ptrdiff_t src_stride_ptr, int width,
16192154de414c1ac41fb434348964c728ccc077ffd3fbarchard@google.com                         int source_y_fraction);
1620b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_NEON(uint8* dst_ptr, const uint8* src_ptr,
1621b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                         ptrdiff_t src_stride_ptr, int width,
1622b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                         int source_y_fraction);
1623b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRows_MIPS_DSPR2(uint8* dst_ptr, const uint8* src_ptr,
1624b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                                ptrdiff_t src_stride_ptr, int width,
1625b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                                int source_y_fraction);
1626b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_Unaligned_SSE2(uint8* dst_ptr, const uint8* src_ptr,
1627b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                                   ptrdiff_t src_stride_ptr, int width,
1628b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                                   int source_y_fraction);
1629b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_Unaligned_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
1630b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                                    ptrdiff_t src_stride_ptr, int width,
1631b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                                    int source_y_fraction);
1632b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_Any_NEON(uint8* dst_ptr, const uint8* src_ptr,
1633b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                             ptrdiff_t src_stride_ptr, int width,
16348811289be7ad257f16a6532aeec2cb5db331fa54fbarchard@google.com                             int source_y_fraction);
1635b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_Any_SSE2(uint8* dst_ptr, const uint8* src_ptr,
1636b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                             ptrdiff_t src_stride_ptr, int width,
1637b5491759b45de37df781d4408a0c46abf6d4ae08fbarchard@google.com                             int source_y_fraction);
1638b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRow_Any_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
1639b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                              ptrdiff_t src_stride_ptr, int width,
1640b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                              int source_y_fraction);
16412154de414c1ac41fb434348964c728ccc077ffd3fbarchard@google.comvoid InterpolateRow_Any_AVX2(uint8* dst_ptr, const uint8* src_ptr,
16422154de414c1ac41fb434348964c728ccc077ffd3fbarchard@google.com                             ptrdiff_t src_stride_ptr, int width,
16432154de414c1ac41fb434348964c728ccc077ffd3fbarchard@google.com                             int source_y_fraction);
1644b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.comvoid InterpolateRows_Any_MIPS_DSPR2(uint8* dst_ptr, const uint8* src_ptr,
1645b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                                    ptrdiff_t src_stride_ptr, int width,
1646b911428afd3994f47e5780a80c876d05d1d4c590fbarchard@google.com                                    int source_y_fraction);
16479bcc9a25355841f844e9fae3ba40522447312a66fbarchard@google.com
1648b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.comvoid InterpolateRow_16_C(uint16* dst_ptr, const uint16* src_ptr,
1649b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.com                         ptrdiff_t src_stride_ptr,
1650b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.com                         int width, int source_y_fraction);
1651b18413e568ae742114eabb8450b180db98a83be0fbarchard@google.com
1652e1247eec9498c870a3d24cf9f70472a2fbb9825efbarchard@google.com// Sobel images.
1653e1247eec9498c870a3d24cf9f70472a2fbb9825efbarchard@google.comvoid SobelXRow_C(const uint8* src_y0, const uint8* src_y1, const uint8* src_y2,
1654e1247eec9498c870a3d24cf9f70472a2fbb9825efbarchard@google.com                 uint8* dst_sobelx, int width);
1655092099507e44e9f429ec52956a20b28db634b910fbarchard@google.comvoid SobelXRow_SSE2(const uint8* src_y0, const uint8* src_y1,
1656092099507e44e9f429ec52956a20b28db634b910fbarchard@google.com                    const uint8* src_y2, uint8* dst_sobelx, int width);
1657c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid SobelXRow_NEON(const uint8* src_y0, const uint8* src_y1,
1658c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                    const uint8* src_y2, uint8* dst_sobelx, int width);
1659e1247eec9498c870a3d24cf9f70472a2fbb9825efbarchard@google.comvoid SobelYRow_C(const uint8* src_y0, const uint8* src_y1,
1660e1247eec9498c870a3d24cf9f70472a2fbb9825efbarchard@google.com                 uint8* dst_sobely, int width);
1661092099507e44e9f429ec52956a20b28db634b910fbarchard@google.comvoid SobelYRow_SSE2(const uint8* src_y0, const uint8* src_y1,
1662092099507e44e9f429ec52956a20b28db634b910fbarchard@google.com                    uint8* dst_sobely, int width);
1663c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid SobelYRow_NEON(const uint8* src_y0, const uint8* src_y1,
1664c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                    uint8* dst_sobely, int width);
1665c93a137671e2e281dfb8d32561fed95caacf608bfbarchard@google.comvoid SobelRow_C(const uint8* src_sobelx, const uint8* src_sobely,
1666c93a137671e2e281dfb8d32561fed95caacf608bfbarchard@google.com                uint8* dst_argb, int width);
1667c93a137671e2e281dfb8d32561fed95caacf608bfbarchard@google.comvoid SobelRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
1668c93a137671e2e281dfb8d32561fed95caacf608bfbarchard@google.com                   uint8* dst_argb, int width);
1669c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid SobelRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
1670c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                   uint8* dst_argb, int width);
16718be4b289c799356d84c68c4eb4b5403285096693fbarchard@google.comvoid SobelToPlaneRow_C(const uint8* src_sobelx, const uint8* src_sobely,
16728be4b289c799356d84c68c4eb4b5403285096693fbarchard@google.com                       uint8* dst_y, int width);
16738be4b289c799356d84c68c4eb4b5403285096693fbarchard@google.comvoid SobelToPlaneRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
16748be4b289c799356d84c68c4eb4b5403285096693fbarchard@google.com                          uint8* dst_y, int width);
16758be4b289c799356d84c68c4eb4b5403285096693fbarchard@google.comvoid SobelToPlaneRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
16768be4b289c799356d84c68c4eb4b5403285096693fbarchard@google.com                          uint8* dst_y, int width);
1677610e012d56b1cce420369b82335bd178f7e39397fbarchard@google.comvoid SobelXYRow_C(const uint8* src_sobelx, const uint8* src_sobely,
1678610e012d56b1cce420369b82335bd178f7e39397fbarchard@google.com                  uint8* dst_argb, int width);
1679610e012d56b1cce420369b82335bd178f7e39397fbarchard@google.comvoid SobelXYRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
1680610e012d56b1cce420369b82335bd178f7e39397fbarchard@google.com                     uint8* dst_argb, int width);
1681c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.comvoid SobelXYRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
1682c56a55fc7206a257eecc21969f94ab066dd80f2ffbarchard@google.com                     uint8* dst_argb, int width);
1683a18ba50d2338a847d60ec69c00cab8d0f8002cc6fbarchard@google.com
1684ae0091e3a74603b23c91f417c8ea023cd43e7e9cfbarchard@google.comvoid ARGBPolynomialRow_C(const uint8* src_argb,
1685ae0091e3a74603b23c91f417c8ea023cd43e7e9cfbarchard@google.com                         uint8* dst_argb, const float* poly,
1686ae0091e3a74603b23c91f417c8ea023cd43e7e9cfbarchard@google.com                         int width);
1687ae0091e3a74603b23c91f417c8ea023cd43e7e9cfbarchard@google.comvoid ARGBPolynomialRow_SSE2(const uint8* src_argb,
1688ae0091e3a74603b23c91f417c8ea023cd43e7e9cfbarchard@google.com                            uint8* dst_argb, const float* poly,
1689ae0091e3a74603b23c91f417c8ea023cd43e7e9cfbarchard@google.com                            int width);
16906da76f3b34e80da2ffebff92d57fd08a93964942fbarchard@google.comvoid ARGBPolynomialRow_AVX2(const uint8* src_argb,
1691b38b73d88cb63f41d943062aa579fc8c27544689fbarchard@google.com                            uint8* dst_argb, const float* poly,
1692b38b73d88cb63f41d943062aa579fc8c27544689fbarchard@google.com                            int width);
1693b38b73d88cb63f41d943062aa579fc8c27544689fbarchard@google.com
169411a0d48e45a7acd5aaf6b914caeee06432f06b6bfbarchard@google.comvoid ARGBLumaColorTableRow_C(const uint8* src_argb, uint8* dst_argb, int width,
16959124ac893a98ae5af2a3e8dc0c14b455e6bcbff9fbarchard@google.com                             const uint8* luma, uint32 lumacoeff);
169611a0d48e45a7acd5aaf6b914caeee06432f06b6bfbarchard@google.comvoid ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
16979124ac893a98ae5af2a3e8dc0c14b455e6bcbff9fbarchard@google.com                                 int width,
16989124ac893a98ae5af2a3e8dc0c14b455e6bcbff9fbarchard@google.com                                 const uint8* luma, uint32 lumacoeff);
1699ae0091e3a74603b23c91f417c8ea023cd43e7e9cfbarchard@google.com
1700fe5ff7ed5451496281697bda9cb85084c532926cfbarchard@google.com#ifdef __cplusplus
1701aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org}  // extern "C"
1702fe5ff7ed5451496281697bda9cb85084c532926cfbarchard@google.com}  // namespace libyuv
1703fe5ff7ed5451496281697bda9cb85084c532926cfbarchard@google.com#endif
1704aed1cc94c105736a5e6010e9c84cc32910b865d6mikhal@webrtc.org
1705c1daff11ebfd4a55447772206a5321f858a66726fbarchard@google.com#endif  // INCLUDE_LIBYUV_ROW_H_  NOLINT
1706