1381 signed long freq_alpha = 0.04 * 65536;
1385 fail(
"Excessive oversampling");
1396 complex<T> *pin =
in.rd(), *pin0 = pin, *pend = pin +
chunk_size;
1418 #elif 1 // Linear by lookup-table. 1.2M on bench3bishs 1425 s.
re = (int)(p0r->re + (p1r->re - p0r->re) *
mu);
1426 s.im = (int)(p0r->im + (p1r->im - p0r->im) *
mu);
1428 #else // Linear floating-point, for reference 1430 float cosa0 = cosf(a0), sina0 = sinf(a0);
1432 p0r(((
float)pin[0].re - 128) * cosa0 - ((
float)pin[0].im - 128) * sina0,
1433 ((
float)pin[0].re - 128) * sina0 + ((
float)pin[0].im - 128) * cosa0);
1435 float cosa1 = cosf(a1), sina1 = sinf(a1);
1437 p1r(((
float)pin[1].re - 128) * cosa1 - ((
float)pin[1].im - 128) * sina1,
1438 ((
float)pin[1].re - 128) * sina1 + ((
float)pin[1].im - 128) * cosa1);
1439 s.re = (int)(128 + p0r.re + (p1r.re - p0r.re) *
mu);
1440 s.im = (int)(128 + p0r.im + (p1r.im - p0r.im) *
mu);
1444 int quadrant = symbol_arg >> 14;
1445 static unsigned char quadrant_to_symbol[4] = {0, 2, 3, 1};
1446 *pout = quadrant_to_symbol[quadrant];
1451 phase += (phase_error * freq_alpha + 32768) >> 16;
1452 freqw += (phase_error * freq_beta + 32768 * 256) >> 24;
1461 #define HIST_FLOAT 0 1463 hist[0].p.re = (float)s.re - 128;
1464 hist[0].p.im = (
float)s.im - 128;
1467 hist[0].c.re = (float)cp.re - 128;
1468 hist[0].c.im = (
float)cp.im - 128;
1482 float mucorr = muerr * gain_mu;
1483 const float max_mucorr = 0.1;
1485 if (mucorr < -max_mucorr)
1486 mucorr = -max_mucorr;
1487 if (mucorr > max_mucorr)
1488 mucorr = max_mucorr;
1499 in.read(pin - pin0);
1511 if (freqw < min_freqw || freqw >
max_freqw)
static const unsigned int chunk_size
static const int RLUT_BITS
struct leansdr::fast_qpsk_receiver::@9 hist[3]
pipewriter< cu8 > * cstln_out
unsigned long meas_decimation
u_angle fast_arg(const cu8 &c)
void written(unsigned long n)
struct leansdr::fast_qpsk_receiver::polar lut_polar[256][256]
std::complex< Fixed< IntType, IntBits > > polar(const Fixed< IntType, IntBits > &rho, const Fixed< IntType, IntBits > &theta)
pipewriter< hardsymbol > out
cu8 arg_to_symbol(u_angle a)
pipewriter< float > * freq_out
cu8 lut_rect[RLUT_ANGLES][256]