The branch, master has been updated
       via  f4b044bbe3be8c87fa09955e1a4c6b306e55ee06 (commit)
      from  1dcb0c6c3e0e461362c7f2f4d05ea117699ec6bd (commit)


- Log -----------------------------------------------------------------
commit f4b044bbe3be8c87fa09955e1a4c6b306e55ee06
Author:     Alan Kelly <alanke...@google.com>
AuthorDate: Fri Sep 5 15:17:25 2025 +0000
Commit:     kierank <kie...@kunhya.com>
CommitDate: Sat Sep 6 20:57:48 2025 +0000

    swscale: Disable avx2 hscale 8to15 on IceLake and below due to Intel Gather 
Data Sampling mitigation performance loss
    
        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.
    
        
https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/gather-data-sampling.html
    
        Broadwell:
        hscale_8_to_15__fs_4_dstW_512_c:                      3379.5 ( 1.00x)
        hscale_8_to_15__fs_4_dstW_512_sse2:                    615.7 ( 5.49x)
        hscale_8_to_15__fs_4_dstW_512_ssse3:                   613.4 ( 5.51x)
        hscale_8_to_15__fs_4_dstW_512_avx2:                    495.7 ( 6.82x)
    
        Skylake:
        hscale_8_to_15__fs_4_dstW_512_c:                      3411.4 ( 1.00x)
        hscale_8_to_15__fs_4_dstW_512_sse2:                    591.0 ( 5.77x)
        hscale_8_to_15__fs_4_dstW_512_ssse3:                   591.5 ( 5.77x)
        hscale_8_to_15__fs_4_dstW_512_avx2:                   1386.2 ( 2.46x)
    
        Cascade Lake:
        hscale_8_to_15__fs_4_dstW_512_c:                      3231.3 ( 1.00x)
        hscale_8_to_15__fs_4_dstW_512_sse2:                    517.9 ( 6.24x)
        hscale_8_to_15__fs_4_dstW_512_ssse3:                   521.6 ( 6.19x)
        hscale_8_to_15__fs_4_dstW_512_avx2:                   1775.0 ( 1.82x)
    
        Sapphire Rapids:
        hscale_8_to_15__fs_4_dstW_512_c:                      1840.0 ( 1.00x)
        hscale_8_to_15__fs_4_dstW_512_sse2:                    287.9 ( 6.39x)
        hscale_8_to_15__fs_4_dstW_512_ssse3:                   293.8 ( 6.26x)
        hscale_8_to_15__fs_4_dstW_512_avx2:                    219.2 ( 8.40x)

diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index d6cd4fab9c..1a592f3bf4 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -244,8 +244,9 @@ 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;
     }
 

-----------------------------------------------------------------------

Summary of changes:
 libavutil/x86/cpu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- ffmpeg-cvslog@ffmpeg.org
To unsubscribe send an email to ffmpeg-cvslog-le...@ffmpeg.org

Reply via email to