• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2013 The LibYuv Project Authors. All rights reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS. All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef INCLUDE_LIBYUV_SCALE_ROW_H_  // NOLINT
12 #define INCLUDE_LIBYUV_SCALE_ROW_H_
13 
14 #include "libyuv/basic_types.h"
15 #include "libyuv/scale.h"
16 
17 #ifdef __cplusplus
18 namespace libyuv {
19 extern "C" {
20 #endif
21 
22 #if defined(__pnacl__) || defined(__CLR_VER) || \
23     (defined(__i386__) && !defined(__SSE2__))
24 #define LIBYUV_DISABLE_X86
25 #endif
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 
33 // The following are available on all x86 platforms:
34 #if !defined(LIBYUV_DISABLE_X86) && \
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
45 #define HAS_SCALEROWDOWN2_SSE2
46 #define HAS_SCALEROWDOWN34_SSSE3
47 #define HAS_SCALEROWDOWN38_SSSE3
48 #define HAS_SCALEROWDOWN4_SSE2
49 #endif
50 
51 // The following are available on VS2012:
52 #if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
53 #define HAS_SCALEADDROW_AVX2
54 #define HAS_SCALEROWDOWN2_AVX2
55 #define HAS_SCALEROWDOWN4_AVX2
56 #endif
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
61 #endif
62 
63 // The following are available on Neon platforms:
64 #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
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
70 #define HAS_SCALEROWDOWN2_NEON
71 #define HAS_SCALEROWDOWN34_NEON
72 #define HAS_SCALEROWDOWN38_NEON
73 #define HAS_SCALEROWDOWN4_NEON
74 #define HAS_SCALEARGBFILTERCOLS_NEON
75 #endif
76 
77 // The following are available on Mips platforms:
78 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \
79     defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2)
80 #define HAS_SCALEROWDOWN2_MIPS_DSPR2
81 #define HAS_SCALEROWDOWN4_MIPS_DSPR2
82 #define HAS_SCALEROWDOWN34_MIPS_DSPR2
83 #define HAS_SCALEROWDOWN38_MIPS_DSPR2
84 #endif
85 
86 // Scale ARGB vertically with bilinear interpolation.
87 void ScalePlaneVertical(int src_height,
88                         int dst_width, int dst_height,
89                         int src_stride, int dst_stride,
90                         const uint8* src_argb, uint8* dst_argb,
91                         int x, int y, int dy,
92                         int bpp, enum FilterMode filtering);
93 
94 void ScalePlaneVertical_16(int src_height,
95                            int dst_width, int dst_height,
96                            int src_stride, int dst_stride,
97                            const uint16* src_argb, uint16* dst_argb,
98                            int x, int y, int dy,
99                            int wpp, enum FilterMode filtering);
100 
101 // Simplify the filtering based on scale factors.
102 enum FilterMode ScaleFilterReduce(int src_width, int src_height,
103                                   int dst_width, int dst_height,
104                                   enum FilterMode filtering);
105 
106 // Divide num by div and return as 16.16 fixed point result.
107 int FixedDiv_C(int num, int div);
108 int FixedDiv_X86(int num, int div);
109 // Divide num - 1 by div - 1 and return as 16.16 fixed point result.
110 int FixedDiv1_C(int num, int div);
111 int FixedDiv1_X86(int num, int div);
112 #ifdef HAS_FIXEDDIV_X86
113 #define FixedDiv FixedDiv_X86
114 #define FixedDiv1 FixedDiv1_X86
115 #else
116 #define FixedDiv FixedDiv_C
117 #define FixedDiv1 FixedDiv1_C
118 #endif
119 
120 // Compute slope values for stepping.
121 void ScaleSlope(int src_width, int src_height,
122                 int dst_width, int dst_height,
123                 enum FilterMode filtering,
124                 int* x, int* y, int* dx, int* dy);
125 
126 void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t src_stride,
127                      uint8* dst, int dst_width);
128 void ScaleRowDown2_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
129                         uint16* dst, int dst_width);
130 void ScaleRowDown2Linear_C(const uint8* src_ptr, ptrdiff_t src_stride,
131                            uint8* dst, int dst_width);
132 void ScaleRowDown2Linear_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
133                               uint16* dst, int dst_width);
134 void ScaleRowDown2Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
135                         uint8* dst, int dst_width);
136 void ScaleRowDown2Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
137                            uint16* dst, int dst_width);
138 void ScaleRowDown4_C(const uint8* src_ptr, ptrdiff_t src_stride,
139                      uint8* dst, int dst_width);
140 void ScaleRowDown4_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
141                         uint16* dst, int dst_width);
142 void ScaleRowDown4Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
143                         uint8* dst, int dst_width);
144 void ScaleRowDown4Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
145                            uint16* dst, int dst_width);
146 void ScaleRowDown34_C(const uint8* src_ptr, ptrdiff_t src_stride,
147                       uint8* dst, int dst_width);
148 void ScaleRowDown34_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
149                          uint16* dst, int dst_width);
150 void ScaleRowDown34_0_Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
151                             uint8* d, int dst_width);
152 void ScaleRowDown34_0_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
153                                uint16* d, int dst_width);
154 void ScaleRowDown34_1_Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
155                             uint8* d, int dst_width);
156 void ScaleRowDown34_1_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
157                                uint16* d, int dst_width);
158 void ScaleCols_C(uint8* dst_ptr, const uint8* src_ptr,
159                  int dst_width, int x, int dx);
160 void ScaleCols_16_C(uint16* dst_ptr, const uint16* src_ptr,
161                     int dst_width, int x, int dx);
162 void ScaleColsUp2_C(uint8* dst_ptr, const uint8* src_ptr,
163                     int dst_width, int, int);
164 void ScaleColsUp2_16_C(uint16* dst_ptr, const uint16* src_ptr,
165                        int dst_width, int, int);
166 void ScaleFilterCols_C(uint8* dst_ptr, const uint8* src_ptr,
167                        int dst_width, int x, int dx);
168 void ScaleFilterCols_16_C(uint16* dst_ptr, const uint16* src_ptr,
169                           int dst_width, int x, int dx);
170 void ScaleFilterCols64_C(uint8* dst_ptr, const uint8* src_ptr,
171                          int dst_width, int x, int dx);
172 void ScaleFilterCols64_16_C(uint16* dst_ptr, const uint16* src_ptr,
173                             int dst_width, int x, int dx);
174 void ScaleRowDown38_C(const uint8* src_ptr, ptrdiff_t src_stride,
175                       uint8* dst, int dst_width);
176 void ScaleRowDown38_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
177                          uint16* dst, int dst_width);
178 void ScaleRowDown38_3_Box_C(const uint8* src_ptr,
179                             ptrdiff_t src_stride,
180                             uint8* dst_ptr, int dst_width);
181 void ScaleRowDown38_3_Box_16_C(const uint16* src_ptr,
182                                ptrdiff_t src_stride,
183                                uint16* dst_ptr, int dst_width);
184 void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
185                             uint8* dst_ptr, int dst_width);
186 void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
187                                uint16* dst_ptr, int dst_width);
188 void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width);
189 void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width);
190 void ScaleARGBRowDown2_C(const uint8* src_argb,
191                          ptrdiff_t src_stride,
192                          uint8* dst_argb, int dst_width);
193 void ScaleARGBRowDown2Linear_C(const uint8* src_argb,
194                                ptrdiff_t src_stride,
195                                uint8* dst_argb, int dst_width);
196 void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride,
197                             uint8* dst_argb, int dst_width);
198 void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t src_stride,
199                             int src_stepx,
200                             uint8* dst_argb, int dst_width);
201 void ScaleARGBRowDownEvenBox_C(const uint8* src_argb,
202                                ptrdiff_t src_stride,
203                                int src_stepx,
204                                uint8* dst_argb, int dst_width);
205 void ScaleARGBCols_C(uint8* dst_argb, const uint8* src_argb,
206                      int dst_width, int x, int dx);
207 void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb,
208                        int dst_width, int x, int dx);
209 void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb,
210                         int dst_width, int, int);
211 void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb,
212                            int dst_width, int x, int dx);
213 void ScaleARGBFilterCols64_C(uint8* dst_argb, const uint8* src_argb,
214                              int dst_width, int x, int dx);
215 
216 // Specialized scalers for x86.
217 void ScaleRowDown2_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
218                         uint8* dst_ptr, int dst_width);
219 void ScaleRowDown2Linear_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
220                               uint8* dst_ptr, int dst_width);
221 void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
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);
229 void ScaleRowDown4_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
230                         uint8* dst_ptr, int dst_width);
231 void ScaleRowDown4Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
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 
238 void ScaleRowDown34_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride,
239                           uint8* dst_ptr, int dst_width);
240 void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr,
241                                 ptrdiff_t src_stride,
242                                 uint8* dst_ptr, int dst_width);
243 void ScaleRowDown34_0_Box_SSSE3(const uint8* src_ptr,
244                                 ptrdiff_t src_stride,
245                                 uint8* dst_ptr, int dst_width);
246 void ScaleRowDown38_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride,
247                           uint8* dst_ptr, int dst_width);
248 void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr,
249                                 ptrdiff_t src_stride,
250                                 uint8* dst_ptr, int dst_width);
251 void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr,
252                                 ptrdiff_t src_stride,
253                                 uint8* dst_ptr, int dst_width);
254 void ScaleRowDown2_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
255                             uint8* dst_ptr, int dst_width);
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 
297 void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
298                            int dst_width, int x, int dx);
299 void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr,
300                        int dst_width, int x, int dx);
301 
302 
303 // ARGB Column functions
304 void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb,
305                         int dst_width, int x, int dx);
306 void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb,
307                                int dst_width, int x, int dx);
308 void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb,
309                            int dst_width, int x, int dx);
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);
352 void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride,
353                                int src_stepx,
354                                uint8* dst_argb, int dst_width);
355 void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, ptrdiff_t src_stride,
356                                   int src_stepx,
357                                   uint8* dst_argb, int dst_width);
358 void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
359                                    int src_stepx,
360                                    uint8* dst_argb, 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);
372 
373 // ScaleRowDown2Box also used by planar functions
374 // NEON downscalers with interpolation.
375 
376 // Note - not static due to reuse in convert for 444 to 420.
377 void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
378                         uint8* dst, int dst_width);
379 void ScaleRowDown2Linear_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
380                               uint8* dst, int dst_width);
381 void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
382                            uint8* dst, int dst_width);
383 
384 void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
385                         uint8* dst_ptr, int dst_width);
386 void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
387                            uint8* dst_ptr, int dst_width);
388 
389 // Down scale from 4 to 3 pixels. Use the neon multilane read/write
390 //  to load up the every 4th pixel into a 4 different registers.
391 // Point samples 32 pixels to 24 pixels.
392 void ScaleRowDown34_NEON(const uint8* src_ptr,
393                          ptrdiff_t src_stride,
394                          uint8* dst_ptr, int dst_width);
395 void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr,
396                                ptrdiff_t src_stride,
397                                uint8* dst_ptr, int dst_width);
398 void ScaleRowDown34_1_Box_NEON(const uint8* src_ptr,
399                                ptrdiff_t src_stride,
400                                uint8* dst_ptr, int dst_width);
401 
402 // 32 -> 12
403 void ScaleRowDown38_NEON(const uint8* src_ptr,
404                          ptrdiff_t src_stride,
405                          uint8* dst_ptr, int dst_width);
406 // 32x3 -> 12x1
407 void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr,
408                                ptrdiff_t src_stride,
409                                uint8* dst_ptr, int dst_width);
410 // 32x2 -> 12x1
411 void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr,
412                                ptrdiff_t src_stride,
413                                uint8* dst_ptr, int dst_width);
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 
451 void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
452                               uint8* dst, int dst_width);
453 void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
454                                  uint8* dst, int dst_width);
455 void ScaleRowDown4_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
456                               uint8* dst, int dst_width);
457 void ScaleRowDown4Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
458                                  uint8* dst, int dst_width);
459 void ScaleRowDown34_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
460                                uint8* dst, int dst_width);
461 void ScaleRowDown34_0_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
462                                      uint8* d, int dst_width);
463 void ScaleRowDown34_1_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
464                                      uint8* d, int dst_width);
465 void ScaleRowDown38_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
466                                uint8* dst, int dst_width);
467 void ScaleRowDown38_2_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
468                                      uint8* dst_ptr, int dst_width);
469 void ScaleRowDown38_3_Box_MIPS_DSPR2(const uint8* src_ptr,
470                                      ptrdiff_t src_stride,
471                                      uint8* dst_ptr, int dst_width);
472 
473 #ifdef __cplusplus
474 }  // extern "C"
475 }  // namespace libyuv
476 #endif
477 
478 #endif  // INCLUDE_LIBYUV_SCALE_ROW_H_  NOLINT
479