aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer_sse41.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/mixer_sse41.c')
-rw-r--r--Alc/mixer_sse41.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/Alc/mixer_sse41.c b/Alc/mixer_sse41.c
index 36f06255..1c859bc1 100644
--- a/Alc/mixer_sse41.c
+++ b/Alc/mixer_sse41.c
@@ -100,24 +100,24 @@ const ALfloat *Resample_cubic32_SSE41(const ALfloat *src, ALuint frac, ALuint in
--src;
for(i = 0;numsamples-i > 3;i += 4)
{
- __m128 val0 = _mm_loadu_ps(&src[pos_.i[0]]);
- __m128 val1 = _mm_loadu_ps(&src[pos_.i[1]]);
- __m128 val2 = _mm_loadu_ps(&src[pos_.i[2]]);
- __m128 val3 = _mm_loadu_ps(&src[pos_.i[3]]);
+ const __m128 val0 = _mm_loadu_ps(&src[pos_.i[0]]);
+ const __m128 val1 = _mm_loadu_ps(&src[pos_.i[1]]);
+ const __m128 val2 = _mm_loadu_ps(&src[pos_.i[2]]);
+ const __m128 val3 = _mm_loadu_ps(&src[pos_.i[3]]);
__m128 k0 = _mm_load_ps(CubicLUT[frac_.i[0]]);
__m128 k1 = _mm_load_ps(CubicLUT[frac_.i[1]]);
__m128 k2 = _mm_load_ps(CubicLUT[frac_.i[2]]);
__m128 k3 = _mm_load_ps(CubicLUT[frac_.i[3]]);
__m128 out;
- val0 = _mm_mul_ps(val0, k0);
- val1 = _mm_mul_ps(val1, k1);
- val2 = _mm_mul_ps(val2, k2);
- val3 = _mm_mul_ps(val3, k3);
- _MM_TRANSPOSE4_PS(val0, val1, val2, val3);
- out = _mm_add_ps(val0, val1);
- out = _mm_add_ps(out, val2);
- out = _mm_add_ps(out, val3);
+ k0 = _mm_mul_ps(k0, val0);
+ k1 = _mm_mul_ps(k1, val1);
+ k2 = _mm_mul_ps(k2, val2);
+ k3 = _mm_mul_ps(k3, val3);
+ _MM_TRANSPOSE4_PS(k0, k1, k2, k3);
+ out = _mm_add_ps(k0, k1);
+ out = _mm_add_ps(out, k2);
+ out = _mm_add_ps(out, k3);
_mm_store_ps(&dst[i], out);