diff options
author | Chris Robinson <[email protected]> | 2020-04-01 23:17:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-04-02 00:49:19 -0700 |
commit | 8853519d896f11b678873f0afacac16b3cdebc27 (patch) | |
tree | 319fd5c5a5978e7790bbd22844c9e218b2bbe10e /common/bsinc_defs.h | |
parent | 6fb59f1182965a0e1e45d60e81e3ff02db45944c (diff) |
Generate the bsinc tables using constexpr methods
All the methods used should be compliant with C++14 constexpr rules. However,
the number of scales and phases cause GenerateBSincCoeffs to reach the allowed
step limit, preventing full compile-time generation. It's not a terribly big
deal, it'll generate them very quickly when loading, but it does prevent using
shared read-only memory pages.
Diffstat (limited to 'common/bsinc_defs.h')
-rw-r--r-- | common/bsinc_defs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/bsinc_defs.h b/common/bsinc_defs.h new file mode 100644 index 00000000..30d1219e --- /dev/null +++ b/common/bsinc_defs.h @@ -0,0 +1,13 @@ +#ifndef BSINC_DEFS_H +#define BSINC_DEFS_H + +/* The number of distinct scale and phase intervals within the filter table. */ +#define BSINC_SCALE_BITS 4 +#define BSINC_SCALE_COUNT (1<<BSINC_SCALE_BITS) +#define BSINC_PHASE_BITS 5 +#define BSINC_PHASE_COUNT (1<<BSINC_PHASE_BITS) + +/* The maximum number of sample points for the bsinc filters. */ +#define BSINC_POINTS_MAX 48 + +#endif /* BSINC_DEFS_H */ |