aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-02-09 15:05:10 -0800
committerChris Robinson <[email protected]>2023-02-09 15:05:10 -0800
commit1564cfe48f681a75521b32dc908773caf4e8b79b (patch)
treebe0ca602693b62db8e0c8803845fe8a2d701c3f6
parentcf8c599ca0d5e5805da4d9f451b204c02370283e (diff)
Rename some variables for consistency
-rw-r--r--core/mixer/mixer_c.cpp19
-rw-r--r--core/mixer/mixer_neon.cpp14
-rw-r--r--core/mixer/mixer_sse.cpp14
3 files changed, 24 insertions, 23 deletions
diff --git a/core/mixer/mixer_c.cpp b/core/mixer/mixer_c.cpp
index f74ecff5..dc5045a8 100644
--- a/core/mixer/mixer_c.cpp
+++ b/core/mixer/mixer_c.cpp
@@ -21,11 +21,12 @@ struct FastBSincTag;
namespace {
-constexpr uint BsincPhaseBitDiff{MixerFracBits - BSincPhaseBits};
-constexpr uint BsincPhaseDiffOne{1 << BsincPhaseBitDiff};
+constexpr uint BsincPhaseDiffBits{MixerFracBits - BSincPhaseBits};
+constexpr uint BsincPhaseDiffOne{1 << BsincPhaseDiffBits};
+constexpr uint BsincPhaseDiffMask{BsincPhaseDiffOne - 1u};
-constexpr uint CubicPhaseBitDiff{MixerFracBits - CubicPhaseBits};
-constexpr uint CubicPhaseDiffOne{1 << CubicPhaseBitDiff};
+constexpr uint CubicPhaseDiffBits{MixerFracBits - CubicPhaseBits};
+constexpr uint CubicPhaseDiffOne{1 << CubicPhaseDiffBits};
constexpr uint CubicPhaseDiffMask{CubicPhaseDiffOne - 1u};
inline float do_point(const InterpState&, const float *RESTRICT vals, const uint)
@@ -35,7 +36,7 @@ inline float do_lerp(const InterpState&, const float *RESTRICT vals, const uint
inline float do_cubic(const InterpState &istate, const float *RESTRICT vals, const uint frac)
{
/* Calculate the phase index and factor. */
- const uint pi{frac >> CubicPhaseBitDiff};
+ const uint pi{frac >> CubicPhaseDiffBits};
const float pf{static_cast<float>(frac&CubicPhaseDiffMask) * (1.0f/CubicPhaseDiffOne)};
const float *RESTRICT fil{al::assume_aligned<16>(istate.cubic.filter[pi].mCoeffs)};
@@ -51,8 +52,8 @@ inline float do_bsinc(const InterpState &istate, const float *RESTRICT vals, con
ASSUME(m > 0);
/* Calculate the phase index and factor. */
- const uint pi{frac >> BsincPhaseBitDiff};
- const float pf{static_cast<float>(frac & (BsincPhaseDiffOne-1)) * (1.0f/BsincPhaseDiffOne)};
+ const uint pi{frac >> BsincPhaseDiffBits};
+ const float pf{static_cast<float>(frac&BsincPhaseDiffMask) * (1.0f/BsincPhaseDiffOne)};
const float *RESTRICT fil{istate.bsinc.filter + m*pi*2};
const float *RESTRICT phd{fil + m};
@@ -71,8 +72,8 @@ inline float do_fastbsinc(const InterpState &istate, const float *RESTRICT vals,
ASSUME(m > 0);
/* Calculate the phase index and factor. */
- const uint pi{frac >> BsincPhaseBitDiff};
- const float pf{static_cast<float>(frac & (BsincPhaseDiffOne-1)) * (1.0f/BsincPhaseDiffOne)};
+ const uint pi{frac >> BsincPhaseDiffBits};
+ const float pf{static_cast<float>(frac&BsincPhaseDiffMask) * (1.0f/BsincPhaseDiffOne)};
const float *RESTRICT fil{istate.bsinc.filter + m*pi*2};
const float *RESTRICT phd{fil + m};
diff --git a/core/mixer/mixer_neon.cpp b/core/mixer/mixer_neon.cpp
index e636ac74..3519a92f 100644
--- a/core/mixer/mixer_neon.cpp
+++ b/core/mixer/mixer_neon.cpp
@@ -24,12 +24,12 @@ struct FastBSincTag;
namespace {
-constexpr uint BSincPhaseBitDiff{MixerFracBits - BSincPhaseBits};
-constexpr uint BSincPhaseDiffOne{1 << BSincPhaseBitDiff};
+constexpr uint BSincPhaseDiffBits{MixerFracBits - BSincPhaseBits};
+constexpr uint BSincPhaseDiffOne{1 << BSincPhaseDiffBits};
constexpr uint BSincPhaseDiffMask{BSincPhaseDiffOne - 1u};
-constexpr uint CubicPhaseBitDiff{MixerFracBits - CubicPhaseBits};
-constexpr uint CubicPhaseDiffOne{1 << CubicPhaseBitDiff};
+constexpr uint CubicPhaseDiffBits{MixerFracBits - CubicPhaseBits};
+constexpr uint CubicPhaseDiffOne{1 << CubicPhaseDiffBits};
constexpr uint CubicPhaseDiffMask{CubicPhaseDiffOne - 1u};
inline float32x4_t set_f4(float l0, float l1, float l2, float l3)
@@ -199,7 +199,7 @@ float *Resample_<CubicTag,NEONTag>(const InterpState *state, float *RESTRICT src
src -= 1;
for(float &out_sample : dst)
{
- const uint pi{frac >> CubicPhaseBitDiff};
+ const uint pi{frac >> CubicPhaseDiffBits};
const float pf{static_cast<float>(frac&CubicPhaseDiffMask) * (1.0f/CubicPhaseDiffOne)};
const float32x4_t pf4{vdupq_n_f32(pf)};
@@ -234,7 +234,7 @@ float *Resample_<BSincTag,NEONTag>(const InterpState *state, float *RESTRICT src
for(float &out_sample : dst)
{
// Calculate the phase index and factor.
- const uint pi{frac >> BSincPhaseBitDiff};
+ const uint pi{frac >> BSincPhaseDiffBits};
const float pf{static_cast<float>(frac&BSincPhaseDiffMask) * (1.0f/BSincPhaseDiffOne)};
// Apply the scale and phase interpolated filter.
@@ -280,7 +280,7 @@ float *Resample_<FastBSincTag,NEONTag>(const InterpState *state, float *RESTRICT
for(float &out_sample : dst)
{
// Calculate the phase index and factor.
- const uint pi{frac >> BSincPhaseBitDiff};
+ const uint pi{frac >> BSincPhaseDiffBits};
const float pf{static_cast<float>(frac&BSincPhaseDiffMask) * (1.0f/BSincPhaseDiffOne)};
// Apply the phase interpolated filter.
diff --git a/core/mixer/mixer_sse.cpp b/core/mixer/mixer_sse.cpp
index 4a31a0f1..e011dfcd 100644
--- a/core/mixer/mixer_sse.cpp
+++ b/core/mixer/mixer_sse.cpp
@@ -23,12 +23,12 @@ struct FastBSincTag;
namespace {
-constexpr uint BSincPhaseBitDiff{MixerFracBits - BSincPhaseBits};
-constexpr uint BSincPhaseDiffOne{1 << BSincPhaseBitDiff};
+constexpr uint BSincPhaseDiffBits{MixerFracBits - BSincPhaseBits};
+constexpr uint BSincPhaseDiffOne{1 << BSincPhaseDiffBits};
constexpr uint BSincPhaseDiffMask{BSincPhaseDiffOne - 1u};
-constexpr uint CubicPhaseBitDiff{MixerFracBits - CubicPhaseBits};
-constexpr uint CubicPhaseDiffOne{1 << CubicPhaseBitDiff};
+constexpr uint CubicPhaseDiffBits{MixerFracBits - CubicPhaseBits};
+constexpr uint CubicPhaseDiffOne{1 << CubicPhaseDiffBits};
constexpr uint CubicPhaseDiffMask{CubicPhaseDiffOne - 1u};
#define MLA4(x, y, z) _mm_add_ps(x, _mm_mul_ps(y, z))
@@ -162,7 +162,7 @@ float *Resample_<CubicTag,SSETag>(const InterpState *state, float *RESTRICT src,
src -= 1;
for(float &out_sample : dst)
{
- const uint pi{frac >> CubicPhaseBitDiff};
+ const uint pi{frac >> CubicPhaseDiffBits};
const float pf{static_cast<float>(frac&CubicPhaseDiffMask) * (1.0f/CubicPhaseDiffOne)};
const __m128 pf4{_mm_set1_ps(pf)};
@@ -198,7 +198,7 @@ float *Resample_<BSincTag,SSETag>(const InterpState *state, float *RESTRICT src,
for(float &out_sample : dst)
{
// Calculate the phase index and factor.
- const uint pi{frac >> BSincPhaseBitDiff};
+ const uint pi{frac >> BSincPhaseDiffBits};
const float pf{static_cast<float>(frac&BSincPhaseDiffMask) * (1.0f/BSincPhaseDiffOne)};
// Apply the scale and phase interpolated filter.
@@ -245,7 +245,7 @@ float *Resample_<FastBSincTag,SSETag>(const InterpState *state, float *RESTRICT
for(float &out_sample : dst)
{
// Calculate the phase index and factor.
- const uint pi{frac >> BSincPhaseBitDiff};
+ const uint pi{frac >> BSincPhaseDiffBits};
const float pf{static_cast<float>(frac&BSincPhaseDiffMask) * (1.0f/BSincPhaseDiffOne)};
// Apply the phase interpolated filter.