diff options
author | Martin Storsjö <martin@martin.st> | 2023-05-26 14:05:30 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2023-06-06 12:50:15 +0300 |
commit | c76643021efdbd24b674298f802ff2c8d9316fe5 (patch) | |
tree | 768d5a52ff0114069d875642a37f577abe4bb3cd /libavutil/aarch64 | |
parent | 9b0052200aa959d5ac939620bc14f0403621ab05 (diff) | |
download | ffmpeg-c76643021efdbd24b674298f802ff2c8d9316fe5.tar.gz |
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@martin.st>
Diffstat (limited to 'libavutil/aarch64')
-rw-r--r-- | libavutil/aarch64/cpu.c | 12 |
1 files changed, 12 insertions, 0 deletions
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) |