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_  // NOLINT
     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__) || (defined(__x86_64__) && !defined(__native_client__)))
     40 #define HAS_TRANSPOSEWX8_SSSE3
     41 #endif
     42 
     43 // The following are available for 64 bit GCC but not NaCL:
     44 #if !defined(LIBYUV_DISABLE_X86) && !defined(__native_client__) && \
     45     defined(__x86_64__)
     46 #define HAS_TRANSPOSEWX8_FAST_SSSE3
     47 #define HAS_TRANSPOSEUVWX8_SSE2
     48 #endif
     49 
     50 #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
     51     (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__))
     52 #define HAS_TRANSPOSEWX8_NEON
     53 #define HAS_TRANSPOSEUVWX8_NEON
     54 #endif
     55 
     56 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \
     57     defined(__mips__) && \
     58     defined(__mips_dsp) && (__mips_dsp_rev >= 2)
     59 #define HAS_TRANSPOSEWX8_DSPR2
     60 #define HAS_TRANSPOSEUVWX8_DSPR2
     61 #endif  // defined(__mips__)
     62 
     63 void TransposeWxH_C(const uint8* src, int src_stride,
     64                     uint8* dst, int dst_stride, int width, int height);
     65 
     66 void TransposeWx8_C(const uint8* src, int src_stride,
     67                     uint8* dst, int dst_stride, int width);
     68 void TransposeWx8_NEON(const uint8* src, int src_stride,
     69                        uint8* dst, int dst_stride, int width);
     70 void TransposeWx8_SSSE3(const uint8* src, int src_stride,
     71                         uint8* dst, int dst_stride, int width);
     72 void TransposeWx8_Fast_SSSE3(const uint8* src, int src_stride,
     73                              uint8* dst, int dst_stride, int width);
     74 void TransposeWx8_DSPR2(const uint8* src, int src_stride,
     75                         uint8* dst, int dst_stride, int width);
     76 void TransposeWx8_Fast_DSPR2(const uint8* src, int src_stride,
     77                              uint8* dst, int dst_stride, int width);
     78 
     79 void TransposeWx8_Any_NEON(const uint8* src, int src_stride,
     80                            uint8* dst, int dst_stride, int width);
     81 void TransposeWx8_Any_SSSE3(const uint8* src, int src_stride,
     82                             uint8* dst, int dst_stride, int width);
     83 void TransposeWx8_Fast_Any_SSSE3(const uint8* src, int src_stride,
     84                                  uint8* dst, int dst_stride, int width);
     85 void TransposeWx8_Any_DSPR2(const uint8* src, int src_stride,
     86                             uint8* dst, int dst_stride, int width);
     87 
     88 void TransposeUVWxH_C(const uint8* src, int src_stride,
     89                       uint8* dst_a, int dst_stride_a,
     90                       uint8* dst_b, int dst_stride_b,
     91                       int width, int height);
     92 
     93 void TransposeUVWx8_C(const uint8* src, int src_stride,
     94                       uint8* dst_a, int dst_stride_a,
     95                       uint8* dst_b, int dst_stride_b, int width);
     96 void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
     97                          uint8* dst_a, int dst_stride_a,
     98                          uint8* dst_b, int dst_stride_b, int width);
     99 void TransposeUVWx8_NEON(const uint8* src, int src_stride,
    100                          uint8* dst_a, int dst_stride_a,
    101                          uint8* dst_b, int dst_stride_b, int width);
    102 void TransposeUVWx8_DSPR2(const uint8* src, int src_stride,
    103                           uint8* dst_a, int dst_stride_a,
    104                           uint8* dst_b, int dst_stride_b, int width);
    105 
    106 void TransposeUVWx8_Any_SSE2(const uint8* src, int src_stride,
    107                              uint8* dst_a, int dst_stride_a,
    108                              uint8* dst_b, int dst_stride_b, int width);
    109 void TransposeUVWx8_Any_NEON(const uint8* src, int src_stride,
    110                              uint8* dst_a, int dst_stride_a,
    111                              uint8* dst_b, int dst_stride_b, int width);
    112 void TransposeUVWx8_Any_DSPR2(const uint8* src, int src_stride,
    113                               uint8* dst_a, int dst_stride_a,
    114                               uint8* dst_b, int dst_stride_b, int width);
    115 
    116 #ifdef __cplusplus
    117 }  // extern "C"
    118 }  // namespace libyuv
    119 #endif
    120 
    121 #endif  // INCLUDE_LIBYUV_ROTATE_ROW_H_  NOLINT
    122