x86/pixelutils: don't use the AVX2 functions on CPUs known to be slow with them
authorJames Almer <jamrial@gmail.com>
Wed, 1 Aug 2018 01:14:53 +0000 (22:14 -0300)
committerJames Almer <jamrial@gmail.com>
Wed, 1 Aug 2018 01:14:53 +0000 (22:14 -0300)
Signed-off-by: James Almer <jamrial@gmail.com>
libavutil/x86/pixelutils_init.c

index dd05421..184a3a4 100644 (file)
@@ -84,7 +84,7 @@ void ff_pixelutils_sad_init_x86(av_pixelutils_sad_fn *sad, int aligned)
         }
     }
 
-    if (EXTERNAL_AVX2(cpu_flags)) {
+    if (EXTERNAL_AVX2_FAST(cpu_flags)) {
         switch (aligned) {
         case 0: sad[4] = ff_pixelutils_sad_32x32_avx2;   break; // src1 unaligned, src2 unaligned
         case 1: sad[4] = ff_pixelutils_sad_u_32x32_avx2; break; // src1   aligned, src2 unaligned