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/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libswscale/utils.c') diff --git a/libswscale/utils.c b/libswscale/utils.c index d4a72d3ce1..7158384f0b 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -282,7 +282,7 @@ void ff_shuffle_filter_coefficients(SwsContext *c, int *filterPos, int filterSiz #if ARCH_X86_64 int i, j, k, l; int cpu_flags = av_get_cpu_flags(); - 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 (dstW % 16 == 0){ if (filter != NULL){ -- cgit v1.2.3