Intel provided a microcode update to mitigate this security
vulnerability which has a huge negative performance impact on gather
instructions. This means that hscale 8to15 avx2, which uses gather
extensively, is no longer faster than SSSE3 on impacted CPUs.
---
 libavutil/x86/cpu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index d6cd4fab9c..923c63e0c4 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -244,9 +244,11 @@ int ff_get_cpu_flags_x86(void)
             family == 6 && model < 23)
             rval |= AV_CPU_FLAG_SSSE3SLOW;
 
-        /* Haswell has slow gather */
-        if ((rval & AV_CPU_FLAG_AVX2) && family == 6 && model < 70)
+        /* Ice Lake and below have slow gather due to Gather Data Sampling
+         * mitigation. */
+        if ((rval & AV_CPU_FLAG_AVX2) && family == 6 && model < 143) {
             rval |= AV_CPU_FLAG_SLOW_GATHER;
+        }
     }
 
 #endif /* cpuid */
-- 
2.50.1.703.g449372360f-goog

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to