| 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 23 matching lines...) Expand all Loading... |
| 34 #endif | 34 #endif |
| 35 #ifdef HAS_TRANSPOSEWX8_SSSE3 | 35 #ifdef HAS_TRANSPOSEWX8_SSSE3 |
| 36 TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, 7) | 36 TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, 7) |
| 37 #endif | 37 #endif |
| 38 #ifdef HAS_TRANSPOSEWX8_FAST_SSSE3 | 38 #ifdef HAS_TRANSPOSEWX8_FAST_SSSE3 |
| 39 TANY(TransposeWx8_Fast_Any_SSSE3, TransposeWx8_Fast_SSSE3, 15) | 39 TANY(TransposeWx8_Fast_Any_SSSE3, TransposeWx8_Fast_SSSE3, 15) |
| 40 #endif | 40 #endif |
| 41 #ifdef HAS_TRANSPOSEWX8_DSPR2 | 41 #ifdef HAS_TRANSPOSEWX8_DSPR2 |
| 42 TANY(TransposeWx8_Any_DSPR2, TransposeWx8_DSPR2, 7) | 42 TANY(TransposeWx8_Any_DSPR2, TransposeWx8_DSPR2, 7) |
| 43 #endif | 43 #endif |
| 44 #ifdef HAS_TRANSPOSEWX8_MSA |
| 45 TANY(TransposeWx8_Any_MSA, TransposeWx8_MSA, 15) |
| 46 #endif |
| 44 #undef TANY | 47 #undef TANY |
| 45 | 48 |
| 46 #define TUVANY(NAMEANY, TPOS_SIMD, MASK) \ | 49 #define TUVANY(NAMEANY, TPOS_SIMD, MASK) \ |
| 47 void NAMEANY(const uint8* src, int src_stride, uint8* dst_a, \ | 50 void NAMEANY(const uint8* src, int src_stride, uint8* dst_a, \ |
| 48 int dst_stride_a, uint8* dst_b, int dst_stride_b, int width) { \ | 51 int dst_stride_a, uint8* dst_b, int dst_stride_b, int width) { \ |
| 49 int r = width & MASK; \ | 52 int r = width & MASK; \ |
| 50 int n = width - r; \ | 53 int n = width - r; \ |
| 51 if (n > 0) { \ | 54 if (n > 0) { \ |
| 52 TPOS_SIMD(src, src_stride, dst_a, dst_stride_a, dst_b, dst_stride_b, n); \ | 55 TPOS_SIMD(src, src_stride, dst_a, dst_stride_a, dst_b, dst_stride_b, n); \ |
| 53 } \ | 56 } \ |
| 54 TransposeUVWx8_C(src + n * 2, src_stride, dst_a + n * dst_stride_a, \ | 57 TransposeUVWx8_C(src + n * 2, src_stride, dst_a + n * dst_stride_a, \ |
| 55 dst_stride_a, dst_b + n * dst_stride_b, dst_stride_b, r); \ | 58 dst_stride_a, dst_b + n * dst_stride_b, dst_stride_b, r); \ |
| 56 } | 59 } |
| 57 | 60 |
| 58 #ifdef HAS_TRANSPOSEUVWX8_NEON | 61 #ifdef HAS_TRANSPOSEUVWX8_NEON |
| 59 TUVANY(TransposeUVWx8_Any_NEON, TransposeUVWx8_NEON, 7) | 62 TUVANY(TransposeUVWx8_Any_NEON, TransposeUVWx8_NEON, 7) |
| 60 #endif | 63 #endif |
| 61 #ifdef HAS_TRANSPOSEUVWX8_SSE2 | 64 #ifdef HAS_TRANSPOSEUVWX8_SSE2 |
| 62 TUVANY(TransposeUVWx8_Any_SSE2, TransposeUVWx8_SSE2, 7) | 65 TUVANY(TransposeUVWx8_Any_SSE2, TransposeUVWx8_SSE2, 7) |
| 63 #endif | 66 #endif |
| 64 #ifdef HAS_TRANSPOSEUVWX8_DSPR2 | 67 #ifdef HAS_TRANSPOSEUVWX8_DSPR2 |
| 65 TUVANY(TransposeUVWx8_Any_DSPR2, TransposeUVWx8_DSPR2, 7) | 68 TUVANY(TransposeUVWx8_Any_DSPR2, TransposeUVWx8_DSPR2, 7) |
| 66 #endif | 69 #endif |
| 70 #ifdef HAS_TRANSPOSEUVWX8_MSA |
| 71 TUVANY(TransposeUVWx8_Any_MSA, TransposeUVWx8_MSA, 7) |
| 72 #endif |
| 67 #undef TUVANY | 73 #undef TUVANY |
| 68 | 74 |
| 69 #ifdef __cplusplus | 75 #ifdef __cplusplus |
| 70 } // extern "C" | 76 } // extern "C" |
| 71 } // namespace libyuv | 77 } // namespace libyuv |
| 72 #endif | 78 #endif |
| OLD | NEW |