diff options
author | Wu Jianhua <jianhua.wu@intel.com> | 2022-02-23 16:57:30 +0800 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-10 16:45:48 -0300 |
commit | f629ea2e188e220876ee206747b111a368bad4ef (patch) | |
tree | 73afd9868a6101dce6929136f617d41f937d7d62 /libavutil/x86/cpu.c | |
parent | e6e3aae294951738a760d2b6907e6e54286d30dd (diff) | |
download | ffmpeg-f629ea2e188e220876ee206747b111a368bad4ef.tar.gz |
avutil/cpu: add AVX512 Icelake flag
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/x86/cpu.c')
-rw-r--r-- | libavutil/x86/cpu.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index 7b13fcae91..d6cd4fab9c 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -150,9 +150,13 @@ int ff_get_cpu_flags_x86(void) rval |= AV_CPU_FLAG_AVX2; #if HAVE_AVX512 /* F, CD, BW, DQ, VL */ if ((xcr0_lo & 0xe0) == 0xe0) { /* OPMASK/ZMM state */ - if ((rval & AV_CPU_FLAG_AVX2) && (ebx & 0xd0030000) == 0xd0030000) + if ((rval & AV_CPU_FLAG_AVX2) && (ebx & 0xd0030000) == 0xd0030000) { rval |= AV_CPU_FLAG_AVX512; - +#if HAVE_AVX512ICL + if ((ebx & 0xd0200000) == 0xd0200000 && (ecx & 0x5f42) == 0x5f42) + rval |= AV_CPU_FLAG_AVX512ICL; +#endif /* HAVE_AVX512ICL */ + } } #endif /* HAVE_AVX512 */ #endif /* HAVE_AVX2 */ |