OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2015 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 #include "libyuv/rotate.h" |
| 12 #include "libyuv/rotate_row.h" |
| 13 |
| 14 #include "libyuv/basic_types.h" |
| 15 |
| 16 #ifdef __cplusplus |
| 17 namespace libyuv { |
| 18 extern "C" { |
| 19 #endif |
| 20 |
| 21 #define TANY(NAMEANY, TPOS_SIMD, TPOS_C, MASK) \ |
| 22 void NAMEANY(const uint8* src, int src_stride, \ |
| 23 uint8* dst, int dst_stride, int width) { \ |
| 24 int r = width & MASK; \ |
| 25 int n = width - r; \ |
| 26 if (n > 0) { \ |
| 27 TPOS_SIMD(src, src_stride, dst, dst_stride, n); \ |
| 28 } \ |
| 29 TPOS_C(src + n, src_stride, dst + n * dst_stride, dst_stride, r); \ |
| 30 } |
| 31 |
| 32 #ifdef HAS_TRANSPOSEWX8_NEON |
| 33 TANY(TransposeWx8_Any_NEON, TransposeWx8_NEON, TransposeWx8_C, 7) |
| 34 #endif |
| 35 #ifdef HAS_TRANSPOSEWX8_SSSE3 |
| 36 TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, TransposeWx8_C, 7) |
| 37 #endif |
| 38 #ifdef HAS_TRANSPOSEWX8_FAST_SSSE3 |
| 39 TANY(TransposeWx8_Fast_Any_SSSE3, TransposeWx8_Fast_SSSE3, TransposeWx8_C, 15) |
| 40 #endif |
| 41 #ifdef HAS_TRANSPOSEWX8_MIPS_DSPR2 |
| 42 TANY(TransposeWx8_Any_MIPS_DSPR2, TransposeWx8_MIPS_DSPR2, TransposeWx8_C, 7) |
| 43 #endif |
| 44 |
| 45 #undef TANY |
| 46 |
| 47 #ifdef __cplusplus |
| 48 } // extern "C" |
| 49 } // namespace libyuv |
| 50 #endif |
| 51 |
| 52 |
| 53 |
| 54 |
| 55 |
OLD | NEW |