From eebe406c808e6061ee76e93a616537b5369dbf40 Mon Sep 17 00:00:00 2001 From: Alan Kelly Date: Mon, 20 Dec 2021 15:45:45 +0100 Subject: libswscale: Test AV_CPU_FLAG_SLOW_GATHER for hscale functions. This is instead of EXTERNAL_AVX2_FAST so that the avx2 hscale functions are only used where they are faster. --- libswscale/x86/swscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libswscale/x86/swscale.c') diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index c49a05c37b..ffc7691c12 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -578,7 +578,7 @@ switch(c->dstBpc){ \ break; \ } - if (EXTERNAL_AVX2_FAST(cpu_flags)) { + if (EXTERNAL_AVX2_FAST(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_SLOW_GATHER)) { if ((c->srcBpc == 8) && (c->dstBpc <= 14)) { if (c->chrDstW % 16 == 0) ASSIGN_AVX2_SCALE_FUNC(c->hcScale, c->hChrFilterSize); -- cgit v1.2.3