diff options
author | Chris Robinson <[email protected]> | 2017-08-16 02:45:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-08-16 02:45:25 -0700 |
commit | f9c09cc845b786705b43b39300d8706db7ab0054 (patch) | |
tree | 7cbc0b883b916c971390cf48fe2a76199267a1c9 /Alc/mixer_c.c | |
parent | 520dd5c77972cad13d1a97e228903b3c5bdc384f (diff) |
Simplify bsinc filter storage in the filter state
Rather than storing individual pointers to filter, scale delta, phase delta,
and scale phase delta entries, per phase index, the new table layout makes it
trivial to access the per-phase filter and delta entries given the base offset
and coefficient count.
Diffstat (limited to 'Alc/mixer_c.c')
-rw-r--r-- | Alc/mixer_c.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c index 87f2fe90..6d616cbf 100644 --- a/Alc/mixer_c.c +++ b/Alc/mixer_c.c @@ -57,6 +57,7 @@ const ALfloat *Resample_bsinc32_C(const InterpState *state, const ALfloat *restr ALsizei dstlen) { const ALfloat *fil, *scd, *phd, *spd; + const ALfloat *filter = state->bsinc.filter; const ALfloat sf = state->bsinc.sf; const ALsizei m = state->bsinc.m; ALsizei j_f, pi, i; @@ -71,10 +72,10 @@ const ALfloat *Resample_bsinc32_C(const InterpState *state, const ALfloat *restr pf = (frac & ((1<<FRAC_PHASE_BITDIFF)-1)) * (1.0f/(1<<FRAC_PHASE_BITDIFF)); #undef FRAC_PHASE_BITDIFF - fil = ASSUME_ALIGNED(state->bsinc.coeffs[pi].filter, 16); - scd = ASSUME_ALIGNED(state->bsinc.coeffs[pi].scDelta, 16); - phd = ASSUME_ALIGNED(state->bsinc.coeffs[pi].phDelta, 16); - spd = ASSUME_ALIGNED(state->bsinc.coeffs[pi].spDelta, 16); + fil = ASSUME_ALIGNED(filter + m*pi*4, 16); + scd = ASSUME_ALIGNED(fil + m, 16); + phd = ASSUME_ALIGNED(scd + m, 16); + spd = ASSUME_ALIGNED(phd + m, 16); // Apply the scale and phase interpolated filter. r = 0.0f; |