13 #define M_PI 3.14159265358979323846 18 enum {
NONE, BLACKMAN, HAMMING, HANNING};
21 typedef std::complex<float>
cmplx;
23 fftfilt(
float f1,
float f2,
int len);
28 void create_filter(
float f1,
float f2);
29 void create_dsb_filter(
float f2);
30 void create_asym_filter(
float fopp,
float fin);
31 void create_rrc_filter(
float fb,
float a);
33 int noFilt(
const cmplx& in, cmplx **out);
34 int runFilt(
const cmplx& in, cmplx **out);
35 int runSSB(
const cmplx& in, cmplx **out,
bool usb,
bool getDC =
true);
36 int runDSB(
const cmplx& in, cmplx **out,
bool getDC =
true);
37 int runAsym(
const cmplx & in, cmplx **out,
bool usb);
52 inline float fsinc(
float fc,
int i,
int len)
55 return (i == len2) ? 2.0 * fc:
56 sin(2 *
M_PI * fc * (i - len2)) / (
M_PI * (i - len2));
62 0.50 *
cos(2.0 *
M_PI * i / len) +
63 0.08 *
cos(4.0 *
M_PI * i / len));
68 inline cmplx
frrc(
float fb,
float a,
int i,
int len)
70 float x = i/(float)len;
80 float y = ((x-(fb-tr)) / (2.0*tr))*
M_PI;
81 return (
cos(y) + 1.0f)/2.0f;
90 void init_dsb_filter();
99 typedef std::complex<float>
cmplx;
102 void run(
const cmplx& input);
103 void fetch(
float *result);
Fixed< IntType, IntBits > cos(Fixed< IntType, IntBits > const &x)
vrot_bins_pair * vrot_bins
cmplx frrc(float fb, float a, int i, int len)
float _blackman(int i, int len)
float fsinc(float fc, int i, int len)
std::complex< float > cmplx
Fixed< IntType, IntBits > sin(Fixed< IntType, IntBits > const &x)
std::complex< float > cmplx