From 33ec79794e08af1b33045c815fcda2480672ef08 Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 29 Jun 2026 19:47:39 +0100 Subject: [PATCH] Fiix builderror in libsoundtouch (FreeBSD) --- media/libsoundtouch/src/sse_optimized.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/media/libsoundtouch/src/sse_optimized.cpp b/media/libsoundtouch/src/sse_optimized.cpp index bce21ef0c6..dc039753e4 100644 --- a/media/libsoundtouch/src/sse_optimized.cpp +++ b/media/libsoundtouch/src/sse_optimized.cpp @@ -253,9 +253,15 @@ uint FIRFilterSSE::evaluateFilterStereo(float *dest, const float *source, uint n const uint filterLength = length; const float *coeffsAlign = filterCoeffsAlign; + // filter is evaluated for two stereo samples with each iteration, thus use of 'j += 2' +const uint filterLength = length; + const float *coeffsAlign = filterCoeffsAlign; + // filter is evaluated for two stereo samples with each iteration, thus use of 'j += 2' #if defined(_OPENMP) - #pragma omp parallel for default(none) shared(source, dest, count, coeffsAlign) private(j) schedule(static) + #pragma omp parallel for default(none) \ + shared(source, dest, count, coeffsAlign, filterLength) \ + private(j) schedule(static) #endif for (j = 0; j < count; j += 2) { @@ -267,8 +273,8 @@ uint FIRFilterSSE::evaluateFilterStereo(float *dest, const float *source, uint n pSrc = (const float*)source + j * 2; // source audio data pDest = dest + j * 2; // destination audio data - pFil = (const __m128*)coeffsAlign; // filter coefficients. NOTE: Assumes coefficients - // are aligned to 16-byte boundary + pFil = (const __m128*)coeffsAlign; + sum1 = sum2 = _mm_setzero_ps(); for (i = 0; i < filterLength / 8; i ++)