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_ROTATE_ROW_H_ 12 #define 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 #if defined(__pnacl__) || defined(__CLR_VER) || \ 22 (defined(__native_client__) && defined(__x86_64__)) || \ 23 (defined(__i386__) && !defined(__SSE__) && !defined(__clang__)) 24 #define LIBYUV_DISABLE_X86 25 #endif 26 #if defined(__native_client__) 27 #define LIBYUV_DISABLE_NEON 28 #endif 29 // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 30 #if defined(__has_feature) 31 #if __has_feature(memory_sanitizer) 32 #define LIBYUV_DISABLE_X86 33 #endif 34 #endif 35 // The following are available for Visual C and clangcl 32 bit: 36 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) 37 #define HAS_TRANSPOSEWX8_SSSE3 38 #define HAS_TRANSPOSEUVWX8_SSE2 39 #endif 40 41 // The following are available for GCC 32 or 64 bit: 42 #if !defined(LIBYUV_DISABLE_X86) && (defined(__i386__) || defined(__x86_64__)) 43 #define HAS_TRANSPOSEWX8_SSSE3 44 #endif 45 46 // The following are available for 64 bit GCC: 47 #if !defined(LIBYUV_DISABLE_X86) && defined(__x86_64__) 48 #define HAS_TRANSPOSEWX8_FAST_SSSE3 49 #define HAS_TRANSPOSEUVWX8_SSE2 50 #endif 51 52 #if !defined(LIBYUV_DISABLE_NEON) && \ 53 (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) 54 #define HAS_TRANSPOSEWX8_NEON 55 #define HAS_TRANSPOSEUVWX8_NEON 56 #endif 57 58 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) 59 #define HAS_TRANSPOSEWX16_MSA 60 #define HAS_TRANSPOSEUVWX16_MSA 61 #endif 62 63 #if !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A) 64 #define HAS_TRANSPOSEWX8_MMI 65 #define HAS_TRANSPOSEUVWX8_MMI 66 #endif 67 68 void TransposeWxH_C(const uint8_t* src, 69 int src_stride, 70 uint8_t* dst, 71 int dst_stride, 72 int width, 73 int height); 74 75 void TransposeWx8_C(const uint8_t* src, 76 int src_stride, 77 uint8_t* dst, 78 int dst_stride, 79 int width); 80 void TransposeWx16_C(const uint8_t* src, 81 int src_stride, 82 uint8_t* dst, 83 int dst_stride, 84 int width); 85 void TransposeWx8_NEON(const uint8_t* src, 86 int src_stride, 87 uint8_t* dst, 88 int dst_stride, 89 int width); 90 void TransposeWx8_SSSE3(const uint8_t* src, 91 int src_stride, 92 uint8_t* dst, 93 int dst_stride, 94 int width); 95 void TransposeWx8_MMI(const uint8_t* src, 96 int src_stride, 97 uint8_t* dst, 98 int dst_stride, 99 int width); 100 void TransposeWx8_Fast_SSSE3(const uint8_t* src, 101 int src_stride, 102 uint8_t* dst, 103 int dst_stride, 104 int width); 105 void TransposeWx16_MSA(const uint8_t* src, 106 int src_stride, 107 uint8_t* dst, 108 int dst_stride, 109 int width); 110 111 void TransposeWx8_Any_NEON(const uint8_t* src, 112 int src_stride, 113 uint8_t* dst, 114 int dst_stride, 115 int width); 116 void TransposeWx8_Any_SSSE3(const uint8_t* src, 117 int src_stride, 118 uint8_t* dst, 119 int dst_stride, 120 int width); 121 void TransposeWx8_Any_MMI(const uint8_t* src, 122 int src_stride, 123 uint8_t* dst, 124 int dst_stride, 125 int width); 126 void TransposeWx8_Fast_Any_SSSE3(const uint8_t* src, 127 int src_stride, 128 uint8_t* dst, 129 int dst_stride, 130 int width); 131 void TransposeWx16_Any_MSA(const uint8_t* src, 132 int src_stride, 133 uint8_t* dst, 134 int dst_stride, 135 int width); 136 137 void TransposeUVWxH_C(const uint8_t* src, 138 int src_stride, 139 uint8_t* dst_a, 140 int dst_stride_a, 141 uint8_t* dst_b, 142 int dst_stride_b, 143 int width, 144 int height); 145 146 void TransposeUVWx8_C(const uint8_t* src, 147 int src_stride, 148 uint8_t* dst_a, 149 int dst_stride_a, 150 uint8_t* dst_b, 151 int dst_stride_b, 152 int width); 153 void TransposeUVWx16_C(const uint8_t* src, 154 int src_stride, 155 uint8_t* dst_a, 156 int dst_stride_a, 157 uint8_t* dst_b, 158 int dst_stride_b, 159 int width); 160 void TransposeUVWx8_SSE2(const uint8_t* src, 161 int src_stride, 162 uint8_t* dst_a, 163 int dst_stride_a, 164 uint8_t* dst_b, 165 int dst_stride_b, 166 int width); 167 void TransposeUVWx8_NEON(const uint8_t* src, 168 int src_stride, 169 uint8_t* dst_a, 170 int dst_stride_a, 171 uint8_t* dst_b, 172 int dst_stride_b, 173 int width); 174 void TransposeUVWx8_MMI(const uint8_t* src, 175 int src_stride, 176 uint8_t* dst_a, 177 int dst_stride_a, 178 uint8_t* dst_b, 179 int dst_stride_b, 180 int width); 181 void TransposeUVWx16_MSA(const uint8_t* src, 182 int src_stride, 183 uint8_t* dst_a, 184 int dst_stride_a, 185 uint8_t* dst_b, 186 int dst_stride_b, 187 int width); 188 189 void TransposeUVWx8_Any_SSE2(const uint8_t* src, 190 int src_stride, 191 uint8_t* dst_a, 192 int dst_stride_a, 193 uint8_t* dst_b, 194 int dst_stride_b, 195 int width); 196 void TransposeUVWx8_Any_NEON(const uint8_t* src, 197 int src_stride, 198 uint8_t* dst_a, 199 int dst_stride_a, 200 uint8_t* dst_b, 201 int dst_stride_b, 202 int width); 203 void TransposeUVWx8_Any_MMI(const uint8_t* src, 204 int src_stride, 205 uint8_t* dst_a, 206 int dst_stride_a, 207 uint8_t* dst_b, 208 int dst_stride_b, 209 int width); 210 void TransposeUVWx16_Any_MSA(const uint8_t* src, 211 int src_stride, 212 uint8_t* dst_a, 213 int dst_stride_a, 214 uint8_t* dst_b, 215 int dst_stride_b, 216 int width); 217 218 #ifdef __cplusplus 219 } // extern "C" 220 } // namespace libyuv 221 #endif 222 223 #endif // INCLUDE_LIBYUV_ROTATE_ROW_H_ 224