mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
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:
parent
23984f8790
commit
8fe83e5304
5 changed files with 77 additions and 58 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue