diff options
author | Chris Robinson <[email protected]> | 2018-01-07 05:32:07 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-07 05:32:07 -0800 |
commit | 4cc1c646466737ba411aa23ce4a6116936ada8c2 (patch) | |
tree | 796fc698eb910630ac5f398fe38f26aef2cd456c /Alc/mixer.c | |
parent | 0e1fd34c89d8f09f68c2c243ceccd0dab4f7c6c0 (diff) |
Replace the sinc4 resampler with cubic
Turns out the C version of the cubic resampler is just slightly faster than
even the SSE3 version of the FIR4 resampler. This is likely due to not using a
64KB random-access lookup table along with unaligned loads, both offseting the
gains from SSE.
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r-- | Alc/mixer.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index 5d6d14d7..a7f0f302 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -128,19 +128,7 @@ ResamplerFunc SelectResampler(enum Resampler resampler) #endif return Resample_lerp_C; case FIR4Resampler: -#ifdef HAVE_NEON - if((CPUCapFlags&CPU_CAP_NEON)) - return Resample_fir4_Neon; -#endif -#ifdef HAVE_SSE4_1 - if((CPUCapFlags&CPU_CAP_SSE4_1)) - return Resample_fir4_SSE41; -#endif -#ifdef HAVE_SSE3 - if((CPUCapFlags&CPU_CAP_SSE3)) - return Resample_fir4_SSE3; -#endif - return Resample_fir4_C; + return Resample_cubic_C; case BSinc12Resampler: case BSinc24Resampler: #ifdef HAVE_NEON @@ -168,7 +156,7 @@ void aluInitMixer(void) ResamplerDefault = PointResampler; else if(strcasecmp(str, "linear") == 0) ResamplerDefault = LinearResampler; - else if(strcasecmp(str, "sinc4") == 0) + else if(strcasecmp(str, "cubic") == 0) ResamplerDefault = FIR4Resampler; else if(strcasecmp(str, "bsinc12") == 0) ResamplerDefault = BSinc12Resampler; @@ -179,9 +167,9 @@ void aluInitMixer(void) WARN("Resampler option \"%s\" is deprecated, using bsinc12\n", str); ResamplerDefault = BSinc12Resampler; } - else if(strcasecmp(str, "cubic") == 0 || strcasecmp(str, "sinc8") == 0) + else if(strcasecmp(str, "sinc4") == 0 || strcasecmp(str, "sinc8") == 0) { - WARN("Resampler option \"%s\" is deprecated, using sinc4\n", str); + WARN("Resampler option \"%s\" is deprecated, using cubic\n", str); ResamplerDefault = FIR4Resampler; } else |