OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2013 The LibYuv Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef INCLUDE_LIBYUV_SCALE_ROW_H_ // NOLINT | 11 #ifndef INCLUDE_LIBYUV_SCALE_ROW_H_ // NOLINT |
12 #define INCLUDE_LIBYUV_SCALE_ROW_H_ | 12 #define INCLUDE_LIBYUV_SCALE_ROW_H_ |
13 | 13 |
14 #include "libyuv/basic_types.h" | 14 #include "libyuv/basic_types.h" |
| 15 #include "libyuv/scale.h" |
15 | 16 |
16 #ifdef __cplusplus | 17 #ifdef __cplusplus |
17 namespace libyuv { | 18 namespace libyuv { |
18 extern "C" { | 19 extern "C" { |
19 #endif | 20 #endif |
20 | 21 |
21 #if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \ | 22 #if defined(__pnacl__) || defined(__CLR_VER) || \ |
22 defined(TARGET_IPHONE_SIMULATOR) | 23 (defined(__i386__) && !defined(__SSE2__)) |
23 #define LIBYUV_DISABLE_X86 | 24 #define LIBYUV_DISABLE_X86 |
24 #endif | 25 #endif |
25 | 26 |
| 27 // Visual C 2012 required for AVX2. |
| 28 #if defined(_M_IX86) && !defined(__clang__) && \ |
| 29 defined(_MSC_VER) && _MSC_VER >= 1700 |
| 30 #define VISUALC_HAS_AVX2 1 |
| 31 #endif // VisualStudio >= 2012 |
| 32 |
26 // The following are available on all x86 platforms: | 33 // The following are available on all x86 platforms: |
27 #if !defined(LIBYUV_DISABLE_X86) && \ | 34 #if !defined(LIBYUV_DISABLE_X86) && \ |
28 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) | 35 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) |
| 36 #define HAS_FIXEDDIV1_X86 |
| 37 #define HAS_FIXEDDIV_X86 |
| 38 #define HAS_SCALEARGBCOLS_SSE2 |
| 39 #define HAS_SCALEARGBCOLSUP2_SSE2 |
| 40 #define HAS_SCALEARGBFILTERCOLS_SSSE3 |
| 41 #define HAS_SCALEARGBROWDOWN2_SSE2 |
| 42 #define HAS_SCALEARGBROWDOWNEVEN_SSE2 |
| 43 #define HAS_SCALECOLSUP2_SSE2 |
| 44 #define HAS_SCALEFILTERCOLS_SSSE3 |
29 #define HAS_SCALEROWDOWN2_SSE2 | 45 #define HAS_SCALEROWDOWN2_SSE2 |
30 #define HAS_SCALEROWDOWN4_SSE2 | |
31 #define HAS_SCALEROWDOWN34_SSSE3 | 46 #define HAS_SCALEROWDOWN34_SSSE3 |
32 #define HAS_SCALEROWDOWN38_SSSE3 | 47 #define HAS_SCALEROWDOWN38_SSSE3 |
33 #define HAS_SCALEADDROWS_SSE2 | 48 #define HAS_SCALEROWDOWN4_SSE2 |
34 #define HAS_SCALEFILTERCOLS_SSSE3 | 49 #endif |
35 #define HAS_SCALECOLSUP2_SSE2 | 50 |
36 #define HAS_SCALEARGBROWDOWN2_SSE2 | 51 // The following are available on VS2012: |
37 #define HAS_SCALEARGBROWDOWNEVEN_SSE2 | 52 #if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2) |
38 #define HAS_SCALEARGBCOLS_SSE2 | 53 #define HAS_SCALEADDROW_AVX2 |
39 #define HAS_SCALEARGBFILTERCOLS_SSSE3 | 54 #define HAS_SCALEROWDOWN2_AVX2 |
40 #define HAS_SCALEARGBCOLSUP2_SSE2 | 55 #define HAS_SCALEROWDOWN4_AVX2 |
41 #define HAS_FIXEDDIV_X86 | 56 #endif |
42 #define HAS_FIXEDDIV1_X86 | 57 |
| 58 // The following are available on Visual C: |
| 59 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && !defined(__clang__) |
| 60 #define HAS_SCALEADDROW_SSE2 |
43 #endif | 61 #endif |
44 | 62 |
45 // The following are available on Neon platforms: | 63 // The following are available on Neon platforms: |
46 #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ | 64 #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ |
47 (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) | 65 (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) |
| 66 #define HAS_SCALEARGBCOLS_NEON |
| 67 #define HAS_SCALEARGBROWDOWN2_NEON |
| 68 #define HAS_SCALEARGBROWDOWNEVEN_NEON |
| 69 #define HAS_SCALEFILTERCOLS_NEON |
48 #define HAS_SCALEROWDOWN2_NEON | 70 #define HAS_SCALEROWDOWN2_NEON |
49 #define HAS_SCALEROWDOWN4_NEON | |
50 #define HAS_SCALEROWDOWN34_NEON | 71 #define HAS_SCALEROWDOWN34_NEON |
51 #define HAS_SCALEROWDOWN38_NEON | 72 #define HAS_SCALEROWDOWN38_NEON |
52 #define HAS_SCALEARGBROWDOWNEVEN_NEON | 73 #define HAS_SCALEROWDOWN4_NEON |
53 #define HAS_SCALEARGBROWDOWN2_NEON | 74 #define HAS_SCALEARGBFILTERCOLS_NEON |
54 #endif | 75 #endif |
55 | 76 |
56 // The following are available on Mips platforms: | 77 // The following are available on Mips platforms: |
57 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ | 78 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ |
58 defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) | 79 defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) |
59 #define HAS_SCALEROWDOWN2_MIPS_DSPR2 | 80 #define HAS_SCALEROWDOWN2_MIPS_DSPR2 |
60 #define HAS_SCALEROWDOWN4_MIPS_DSPR2 | 81 #define HAS_SCALEROWDOWN4_MIPS_DSPR2 |
61 #define HAS_SCALEROWDOWN34_MIPS_DSPR2 | 82 #define HAS_SCALEROWDOWN34_MIPS_DSPR2 |
62 #define HAS_SCALEROWDOWN38_MIPS_DSPR2 | 83 #define HAS_SCALEROWDOWN38_MIPS_DSPR2 |
63 #endif | 84 #endif |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 void ScaleRowDown38_3_Box_C(const uint8* src_ptr, | 178 void ScaleRowDown38_3_Box_C(const uint8* src_ptr, |
158 ptrdiff_t src_stride, | 179 ptrdiff_t src_stride, |
159 uint8* dst_ptr, int dst_width); | 180 uint8* dst_ptr, int dst_width); |
160 void ScaleRowDown38_3_Box_16_C(const uint16* src_ptr, | 181 void ScaleRowDown38_3_Box_16_C(const uint16* src_ptr, |
161 ptrdiff_t src_stride, | 182 ptrdiff_t src_stride, |
162 uint16* dst_ptr, int dst_width); | 183 uint16* dst_ptr, int dst_width); |
163 void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, | 184 void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, |
164 uint8* dst_ptr, int dst_width); | 185 uint8* dst_ptr, int dst_width); |
165 void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, | 186 void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, |
166 uint16* dst_ptr, int dst_width); | 187 uint16* dst_ptr, int dst_width); |
167 void ScaleAddRows_C(const uint8* src_ptr, ptrdiff_t src_stride, | 188 void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width); |
168 uint16* dst_ptr, int src_width, int src_height); | 189 void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width); |
169 void ScaleAddRows_16_C(const uint16* src_ptr, ptrdiff_t src_stride, | |
170 uint32* dst_ptr, int src_width, int src_height); | |
171 void ScaleARGBRowDown2_C(const uint8* src_argb, | 190 void ScaleARGBRowDown2_C(const uint8* src_argb, |
172 ptrdiff_t src_stride, | 191 ptrdiff_t src_stride, |
173 uint8* dst_argb, int dst_width); | 192 uint8* dst_argb, int dst_width); |
174 void ScaleARGBRowDown2Linear_C(const uint8* src_argb, | 193 void ScaleARGBRowDown2Linear_C(const uint8* src_argb, |
175 ptrdiff_t src_stride, | 194 ptrdiff_t src_stride, |
176 uint8* dst_argb, int dst_width); | 195 uint8* dst_argb, int dst_width); |
177 void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride, | 196 void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride, |
178 uint8* dst_argb, int dst_width); | 197 uint8* dst_argb, int dst_width); |
179 void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t src_stride, | 198 void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t src_stride, |
180 int src_stepx, | 199 int src_stepx, |
181 uint8* dst_argb, int dst_width); | 200 uint8* dst_argb, int dst_width); |
182 void ScaleARGBRowDownEvenBox_C(const uint8* src_argb, | 201 void ScaleARGBRowDownEvenBox_C(const uint8* src_argb, |
183 ptrdiff_t src_stride, | 202 ptrdiff_t src_stride, |
184 int src_stepx, | 203 int src_stepx, |
185 uint8* dst_argb, int dst_width); | 204 uint8* dst_argb, int dst_width); |
186 void ScaleARGBCols_C(uint8* dst_argb, const uint8* src_argb, | 205 void ScaleARGBCols_C(uint8* dst_argb, const uint8* src_argb, |
187 int dst_width, int x, int dx); | 206 int dst_width, int x, int dx); |
188 void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb, | 207 void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb, |
189 int dst_width, int x, int dx); | 208 int dst_width, int x, int dx); |
190 void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb, | 209 void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb, |
191 int dst_width, int, int); | 210 int dst_width, int, int); |
192 void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb, | 211 void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb, |
193 int dst_width, int x, int dx); | 212 int dst_width, int x, int dx); |
194 void ScaleARGBFilterCols64_C(uint8* dst_argb, const uint8* src_argb, | 213 void ScaleARGBFilterCols64_C(uint8* dst_argb, const uint8* src_argb, |
195 int dst_width, int x, int dx); | 214 int dst_width, int x, int dx); |
196 | 215 |
| 216 // Specialized scalers for x86. |
197 void ScaleRowDown2_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, | 217 void ScaleRowDown2_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
198 uint8* dst_ptr, int dst_width); | 218 uint8* dst_ptr, int dst_width); |
199 void ScaleRowDown2Linear_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, | 219 void ScaleRowDown2Linear_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
200 uint8* dst_ptr, int dst_width); | 220 uint8* dst_ptr, int dst_width); |
201 void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, | 221 void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
202 uint8* dst_ptr, int dst_width); | 222 uint8* dst_ptr, int dst_width); |
| 223 void ScaleRowDown2_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 224 uint8* dst_ptr, int dst_width); |
| 225 void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 226 uint8* dst_ptr, int dst_width); |
| 227 void ScaleRowDown2Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 228 uint8* dst_ptr, int dst_width); |
203 void ScaleRowDown4_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, | 229 void ScaleRowDown4_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
204 uint8* dst_ptr, int dst_width); | 230 uint8* dst_ptr, int dst_width); |
205 void ScaleRowDown4Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, | 231 void ScaleRowDown4Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
206 uint8* dst_ptr, int dst_width); | 232 uint8* dst_ptr, int dst_width); |
| 233 void ScaleRowDown4_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 234 uint8* dst_ptr, int dst_width); |
| 235 void ScaleRowDown4Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 236 uint8* dst_ptr, int dst_width); |
| 237 |
207 void ScaleRowDown34_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, | 238 void ScaleRowDown34_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, |
208 uint8* dst_ptr, int dst_width); | 239 uint8* dst_ptr, int dst_width); |
209 void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr, | 240 void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr, |
210 ptrdiff_t src_stride, | 241 ptrdiff_t src_stride, |
211 uint8* dst_ptr, int dst_width); | 242 uint8* dst_ptr, int dst_width); |
212 void ScaleRowDown34_0_Box_SSSE3(const uint8* src_ptr, | 243 void ScaleRowDown34_0_Box_SSSE3(const uint8* src_ptr, |
213 ptrdiff_t src_stride, | 244 ptrdiff_t src_stride, |
214 uint8* dst_ptr, int dst_width); | 245 uint8* dst_ptr, int dst_width); |
215 void ScaleRowDown38_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, | 246 void ScaleRowDown38_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, |
216 uint8* dst_ptr, int dst_width); | 247 uint8* dst_ptr, int dst_width); |
217 void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr, | 248 void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr, |
218 ptrdiff_t src_stride, | 249 ptrdiff_t src_stride, |
219 uint8* dst_ptr, int dst_width); | 250 uint8* dst_ptr, int dst_width); |
220 void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr, | 251 void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr, |
221 ptrdiff_t src_stride, | 252 ptrdiff_t src_stride, |
222 uint8* dst_ptr, int dst_width); | 253 uint8* dst_ptr, int dst_width); |
223 void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, | 254 void ScaleRowDown2_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
224 uint16* dst_ptr, int src_width, | 255 uint8* dst_ptr, int dst_width); |
225 int src_height); | 256 void ScaleRowDown2Linear_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 257 uint8* dst_ptr, int dst_width); |
| 258 void ScaleRowDown2Box_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 259 uint8* dst_ptr, int dst_width); |
| 260 void ScaleRowDown2_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 261 uint8* dst_ptr, int dst_width); |
| 262 void ScaleRowDown2Linear_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 263 uint8* dst_ptr, int dst_width); |
| 264 void ScaleRowDown2Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 265 uint8* dst_ptr, int dst_width); |
| 266 void ScaleRowDown4_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 267 uint8* dst_ptr, int dst_width); |
| 268 void ScaleRowDown4Box_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 269 uint8* dst_ptr, int dst_width); |
| 270 void ScaleRowDown4_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 271 uint8* dst_ptr, int dst_width); |
| 272 void ScaleRowDown4Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, |
| 273 uint8* dst_ptr, int dst_width); |
| 274 |
| 275 void ScaleRowDown34_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, |
| 276 uint8* dst_ptr, int dst_width); |
| 277 void ScaleRowDown34_1_Box_Any_SSSE3(const uint8* src_ptr, |
| 278 ptrdiff_t src_stride, |
| 279 uint8* dst_ptr, int dst_width); |
| 280 void ScaleRowDown34_0_Box_Any_SSSE3(const uint8* src_ptr, |
| 281 ptrdiff_t src_stride, |
| 282 uint8* dst_ptr, int dst_width); |
| 283 void ScaleRowDown38_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, |
| 284 uint8* dst_ptr, int dst_width); |
| 285 void ScaleRowDown38_3_Box_Any_SSSE3(const uint8* src_ptr, |
| 286 ptrdiff_t src_stride, |
| 287 uint8* dst_ptr, int dst_width); |
| 288 void ScaleRowDown38_2_Box_Any_SSSE3(const uint8* src_ptr, |
| 289 ptrdiff_t src_stride, |
| 290 uint8* dst_ptr, int dst_width); |
| 291 |
| 292 void ScaleAddRow_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); |
| 293 void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); |
| 294 void ScaleAddRow_Any_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); |
| 295 void ScaleAddRow_Any_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); |
| 296 |
226 void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, | 297 void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, |
227 int dst_width, int x, int dx); | 298 int dst_width, int x, int dx); |
228 void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, | 299 void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, |
229 int dst_width, int x, int dx); | 300 int dst_width, int x, int dx); |
230 void ScaleARGBRowDown2_SSE2(const uint8* src_argb, | 301 |
231 ptrdiff_t src_stride, | 302 |
232 uint8* dst_argb, int dst_width); | 303 // ARGB Column functions |
233 void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, | |
234 ptrdiff_t src_stride, | |
235 uint8* dst_argb, int dst_width); | |
236 void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, | |
237 ptrdiff_t src_stride, | |
238 uint8* dst_argb, int dst_width); | |
239 void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride, | |
240 int src_stepx, | |
241 uint8* dst_argb, int dst_width); | |
242 void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, | |
243 ptrdiff_t src_stride, | |
244 int src_stepx, | |
245 uint8* dst_argb, int dst_width); | |
246 void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, | 304 void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, |
247 int dst_width, int x, int dx); | 305 int dst_width, int x, int dx); |
248 void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, | 306 void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, |
249 int dst_width, int x, int dx); | 307 int dst_width, int x, int dx); |
250 void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb, | 308 void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb, |
251 int dst_width, int x, int dx); | 309 int dst_width, int x, int dx); |
252 // Row functions. | 310 void ScaleARGBFilterCols_NEON(uint8* dst_argb, const uint8* src_argb, |
| 311 int dst_width, int x, int dx); |
| 312 void ScaleARGBCols_NEON(uint8* dst_argb, const uint8* src_argb, |
| 313 int dst_width, int x, int dx); |
| 314 void ScaleARGBFilterCols_Any_NEON(uint8* dst_argb, const uint8* src_argb, |
| 315 int dst_width, int x, int dx); |
| 316 void ScaleARGBCols_Any_NEON(uint8* dst_argb, const uint8* src_argb, |
| 317 int dst_width, int x, int dx); |
| 318 |
| 319 // ARGB Row functions |
| 320 void ScaleARGBRowDown2_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
| 321 uint8* dst_argb, int dst_width); |
| 322 void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
| 323 uint8* dst_argb, int dst_width); |
| 324 void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
| 325 uint8* dst_argb, int dst_width); |
| 326 void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 327 uint8* dst, int dst_width); |
| 328 void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, ptrdiff_t src_stride, |
| 329 uint8* dst_argb, int dst_width); |
| 330 void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 331 uint8* dst, int dst_width); |
| 332 void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
| 333 uint8* dst_argb, int dst_width); |
| 334 void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb, |
| 335 ptrdiff_t src_stride, |
| 336 uint8* dst_argb, int dst_width); |
| 337 void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
| 338 uint8* dst_argb, int dst_width); |
| 339 void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 340 uint8* dst, int dst_width); |
| 341 void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb, |
| 342 ptrdiff_t src_stride, |
| 343 uint8* dst_argb, int dst_width); |
| 344 void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 345 uint8* dst, int dst_width); |
| 346 |
| 347 void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
| 348 int src_stepx, uint8* dst_argb, int dst_width); |
| 349 void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
| 350 int src_stepx, |
| 351 uint8* dst_argb, int dst_width); |
253 void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride, | 352 void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride, |
254 int src_stepx, | 353 int src_stepx, |
255 uint8* dst_argb, int dst_width); | 354 uint8* dst_argb, int dst_width); |
256 void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, ptrdiff_t src_stride, | 355 void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, ptrdiff_t src_stride, |
257 int src_stepx, | 356 int src_stepx, |
258 uint8* dst_argb, int dst_width); | 357 uint8* dst_argb, int dst_width); |
259 void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, | 358 void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
260 uint8* dst, int dst_width); | 359 int src_stepx, |
261 void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, | 360 uint8* dst_argb, int dst_width); |
262 uint8* dst, int dst_width); | 361 void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb, |
| 362 ptrdiff_t src_stride, |
| 363 int src_stepx, |
| 364 uint8* dst_argb, int dst_width); |
| 365 void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, ptrdiff_t src_stride, |
| 366 int src_stepx, |
| 367 uint8* dst_argb, int dst_width); |
| 368 void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb, |
| 369 ptrdiff_t src_stride, |
| 370 int src_stepx, |
| 371 uint8* dst_argb, int dst_width); |
263 | 372 |
264 // ScaleRowDown2Box also used by planar functions | 373 // ScaleRowDown2Box also used by planar functions |
265 // NEON downscalers with interpolation. | 374 // NEON downscalers with interpolation. |
266 | 375 |
267 // Note - not static due to reuse in convert for 444 to 420. | 376 // Note - not static due to reuse in convert for 444 to 420. |
268 void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, | 377 void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
269 uint8* dst, int dst_width); | 378 uint8* dst, int dst_width); |
270 | 379 void ScaleRowDown2Linear_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 380 uint8* dst, int dst_width); |
271 void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, | 381 void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
272 uint8* dst, int dst_width); | 382 uint8* dst, int dst_width); |
273 | 383 |
274 void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t src_stride, | 384 void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
275 uint8* dst_ptr, int dst_width); | 385 uint8* dst_ptr, int dst_width); |
276 void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, | 386 void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
277 uint8* dst_ptr, int dst_width); | 387 uint8* dst_ptr, int dst_width); |
278 | 388 |
279 // Down scale from 4 to 3 pixels. Use the neon multilane read/write | 389 // Down scale from 4 to 3 pixels. Use the neon multilane read/write |
280 // to load up the every 4th pixel into a 4 different registers. | 390 // to load up the every 4th pixel into a 4 different registers. |
(...skipping 14 matching lines...) Expand all Loading... |
295 uint8* dst_ptr, int dst_width); | 405 uint8* dst_ptr, int dst_width); |
296 // 32x3 -> 12x1 | 406 // 32x3 -> 12x1 |
297 void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr, | 407 void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr, |
298 ptrdiff_t src_stride, | 408 ptrdiff_t src_stride, |
299 uint8* dst_ptr, int dst_width); | 409 uint8* dst_ptr, int dst_width); |
300 // 32x2 -> 12x1 | 410 // 32x2 -> 12x1 |
301 void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, | 411 void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, |
302 ptrdiff_t src_stride, | 412 ptrdiff_t src_stride, |
303 uint8* dst_ptr, int dst_width); | 413 uint8* dst_ptr, int dst_width); |
304 | 414 |
| 415 void ScaleRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 416 uint8* dst, int dst_width); |
| 417 void ScaleRowDown2Linear_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 418 uint8* dst, int dst_width); |
| 419 void ScaleRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 420 uint8* dst, int dst_width); |
| 421 void ScaleRowDown4_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 422 uint8* dst_ptr, int dst_width); |
| 423 void ScaleRowDown4Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 424 uint8* dst_ptr, int dst_width); |
| 425 void ScaleRowDown34_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 426 uint8* dst_ptr, int dst_width); |
| 427 void ScaleRowDown34_0_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 428 uint8* dst_ptr, int dst_width); |
| 429 void ScaleRowDown34_1_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 430 uint8* dst_ptr, int dst_width); |
| 431 // 32 -> 12 |
| 432 void ScaleRowDown38_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 433 uint8* dst_ptr, int dst_width); |
| 434 // 32x3 -> 12x1 |
| 435 void ScaleRowDown38_3_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 436 uint8* dst_ptr, int dst_width); |
| 437 // 32x2 -> 12x1 |
| 438 void ScaleRowDown38_2_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, |
| 439 uint8* dst_ptr, int dst_width); |
| 440 |
| 441 void ScaleAddRow_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); |
| 442 void ScaleAddRow_Any_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); |
| 443 |
| 444 void ScaleFilterCols_NEON(uint8* dst_ptr, const uint8* src_ptr, |
| 445 int dst_width, int x, int dx); |
| 446 |
| 447 void ScaleFilterCols_Any_NEON(uint8* dst_ptr, const uint8* src_ptr, |
| 448 int dst_width, int x, int dx); |
| 449 |
| 450 |
305 void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 451 void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
306 uint8* dst, int dst_width); | 452 uint8* dst, int dst_width); |
307 void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 453 void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
308 uint8* dst, int dst_width); | 454 uint8* dst, int dst_width); |
309 void ScaleRowDown4_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 455 void ScaleRowDown4_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
310 uint8* dst, int dst_width); | 456 uint8* dst, int dst_width); |
311 void ScaleRowDown4Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 457 void ScaleRowDown4Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
312 uint8* dst, int dst_width); | 458 uint8* dst, int dst_width); |
313 void ScaleRowDown34_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 459 void ScaleRowDown34_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
314 uint8* dst, int dst_width); | 460 uint8* dst, int dst_width); |
315 void ScaleRowDown34_0_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 461 void ScaleRowDown34_0_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
316 uint8* d, int dst_width); | 462 uint8* d, int dst_width); |
317 void ScaleRowDown34_1_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 463 void ScaleRowDown34_1_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
318 uint8* d, int dst_width); | 464 uint8* d, int dst_width); |
319 void ScaleRowDown38_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 465 void ScaleRowDown38_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
320 uint8* dst, int dst_width); | 466 uint8* dst, int dst_width); |
321 void ScaleRowDown38_2_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, | 467 void ScaleRowDown38_2_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, |
322 uint8* dst_ptr, int dst_width); | 468 uint8* dst_ptr, int dst_width); |
323 void ScaleRowDown38_3_Box_MIPS_DSPR2(const uint8* src_ptr, | 469 void ScaleRowDown38_3_Box_MIPS_DSPR2(const uint8* src_ptr, |
324 ptrdiff_t src_stride, | 470 ptrdiff_t src_stride, |
325 uint8* dst_ptr, int dst_width); | 471 uint8* dst_ptr, int dst_width); |
326 | 472 |
327 #ifdef __cplusplus | 473 #ifdef __cplusplus |
328 } // extern "C" | 474 } // extern "C" |
329 } // namespace libyuv | 475 } // namespace libyuv |
330 #endif | 476 #endif |
331 | 477 |
332 #endif // INCLUDE_LIBYUV_SCALE_ROW_H_ NOLINT | 478 #endif // INCLUDE_LIBYUV_SCALE_ROW_H_ NOLINT |
OLD | NEW |