diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /media/libspeex_resampler/src/simd_detect.h | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'media/libspeex_resampler/src/simd_detect.h')
-rw-r--r-- | media/libspeex_resampler/src/simd_detect.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/media/libspeex_resampler/src/simd_detect.h b/media/libspeex_resampler/src/simd_detect.h new file mode 100644 index 0000000000..70f71c6a85 --- /dev/null +++ b/media/libspeex_resampler/src/simd_detect.h @@ -0,0 +1,43 @@ +/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef simd_detect_h +#define simd_detect_h + +#include "speex_resampler.h" +#include "arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int moz_speex_have_single_simd(); +int moz_speex_have_double_simd(); + +#if defined(USE_SSE) || defined(USE_NEON) +#define OVERRIDE_INNER_PRODUCT_SINGLE +#define inner_product_single CAT_PREFIX(RANDOM_PREFIX,_inner_product_single) +spx_word32_t inner_product_single(const spx_word16_t *a, const spx_word16_t *b, unsigned int len); +#endif +#if defined(USE_SSE) +#define OVERRIDE_INTERPOLATE_PRODUCT_SINGLE +#define interpolate_product_single CAT_PREFIX(RANDOM_PREFIX,_interpolate_product_single) +spx_word32_t interpolate_product_single(const spx_word16_t *a, const spx_word16_t *b, unsigned int len, const spx_uint32_t oversample, float *frac); +#endif + +#if defined(USE_SSE2) +#define OVERRIDE_INNER_PRODUCT_DOUBLE +#define inner_product_double CAT_PREFIX(RANDOM_PREFIX,_inner_product_double) +double inner_product_double(const float *a, const float *b, unsigned int len); +#define OVERRIDE_INTERPOLATE_PRODUCT_DOUBLE +#define interpolate_product_double CAT_PREFIX(RANDOM_PREFIX,_interpolate_product_double) +double interpolate_product_double(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac); +#endif + +#ifdef __cplusplus +} +#endif + +#endif // simd_detect_h |