From c833af9ecd6ed51fcfacc42bbdad16175b882279 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 29 Sep 2019 23:39:04 -0700 Subject: Repack the bsinc resamplers coefficients This puts the base coefficients and the phase deltas next to each other. This improves caching, as the base and phase deltas are always used together while the scales are only used for the non-fast versions. --- alc/mixer/mixer_c.cpp | 8 ++++---- alc/mixer/mixer_neon.cpp | 8 ++++---- alc/mixer/mixer_sse.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'alc') diff --git a/alc/mixer/mixer_c.cpp b/alc/mixer/mixer_c.cpp index fafda70d..f2164f53 100644 --- a/alc/mixer/mixer_c.cpp +++ b/alc/mixer/mixer_c.cpp @@ -31,9 +31,9 @@ inline ALfloat do_bsinc(const InterpState &istate, const ALfloat *RESTRICT vals, #undef FRAC_PHASE_BITDIFF const ALfloat *fil{istate.bsinc.filter + m*pi*4}; - const ALfloat *scd{fil + m}; - const ALfloat *phd{scd + m}; - const ALfloat *spd{phd + m}; + const ALfloat *phd{fil + m}; + const ALfloat *scd{phd + m}; + const ALfloat *spd{scd + m}; // Apply the scale and phase interpolated filter. ALfloat r{0.0f}; @@ -53,7 +53,7 @@ inline ALfloat do_fastbsinc(const InterpState &istate, const ALfloat *RESTRICT v #undef FRAC_PHASE_BITDIFF const ALfloat *fil{istate.bsinc.filter + m*pi*4}; - const ALfloat *phd{fil + m*2}; + const ALfloat *phd{fil + m}; // Apply the phase interpolated filter. ALfloat r{0.0f}; diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp index 178c7d6e..75faa61f 100644 --- a/alc/mixer/mixer_neon.cpp +++ b/alc/mixer/mixer_neon.cpp @@ -91,9 +91,9 @@ const ALfloat *Resample_(const InterpState *state, const ALflo { const float32x4_t pf4{vdupq_n_f32(pf)}; const float *fil{filter + m*pi*4}; - const float *scd{fil + m}; - const float *phd{scd + m}; - const float *spd{phd + m}; + const float *phd{fil + m}; + const float *scd{phd + m}; + const float *spd{scd + m}; size_t td{m >> 2}; size_t j{0u}; @@ -140,7 +140,7 @@ const ALfloat *Resample_(const InterpState *state, { const float32x4_t pf4{vdupq_n_f32(pf)}; const float *fil{filter + m*pi*4}; - const float *phd{fil + m*2}; + const float *phd{fil + m}; size_t td{m >> 2}; size_t j{0u}; diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp index 002d6064..84f651d1 100644 --- a/alc/mixer/mixer_sse.cpp +++ b/alc/mixer/mixer_sse.cpp @@ -36,9 +36,9 @@ const ALfloat *Resample_(const InterpState *state, const ALfloa { const __m128 pf4{_mm_set1_ps(pf)}; const float *fil{filter + m*pi*4}; - const float *scd{fil + m}; - const float *phd{scd + m}; - const float *spd{phd + m}; + const float *phd{fil + m}; + const float *scd{phd + m}; + const float *spd{scd + m}; size_t td{m >> 2}; size_t j{0u}; @@ -88,7 +88,7 @@ const ALfloat *Resample_(const InterpState *state, { const __m128 pf4{_mm_set1_ps(pf)}; const float *fil{filter + m*pi*4}; - const float *phd{fil + m*2}; + const float *phd{fil + m}; size_t td{m >> 2}; size_t j{0u}; -- cgit v1.2.3