HRTF cleanup

This commit is contained in:
Ken Cooke 2017-10-29 18:01:43 -07:00
parent 6ba2a83bbe
commit a99b1ffa23
2 changed files with 3 additions and 14 deletions

View file

@ -673,8 +673,8 @@ static void crossfade_4x2(float* src, float* dst, const float* win, int numFrame
// linear interpolation with gain
static void interpolate(float* dst, const float* src0, const float* src1, float frac, float gain) {
float f0 = HRTF_GAIN * gain * (1.0f - frac);
float f1 = HRTF_GAIN * gain * frac;
float f0 = gain * (1.0f - frac);
float f1 = gain * frac;
for (int k = 0; k < HRTF_TAPS; k++) {
dst[k] = f0 * src0[k] + f1 * src1[k];

View file

@ -9,7 +9,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#if defined(__AVX512F__)
#ifdef __AVX512F__
#include <assert.h>
#include <immintrin.h>
@ -87,15 +87,4 @@ void FIR_1x4_AVX512(float* src, float* dst0, float* dst1, float* dst2, float* ds
_mm256_zeroupper();
}
// FIXME: this fallback can be removed, once we require VS2017
#elif defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__x86_64__)
#include "../AudioHRTF.h"
void FIR_1x4_AVX2(float* src, float* dst0, float* dst1, float* dst2, float* dst3, float coef[4][HRTF_TAPS], int numFrames);
void FIR_1x4_AVX512(float* src, float* dst0, float* dst1, float* dst2, float* dst3, float coef[4][HRTF_TAPS], int numFrames) {
FIR_1x4_AVX2(src, dst0, dst1, dst2, dst3, coef, numFrames);
}
#endif