diff options
author | Chris Robinson <[email protected]> | 2014-12-16 09:20:19 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-12-16 09:20:35 -0800 |
commit | c48a6196ad3d6a697679a9d3f453da055f172f52 (patch) | |
tree | 4b4db0d7a3e6d59a8597a7c0e01ced4e143107cd /Alc/mixer_sse2.c | |
parent | d2adefe06364540d0632ca6fffac7d2f4cc8504c (diff) |
Constify some variables
Diffstat (limited to 'Alc/mixer_sse2.c')
-rw-r--r-- | Alc/mixer_sse2.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Alc/mixer_sse2.c b/Alc/mixer_sse2.c index fbc2b629..39109245 100644 --- a/Alc/mixer_sse2.c +++ b/Alc/mixer_sse2.c @@ -96,24 +96,24 @@ const ALfloat *Resample_cubic32_SSE2(const ALfloat *src, ALuint frac, ALuint inc --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); |