[FFmpeg-cvslog] aarch64: Detect I8MM on Windows via SVE-I8MM
Martin Storsjö
git at videolan.org
Fri Sep 27 00:09:39 EEST 2024
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Sep 17 15:00:56 2024 +0300| [067abbfe9dbf136c5621592622fa93bdd0f9f84d] | committer: Martin Storsjö
aarch64: Detect I8MM on Windows via SVE-I8MM
There's no direct processor feature constant for I8MM alone, but
there is a flag for SVE-I8MM (added in WinSDK 10.0.26100 and
recent versions of mingw-w64). If SVE-I8MM is available, we can
assume that I8MM is available.
While HW supporting these features isn't yet commonly running
Windows, this at least allows detecting and running the I8MM codepaths
in Windows builds in Wine (possibly running in QEMU).
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=067abbfe9dbf136c5621592622fa93bdd0f9f84d
---
libavutil/aarch64/cpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavutil/aarch64/cpu.c b/libavutil/aarch64/cpu.c
index 7631d13de0..fe24b1da4d 100644
--- a/libavutil/aarch64/cpu.c
+++ b/libavutil/aarch64/cpu.c
@@ -112,6 +112,13 @@ static int detect_flags(void)
#ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE
if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
flags |= AV_CPU_FLAG_DOTPROD;
+#endif
+#ifdef PF_ARM_SVE_I8MM_INSTRUCTIONS_AVAILABLE
+ /* There's no PF_* flag that indicates whether plain I8MM is available
+ * or not. But if SVE_I8MM is available, that also implies that
+ * regular I8MM is available. */
+ if (IsProcessorFeaturePresent(PF_ARM_SVE_I8MM_INSTRUCTIONS_AVAILABLE))
+ flags |= AV_CPU_FLAG_I8MM;
#endif
return flags;
}
More information about the ffmpeg-cvslog
mailing list