aboutsummaryrefslogtreecommitdiffstats
path: root/alc/mixer
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-11-16 13:42:20 -0800
committerChris Robinson <[email protected]>2020-11-16 13:42:20 -0800
commit88cb398a836bb8b2d4038edcedff5167886e2d51 (patch)
tree8eff91dbda38c7bfcb4cbe7e0871fe7a2d71676d /alc/mixer
parent1869dc14d498be4dbe771a898b995ae6eb372083 (diff)
Avoid direct initialization of float32x4_t
Diffstat (limited to 'alc/mixer')
-rw-r--r--alc/mixer/mixer_neon.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp
index 1b6e7b54..fa7c142a 100644
--- a/alc/mixer/mixer_neon.cpp
+++ b/alc/mixer/mixer_neon.cpp
@@ -21,6 +21,16 @@ struct FastBSincTag;
namespace {
+inline float32x4_t set_f4(float l0, float l1, float l2, float l3)
+{
+ float32x4_t ret{};
+ ret = vsetq_lane_f32(l0, ret, 0);
+ ret = vsetq_lane_f32(l1, ret, 1);
+ ret = vsetq_lane_f32(l2, ret, 2);
+ ret = vsetq_lane_f32(l3, ret, 3);
+ return ret;
+}
+
constexpr ALuint FracPhaseBitDiff{MixerFracBits - BSincPhaseBits};
constexpr ALuint FracPhaseDiffOne{1 << FracPhaseBitDiff};
@@ -70,8 +80,8 @@ const float *Resample_<LerpTag,NEONTag>(const InterpState*, const float *RESTRIC
const int pos1{vgetq_lane_s32(pos4, 1)};
const int pos2{vgetq_lane_s32(pos4, 2)};
const int pos3{vgetq_lane_s32(pos4, 3)};
- const float32x4_t val1{src[pos0], src[pos1], src[pos2], src[pos3]};
- const float32x4_t val2{src[pos0+1], src[pos1+1], src[pos2+1], src[pos3+1]};
+ const float32x4_t val1{set_f4(src[pos0], src[pos1], src[pos2], src[pos3])};
+ const float32x4_t val2{set_f4(src[pos0+1], src[pos1+1], src[pos2+1], src[pos3+1])};
/* val1 + (val2-val1)*mu */
const float32x4_t r0{vsubq_f32(val2, val1)};