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