diff options
author | Chris Robinson <[email protected]> | 2014-06-06 01:52:53 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-06-06 07:15:22 -0700 |
commit | 6d1622dc68073e08dff6149280096f8f1d9a0a2e (patch) | |
tree | 8f400ce980a7c191dbab223c0a4268118bdebe15 /Alc/mixer_sse41.c | |
parent | fc0be88c0f8d3d8887edd2afac915840f4e3f5e4 (diff) |
Move InitiatePositionArrays to mixer_defs.h
Diffstat (limited to 'Alc/mixer_sse41.c')
-rw-r--r-- | Alc/mixer_sse41.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/Alc/mixer_sse41.c b/Alc/mixer_sse41.c index 958fecec..db89abfa 100644 --- a/Alc/mixer_sse41.c +++ b/Alc/mixer_sse41.c @@ -28,27 +28,6 @@ #include "mixer_defs.h" -static inline void InitiatePositionArrays(ALuint frac, ALuint increment, - ALuint *frac_arr, ALuint *pos_arr) -{ - ALuint frac_tmp; - - pos_arr[0] = 0; - frac_arr[0] = frac; - - frac_tmp = frac_arr[0] + increment; - pos_arr[1] = pos_arr[0] + (frac_tmp>>FRACTIONBITS); - frac_arr[1] = frac_tmp & FRACTIONMASK; - - frac_tmp = frac_arr[1] + increment; - pos_arr[2] = pos_arr[1] + (frac_tmp>>FRACTIONBITS); - frac_arr[2] = frac_tmp & FRACTIONMASK; - - frac_tmp = frac_arr[2] + increment; - pos_arr[3] = pos_arr[2] + (frac_tmp>>FRACTIONBITS); - frac_arr[3] = frac_tmp & FRACTIONMASK; -} - const ALfloat *Resample_lerp32_SSE41(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint numsamples) { @@ -61,12 +40,12 @@ const ALfloat *Resample_lerp32_SSE41(const ALfloat *src, ALuint frac, ALuint inc ALuint pos; ALuint i; - InitiatePositionArrays(frac, increment, frac_.i, pos_.i); + InitiatePositionArrays(frac, increment, frac_.i, pos_.i, 4); frac4 = _mm_castps_si128(_mm_load_ps(frac_.f)); pos4 = _mm_castps_si128(_mm_load_ps(pos_.f)); - for(i = 0;i < numsamples-3;i += 4) + for(i = 0;numsamples-i > 3;i += 4) { const __m128 val1 = _mm_setr_ps(src[pos_.i[0]], src[pos_.i[1]], src[pos_.i[2]], src[pos_.i[3]]); const __m128 val2 = _mm_setr_ps(src[pos_.i[0]+1], src[pos_.i[1]+1], src[pos_.i[2]+1], src[pos_.i[3]+1]); |