diff options
author | Chris Robinson <[email protected]> | 2023-02-06 17:46:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-02-06 17:46:32 -0800 |
commit | da845ddd9c35a1e1fcff03ea342636ae4bb8018b (patch) | |
tree | 8fe219826036410c655b7c732e94f04b442c3261 /core/cubic_defs.h | |
parent | 0de7ea42fa197833bff70b4c370ed29f9859889d (diff) |
Use an interpolated FIR filter for cubic resampling
Similar to how the bsinc filters work, but optimized for 4-point filtering. At
least the SSE version is notably faster than calculating the coefficients in
real time.
Diffstat (limited to 'core/cubic_defs.h')
-rw-r--r-- | core/cubic_defs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/cubic_defs.h b/core/cubic_defs.h new file mode 100644 index 00000000..33751c97 --- /dev/null +++ b/core/cubic_defs.h @@ -0,0 +1,13 @@ +#ifndef CORE_CUBIC_DEFS_H +#define CORE_CUBIC_DEFS_H + +/* The number of distinct phase intervals within the cubic filter tables. */ +constexpr unsigned int CubicPhaseBits{5}; +constexpr unsigned int CubicPhaseCount{1 << CubicPhaseBits}; + +struct CubicCoefficients { + float mCoeffs[4]; + float mDeltas[4]; +}; + +#endif /* CORE_CUBIC_DEFS_H */ |