diff options
author | Chris Robinson <[email protected]> | 2014-11-24 22:26:42 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-24 22:26:42 -0800 |
commit | 8e6c131b364e674429c20a03a54a7aac487ec704 (patch) | |
tree | b339b9c4f375fb930b97f0153b4293465daaa839 /Alc/mixer_neon.c | |
parent | cbe22763eec9391bce03ebc2294ec742be1f381b (diff) |
Use a separate method to set initial HRTF coefficients
Diffstat (limited to 'Alc/mixer_neon.c')
-rw-r--r-- | Alc/mixer_neon.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Alc/mixer_neon.c b/Alc/mixer_neon.c index 8ce17644..a068d02b 100644 --- a/Alc/mixer_neon.c +++ b/Alc/mixer_neon.c @@ -9,6 +9,25 @@ #include "hrtf.h" +static inline void SetupCoeffs(ALfloat (*restrict OutCoeffs)[2], + const HrtfParams *hrtfparams, + ALuint IrSize, ALuint Counter) +{ + ALuint c; + float32x4_t counter4; + { + float32x2_t counter2 = vdup_n_f32(-(float)Counter); + counter4 = vcombine_f32(counter2, counter2); + } + for(c = 0;c < IrSize;c += 2) + { + float32x4_t step4 = vld1q_f32((float32_t*)hrtfparams->CoeffStep[c]); + float32x4_t coeffs = vld1q_f32((float32_t*)hrtfparams->Coeffs[c]); + coeffs = vmlaq_f32(coeffs, step4, counter4); + vst1q_f32((float32_t*)OutCoeffs[c], coeffs); + } +} + static inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*restrict Values)[2], const ALuint IrSize, ALfloat (*restrict Coeffs)[2], |