mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
audioconvert: refactor peaks resampler
Use common code in macro and generate arch specific version. Compile with -Ofast to optimize some fmaxf calls.
This commit is contained in:
parent
a79b5c86ea
commit
6e9e02b420
9 changed files with 89 additions and 110 deletions
|
|
@ -27,7 +27,7 @@
|
|||
#include <assert.h>
|
||||
#include <immintrin.h>
|
||||
|
||||
static void inner_product_avx(float *d, const float * SPA_RESTRICT s,
|
||||
static inline void inner_product_avx(float *d, const float * SPA_RESTRICT s,
|
||||
const float * SPA_RESTRICT taps, uint32_t n_taps)
|
||||
{
|
||||
__m256 sy[2] = { _mm256_setzero_ps(), _mm256_setzero_ps() }, ty;
|
||||
|
|
@ -56,7 +56,7 @@ static void inner_product_avx(float *d, const float * SPA_RESTRICT s,
|
|||
_mm_store_ss(d, sx[0]);
|
||||
}
|
||||
|
||||
static void inner_product_ip_avx(float *d, const float * SPA_RESTRICT s,
|
||||
static inline void inner_product_ip_avx(float *d, const float * SPA_RESTRICT s,
|
||||
const float * SPA_RESTRICT t0, const float * SPA_RESTRICT t1, float x,
|
||||
uint32_t n_taps)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue