mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 22:52:27 -04:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -30,52 +30,50 @@
|
|||
#include <array>
|
||||
|
||||
class ChannelDecimator {
|
||||
public:
|
||||
enum class DecimationFactor {
|
||||
By2,
|
||||
By4,
|
||||
By8,
|
||||
By16,
|
||||
By32,
|
||||
};
|
||||
|
||||
constexpr ChannelDecimator(
|
||||
const DecimationFactor decimation_factor,
|
||||
const bool fs_over_4_downconvert = true
|
||||
) : decimation_factor { decimation_factor },
|
||||
fs_over_4_downconvert { fs_over_4_downconvert }
|
||||
{
|
||||
}
|
||||
public:
|
||||
enum class DecimationFactor {
|
||||
By2,
|
||||
By4,
|
||||
By8,
|
||||
By16,
|
||||
By32,
|
||||
};
|
||||
|
||||
void set_decimation_factor(const DecimationFactor f) {
|
||||
decimation_factor = f;
|
||||
}
|
||||
constexpr ChannelDecimator(
|
||||
const DecimationFactor decimation_factor,
|
||||
const bool fs_over_4_downconvert = true)
|
||||
: decimation_factor{decimation_factor},
|
||||
fs_over_4_downconvert{fs_over_4_downconvert} {
|
||||
}
|
||||
|
||||
buffer_c16_t execute(const buffer_c8_t& buffer) {
|
||||
auto decimated = execute_decimation(buffer);
|
||||
void set_decimation_factor(const DecimationFactor f) {
|
||||
decimation_factor = f;
|
||||
}
|
||||
|
||||
return decimated;
|
||||
}
|
||||
buffer_c16_t execute(const buffer_c8_t& buffer) {
|
||||
auto decimated = execute_decimation(buffer);
|
||||
|
||||
private:
|
||||
std::array<complex16_t, 1024> work_baseband { };
|
||||
return decimated;
|
||||
}
|
||||
|
||||
dsp::decimate::TranslateByFSOver4AndDecimateBy2CIC3 translate { };
|
||||
dsp::decimate::Complex8DecimateBy2CIC3 cic_0 { };
|
||||
dsp::decimate::DecimateBy2CIC3 cic_1 { };
|
||||
dsp::decimate::DecimateBy2CIC3 cic_2 { };
|
||||
dsp::decimate::DecimateBy2CIC3 cic_3 { };
|
||||
dsp::decimate::DecimateBy2CIC3 cic_4 { };
|
||||
private:
|
||||
std::array<complex16_t, 1024> work_baseband{};
|
||||
|
||||
DecimationFactor decimation_factor { DecimationFactor::By32 };
|
||||
const bool fs_over_4_downconvert { true };
|
||||
dsp::decimate::TranslateByFSOver4AndDecimateBy2CIC3 translate{};
|
||||
dsp::decimate::Complex8DecimateBy2CIC3 cic_0{};
|
||||
dsp::decimate::DecimateBy2CIC3 cic_1{};
|
||||
dsp::decimate::DecimateBy2CIC3 cic_2{};
|
||||
dsp::decimate::DecimateBy2CIC3 cic_3{};
|
||||
dsp::decimate::DecimateBy2CIC3 cic_4{};
|
||||
|
||||
buffer_c16_t execute_decimation(const buffer_c8_t& buffer);
|
||||
DecimationFactor decimation_factor{DecimationFactor::By32};
|
||||
const bool fs_over_4_downconvert{true};
|
||||
|
||||
buffer_c16_t execute_stage_0(
|
||||
const buffer_c8_t& buffer,
|
||||
const buffer_c16_t& work_baseband_buffer
|
||||
);
|
||||
buffer_c16_t execute_decimation(const buffer_c8_t& buffer);
|
||||
|
||||
buffer_c16_t execute_stage_0(
|
||||
const buffer_c8_t& buffer,
|
||||
const buffer_c16_t& work_baseband_buffer);
|
||||
};
|
||||
|
||||
#endif/*__CHANNEL_DECIMATOR_H__*/
|
||||
#endif /*__CHANNEL_DECIMATOR_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue