[FFmpeg-devel] [PATCH v2 5/5] aarch64: Add Windows runtime detection of the dotprod instructions
Martin Storsjö
martin at martin.st
Tue May 30 15:30:43 EEST 2023
For Windows, there's no publicly defined constant for checking for
the i8mm extension yet.
---
libavutil/aarch64/cpu.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavutil/aarch64/cpu.c b/libavutil/aarch64/cpu.c
index ffb00f6dd2..4b97530240 100644
--- a/libavutil/aarch64/cpu.c
+++ b/libavutil/aarch64/cpu.c
@@ -94,6 +94,16 @@ static int detect_flags(void)
return flags;
}
+#elif defined(_WIN32)
+#include <windows.h>
+
+static int detect_flags(void)
+{
+ int flags = 0;
+ if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
+ flags |= AV_CPU_FLAG_DOTPROD;
+ return flags;
+}
#else
static int detect_flags(void)
--
2.37.1 (Apple Git-137.1)
More information about the ffmpeg-devel
mailing list