summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2021-09-13 17:44:38 -0700
committerJames Zern <jzern@google.com>2021-09-13 19:56:19 -0700
commite23cd5481c4d90229e967bc01034fdc355e8978d (patch)
tree075572b9db1981cbf254a5a74cdd00e8824e6bba
parent3875c7de07099a1c6584b9dc9647db618d469deb (diff)
downloadlibwebp-e23cd5481c4d90229e967bc01034fdc355e8978d.tar.gz
dsp.h: enable NEON w/VS2019+ ARM64 targets
Visual Studio added ARM64 support, but requires arm64_neon.h to be included rather than arm_neon.h. Visual Studio 2019 addressed this so we'll start with that version and leave a local adapter include for a follow up. Bug: webp:539 Change-Id: If975c029dafffba99210b3bb2d670035a83e8105
-rw-r--r--src/dsp/dsp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h
index 513e159b..c4f57e4d 100644
--- a/src/dsp/dsp.h
+++ b/src/dsp/dsp.h
@@ -119,7 +119,12 @@ extern "C" {
#define WEBP_USE_NEON
#endif
-#if defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_M_ARM)
+// Note: ARM64 is supported in Visual Studio 2017, but requires the direct
+// inclusion of arm64_neon.h; Visual Studio 2019 includes this file in
+// arm_neon.h.
+#if defined(_MSC_VER) && \
+ ((_MSC_VER >= 1700 && defined(_M_ARM)) || \
+ (_MSC_VER >= 1920 && defined(_M_ARM64)))
#define WEBP_USE_NEON
#define WEBP_USE_INTRINSICS
#endif