audiomixer: optimize avx mixer some more

Add avx mixer to test and benchmark
Rework and unroll the avx mixer some more.
The SSE one is 10 times faster than the C one, The AVX is 20 times
faster. The SSE2 function is 5 times faster than the C one.
This commit is contained in:
Wim Taymans 2022-07-10 23:13:24 +02:00
parent 23984f8790
commit 8fe83e5304
5 changed files with 77 additions and 58 deletions

View file

@ -240,6 +240,13 @@ static void test_f32(void)
run_test("test_f32_4_sse", src, 4, out_4, sizeof(out_4), SPA_N_ELEMENTS(out_4), mix_f32_sse);
}
#endif
#if defined(HAVE_AVX)
if (cpu_flags & SPA_CPU_FLAG_AVX) {
run_test("test_f32_0_avx", NULL, 0, out, sizeof(out), SPA_N_ELEMENTS(out), mix_f32_avx);
run_test("test_f32_1_avx", src, 1, in_1, sizeof(in_1), SPA_N_ELEMENTS(in_1), mix_f32_avx);
run_test("test_f32_4_avx", src, 4, out_4, sizeof(out_4), SPA_N_ELEMENTS(out_4), mix_f32_avx);
}
#endif
}
static void test_f64(void)