19 #ifndef __ardour_mix_h__
20 #define __ardour_mix_h__
24 #include "ardour/utils.h"
26 #if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS)
30 LIBARDOUR_API float x86_sse_compute_peak (
float const* buf, uint32_t nsamples,
float current);
31 LIBARDOUR_API void x86_sse_apply_gain_to_buffer (
float* buf, uint32_t nframes,
float gain);
32 LIBARDOUR_API void x86_sse_mix_buffers_with_gain(
float* dst,
float const* src, uint32_t nframes,
float gain);
33 LIBARDOUR_API void x86_sse_mix_buffers_no_gain (
float* dst,
float const* src, uint32_t nframes);
36 LIBARDOUR_API void x86_sse_find_peaks (
float const* buf, uint32_t nsamples,
float* min,
float* max);
40 LIBARDOUR_API float x86_sse_avx_compute_peak (
float const* buf, uint32_t nsamples,
float current);
41 LIBARDOUR_API void x86_sse_avx_apply_gain_to_buffer (
float* buf, uint32_t nframes,
float gain);
42 LIBARDOUR_API void x86_sse_avx_mix_buffers_with_gain (
float* dst,
float const* src, uint32_t nframes,
float gain);
43 LIBARDOUR_API void x86_sse_avx_mix_buffers_no_gain (
float* dst,
float const* src, uint32_t nframes);
44 LIBARDOUR_API void x86_sse_avx_copy_vector (
float* dst,
float const* src, uint32_t nframes);
45 #ifndef PLATFORM_WINDOWS
46 LIBARDOUR_API void x86_sse_avx_find_peaks (
float const* buf, uint32_t nsamples,
float* min,
float* max);
49 #ifdef PLATFORM_WINDOWS
50 LIBARDOUR_API void x86_sse_avx_find_peaks (
float const* buf, uint32_t nsamples,
float* min,
float* max);
54 #ifdef FPU_AVX_FMA_SUPPORT
55 LIBARDOUR_API void x86_fma_mix_buffers_with_gain (
float* dst,
float const* src, uint32_t nframes,
float gain);
59 #ifdef FPU_AVX512F_SUPPORT
60 LIBARDOUR_API float x86_avx512f_compute_peak (
float const* buf, uint32_t nsamples,
float current);
61 LIBARDOUR_API void x86_avx512f_apply_gain_to_buffer (
float* buf, uint32_t nframes,
float gain);
62 LIBARDOUR_API void x86_avx512f_mix_buffers_with_gain (
float* dst,
float const* src, uint32_t nframes,
float gain);
63 LIBARDOUR_API void x86_avx512f_mix_buffers_no_gain (
float* dst,
float const* src, uint32_t nframes);
64 LIBARDOUR_API void x86_avx512f_copy_vector (
float* dst,
float const* src, uint32_t nframes);
65 LIBARDOUR_API void x86_avx512f_find_peaks (
float const* buf, uint32_t nsamples,
float* min,
float* max);
78 #if defined (__APPLE__)
88 #if defined ARM_NEON_SUPPORT
91 LIBARDOUR_API float arm_neon_compute_peak (
float const* buf, uint32_t nsamples,
float current);
92 LIBARDOUR_API void arm_neon_apply_gain_to_buffer (
float* buf, uint32_t nframes,
float gain);
93 LIBARDOUR_API void arm_neon_copy_vector (
float* dst,
float const* src, uint32_t nframes);
94 LIBARDOUR_API void arm_neon_find_peaks (
float const* src, uint32_t nframes,
float* minf,
float* maxf);
95 LIBARDOUR_API void arm_neon_mix_buffers_no_gain (
float* dst,
float const* src, uint32_t nframes);
96 LIBARDOUR_API void arm_neon_mix_buffers_with_gain (
float* dst,
float const* src, uint32_t nframes,
float gain);
void default_find_peaks(ARDOUR::Sample const *buf, ARDOUR::pframes_t nsamples, float *min, float *max)
void default_apply_gain_to_buffer(ARDOUR::Sample *buf, ARDOUR::pframes_t nframes, float gain)
float default_compute_peak(ARDOUR::Sample const *buf, ARDOUR::pframes_t nsamples, float current)
void default_copy_vector(ARDOUR::Sample *dst, ARDOUR::Sample const *src, ARDOUR::pframes_t nframes)
void default_mix_buffers_no_gain(ARDOUR::Sample *dst, ARDOUR::Sample const *src, ARDOUR::pframes_t nframes)
void default_mix_buffers_with_gain(ARDOUR::Sample *dst, ARDOUR::Sample const *src, ARDOUR::pframes_t nframes, float gain)
PBD::PropertyDescriptor< gain_t > gain