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 // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 27 #if defined(__has_feature) 28 #if __has_feature(memory_sanitizer) 29 #define LIBYUV_DISABLE_X86 30 #endif 31 #endif 32 33 // GCC >= 4.7.0 required for AVX2. 34 #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) 35 #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7)) 36 #define GCC_HAS_AVX2 1 37 #endif // GNUC >= 4.7 38 #endif // __GNUC__ 39 40 // clang >= 3.4.0 required for AVX2. 41 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) 42 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) 43 #define CLANG_HAS_AVX2 1 44 #endif // clang >= 3.4 45 #endif // __clang__ 46 47 // Visual C 2012 required for AVX2. 48 #if defined(_M_IX86) && !defined(__clang__) && \ 49 defined(_MSC_VER) && _MSC_VER >= 1700 50 #define VISUALC_HAS_AVX2 1 51 #endif // VisualStudio >= 2012 52 53 // The following are available on all x86 platforms: 54 #if !defined(LIBYUV_DISABLE_X86) && \ 55 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) 56 #define HAS_FIXEDDIV1_X86 57 #define HAS_FIXEDDIV_X86 58 #define HAS_SCALEARGBCOLS_SSE2 59 #define HAS_SCALEARGBCOLSUP2_SSE2 60 #define HAS_SCALEARGBFILTERCOLS_SSSE3 61 #define HAS_SCALEARGBROWDOWN2_SSE2 62 #define HAS_SCALEARGBROWDOWNEVEN_SSE2 63 #define HAS_SCALECOLSUP2_SSE2 64 #define HAS_SCALEFILTERCOLS_SSSE3 65 #define HAS_SCALEROWDOWN2_SSSE3 66 #define HAS_SCALEROWDOWN34_SSSE3 67 #define HAS_SCALEROWDOWN38_SSSE3 68 #define HAS_SCALEROWDOWN4_SSSE3 69 #define HAS_SCALEADDROW_SSE2 70 #endif 71 72 // The following are available on all x86 platforms, but 73 // require VS2012, clang 3.4 or gcc 4.7. 74 // The code supports NaCL but requires a new compiler and validator. 75 #if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \ 76 defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)) 77 #define HAS_SCALEADDROW_AVX2 78 #define HAS_SCALEROWDOWN2_AVX2 79 #define HAS_SCALEROWDOWN4_AVX2 80 #endif 81 82 // The following are available on Neon platforms: 83 #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ 84 (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) 85 #define HAS_SCALEARGBCOLS_NEON 86 #define HAS_SCALEARGBROWDOWN2_NEON 87 #define HAS_SCALEARGBROWDOWNEVEN_NEON 88 #define HAS_SCALEFILTERCOLS_NEON 89 #define HAS_SCALEROWDOWN2_NEON 90 #define HAS_SCALEROWDOWN34_NEON 91 #define HAS_SCALEROWDOWN38_NEON 92 #define HAS_SCALEROWDOWN4_NEON 93 #define HAS_SCALEARGBFILTERCOLS_NEON 94 #endif 95 96 // The following are available on Mips platforms: 97 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ 98 defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) 99 #define HAS_SCALEROWDOWN2_DSPR2 100 #define HAS_SCALEROWDOWN4_DSPR2 101 #define HAS_SCALEROWDOWN34_DSPR2 102 #define HAS_SCALEROWDOWN38_DSPR2 103 #endif 104 105 // Scale ARGB vertically with bilinear interpolation. 106 void ScalePlaneVertical(int src_height, 107 int dst_width, int dst_height, 108 int src_stride, int dst_stride, 109 const uint8* src_argb, uint8* dst_argb, 110 int x, int y, int dy, 111 int bpp, enum FilterMode filtering); 112 113 void ScalePlaneVertical_16(int src_height, 114 int dst_width, int dst_height, 115 int src_stride, int dst_stride, 116 const uint16* src_argb, uint16* dst_argb, 117 int x, int y, int dy, 118 int wpp, enum FilterMode filtering); 119 120 // Simplify the filtering based on scale factors. 121 enum FilterMode ScaleFilterReduce(int src_width, int src_height, 122 int dst_width, int dst_height, 123 enum FilterMode filtering); 124 125 // Divide num by div and return as 16.16 fixed point result. 126 int FixedDiv_C(int num, int div); 127 int FixedDiv_X86(int num, int div); 128 // Divide num - 1 by div - 1 and return as 16.16 fixed point result. 129 int FixedDiv1_C(int num, int div); 130 int FixedDiv1_X86(int num, int div); 131 #ifdef HAS_FIXEDDIV_X86 132 #define FixedDiv FixedDiv_X86 133 #define FixedDiv1 FixedDiv1_X86 134 #else 135 #define FixedDiv FixedDiv_C 136 #define FixedDiv1 FixedDiv1_C 137 #endif 138 139 // Compute slope values for stepping. 140 void ScaleSlope(int src_width, int src_height, 141 int dst_width, int dst_height, 142 enum FilterMode filtering, 143 int* x, int* y, int* dx, int* dy); 144 145 void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t src_stride, 146 uint8* dst, int dst_width); 147 void ScaleRowDown2_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 148 uint16* dst, int dst_width); 149 void ScaleRowDown2Linear_C(const uint8* src_ptr, ptrdiff_t src_stride, 150 uint8* dst, int dst_width); 151 void ScaleRowDown2Linear_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 152 uint16* dst, int dst_width); 153 void ScaleRowDown2Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 154 uint8* dst, int dst_width); 155 void ScaleRowDown2Box_Odd_C(const uint8* src_ptr, ptrdiff_t src_stride, 156 uint8* dst, int dst_width); 157 void ScaleRowDown2Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 158 uint16* dst, int dst_width); 159 void ScaleRowDown4_C(const uint8* src_ptr, ptrdiff_t src_stride, 160 uint8* dst, int dst_width); 161 void ScaleRowDown4_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 162 uint16* dst, int dst_width); 163 void ScaleRowDown4Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 164 uint8* dst, int dst_width); 165 void ScaleRowDown4Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 166 uint16* dst, int dst_width); 167 void ScaleRowDown34_C(const uint8* src_ptr, ptrdiff_t src_stride, 168 uint8* dst, int dst_width); 169 void ScaleRowDown34_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 170 uint16* dst, int dst_width); 171 void ScaleRowDown34_0_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 172 uint8* d, int dst_width); 173 void ScaleRowDown34_0_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 174 uint16* d, int dst_width); 175 void ScaleRowDown34_1_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 176 uint8* d, int dst_width); 177 void ScaleRowDown34_1_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 178 uint16* d, int dst_width); 179 void ScaleCols_C(uint8* dst_ptr, const uint8* src_ptr, 180 int dst_width, int x, int dx); 181 void ScaleCols_16_C(uint16* dst_ptr, const uint16* src_ptr, 182 int dst_width, int x, int dx); 183 void ScaleColsUp2_C(uint8* dst_ptr, const uint8* src_ptr, 184 int dst_width, int, int); 185 void ScaleColsUp2_16_C(uint16* dst_ptr, const uint16* src_ptr, 186 int dst_width, int, int); 187 void ScaleFilterCols_C(uint8* dst_ptr, const uint8* src_ptr, 188 int dst_width, int x, int dx); 189 void ScaleFilterCols_16_C(uint16* dst_ptr, const uint16* src_ptr, 190 int dst_width, int x, int dx); 191 void ScaleFilterCols64_C(uint8* dst_ptr, const uint8* src_ptr, 192 int dst_width, int x, int dx); 193 void ScaleFilterCols64_16_C(uint16* dst_ptr, const uint16* src_ptr, 194 int dst_width, int x, int dx); 195 void ScaleRowDown38_C(const uint8* src_ptr, ptrdiff_t src_stride, 196 uint8* dst, int dst_width); 197 void ScaleRowDown38_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 198 uint16* dst, int dst_width); 199 void ScaleRowDown38_3_Box_C(const uint8* src_ptr, 200 ptrdiff_t src_stride, 201 uint8* dst_ptr, int dst_width); 202 void ScaleRowDown38_3_Box_16_C(const uint16* src_ptr, 203 ptrdiff_t src_stride, 204 uint16* dst_ptr, int dst_width); 205 void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 206 uint8* dst_ptr, int dst_width); 207 void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 208 uint16* dst_ptr, int dst_width); 209 void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width); 210 void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width); 211 void ScaleARGBRowDown2_C(const uint8* src_argb, 212 ptrdiff_t src_stride, 213 uint8* dst_argb, int dst_width); 214 void ScaleARGBRowDown2Linear_C(const uint8* src_argb, 215 ptrdiff_t src_stride, 216 uint8* dst_argb, int dst_width); 217 void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride, 218 uint8* dst_argb, int dst_width); 219 void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t src_stride, 220 int src_stepx, 221 uint8* dst_argb, int dst_width); 222 void ScaleARGBRowDownEvenBox_C(const uint8* src_argb, 223 ptrdiff_t src_stride, 224 int src_stepx, 225 uint8* dst_argb, int dst_width); 226 void ScaleARGBCols_C(uint8* dst_argb, const uint8* src_argb, 227 int dst_width, int x, int dx); 228 void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb, 229 int dst_width, int x, int dx); 230 void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb, 231 int dst_width, int, int); 232 void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb, 233 int dst_width, int x, int dx); 234 void ScaleARGBFilterCols64_C(uint8* dst_argb, const uint8* src_argb, 235 int dst_width, int x, int dx); 236 237 // Specialized scalers for x86. 238 void ScaleRowDown2_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 239 uint8* dst_ptr, int dst_width); 240 void ScaleRowDown2Linear_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 241 uint8* dst_ptr, int dst_width); 242 void ScaleRowDown2Box_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 243 uint8* dst_ptr, int dst_width); 244 void ScaleRowDown2_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 245 uint8* dst_ptr, int dst_width); 246 void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 247 uint8* dst_ptr, int dst_width); 248 void ScaleRowDown2Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 249 uint8* dst_ptr, int dst_width); 250 void ScaleRowDown4_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 251 uint8* dst_ptr, int dst_width); 252 void ScaleRowDown4Box_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 253 uint8* dst_ptr, int dst_width); 254 void ScaleRowDown4_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 255 uint8* dst_ptr, int dst_width); 256 void ScaleRowDown4Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 257 uint8* dst_ptr, int dst_width); 258 259 void ScaleRowDown34_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 260 uint8* dst_ptr, int dst_width); 261 void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr, 262 ptrdiff_t src_stride, 263 uint8* dst_ptr, int dst_width); 264 void ScaleRowDown34_0_Box_SSSE3(const uint8* src_ptr, 265 ptrdiff_t src_stride, 266 uint8* dst_ptr, int dst_width); 267 void ScaleRowDown38_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 268 uint8* dst_ptr, int dst_width); 269 void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr, 270 ptrdiff_t src_stride, 271 uint8* dst_ptr, int dst_width); 272 void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr, 273 ptrdiff_t src_stride, 274 uint8* dst_ptr, int dst_width); 275 void ScaleRowDown2_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 276 uint8* dst_ptr, int dst_width); 277 void ScaleRowDown2Linear_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 278 uint8* dst_ptr, int dst_width); 279 void ScaleRowDown2Box_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 280 uint8* dst_ptr, int dst_width); 281 void ScaleRowDown2Box_Odd_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 282 uint8* dst_ptr, int dst_width); 283 void ScaleRowDown2_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 284 uint8* dst_ptr, int dst_width); 285 void ScaleRowDown2Linear_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 286 uint8* dst_ptr, int dst_width); 287 void ScaleRowDown2Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 288 uint8* dst_ptr, int dst_width); 289 void ScaleRowDown2Box_Odd_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 290 uint8* dst_ptr, int dst_width); 291 void ScaleRowDown4_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 292 uint8* dst_ptr, int dst_width); 293 void ScaleRowDown4Box_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 294 uint8* dst_ptr, int dst_width); 295 void ScaleRowDown4_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 296 uint8* dst_ptr, int dst_width); 297 void ScaleRowDown4Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 298 uint8* dst_ptr, int dst_width); 299 300 void ScaleRowDown34_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 301 uint8* dst_ptr, int dst_width); 302 void ScaleRowDown34_1_Box_Any_SSSE3(const uint8* src_ptr, 303 ptrdiff_t src_stride, 304 uint8* dst_ptr, int dst_width); 305 void ScaleRowDown34_0_Box_Any_SSSE3(const uint8* src_ptr, 306 ptrdiff_t src_stride, 307 uint8* dst_ptr, int dst_width); 308 void ScaleRowDown38_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 309 uint8* dst_ptr, int dst_width); 310 void ScaleRowDown38_3_Box_Any_SSSE3(const uint8* src_ptr, 311 ptrdiff_t src_stride, 312 uint8* dst_ptr, int dst_width); 313 void ScaleRowDown38_2_Box_Any_SSSE3(const uint8* src_ptr, 314 ptrdiff_t src_stride, 315 uint8* dst_ptr, int dst_width); 316 317 void ScaleAddRow_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); 318 void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); 319 void ScaleAddRow_Any_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); 320 void ScaleAddRow_Any_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); 321 322 void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, 323 int dst_width, int x, int dx); 324 void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, 325 int dst_width, int x, int dx); 326 327 328 // ARGB Column functions 329 void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, 330 int dst_width, int x, int dx); 331 void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, 332 int dst_width, int x, int dx); 333 void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb, 334 int dst_width, int x, int dx); 335 void ScaleARGBFilterCols_NEON(uint8* dst_argb, const uint8* src_argb, 336 int dst_width, int x, int dx); 337 void ScaleARGBCols_NEON(uint8* dst_argb, const uint8* src_argb, 338 int dst_width, int x, int dx); 339 void ScaleARGBFilterCols_Any_NEON(uint8* dst_argb, const uint8* src_argb, 340 int dst_width, int x, int dx); 341 void ScaleARGBCols_Any_NEON(uint8* dst_argb, const uint8* src_argb, 342 int dst_width, int x, int dx); 343 344 // ARGB Row functions 345 void ScaleARGBRowDown2_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 346 uint8* dst_argb, int dst_width); 347 void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 348 uint8* dst_argb, int dst_width); 349 void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 350 uint8* dst_argb, int dst_width); 351 void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 352 uint8* dst, int dst_width); 353 void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, ptrdiff_t src_stride, 354 uint8* dst_argb, int dst_width); 355 void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 356 uint8* dst, int dst_width); 357 void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 358 uint8* dst_argb, int dst_width); 359 void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb, 360 ptrdiff_t src_stride, 361 uint8* dst_argb, int dst_width); 362 void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 363 uint8* dst_argb, int dst_width); 364 void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 365 uint8* dst, int dst_width); 366 void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb, 367 ptrdiff_t src_stride, 368 uint8* dst_argb, int dst_width); 369 void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 370 uint8* dst, int dst_width); 371 372 void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 373 int src_stepx, uint8* dst_argb, int dst_width); 374 void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 375 int src_stepx, 376 uint8* dst_argb, int dst_width); 377 void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride, 378 int src_stepx, 379 uint8* dst_argb, int dst_width); 380 void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, ptrdiff_t src_stride, 381 int src_stepx, 382 uint8* dst_argb, int dst_width); 383 void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 384 int src_stepx, 385 uint8* dst_argb, int dst_width); 386 void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb, 387 ptrdiff_t src_stride, 388 int src_stepx, 389 uint8* dst_argb, int dst_width); 390 void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, ptrdiff_t src_stride, 391 int src_stepx, 392 uint8* dst_argb, int dst_width); 393 void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb, 394 ptrdiff_t src_stride, 395 int src_stepx, 396 uint8* dst_argb, int dst_width); 397 398 // ScaleRowDown2Box also used by planar functions 399 // NEON downscalers with interpolation. 400 401 // Note - not static due to reuse in convert for 444 to 420. 402 void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 403 uint8* dst, int dst_width); 404 void ScaleRowDown2Linear_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 405 uint8* dst, int dst_width); 406 void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 407 uint8* dst, int dst_width); 408 409 void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 410 uint8* dst_ptr, int dst_width); 411 void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 412 uint8* dst_ptr, int dst_width); 413 414 // Down scale from 4 to 3 pixels. Use the neon multilane read/write 415 // to load up the every 4th pixel into a 4 different registers. 416 // Point samples 32 pixels to 24 pixels. 417 void ScaleRowDown34_NEON(const uint8* src_ptr, 418 ptrdiff_t src_stride, 419 uint8* dst_ptr, int dst_width); 420 void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr, 421 ptrdiff_t src_stride, 422 uint8* dst_ptr, int dst_width); 423 void ScaleRowDown34_1_Box_NEON(const uint8* src_ptr, 424 ptrdiff_t src_stride, 425 uint8* dst_ptr, int dst_width); 426 427 // 32 -> 12 428 void ScaleRowDown38_NEON(const uint8* src_ptr, 429 ptrdiff_t src_stride, 430 uint8* dst_ptr, int dst_width); 431 // 32x3 -> 12x1 432 void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr, 433 ptrdiff_t src_stride, 434 uint8* dst_ptr, int dst_width); 435 // 32x2 -> 12x1 436 void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, 437 ptrdiff_t src_stride, 438 uint8* dst_ptr, int dst_width); 439 440 void ScaleRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 441 uint8* dst, int dst_width); 442 void ScaleRowDown2Linear_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 443 uint8* dst, int dst_width); 444 void ScaleRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 445 uint8* dst, int dst_width); 446 void ScaleRowDown2Box_Odd_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 447 uint8* dst, int dst_width); 448 void ScaleRowDown4_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 449 uint8* dst_ptr, int dst_width); 450 void ScaleRowDown4Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 451 uint8* dst_ptr, int dst_width); 452 void ScaleRowDown34_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 453 uint8* dst_ptr, int dst_width); 454 void ScaleRowDown34_0_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 455 uint8* dst_ptr, int dst_width); 456 void ScaleRowDown34_1_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 457 uint8* dst_ptr, int dst_width); 458 // 32 -> 12 459 void ScaleRowDown38_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 460 uint8* dst_ptr, int dst_width); 461 // 32x3 -> 12x1 462 void ScaleRowDown38_3_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 463 uint8* dst_ptr, int dst_width); 464 // 32x2 -> 12x1 465 void ScaleRowDown38_2_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 466 uint8* dst_ptr, int dst_width); 467 468 void ScaleAddRow_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); 469 void ScaleAddRow_Any_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); 470 471 void ScaleFilterCols_NEON(uint8* dst_ptr, const uint8* src_ptr, 472 int dst_width, int x, int dx); 473 474 void ScaleFilterCols_Any_NEON(uint8* dst_ptr, const uint8* src_ptr, 475 int dst_width, int x, int dx); 476 477 void ScaleRowDown2_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 478 uint8* dst, int dst_width); 479 void ScaleRowDown2Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 480 uint8* dst, int dst_width); 481 void ScaleRowDown4_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 482 uint8* dst, int dst_width); 483 void ScaleRowDown4Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 484 uint8* dst, int dst_width); 485 void ScaleRowDown34_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 486 uint8* dst, int dst_width); 487 void ScaleRowDown34_0_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 488 uint8* d, int dst_width); 489 void ScaleRowDown34_1_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 490 uint8* d, int dst_width); 491 void ScaleRowDown38_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 492 uint8* dst, int dst_width); 493 void ScaleRowDown38_2_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 494 uint8* dst_ptr, int dst_width); 495 void ScaleRowDown38_3_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 496 uint8* dst_ptr, int dst_width); 497 498 #ifdef __cplusplus 499 } // extern "C" 500 } // namespace libyuv 501 #endif 502 503 #endif // INCLUDE_LIBYUV_SCALE_ROW_H_ NOLINT 504