39 #include <sys/types.h> 113 bool b_lowpass, b_highpass;
114 b_lowpass = (f2 != 0);
115 b_highpass = (f1 != 0);
127 if (b_highpass && f2 < f1)
136 float scale = 0, mag;
139 if (mag > scale) scale = mag;
161 float scale = 0, mag;
164 if (mag > scale) scale = mag;
188 float scale = 0, mag;
191 if (mag > scale) scale = mag;
213 if (mag > scale) scale = mag;
226 for (
int i = 0;
i <
flen;
i++) {
231 float scale = 0, mag;
241 for (
int i = 0;
i <
flen;
i++) {
413 delay =
new cmplx[len];
418 double phi = 0.0, tau = 2.0 *
M_PI/ len;
420 for (
int i = 0;
i < len;
i++) {
423 delay[
i] = vrot_bins[
i].bins = 0.0;
439 cmplx & de = delay[ptr];
440 const cmplx z( input.real() - k2 * de.real(), input.imag() - k2 * de.imag());
446 for (
vrot_bins_pair *itr = vrot_bins + first, *end = vrot_bins + last; itr != end ; ++itr)
447 itr->bins = (itr->bins + z) * itr->vrot;
453 for (
vrot_bins_pair *itr = vrot_bins, *end = vrot_bins + last; itr != end; ++itr, ++result)
454 *result = itr->bins.real() * itr->bins.real()
455 + itr->bins.imag() * itr->bins.imag();
Fixed< IntType, IntBits > cos(Fixed< IntType, IntBits > const &x)
cmplx frrc(float fb, float a, int i, int len)
fftfilt(float f1, float f2, int len)
void InverseComplexFFT(std::complex< FFT_TYPE > *buf)
int runFilt(const cmplx &in, cmplx **out)
Fixed< IntType, IntBits > abs(Fixed< IntType, IntBits > const &x)
float _blackman(int i, int len)
float fsinc(float fc, int i, int len)
std::complex< float > cmplx
void ComplexFFT(std::complex< FFT_TYPE > *buf)
int noFilt(const cmplx &in, cmplx **out)
void fetch(float *result)
void run(const cmplx &input)
void create_filter(float f1, float f2)
Fixed< IntType, IntBits > sin(Fixed< IntType, IntBits > const &x)
void create_rrc_filter(float fb, float a)
root raised cosine. fb is half the band pass
int runSSB(const cmplx &in, cmplx **out, bool usb, bool getDC=true)
void create_asym_filter(float fopp, float fin)
two different filters for in band and opposite band
std::complex< float > cmplx
int runDSB(const cmplx &in, cmplx **out, bool getDC=true)
void create_dsb_filter(float f2)
int runAsym(const cmplx &in, cmplx **out, bool usb)
Asymmetrical fitering can be used for vestigial sideband.