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 18namespace libyuv { 19extern "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. 106void 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 113void 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. 121enum 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. 126int FixedDiv_C(int num, int div); 127int FixedDiv_X86(int num, int div); 128// Divide num - 1 by div - 1 and return as 16.16 fixed point result. 129int FixedDiv1_C(int num, int div); 130int 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. 140void 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 145void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t src_stride, 146 uint8* dst, int dst_width); 147void ScaleRowDown2_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 148 uint16* dst, int dst_width); 149void ScaleRowDown2Linear_C(const uint8* src_ptr, ptrdiff_t src_stride, 150 uint8* dst, int dst_width); 151void ScaleRowDown2Linear_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 152 uint16* dst, int dst_width); 153void ScaleRowDown2Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 154 uint8* dst, int dst_width); 155void ScaleRowDown2Box_Odd_C(const uint8* src_ptr, ptrdiff_t src_stride, 156 uint8* dst, int dst_width); 157void ScaleRowDown2Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 158 uint16* dst, int dst_width); 159void ScaleRowDown4_C(const uint8* src_ptr, ptrdiff_t src_stride, 160 uint8* dst, int dst_width); 161void ScaleRowDown4_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 162 uint16* dst, int dst_width); 163void ScaleRowDown4Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 164 uint8* dst, int dst_width); 165void ScaleRowDown4Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 166 uint16* dst, int dst_width); 167void ScaleRowDown34_C(const uint8* src_ptr, ptrdiff_t src_stride, 168 uint8* dst, int dst_width); 169void ScaleRowDown34_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 170 uint16* dst, int dst_width); 171void ScaleRowDown34_0_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 172 uint8* d, int dst_width); 173void ScaleRowDown34_0_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 174 uint16* d, int dst_width); 175void ScaleRowDown34_1_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 176 uint8* d, int dst_width); 177void ScaleRowDown34_1_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 178 uint16* d, int dst_width); 179void ScaleCols_C(uint8* dst_ptr, const uint8* src_ptr, 180 int dst_width, int x, int dx); 181void ScaleCols_16_C(uint16* dst_ptr, const uint16* src_ptr, 182 int dst_width, int x, int dx); 183void ScaleColsUp2_C(uint8* dst_ptr, const uint8* src_ptr, 184 int dst_width, int, int); 185void ScaleColsUp2_16_C(uint16* dst_ptr, const uint16* src_ptr, 186 int dst_width, int, int); 187void ScaleFilterCols_C(uint8* dst_ptr, const uint8* src_ptr, 188 int dst_width, int x, int dx); 189void ScaleFilterCols_16_C(uint16* dst_ptr, const uint16* src_ptr, 190 int dst_width, int x, int dx); 191void ScaleFilterCols64_C(uint8* dst_ptr, const uint8* src_ptr, 192 int dst_width, int x, int dx); 193void ScaleFilterCols64_16_C(uint16* dst_ptr, const uint16* src_ptr, 194 int dst_width, int x, int dx); 195void ScaleRowDown38_C(const uint8* src_ptr, ptrdiff_t src_stride, 196 uint8* dst, int dst_width); 197void ScaleRowDown38_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 198 uint16* dst, int dst_width); 199void ScaleRowDown38_3_Box_C(const uint8* src_ptr, 200 ptrdiff_t src_stride, 201 uint8* dst_ptr, int dst_width); 202void ScaleRowDown38_3_Box_16_C(const uint16* src_ptr, 203 ptrdiff_t src_stride, 204 uint16* dst_ptr, int dst_width); 205void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, 206 uint8* dst_ptr, int dst_width); 207void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride, 208 uint16* dst_ptr, int dst_width); 209void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width); 210void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width); 211void ScaleARGBRowDown2_C(const uint8* src_argb, 212 ptrdiff_t src_stride, 213 uint8* dst_argb, int dst_width); 214void ScaleARGBRowDown2Linear_C(const uint8* src_argb, 215 ptrdiff_t src_stride, 216 uint8* dst_argb, int dst_width); 217void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride, 218 uint8* dst_argb, int dst_width); 219void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t src_stride, 220 int src_stepx, 221 uint8* dst_argb, int dst_width); 222void ScaleARGBRowDownEvenBox_C(const uint8* src_argb, 223 ptrdiff_t src_stride, 224 int src_stepx, 225 uint8* dst_argb, int dst_width); 226void ScaleARGBCols_C(uint8* dst_argb, const uint8* src_argb, 227 int dst_width, int x, int dx); 228void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb, 229 int dst_width, int x, int dx); 230void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb, 231 int dst_width, int, int); 232void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb, 233 int dst_width, int x, int dx); 234void ScaleARGBFilterCols64_C(uint8* dst_argb, const uint8* src_argb, 235 int dst_width, int x, int dx); 236 237// Specialized scalers for x86. 238void ScaleRowDown2_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 239 uint8* dst_ptr, int dst_width); 240void ScaleRowDown2Linear_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 241 uint8* dst_ptr, int dst_width); 242void ScaleRowDown2Box_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 243 uint8* dst_ptr, int dst_width); 244void ScaleRowDown2_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 245 uint8* dst_ptr, int dst_width); 246void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 247 uint8* dst_ptr, int dst_width); 248void ScaleRowDown2Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 249 uint8* dst_ptr, int dst_width); 250void ScaleRowDown4_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 251 uint8* dst_ptr, int dst_width); 252void ScaleRowDown4Box_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 253 uint8* dst_ptr, int dst_width); 254void ScaleRowDown4_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 255 uint8* dst_ptr, int dst_width); 256void ScaleRowDown4Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 257 uint8* dst_ptr, int dst_width); 258 259void ScaleRowDown34_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 260 uint8* dst_ptr, int dst_width); 261void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr, 262 ptrdiff_t src_stride, 263 uint8* dst_ptr, int dst_width); 264void ScaleRowDown34_0_Box_SSSE3(const uint8* src_ptr, 265 ptrdiff_t src_stride, 266 uint8* dst_ptr, int dst_width); 267void ScaleRowDown38_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 268 uint8* dst_ptr, int dst_width); 269void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr, 270 ptrdiff_t src_stride, 271 uint8* dst_ptr, int dst_width); 272void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr, 273 ptrdiff_t src_stride, 274 uint8* dst_ptr, int dst_width); 275void ScaleRowDown2_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 276 uint8* dst_ptr, int dst_width); 277void ScaleRowDown2Linear_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 278 uint8* dst_ptr, int dst_width); 279void ScaleRowDown2Box_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 280 uint8* dst_ptr, int dst_width); 281void ScaleRowDown2Box_Odd_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 282 uint8* dst_ptr, int dst_width); 283void ScaleRowDown2_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 284 uint8* dst_ptr, int dst_width); 285void ScaleRowDown2Linear_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 286 uint8* dst_ptr, int dst_width); 287void ScaleRowDown2Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 288 uint8* dst_ptr, int dst_width); 289void ScaleRowDown2Box_Odd_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 290 uint8* dst_ptr, int dst_width); 291void ScaleRowDown4_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 292 uint8* dst_ptr, int dst_width); 293void ScaleRowDown4Box_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 294 uint8* dst_ptr, int dst_width); 295void ScaleRowDown4_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 296 uint8* dst_ptr, int dst_width); 297void ScaleRowDown4Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, 298 uint8* dst_ptr, int dst_width); 299 300void ScaleRowDown34_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 301 uint8* dst_ptr, int dst_width); 302void ScaleRowDown34_1_Box_Any_SSSE3(const uint8* src_ptr, 303 ptrdiff_t src_stride, 304 uint8* dst_ptr, int dst_width); 305void ScaleRowDown34_0_Box_Any_SSSE3(const uint8* src_ptr, 306 ptrdiff_t src_stride, 307 uint8* dst_ptr, int dst_width); 308void ScaleRowDown38_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, 309 uint8* dst_ptr, int dst_width); 310void ScaleRowDown38_3_Box_Any_SSSE3(const uint8* src_ptr, 311 ptrdiff_t src_stride, 312 uint8* dst_ptr, int dst_width); 313void ScaleRowDown38_2_Box_Any_SSSE3(const uint8* src_ptr, 314 ptrdiff_t src_stride, 315 uint8* dst_ptr, int dst_width); 316 317void ScaleAddRow_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); 318void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); 319void ScaleAddRow_Any_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); 320void ScaleAddRow_Any_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); 321 322void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, 323 int dst_width, int x, int dx); 324void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, 325 int dst_width, int x, int dx); 326 327 328// ARGB Column functions 329void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, 330 int dst_width, int x, int dx); 331void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, 332 int dst_width, int x, int dx); 333void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb, 334 int dst_width, int x, int dx); 335void ScaleARGBFilterCols_NEON(uint8* dst_argb, const uint8* src_argb, 336 int dst_width, int x, int dx); 337void ScaleARGBCols_NEON(uint8* dst_argb, const uint8* src_argb, 338 int dst_width, int x, int dx); 339void ScaleARGBFilterCols_Any_NEON(uint8* dst_argb, const uint8* src_argb, 340 int dst_width, int x, int dx); 341void ScaleARGBCols_Any_NEON(uint8* dst_argb, const uint8* src_argb, 342 int dst_width, int x, int dx); 343 344// ARGB Row functions 345void ScaleARGBRowDown2_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 346 uint8* dst_argb, int dst_width); 347void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 348 uint8* dst_argb, int dst_width); 349void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 350 uint8* dst_argb, int dst_width); 351void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 352 uint8* dst, int dst_width); 353void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, ptrdiff_t src_stride, 354 uint8* dst_argb, int dst_width); 355void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 356 uint8* dst, int dst_width); 357void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 358 uint8* dst_argb, int dst_width); 359void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb, 360 ptrdiff_t src_stride, 361 uint8* dst_argb, int dst_width); 362void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 363 uint8* dst_argb, int dst_width); 364void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 365 uint8* dst, int dst_width); 366void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb, 367 ptrdiff_t src_stride, 368 uint8* dst_argb, int dst_width); 369void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 370 uint8* dst, int dst_width); 371 372void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 373 int src_stepx, uint8* dst_argb, int dst_width); 374void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 375 int src_stepx, 376 uint8* dst_argb, int dst_width); 377void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride, 378 int src_stepx, 379 uint8* dst_argb, int dst_width); 380void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, ptrdiff_t src_stride, 381 int src_stepx, 382 uint8* dst_argb, int dst_width); 383void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride, 384 int src_stepx, 385 uint8* dst_argb, int dst_width); 386void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb, 387 ptrdiff_t src_stride, 388 int src_stepx, 389 uint8* dst_argb, int dst_width); 390void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, ptrdiff_t src_stride, 391 int src_stepx, 392 uint8* dst_argb, int dst_width); 393void 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. 402void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 403 uint8* dst, int dst_width); 404void ScaleRowDown2Linear_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 405 uint8* dst, int dst_width); 406void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 407 uint8* dst, int dst_width); 408 409void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 410 uint8* dst_ptr, int dst_width); 411void 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. 417void ScaleRowDown34_NEON(const uint8* src_ptr, 418 ptrdiff_t src_stride, 419 uint8* dst_ptr, int dst_width); 420void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr, 421 ptrdiff_t src_stride, 422 uint8* dst_ptr, int dst_width); 423void ScaleRowDown34_1_Box_NEON(const uint8* src_ptr, 424 ptrdiff_t src_stride, 425 uint8* dst_ptr, int dst_width); 426 427// 32 -> 12 428void ScaleRowDown38_NEON(const uint8* src_ptr, 429 ptrdiff_t src_stride, 430 uint8* dst_ptr, int dst_width); 431// 32x3 -> 12x1 432void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr, 433 ptrdiff_t src_stride, 434 uint8* dst_ptr, int dst_width); 435// 32x2 -> 12x1 436void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, 437 ptrdiff_t src_stride, 438 uint8* dst_ptr, int dst_width); 439 440void ScaleRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 441 uint8* dst, int dst_width); 442void ScaleRowDown2Linear_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 443 uint8* dst, int dst_width); 444void ScaleRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 445 uint8* dst, int dst_width); 446void ScaleRowDown2Box_Odd_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 447 uint8* dst, int dst_width); 448void ScaleRowDown4_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 449 uint8* dst_ptr, int dst_width); 450void ScaleRowDown4Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 451 uint8* dst_ptr, int dst_width); 452void ScaleRowDown34_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 453 uint8* dst_ptr, int dst_width); 454void ScaleRowDown34_0_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 455 uint8* dst_ptr, int dst_width); 456void ScaleRowDown34_1_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 457 uint8* dst_ptr, int dst_width); 458// 32 -> 12 459void ScaleRowDown38_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 460 uint8* dst_ptr, int dst_width); 461// 32x3 -> 12x1 462void ScaleRowDown38_3_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 463 uint8* dst_ptr, int dst_width); 464// 32x2 -> 12x1 465void ScaleRowDown38_2_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride, 466 uint8* dst_ptr, int dst_width); 467 468void ScaleAddRow_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); 469void ScaleAddRow_Any_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); 470 471void ScaleFilterCols_NEON(uint8* dst_ptr, const uint8* src_ptr, 472 int dst_width, int x, int dx); 473 474void ScaleFilterCols_Any_NEON(uint8* dst_ptr, const uint8* src_ptr, 475 int dst_width, int x, int dx); 476 477void ScaleRowDown2_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 478 uint8* dst, int dst_width); 479void ScaleRowDown2Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 480 uint8* dst, int dst_width); 481void ScaleRowDown4_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 482 uint8* dst, int dst_width); 483void ScaleRowDown4Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 484 uint8* dst, int dst_width); 485void ScaleRowDown34_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 486 uint8* dst, int dst_width); 487void ScaleRowDown34_0_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 488 uint8* d, int dst_width); 489void ScaleRowDown34_1_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 490 uint8* d, int dst_width); 491void ScaleRowDown38_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 492 uint8* dst, int dst_width); 493void ScaleRowDown38_2_Box_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, 494 uint8* dst_ptr, int dst_width); 495void 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