audioconvert: add avx2 optimized s32_to f32d

Add an alternative avx2 s32_to_f32d implementation that doesn't use the
gather function for when gather is slow.

Don't overwrite the orinal cpu_flags but store the selected flags in a
new variable. Use this to debug the selected function cpu flags.

Build libraries with defines from previous libraries so that we can
reuse functions from them.

We can then remove the SSE2 | SLOW_GATHER function selection from the
list. We will now select avx2 and it will then switch implementations
based on the CPU flags.
This commit is contained in:
Wim Taymans 2026-03-20 17:53:00 +01:00
parent 3dff64364f
commit c02cdcb5ce
13 changed files with 218 additions and 38 deletions

View file

@ -2125,7 +2125,7 @@ static int setup_in_convert(struct impl *this)
return res;
spa_log_debug(this->log, "%p: got converter features %08x:%08x passthrough:%d remap:%d %s", this,
this->cpu_flags, in->conv.cpu_flags, in->conv.is_passthrough,
this->cpu_flags, in->conv.func_cpu_flags, in->conv.is_passthrough,
remap, in->conv.func_name);
return 0;
@ -2282,7 +2282,7 @@ static int setup_channelmix(struct impl *this, uint32_t channels, uint32_t *posi
set_volume(this);
spa_log_debug(this->log, "%p: got channelmix features %08x:%08x flags:%08x %s",
this, this->cpu_flags, this->mix.cpu_flags,
this, this->cpu_flags, this->mix.func_cpu_flags,
this->mix.flags, this->mix.func_name);
return 0;
}
@ -2330,7 +2330,7 @@ static int setup_resample(struct impl *this)
res = resample_native_init(&this->resample);
spa_log_debug(this->log, "%p: got resample features %08x:%08x %s",
this, this->cpu_flags, this->resample.cpu_flags,
this, this->cpu_flags, this->resample.func_cpu_flags,
this->resample.func_name);
return res;
}
@ -2422,7 +2422,7 @@ static int setup_out_convert(struct impl *this)
spa_log_debug(this->log, "%p: got converter features %08x:%08x quant:%d:%d"
" passthrough:%d remap:%d %s", this,
this->cpu_flags, out->conv.cpu_flags, out->conv.method,
this->cpu_flags, out->conv.func_cpu_flags, out->conv.method,
out->conv.noise_bits, out->conv.is_passthrough, remap, out->conv.func_name);
return 0;