mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-25 01:40:36 -05:00
spa: use the right AVX2 flags
Our AVX optimizations are really AVX2 so rename the files and functions and use the right HAVE_AVX2 and cpu flags to compile and select the right functions. Fixes #5072
This commit is contained in:
parent
5871f88b81
commit
8eb60b132c
15 changed files with 66 additions and 66 deletions
|
|
@ -156,17 +156,17 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#if defined (HAVE_AVX) && defined(HAVE_FMA)
|
||||
if (SPA_FLAG_IS_SET(cpu_flags, SPA_CPU_FLAG_AVX | SPA_CPU_FLAG_FMA3)) {
|
||||
#if defined (HAVE_AVX2) && defined(HAVE_FMA)
|
||||
if (SPA_FLAG_IS_SET(cpu_flags, SPA_CPU_FLAG_AVX2 | SPA_CPU_FLAG_FMA3)) {
|
||||
for (i = 0; i < SPA_N_ELEMENTS(in_rates); i++) {
|
||||
spa_zero(r);
|
||||
r.channels = 2;
|
||||
r.cpu_flags = SPA_CPU_FLAG_AVX | SPA_CPU_FLAG_FMA3;
|
||||
r.cpu_flags = SPA_CPU_FLAG_AVX2 | SPA_CPU_FLAG_FMA3;
|
||||
r.i_rate = in_rates[i];
|
||||
r.o_rate = out_rates[i];
|
||||
r.quality = RESAMPLE_DEFAULT_QUALITY;
|
||||
resample_native_init(&r);
|
||||
run_test("native", "avx", &r);
|
||||
run_test("native", "avx2", &r);
|
||||
resample_free(&r);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue