mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
echo-cancel: Add SSE optimisation to the adrian module
Optimises the core inner-product function, which takes the most CPU. The SSE-optimised bits of the adrian echo canceller only if the CPU that PA is running on actually supports SSE.
This commit is contained in:
parent
ab4223e9cf
commit
963250abb9
7 changed files with 61 additions and 12 deletions
|
|
@ -51,12 +51,12 @@ static void pa_adrian_ec_fixate_spec(pa_sample_spec *source_ss, pa_channel_map *
|
|||
*sink_map = *source_map;
|
||||
}
|
||||
|
||||
pa_bool_t pa_adrian_ec_init(pa_echo_canceller *ec,
|
||||
pa_bool_t pa_adrian_ec_init(pa_core *c, pa_echo_canceller *ec,
|
||||
pa_sample_spec *source_ss, pa_channel_map *source_map,
|
||||
pa_sample_spec *sink_ss, pa_channel_map *sink_map,
|
||||
uint32_t *blocksize, const char *args)
|
||||
{
|
||||
int framelen, rate;
|
||||
int framelen, rate, have_vector = 0;
|
||||
uint32_t frame_size_ms;
|
||||
pa_modargs *ma;
|
||||
|
||||
|
|
@ -80,7 +80,11 @@ pa_bool_t pa_adrian_ec_init(pa_echo_canceller *ec,
|
|||
|
||||
pa_log_debug ("Using framelen %d, blocksize %u, channels %d, rate %d", framelen, ec->params.priv.adrian.blocksize, source_ss->channels, source_ss->rate);
|
||||
|
||||
ec->params.priv.adrian.aec = AEC_init(rate);
|
||||
/* For now we only support SSE */
|
||||
if (c->cpu_info.cpu_type == PA_CPU_X86 && (c->cpu_info.flags.x86 & PA_CPU_X86_SSE))
|
||||
have_vector = 1;
|
||||
|
||||
ec->params.priv.adrian.aec = AEC_init(rate, have_vector);
|
||||
if (!ec->params.priv.adrian.aec)
|
||||
goto fail;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue