[FFmpeg-devel] [PATCH v2 2/2] libavutil/x86/cpu.c: add IceLake-AVX512 runtime check
Wu, Jianhua
jianhua.wu at intel.com
Mon Aug 23 10:59:28 EEST 2021
Ping.
> -----Original Message-----
> From: Wu, Jianhua <jianhua.wu at intel.com>
> Sent: Wednesday, August 18, 2021 2:42 PM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Wu, Jianhua <jianhua.wu at intel.com>
> Subject: [PATCH v2 2/2] libavutil/x86/cpu.c: add IceLake-AVX512 runtime
> check
>
> Signed-off-by: Wu Jianhua <jianhua.wu at intel.com>
> ---
> libavutil/x86/cpu.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index
> bcd41a50a2..9e6015cf31 100644
> --- a/libavutil/x86/cpu.c
> +++ b/libavutil/x86/cpu.c
> @@ -148,11 +148,10 @@ int ff_get_cpu_flags_x86(void) #if HAVE_AVX2
> if ((rval & AV_CPU_FLAG_AVX) && (ebx & 0x00000020))
> rval |= AV_CPU_FLAG_AVX2;
> -#if HAVE_AVX512 /* F, CD, BW, DQ, VL */
> +#if HAVE_AVX512 /*
> +F/CD/BW/DQ/VL/VNNI/IFMA/VBMI/VBMI2/VPOPCNTDQ/BITALG/GFNI/V
> AES/VPCLMULQD
> +Q */
> if ((xcr0_lo & 0xe0) == 0xe0) { /* OPMASK/ZMM state */
> - if ((rval & AV_CPU_FLAG_AVX2) && (ebx & 0xd0030000) ==
> 0xd0030000)
> + if ((rval & AV_CPU_FLAG_AVX2) && (ebx & 0xd0230000) ==
> + 0xd0230000 && (ecx & 0x5f42) == 0x5f42)
> rval |= AV_CPU_FLAG_AVX512;
> -
> }
> #endif /* HAVE_AVX512 */
> #endif /* HAVE_AVX2 */
> --
> 2.25.1
Any update of review on this patchset?
Jianhua
More information about the ffmpeg-devel
mailing list