| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2012 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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 ANY11P(ARGBShuffleRow_Any_SSSE3, ARGBShuffleRow_SSSE3, const uint8*, 4, 4, 7) | 539 ANY11P(ARGBShuffleRow_Any_SSSE3, ARGBShuffleRow_SSSE3, const uint8*, 4, 4, 7) |
| 540 #endif | 540 #endif |
| 541 #ifdef HAS_ARGBSHUFFLEROW_AVX2 | 541 #ifdef HAS_ARGBSHUFFLEROW_AVX2 |
| 542 ANY11P(ARGBShuffleRow_Any_AVX2, ARGBShuffleRow_AVX2, const uint8*, 4, 4, 15) | 542 ANY11P(ARGBShuffleRow_Any_AVX2, ARGBShuffleRow_AVX2, const uint8*, 4, 4, 15) |
| 543 #endif | 543 #endif |
| 544 #ifdef HAS_ARGBSHUFFLEROW_NEON | 544 #ifdef HAS_ARGBSHUFFLEROW_NEON |
| 545 ANY11P(ARGBShuffleRow_Any_NEON, ARGBShuffleRow_NEON, const uint8*, 4, 4, 3) | 545 ANY11P(ARGBShuffleRow_Any_NEON, ARGBShuffleRow_NEON, const uint8*, 4, 4, 3) |
| 546 #endif | 546 #endif |
| 547 #undef ANY11P | 547 #undef ANY11P |
| 548 | 548 |
| 549 // Any 1 to 1 with parameter and shorts. BPP measures in shorts. |
| 550 #define ANY11P16(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK) \ |
| 551 void NAMEANY(const uint16* src_ptr, uint16* dst_ptr, \ |
| 552 T shuffler, int width) { \ |
| 553 SIMD_ALIGNED(uint16 temp[32 * 2]); \ |
| 554 memset(temp, 0, 64); /* for msan */ \ |
| 555 int r = width & MASK; \ |
| 556 int n = width & ~MASK; \ |
| 557 if (n > 0) { \ |
| 558 ANY_SIMD(src_ptr, dst_ptr, shuffler, n); \ |
| 559 } \ |
| 560 memcpy(temp, src_ptr + n * SBPP, r * SBPP); \ |
| 561 ANY_SIMD(temp, temp + 64, shuffler, MASK + 1); \ |
| 562 memcpy(dst_ptr + n * BPP, temp + 64, r * BPP); \ |
| 563 } |
| 564 |
| 565 #ifdef HAS_HALFFLOATROW_AVX2 |
| 566 ANY11P16(HalfFloatRow_Any_AVX2, HalfFloatRow_AVX2, float, 1, 1, 15) |
| 567 #endif |
| 568 #undef ANY11P16 |
| 569 |
| 570 |
| 549 // Any 1 to 1 with yuvconstants | 571 // Any 1 to 1 with yuvconstants |
| 550 #define ANY11C(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ | 572 #define ANY11C(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ |
| 551 void NAMEANY(const uint8* src_ptr, uint8* dst_ptr, \ | 573 void NAMEANY(const uint8* src_ptr, uint8* dst_ptr, \ |
| 552 const struct YuvConstants* yuvconstants, int width) { \ | 574 const struct YuvConstants* yuvconstants, int width) { \ |
| 553 SIMD_ALIGNED(uint8 temp[128 * 2]); \ | 575 SIMD_ALIGNED(uint8 temp[128 * 2]); \ |
| 554 memset(temp, 0, 128); /* for YUY2 and msan */ \ | 576 memset(temp, 0, 128); /* for YUY2 and msan */ \ |
| 555 int r = width & MASK; \ | 577 int r = width & MASK; \ |
| 556 int n = width & ~MASK; \ | 578 int n = width & ~MASK; \ |
| 557 if (n > 0) { \ | 579 if (n > 0) { \ |
| 558 ANY_SIMD(src_ptr, dst_ptr, yuvconstants, n); \ | 580 ANY_SIMD(src_ptr, dst_ptr, yuvconstants, n); \ |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 #endif | 843 #endif |
| 822 #ifdef HAS_UYVYTOUVROW_NEON | 844 #ifdef HAS_UYVYTOUVROW_NEON |
| 823 ANY12S(UYVYToUVRow_Any_NEON, UYVYToUVRow_NEON, 1, 4, 15) | 845 ANY12S(UYVYToUVRow_Any_NEON, UYVYToUVRow_NEON, 1, 4, 15) |
| 824 #endif | 846 #endif |
| 825 #undef ANY12S | 847 #undef ANY12S |
| 826 | 848 |
| 827 #ifdef __cplusplus | 849 #ifdef __cplusplus |
| 828 } // extern "C" | 850 } // extern "C" |
| 829 } // namespace libyuv | 851 } // namespace libyuv |
| 830 #endif | 852 #endif |
| OLD | NEW |