| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright 2015 The LibYuv Project Authors. All rights reserved. | 2  *  Copyright 2015 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 | 
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 276       2, | 276       2, | 
| 277       4, | 277       4, | 
| 278       7) | 278       7) | 
| 279 SDANY(ScaleARGBRowDown2Box_Any_NEON, | 279 SDANY(ScaleARGBRowDown2Box_Any_NEON, | 
| 280       ScaleARGBRowDown2Box_NEON, | 280       ScaleARGBRowDown2Box_NEON, | 
| 281       ScaleARGBRowDown2Box_C, | 281       ScaleARGBRowDown2Box_C, | 
| 282       2, | 282       2, | 
| 283       4, | 283       4, | 
| 284       7) | 284       7) | 
| 285 #endif | 285 #endif | 
|  | 286 #ifdef HAS_SCALEARGBROWDOWN2_MSA | 
|  | 287 SDANY(ScaleARGBRowDown2_Any_MSA, | 
|  | 288       ScaleARGBRowDown2_MSA, | 
|  | 289       ScaleARGBRowDown2_C, | 
|  | 290       2, | 
|  | 291       4, | 
|  | 292       3) | 
|  | 293 SDANY(ScaleARGBRowDown2Linear_Any_MSA, | 
|  | 294       ScaleARGBRowDown2Linear_MSA, | 
|  | 295       ScaleARGBRowDown2Linear_C, | 
|  | 296       2, | 
|  | 297       4, | 
|  | 298       3) | 
|  | 299 SDANY(ScaleARGBRowDown2Box_Any_MSA, | 
|  | 300       ScaleARGBRowDown2Box_MSA, | 
|  | 301       ScaleARGBRowDown2Box_C, | 
|  | 302       2, | 
|  | 303       4, | 
|  | 304       3) | 
|  | 305 #endif | 
| 286 #undef SDANY | 306 #undef SDANY | 
| 287 | 307 | 
| 288 // Scale down by even scale factor. | 308 // Scale down by even scale factor. | 
| 289 #define SDAANY(NAMEANY, SCALEROWDOWN_SIMD, SCALEROWDOWN_C, BPP, MASK)      \ | 309 #define SDAANY(NAMEANY, SCALEROWDOWN_SIMD, SCALEROWDOWN_C, BPP, MASK)      \ | 
| 290   void NAMEANY(const uint8* src_ptr, ptrdiff_t src_stride, int src_stepx,  \ | 310   void NAMEANY(const uint8* src_ptr, ptrdiff_t src_stride, int src_stepx,  \ | 
| 291                uint8* dst_ptr, int dst_width) {                            \ | 311                uint8* dst_ptr, int dst_width) {                            \ | 
| 292     int r = (int)((unsigned int)dst_width % (MASK + 1));                   \ | 312     int r = (int)((unsigned int)dst_width % (MASK + 1));                   \ | 
| 293     int n = dst_width - r;                                                 \ | 313     int n = dst_width - r;                                                 \ | 
| 294     if (n > 0) {                                                           \ | 314     if (n > 0) {                                                           \ | 
| 295       SCALEROWDOWN_SIMD(src_ptr, src_stride, src_stepx, dst_ptr, n);       \ | 315       SCALEROWDOWN_SIMD(src_ptr, src_stride, src_stepx, dst_ptr, n);       \ | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
| 315        ScaleARGBRowDownEven_NEON, | 335        ScaleARGBRowDownEven_NEON, | 
| 316        ScaleARGBRowDownEven_C, | 336        ScaleARGBRowDownEven_C, | 
| 317        4, | 337        4, | 
| 318        3) | 338        3) | 
| 319 SDAANY(ScaleARGBRowDownEvenBox_Any_NEON, | 339 SDAANY(ScaleARGBRowDownEvenBox_Any_NEON, | 
| 320        ScaleARGBRowDownEvenBox_NEON, | 340        ScaleARGBRowDownEvenBox_NEON, | 
| 321        ScaleARGBRowDownEvenBox_C, | 341        ScaleARGBRowDownEvenBox_C, | 
| 322        4, | 342        4, | 
| 323        3) | 343        3) | 
| 324 #endif | 344 #endif | 
|  | 345 #ifdef HAS_SCALEARGBROWDOWNEVEN_MSA | 
|  | 346 SDAANY(ScaleARGBRowDownEven_Any_MSA, | 
|  | 347        ScaleARGBRowDownEven_MSA, | 
|  | 348        ScaleARGBRowDownEven_C, | 
|  | 349        4, | 
|  | 350        3) | 
|  | 351 SDAANY(ScaleARGBRowDownEvenBox_Any_MSA, | 
|  | 352        ScaleARGBRowDownEvenBox_MSA, | 
|  | 353        ScaleARGBRowDownEvenBox_C, | 
|  | 354        4, | 
|  | 355        3) | 
|  | 356 #endif | 
| 325 | 357 | 
| 326 // Add rows box filter scale down. | 358 // Add rows box filter scale down. | 
| 327 #define SAANY(NAMEANY, SCALEADDROW_SIMD, SCALEADDROW_C, MASK)          \ | 359 #define SAANY(NAMEANY, SCALEADDROW_SIMD, SCALEADDROW_C, MASK)          \ | 
| 328   void NAMEANY(const uint8* src_ptr, uint16* dst_ptr, int src_width) { \ | 360   void NAMEANY(const uint8* src_ptr, uint16* dst_ptr, int src_width) { \ | 
| 329     int n = src_width & ~MASK;                                         \ | 361     int n = src_width & ~MASK;                                         \ | 
| 330     if (n > 0) {                                                       \ | 362     if (n > 0) {                                                       \ | 
| 331       SCALEADDROW_SIMD(src_ptr, dst_ptr, n);                           \ | 363       SCALEADDROW_SIMD(src_ptr, dst_ptr, n);                           \ | 
| 332     }                                                                  \ | 364     }                                                                  \ | 
| 333     SCALEADDROW_C(src_ptr + n, dst_ptr + n, src_width & MASK);         \ | 365     SCALEADDROW_C(src_ptr + n, dst_ptr + n, src_width & MASK);         \ | 
| 334   } | 366   } | 
| 335 | 367 | 
| 336 #ifdef HAS_SCALEADDROW_SSE2 | 368 #ifdef HAS_SCALEADDROW_SSE2 | 
| 337 SAANY(ScaleAddRow_Any_SSE2, ScaleAddRow_SSE2, ScaleAddRow_C, 15) | 369 SAANY(ScaleAddRow_Any_SSE2, ScaleAddRow_SSE2, ScaleAddRow_C, 15) | 
| 338 #endif | 370 #endif | 
| 339 #ifdef HAS_SCALEADDROW_AVX2 | 371 #ifdef HAS_SCALEADDROW_AVX2 | 
| 340 SAANY(ScaleAddRow_Any_AVX2, ScaleAddRow_AVX2, ScaleAddRow_C, 31) | 372 SAANY(ScaleAddRow_Any_AVX2, ScaleAddRow_AVX2, ScaleAddRow_C, 31) | 
| 341 #endif | 373 #endif | 
| 342 #ifdef HAS_SCALEADDROW_NEON | 374 #ifdef HAS_SCALEADDROW_NEON | 
| 343 SAANY(ScaleAddRow_Any_NEON, ScaleAddRow_NEON, ScaleAddRow_C, 15) | 375 SAANY(ScaleAddRow_Any_NEON, ScaleAddRow_NEON, ScaleAddRow_C, 15) | 
| 344 #endif | 376 #endif | 
| 345 #undef SAANY | 377 #undef SAANY | 
| 346 | 378 | 
| 347 #ifdef __cplusplus | 379 #ifdef __cplusplus | 
| 348 }  // extern "C" | 380 }  // extern "C" | 
| 349 }  // namespace libyuv | 381 }  // namespace libyuv | 
| 350 #endif | 382 #endif | 
| OLD | NEW | 
|---|