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:
Wim Taymans 2022-09-07 16:00:31 +02:00
parent a79b5c86ea
commit 6e9e02b420
9 changed files with 89 additions and 110 deletions

View file

@ -24,7 +24,7 @@
#include "resample-native-impl.h"
static void inner_product_c(float *d, const float * SPA_RESTRICT s,
static inline void inner_product_c(float *d, const float * SPA_RESTRICT s,
const float * SPA_RESTRICT taps, uint32_t n_taps)
{
float sum = 0.0f;
@ -40,7 +40,7 @@ static void inner_product_c(float *d, const float * SPA_RESTRICT s,
*d = sum;
}
static void inner_product_ip_c(float *d, const float * SPA_RESTRICT s,
static inline void inner_product_ip_c(float *d, const float * SPA_RESTRICT s,
const float * SPA_RESTRICT t0, const float * SPA_RESTRICT t1, float x,
uint32_t n_taps)
{