aboutsummaryrefslogtreecommitdiffstats
path: root/alc/mixer
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-16 01:47:33 -0700
committerChris Robinson <[email protected]>2020-04-16 01:47:33 -0700
commitdc41f276d8a7c6c870aebe6123b25e3de4a32545 (patch)
tree48b837e1cf5a233ab6921cb34867fd07464990ff /alc/mixer
parent5214a7210a2da6003d811a0f9707f417f8a7cbc5 (diff)
Get rid of the specialized MixRow_ methods
Diffstat (limited to 'alc/mixer')
-rw-r--r--alc/mixer/defs.h3
-rw-r--r--alc/mixer/mixer_c.cpp24
-rw-r--r--alc/mixer/mixer_neon.cpp31
-rw-r--r--alc/mixer/mixer_sse.cpp31
4 files changed, 0 insertions, 89 deletions
diff --git a/alc/mixer/defs.h b/alc/mixer/defs.h
index 6e270fb4..0f3a0f3d 100644
--- a/alc/mixer/defs.h
+++ b/alc/mixer/defs.h
@@ -18,9 +18,6 @@ const float *Resample_(const InterpState *state, const float *RESTRICT src, ALui
template<typename InstTag>
void Mix_(const al::span<const float> InSamples, const al::span<FloatBufferLine> OutBuffer,
float *CurrentGains, const float *TargetGains, const size_t Counter, const size_t OutPos);
-template<typename InstTag>
-void MixRow_(const al::span<float> OutBuffer, const al::span<const float> Gains,
- const float *InSamples, const size_t InStride);
template<typename InstTag>
void MixHrtf_(const float *InSamples, float2 *AccumSamples, const ALuint IrSize,
diff --git a/alc/mixer/mixer_c.cpp b/alc/mixer/mixer_c.cpp
index 716f2c4d..9858a4b4 100644
--- a/alc/mixer/mixer_c.cpp
+++ b/alc/mixer/mixer_c.cpp
@@ -196,27 +196,3 @@ void Mix_<CTag>(const al::span<const float> InSamples, const al::span<FloatBuffe
*(dst++) += *(in_iter++) * gain;
}
}
-
-/* Basically the inverse of the above. Rather than one input going to multiple
- * outputs (each with its own gain), it's multiple inputs (each with its own
- * gain) going to one output. This applies one row (vs one column) of a matrix
- * transform. And as the matrices are more or less static once set up, no
- * stepping is necessary.
- */
-template<>
-void MixRow_<CTag>(const al::span<float> OutBuffer, const al::span<const float> Gains,
- const float *InSamples, const size_t InStride)
-{
- for(const float gain : Gains)
- {
- const float *RESTRICT input{InSamples};
- InSamples += InStride;
-
- if(!(std::fabs(gain) > GAIN_SILENCE_THRESHOLD))
- continue;
-
- auto do_mix = [gain](const float cur, const float src) noexcept -> float
- { return cur + src*gain; };
- std::transform(OutBuffer.begin(), OutBuffer.end(), input, OutBuffer.begin(), do_mix);
- }
-}
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp
index 760ac58e..ee5b11a2 100644
--- a/alc/mixer/mixer_neon.cpp
+++ b/alc/mixer/mixer_neon.cpp
@@ -296,34 +296,3 @@ void Mix_<NEONTag>(const al::span<const float> InSamples, const al::span<FloatBu
*(dst++) += *(in_iter++) * gain;
}
}
-
-template<>
-void MixRow_<NEONTag>(const al::span<float> OutBuffer, const al::span<const float> Gains,
- const float *InSamples, const size_t InStride)
-{
- for(const float gain : Gains)
- {
- const float *RESTRICT input{InSamples};
- InSamples += InStride;
-
- if(!(std::fabs(gain) > GAIN_SILENCE_THRESHOLD))
- continue;
-
- auto out_iter = OutBuffer.begin();
- if(size_t todo{OutBuffer.size() >> 2})
- {
- const float32x4_t gain4{vdupq_n_f32(gain)};
- do {
- const float32x4_t val4 = vld1q_f32(input);
- float32x4_t dry4 = vld1q_f32(out_iter);
- dry4 = vmlaq_f32(dry4, val4, gain4);
- vst1q_f32(out_iter, dry4);
- out_iter += 4; input += 4;
- } while(--todo);
- }
-
- auto do_mix = [gain](const float cur, const float src) noexcept -> float
- { return cur + src*gain; };
- std::transform(out_iter, OutBuffer.end(), input, out_iter, do_mix);
- }
-}
diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp
index 3ec14541..db60776d 100644
--- a/alc/mixer/mixer_sse.cpp
+++ b/alc/mixer/mixer_sse.cpp
@@ -268,34 +268,3 @@ void Mix_<SSETag>(const al::span<const float> InSamples, const al::span<FloatBuf
*(dst++) += *(in_iter++) * gain;
}
}
-
-template<>
-void MixRow_<SSETag>(const al::span<float> OutBuffer, const al::span<const float> Gains,
- const float *InSamples, const size_t InStride)
-{
- for(const float gain : Gains)
- {
- const float *RESTRICT input{InSamples};
- InSamples += InStride;
-
- if(!(std::fabs(gain) > GAIN_SILENCE_THRESHOLD))
- continue;
-
- auto out_iter = OutBuffer.begin();
- if(size_t todo{OutBuffer.size() >> 2})
- {
- const __m128 gain4 = _mm_set1_ps(gain);
- do {
- const __m128 val4{_mm_load_ps(input)};
- __m128 dry4{_mm_load_ps(out_iter)};
- dry4 = _mm_add_ps(dry4, _mm_mul_ps(val4, gain4));
- _mm_store_ps(out_iter, dry4);
- out_iter += 4; input += 4;
- } while(--todo);
- }
-
- auto do_mix = [gain](const float cur, const float src) noexcept -> float
- { return cur + src*gain; };
- std::transform(out_iter, OutBuffer.end(), input, out_iter, do_mix);
- }
-}