Unified · Split
| @@ -86,7 +86,7 @@ int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, mp3d_s · 85 unmodified lines | |||
| 86 | 86 | ||
| 87 | #if !defined(MINIMP3_NO_SIMD) | 87 | #if !defined(MINIMP3_NO_SIMD) |
| 88 | 88 | ||
| 89 | #if !defined(MINIMP3_ONLY_SIMD) && (defined(_M_X64) || defined(_M_ARM64) || defined(__x86_64__) || defined(__aarch64__)) | 89 | #if !defined(MINIMP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64)) |
| 90 | /* x64 always have SSE2, arm64 always have neon, no need for generic code */ | 90 | /* x64 always have SSE2, arm64 always have neon, no need for generic code */ |
| 91 | #define MINIMP3_ONLY_SIMD | 91 | #define MINIMP3_ONLY_SIMD |
| 92 | #endif /* SIMD checks... */ | 92 | #endif /* SIMD checks... */ |
| @@ -161,7 +161,7 @@ end: · 68 unmodified lines | |||
| 161 | return g_have_simd - 1; | 161 | return g_have_simd - 1; |
| 162 | #endif /* MINIMP3_ONLY_SIMD */ | 162 | #endif /* MINIMP3_ONLY_SIMD */ |
| 163 | } | 163 | } |
| 164 | #elif defined(__ARM_NEON) || defined(__aarch64__) | 164 | #elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64) |
| 165 | #include <arm_neon.h> | 165 | #include <arm_neon.h> |
| 166 | #define HAVE_SSE 0 | 166 | #define HAVE_SSE 0 |
| 167 | #define HAVE_SIMD 1 | 167 | #define HAVE_SIMD 1 |
| @@ -191,7 +191,7 @@ static int have_simd() · 23 unmodified lines | |||
| 191 | #define HAVE_SIMD 0 | 191 | #define HAVE_SIMD 0 |
| 192 | #endif /* !defined(MINIMP3_NO_SIMD) */ | 192 | #endif /* !defined(MINIMP3_NO_SIMD) */ |
| 193 | 193 | ||
| 194 | #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) | 194 | #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) |
| 195 | #define HAVE_ARMV6 1 | 195 | #define HAVE_ARMV6 1 |
| 196 | static __inline__ __attribute__((always_inline)) int32_t minimp3_clip_int16_arm(int32_t a) | 196 | static __inline__ __attribute__((always_inline)) int32_t minimp3_clip_int16_arm(int32_t a) |
| 197 | { | 197 | { |