diff options
author | Chris Robinson <[email protected]> | 2023-10-14 11:15:32 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-10-14 11:44:32 -0700 |
commit | d157cf4154dd7a078ac534cd6bbd0f762c23eaaf (patch) | |
tree | 2be748440b9663fe4565c0de740e14ffe893e731 /common | |
parent | d3d23579add16fbe3c21f2b436457f398f0f5254 (diff) |
Use a split filter for the FIR-based UHJ encoders
This applies the all-pass filter in two steps, first as a relatively short
time-domain FIR filter, then as a series of frequency domain convolutions
(using complex multiplies). Time-domain convolution scales poorly, so larger
convolutions benefit from being done in the frequency domain (though the first
part is still done in the time domain, to avoid longer delays).
Diffstat (limited to 'common')
-rw-r--r-- | common/phase_shifter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/phase_shifter.h b/common/phase_shifter.h index b9c889c2..e1a83dab 100644 --- a/common/phase_shifter.h +++ b/common/phase_shifter.h @@ -15,6 +15,8 @@ #include "alspan.h" +struct NoInit { }; + /* Implements a wide-band +90 degree phase-shift. Note that this should be * given one sample less of a delay (FilterSize/2 - 1) compared to the direct * signal delay (FilterSize/2) to properly align. @@ -71,6 +73,8 @@ struct PhaseShifterT { } } + PhaseShifterT(NoInit) { } + void process(al::span<float> dst, const float *RESTRICT src) const; private: |