rotate_row.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. #ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_ // NOLINT
  11. #define INCLUDE_LIBYUV_ROTATE_ROW_H_
  12. #include "basic_types.h"
  13. #ifdef __cplusplus
  14. namespace libyuv {
  15. extern "C" {
  16. #endif
  17. #if defined(__pnacl__) || defined(__CLR_VER) || \
  18. (defined(__i386__) && !defined(__SSE2__))
  19. #define LIBYUV_DISABLE_X86
  20. #endif
  21. // The following are available for Visual C and clangcl 32 bit:
  22. #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
  23. #define HAS_TRANSPOSEWX8_SSSE3
  24. #define HAS_TRANSPOSEUVWX8_SSE2
  25. #endif
  26. // The following are available for GCC 32 or 64 bit but not NaCL for 64 bit:
  27. #if !defined(LIBYUV_DISABLE_X86) && \
  28. (defined(__i386__) || (defined(__x86_64__) && !defined(__native_client__)))
  29. #define HAS_TRANSPOSEWX8_SSSE3
  30. #endif
  31. // The following are available for 64 bit GCC but not NaCL:
  32. #if !defined(LIBYUV_DISABLE_X86) && !defined(__native_client__) && \
  33. defined(__x86_64__)
  34. #define HAS_TRANSPOSEWX8_FAST_SSSE3
  35. #define HAS_TRANSPOSEUVWX8_SSE2
  36. #endif
  37. #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
  38. (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__))
  39. #define HAS_TRANSPOSEWX8_NEON
  40. #define HAS_TRANSPOSEUVWX8_NEON
  41. #endif
  42. #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \
  43. defined(__mips__) && \
  44. defined(__mips_dsp) && (__mips_dsp_rev >= 2)
  45. #define HAS_TRANSPOSEWX8_DSPR2
  46. #define HAS_TRANSPOSEUVWX8_DSPR2
  47. #endif // defined(__mips__)
  48. void TransposeWxH_C(const uint8* src, int src_stride,
  49. uint8* dst, int dst_stride, int width, int height);
  50. void TransposeWx8_C(const uint8* src, int src_stride,
  51. uint8* dst, int dst_stride, int width);
  52. void TransposeWx8_NEON(const uint8* src, int src_stride,
  53. uint8* dst, int dst_stride, int width);
  54. void TransposeWx8_SSSE3(const uint8* src, int src_stride,
  55. uint8* dst, int dst_stride, int width);
  56. void TransposeWx8_Fast_SSSE3(const uint8* src, int src_stride,
  57. uint8* dst, int dst_stride, int width);
  58. void TransposeWx8_DSPR2(const uint8* src, int src_stride,
  59. uint8* dst, int dst_stride, int width);
  60. void TransposeWx8_Fast_DSPR2(const uint8* src, int src_stride,
  61. uint8* dst, int dst_stride, int width);
  62. void TransposeWx8_Any_NEON(const uint8* src, int src_stride,
  63. uint8* dst, int dst_stride, int width);
  64. void TransposeWx8_Any_SSSE3(const uint8* src, int src_stride,
  65. uint8* dst, int dst_stride, int width);
  66. void TransposeWx8_Fast_Any_SSSE3(const uint8* src, int src_stride,
  67. uint8* dst, int dst_stride, int width);
  68. void TransposeWx8_Any_DSPR2(const uint8* src, int src_stride,
  69. uint8* dst, int dst_stride, int width);
  70. void TransposeUVWxH_C(const uint8* src, int src_stride,
  71. uint8* dst_a, int dst_stride_a,
  72. uint8* dst_b, int dst_stride_b,
  73. int width, int height);
  74. void TransposeUVWx8_C(const uint8* src, int src_stride,
  75. uint8* dst_a, int dst_stride_a,
  76. uint8* dst_b, int dst_stride_b, int width);
  77. void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
  78. uint8* dst_a, int dst_stride_a,
  79. uint8* dst_b, int dst_stride_b, int width);
  80. void TransposeUVWx8_NEON(const uint8* src, int src_stride,
  81. uint8* dst_a, int dst_stride_a,
  82. uint8* dst_b, int dst_stride_b, int width);
  83. void TransposeUVWx8_DSPR2(const uint8* src, int src_stride,
  84. uint8* dst_a, int dst_stride_a,
  85. uint8* dst_b, int dst_stride_b, int width);
  86. void TransposeUVWx8_Any_SSE2(const uint8* src, int src_stride,
  87. uint8* dst_a, int dst_stride_a,
  88. uint8* dst_b, int dst_stride_b, int width);
  89. void TransposeUVWx8_Any_NEON(const uint8* src, int src_stride,
  90. uint8* dst_a, int dst_stride_a,
  91. uint8* dst_b, int dst_stride_b, int width);
  92. void TransposeUVWx8_Any_DSPR2(const uint8* src, int src_stride,
  93. uint8* dst_a, int dst_stride_a,
  94. uint8* dst_b, int dst_stride_b, int width);
  95. #ifdef __cplusplus
  96. } // extern "C"
  97. } // namespace libyuv
  98. #endif
  99. #endif // INCLUDE_LIBYUV_ROTATE_ROW_H_ NOLINT