mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-28 16:59:47 -05:00
Use new FIR decimation in FSK demodulator.
Reduces FIR calculation effort when output samples are skipped at FIR filter, not after.
This commit is contained in:
parent
86b068be62
commit
26c23dc8a0
@ -65,7 +65,7 @@ void FSKProcessor::execute(buffer_c8_t buffer) {
|
||||
|
||||
/* 153.6kHz complex<int16_t>[128]
|
||||
* -> FIR filter, <?kHz (?fs) pass, gain 1.0
|
||||
* -> 76.8kHz int16_t[64] */
|
||||
* -> 19.2kHz int16_t[16] */
|
||||
auto channel = channel_filter.execute(decimator_out, work_baseband_buffer);
|
||||
|
||||
/* 76.8kHz, 64 samples */
|
||||
@ -79,7 +79,7 @@ void FSKProcessor::execute(buffer_c8_t buffer) {
|
||||
// 76.8k
|
||||
|
||||
// TODO: Factor out this hidden decimation magic.
|
||||
for(size_t i=0; i<channel.count; i+=4) {
|
||||
for(size_t i=0; i<channel.count; i++) {
|
||||
// TODO: No idea why implicit cast int16_t->float is not allowed.
|
||||
const std::complex<float> sample {
|
||||
static_cast<float>(channel.p[i].real()),
|
||||
|
@ -55,7 +55,7 @@ private:
|
||||
|
||||
ChannelDecimator decimator { ChannelDecimator::DecimationFactor::By16 };
|
||||
const fir_taps_real<64>& channel_filter_taps = taps_64_lp_031_070_tfilter;
|
||||
dsp::decimate::FIRAndDecimateComplex channel_filter { channel_filter_taps.taps, 2 };
|
||||
dsp::decimate::FIRAndDecimateComplex channel_filter { channel_filter_taps.taps, 8 };
|
||||
|
||||
dsp::matched_filter::MatchedFilter mf { baseband::ais::rrc_taps_128_decim_4_p, 1 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user