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