[FFmpeg-cvslog] aarch64: Add Windows runtime detection of the dotprod instructions
Martin Storsjö
git at videolan.org
Tue Jun 6 13:25:46 EEST 2023
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri May 26 14:05:30 2023 +0300| [c76643021efdbd24b674298f802ff2c8d9316fe5] | committer: Martin Storsjö
aarch64: Add Windows runtime detection of the dotprod instructions
For Windows, there's no publicly defined constant for checking for
the i8mm extension yet.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c76643021efdbd24b674298f802ff2c8d9316fe5
---
libavutil/aarch64/cpu.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/libavutil/aarch64/cpu.c b/libavutil/aarch64/cpu.c
index b808a7650e..a8cb301dd7 100644
--- a/libavutil/aarch64/cpu.c
+++ b/libavutil/aarch64/cpu.c
@@ -83,6 +83,18 @@ static int detect_flags(void)
return flags;
}
+#elif defined(_WIN32)
+#include <windows.h>
+
+static int detect_flags(void)
+{
+ int flags = 0;
+#ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE
+ if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
+ flags |= AV_CPU_FLAG_DOTPROD;
+#endif
+ return flags;
+}
#else
static int detect_flags(void)
More information about the ffmpeg-cvslog
mailing list