25 |
|
|
26 |
#include <math.h> |
#include <math.h> |
27 |
|
|
28 |
|
#include "../../common/global.h" |
29 |
|
|
30 |
/// ln(2) / 2 |
/// ln(2) / 2 |
31 |
#define LN_2_2 0.34657359f |
#define LN_2_2 0.34657359f |
32 |
|
|
123 |
return y; |
return y; |
124 |
} |
} |
125 |
|
|
126 |
|
#if ARCH_X86 |
127 |
// expects to find input in xmm0 (xmm0 stays unmodified) and finally leaves output in xmm6 |
// expects to find input in xmm0 (xmm0 stays unmodified) and finally leaves output in xmm6 |
128 |
inline void Apply4StepsSSE(biquad_param_t* param) { |
inline void Apply4StepsSSE(biquad_param_t* param) { |
129 |
__asm__ __volatile__ ( |
__asm__ __volatile__ ( |
210 |
"r" (¶m->b0) /* %2 */ |
"r" (¶m->b0) /* %2 */ |
211 |
); |
); |
212 |
} |
} |
213 |
|
#endif // ARCH_X86 |
214 |
|
|
215 |
inline bq_t ApplyFB(bq_t x, const bq_t fb) { |
inline bq_t ApplyFB(bq_t x, const bq_t fb) { |
216 |
bq_t y; |
bq_t y; |
242 |
return y; |
return y; |
243 |
} |
} |
244 |
|
|
245 |
|
#if ARCH_X86 |
246 |
// expects to find input in xmm0 (xmm0 stays unmodified) and finally leaves output in xmm7 |
// expects to find input in xmm0 (xmm0 stays unmodified) and finally leaves output in xmm7 |
247 |
inline void ApplyFB4StepsSSE(biquad_param_t* param, const bq_t &fb) { |
inline void ApplyFB4StepsSSE(biquad_param_t* param, const bq_t &fb) { |
248 |
float xs, ys; |
float xs, ys; |
439 |
); |
); |
440 |
} |
} |
441 |
}; |
}; |
442 |
|
#endif // ARCH_X86 |
443 |
|
|
444 |
class LowpassFilter : public BiquadFilter { |
class LowpassFilter : public BiquadFilter { |
445 |
public: |
public: |