28 # define M_PI 3.14159265358979323846 34 static const int SIZE_RSPACKET = 204;
35 static const int MPEG_SYNC = 0x47;
36 static const int MPEG_SYNC_INV = (MPEG_SYNC ^ 0xff);
37 static const int MPEG_SYNC_CORRUPTED = 0x55;
76 static const int DVBS_G1 = 0171;
77 static const int DVBS_G2 = 0133;
114 template <
typename Tbyte, Tbyte BYTE_ERASED>
126 out(_out, SIZE_RSPACKET),
139 for (
int i = 0;
i < 2; ++
i)
163 for (; x; ++n, x >>= 1)
170 int sbits =
log2(s) + 1;
172 unsigned char state = 0;
174 for (
int b = sbits - 1; b >= 0; --b)
176 unsigned char bit = (s >> b) & 1;
177 state = (state >> 1) | (bit << 6);
179 for (
int j = 0; j <
nG; ++j)
198 fail(
"Bug: next_sync() called with fastlock");
219 void solve_rec(iq_t prefix,
unsigned int nprefix, signal_t
exp, iq_t *best)
223 if (nprefix >
sizeof(prefix) * 8)
230 if (
parity(prefix & response[b]) != ((exp >> b) & 1))
233 if ((response[b] >> nprefix) == 0)
246 solve_rec(prefix, nprefix + 1, exp, best);
247 solve_rec(prefix | ((iq_t)1 << nprefix), nprefix + 1, exp, best);
254 for (
int sbit = 0; sbit <
maxsbits; ++sbit)
256 response[sbit] =
convolve((iq_t)1 << sbit);
270 if (d == 0x00000000000003baLL)
271 d2 = 0x0000000000038ccaLL;
273 if (d == 0x0000000000000f29LL)
274 d2 = 0x000000003c569329LL;
275 if (d == 0x000000000003c552LL)
276 d2 = 0x00000000001dee1cLL;
277 if (d == 0x0000000000007948LL)
278 d2 = 0x00000001e2b49948LL;
279 if (d == 0x00000000000001deLL)
280 d2 = 0x00000000001e2a90LL;
282 if (d == 0x000000000000f247LL)
283 d2 = 0x000000000fd6383bLL;
284 if (d == 0x00000000000fd9eeLL)
285 d2 = 0x000000000fd91392LL;
286 if (d == 0x0000000000f248d8LL)
287 d2 = 0x00000000fd9eef18LL;
289 if (d == 0x0000000000f5727fLL)
290 d2 = 0x000003d5c909758fLL;
291 if (d == 0x000000003d5c90aaLL)
292 d2 = 0x0f5727f0229c90aaLL;
293 if (d == 0x000000003daa371cLL)
294 d2 = 0x000003d5f45630ecLL;
295 if (d == 0x0000000f5727ff48LL)
296 d2 = 0x0000f57d28260348LL;
297 if (d == 0x0000000f57d28260LL)
298 d2 = 0xf5727ff48128260LL;
300 if (d == 0x0000fbeac76c454fLL)
301 d2 = 0x00fb11d6ba045a8fLL;
302 if (d == 0x00000000fb11d6baLL)
303 d2 = 0xfbea3c7d930e16baLL;
304 if (d == 0x0000fb112d5038dcLL)
305 d2 = 0x00fb112d5038271cLL;
306 if (d == 0x000000fbea3c7d68LL)
307 d2 = 0x00fbeac7975462a8LL;
308 if (d == 0x00000000fb112d50LL)
309 d2 = 0x00fbea3c86793290LL;
310 if (d == 0x0000fb112dabd2e0LL)
311 d2 = 0x00fb112d50c3cd20LL;
312 if (d == 0x00000000fb11d640LL)
313 d2 = 0x00fbea3c8679c980LL;
315 fail(
"Alt polynomial not provided");
323 fprintf(stderr,
"deconv[%d]=0x%016llx %d taps / %d bits\n",
333 iq_t iq =
convolve((iq_t)1 << (LATENCY +
i));
334 int expect = (b ==
i) ? 1 : 0;
337 fail(
"Failed to inverse convolutional coding");
340 fail(
"Failed to inverse convolutional coding (alt)");
343 if (traceback >
sizeof(iq_t) * 8)
344 fail(
"Bug: traceback exceeds register size");
346 fail(
"traceback insufficient for deconvolution");
348 fail(
"traceback insufficient for deconvolution (alt)");
371 for (
int sync_id = 0; sync_id <
NSYNCS; ++sync_id)
373 for (
int re_pos = 0; re_pos <= 1; ++re_pos)
375 for (
int im_pos = 0; im_pos <= 1; ++im_pos)
377 int re_neg = !re_pos;
417 syncs[sync_id].
lut[re_pos][im_pos] = (I << 1) | Q;
441 while (s->n_in < traceback)
445 iq = (iq << 2) | iqbits;
454 s->out = (s->out << 1) | bit;
461 Tbyte res = (s->out >> (s->n_out - 8)) & 255;
468 unsigned long res = 0;
470 while (s->n_out2 < 8)
474 while (s->n_in2 < traceback)
478 iq = (iq << 2) | iqbits;
506 if (
in.readable() < 64)
510 int maxwr =
out.writable();
511 int n = (maxrd < maxwr) ? maxrd : maxwr;
524 long errors_best = 1 << 30;
525 sync_t *best = &
syncs[0];
532 for (
int c = n; c--;)
535 if (errors < errors_best)
537 errors_best = errors;
554 if (errors_best > n * 8 / 3)
562 Tbyte *pout =
out.wr(), *pout0 = pout;
570 out.written(pout - pout0);
595 static const uint16_t polys_fec12[] = {
600 static const uint16_t polys_fec23[] = {
606 static const uint16_t polys_fec46[] = {
609 DVBS_G1 << 2, DVBS_G2 << 2,
613 static const uint16_t polys_fec34[] = {
620 static const uint16_t polys_fec45[] = {
629 static const uint16_t polys_fec56[] = {
638 static const uint16_t polys_fec78[] = {
650 static struct fec_spec
675 int bits_per_symbol) :
runnable(sch,
"dvb_convol"),
679 fec_spec *fs = &fec_specs[fec];
682 fail(
"Unexpected FEC");
684 convol.bits_in = fs->bits_in;
685 convol.bits_out = fs->bits_out;
686 convol.polys = fs->polys;
687 convol.bps = bits_per_symbol;
690 if (convol.bits_out % convol.bps)
691 fail(
"Code rate not suitable for this constellation");
696 int count =
min(
in.readable(),
out.writable() * convol.bps / convol.bits_out * convol.bits_in / 8);
698 int chunk = convol.bits_in;
699 count = (count / chunk) * chunk;
700 convol.encode(
in.rd(),
out.wr(), count);
702 int nout = count * 8 / convol.bits_in * convol.bits_out / convol.bps;
718 template <
typename Tin>
723 static const int chunk_size = 64;
730 out(_out, chunk_size),
739 while (
in.readable() >= chunk_size * 8 &&
out.writable() >= chunk_size)
741 int errors_best = 1 << 30;
746 if (resync_phase != 0 && s !=
locked)
751 static decoded_byte dummy[chunk_size];
752 decoded_byte *pout = (s ==
locked) ?
out.wr() : dummy;
753 int nerrors = s->deconv.run(pin, s->lut, pout, chunk_size);
755 if (nerrors < errors_best)
757 errors_best = nerrors;
762 in.read(chunk_size * 8);
763 out.written(chunk_size);
768 fprintf(stderr,
"%%%d", (
int)(best -
syncs));
772 if (++resync_phase >= resync_period)
794 for (
int s = 0; s <
NSYNCS; ++s)
831 template <
typename Tbyte, Tbyte BYTE_ERASED>
851 out(_out, SIZE_RSPACKET * (scan_syncs + 1)),
866 if (report_state && state_out && state_out->writable() >= 1)
870 report_state =
false;
880 run_searching_fast();
889 int chunk = SIZE_RSPACKET * scan_syncs;
891 while (
in.readable() >= chunk + 1
892 &&
out.writable() >= chunk
893 && (!state_out || state_out->writable() >= 1))
914 if (next_sync_count >= 3)
926 int chunk = SIZE_RSPACKET * scan_syncs;
928 while (
in.readable() >= chunk + 1
929 &&
out.writable() >= chunk
930 && (!state_out || state_out->writable() >= 1))
932 if (resync_phase == 0)
935 for (bitphase = 0; bitphase <= 7; ++bitphase)
942 in.read(SIZE_RSPACKET);
944 if (++resync_phase >= resync_period)
951 int chunk = SIZE_RSPACKET * scan_syncs;
953 Tbyte *pin =
in.rd(), *pend = pin + chunk;
954 Tbyte *pout =
out.wr();
955 unsigned short w = *pin++;
957 for (; pin <= pend; ++pin, ++pout)
960 *pout = w >> bitphase;
964 for (
int i = 0;
i < SIZE_RSPACKET; ++
i)
966 int nsyncs_p = 0, nsyncs_n = 0;
967 int phase8_p = -1, phase8_n = -1;
968 Tbyte *p = &
out.wr()[
i];
970 for (
int j = 0; j < scan_syncs; ++j, p += SIZE_RSPACKET)
977 phase8_n = (8 - j) & 7;
980 if (b == MPEG_SYNC_INV)
983 phase8_p = (8 - j) & 7;
990 if (nsyncs_p > nsyncs_n)
1003 if (nsyncs >= want_syncs && phase8 >= 0)
1006 fprintf(stderr,
"Locked\n");
1011 phase8 = (phase8 + 1) & 7;
1015 synchronized =
true;
1016 lock_timeleft = lock_timeout;
1020 state_out->write(1);
1030 while (
in.readable() >= SIZE_RSPACKET + 1 &&
out.writable() >= SIZE_RSPACKET && (!state_out || state_out->writable() >= 1) && (!locktime_out || locktime_out->writable() >= 1))
1032 Tbyte *pin =
in.rd(), *pend = pin + SIZE_RSPACKET;
1033 Tbyte *pout =
out.wr();
1034 unsigned short w = *pin++;
1036 for (; pin <= pend; ++pin, ++pout)
1038 w = (w << 8) | *pin;
1039 *pout = (w >> bitphase) ^ polarity;
1042 in.read(SIZE_RSPACKET);
1043 Tbyte syncbyte = *
out.wr();
1044 out.written(SIZE_RSPACKET);
1048 locktime_out->write(locktime);
1051 Tbyte expected = phase8 ? MPEG_SYNC : MPEG_SYNC_INV;
1053 if (syncbyte == expected)
1054 lock_timeleft = lock_timeout;
1056 phase8 = (phase8 + 1) & 7;
1062 fprintf(stderr,
"Unlocked\n");
1064 synchronized =
false;
1065 next_sync_count = 0;
1068 state_out->write(0);
1092 template <
typename Tbyte>
1095 Tbyte data[SIZE_RSPACKET];
1106 out(_out, SIZE_RSPACKET)
1112 while (
in.readable() >= 12 &&
out.writable() >= SIZE_RSPACKET)
1115 u8 *pout =
out.wr();
1118 for (
int i = 0;
i < SIZE_RSPACKET; ++
i, ++pout, delay = (delay + 1) % 12)
1120 *pout = pin[11 - delay].
data[
i];
1124 out.written(SIZE_RSPACKET);
1136 template <
typename Tbyte>
1149 while (
in.readable() >= 17 * 11 * 12 + SIZE_RSPACKET &&
out.writable() >= 1)
1151 Tbyte *pin =
in.rd() + 17 * 11 * 12, *pend = pin + SIZE_RSPACKET;
1152 Tbyte *pout =
out.wr()->data;
1154 for (
int delay = 17 * 11; pin < pend; ++pin, ++pout, delay = (delay - 17 + 17 * 12) % (17 * 12))
1156 *pout = pin[-delay * 12];
1159 in.read(SIZE_RSPACKET);
1170 static const int SIZE_TSPACKET = 188;
1173 static const int SIZE = 188;
1191 while (
in.readable() >= 1 &&
out.writable() >= 1)
1193 u8 *pin =
in.rd()->data;
1194 u8 *pout =
out.wr()->data;
1196 memcpy(pout, pin, SIZE_TSPACKET);
1214 template <
typename Tbyte,
int BYTE_ERASED>
1233 if (bitcount && bitcount->writable() < 1)
1235 if (errcount && errcount->writable() < 1)
1238 int nbits = 0, nerrs = 0;
1240 while (
in.readable() >= 1 &&
out.writable() >= 1)
1242 Tbyte *pin =
in.rd()->data;
1243 u8 *pout =
out.wr()->data;
1245 nbits += SIZE_RSPACKET * 8;
1248 if (
sizeof(Tbyte) == 1)
1249 memcpy(pout, pin, SIZE_TSPACKET);
1251 fail(
"Erasures not implemented");
1254 bool corrupted = rs.
syndromes(pin, synd);
1257 if ( ! corrupted ) {
1259 fprintf(stderr,
"Simulating errors\n");
1268 fprintf(stderr,
"_");
1272 corrupted = rs.
correct(synd, pout, pin, &nerrs);
1277 fprintf(stderr,
".");
1279 fprintf(stderr,
"!");
1288 pout[0] ^= MPEG_SYNC_CORRUPTED;
1296 bitcount->write(nbits);
1298 errcount->write(nerrs);
1319 precompute_pattern();
1321 pattern_end = pattern +
sizeof(pattern) /
sizeof(pattern[0]);
1328 unsigned short st = 000251;
1330 for (
int i = 1;
i < 188 * 8; ++
i)
1334 for (
int n = 8; n--;)
1336 int bit = ((st >> 13) ^ (st >> 14)) & 1;
1337 out = (out << 1) | bit;
1338 st = (st << 1) | bit;
1341 pattern[
i] = (
i % 188) ? out : 0;
1347 while (
in.readable() >= 1 &&
out.writable() >= 1)
1349 u8 *pin =
in.rd()->data, *pend = pin + SIZE_TSPACKET;
1350 u8 *pout =
out.wr()->data;
1351 if (pin[0] != MPEG_SYNC)
1352 fprintf(stderr,
"randomizer: bad MPEG sync %02x\n", pin[0]);
1353 for (; pin < pend; ++pin, ++pout, ++pos)
1354 *pout = *pin ^ *pos;
1355 if (pos == pattern_end)
1363 u8 pattern[188 * 8], *pattern_end, *
pos;
1379 precompute_pattern();
1381 pattern_end = pattern +
sizeof(pattern) /
sizeof(pattern[0]);
1388 unsigned short st = 000251;
1390 for (
int i = 1;
i < 188 * 8; ++
i)
1394 for (
int n = 8; n--;)
1396 int bit = ((st >> 13) ^ (st >> 14)) & 1;
1397 out = (out << 1) | bit;
1398 st = (st << 1) | bit;
1401 pattern[
i] = (
i % 188) ? out : 0;
1407 while (
in.readable() >= 1 &&
out.writable() >= 1)
1409 u8 *pin =
in.rd()->data, *pend = pin + SIZE_TSPACKET;
1410 u8 *pout =
out.wr()->data;
1412 if (pin[0] == MPEG_SYNC_INV || pin[0] == (MPEG_SYNC_INV ^ MPEG_SYNC_CORRUPTED))
1417 fprintf(stderr,
"derandomizer: resynchronizing\n");
1422 for (; pin < pend; ++pin, ++pout, ++pos)
1424 *pout = *pin ^ *pos;
1427 if (pos == pattern_end)
1432 u8 sync =
out.wr()->data[0];
1434 if (sync == MPEG_SYNC)
1440 if (sync != (MPEG_SYNC ^ MPEG_SYNC_CORRUPTED))
1442 fprintf(stderr,
"(%02x)", sync);
1444 out.wr()->data[1] |= 0x80;
1453 u8 pattern[188 * 8], *pattern_end, *
pos;
1525 static const int chunk_size = 128;
1537 out(_out, chunk_size),
1544 fec = &fec_specs[cr];
1547 int symbols_per_block = fec->bits_out / bits_per_symbol;
1548 if (bits_per_symbol * symbols_per_block != fec->bits_out)
1549 fail(
"Code rate not suitable for this constellation");
1579 nshifts = fec->bits_out / bits_per_symbol;
1580 nsyncs = nconj * nrotations * nshifts;
1588 for (
int s = 0; s < nsyncs; ++s)
1591 int rot = s % nrotations;
1592 int conj = (s / nrotations) % nconj;
1593 int shift = s / nrotations / nconj;
1594 syncs[s].shift = shift;
1597 syncs[s].map =
syncs[conj * nrotations + rot].map;
1599 syncs[s].map = init_map(conj,
1602 fprintf(stderr,
"sync %3d: conj%d offs%d rot%d/%d map:",
1605 fprintf(stderr,
" %2d",
syncs[s].map[
i]);
1606 fprintf(stderr,
"\n");
1612 trellis_12 *trell =
new trellis_12();
1614 for (
int s = 0; s < nsyncs; ++s)
1615 syncs[s].dec =
new dvb_dec_12(trell);
1617 else if (cr ==
FEC23)
1619 trellis_23 *trell =
new trellis_23();
1621 for (
int s = 0; s < nsyncs; ++s)
1622 syncs[s].dec =
new dvb_dec_23(trell);
1624 else if (cr ==
FEC46)
1626 trellis_46 *trell =
new trellis_46();
1628 for (
int s = 0; s < nsyncs; ++s)
1629 syncs[s].dec =
new dvb_dec_46(trell);
1631 else if (cr ==
FEC34)
1633 trellis_34 *trell =
new trellis_34();
1635 for (
int s = 0; s < nsyncs; ++s)
1636 syncs[s].dec =
new dvb_dec_34(trell);
1638 else if (cr ==
FEC45)
1640 trellis_45 *trell =
new trellis_45();
1642 for (
int s = 0; s < nsyncs; ++s)
1643 syncs[s].dec =
new dvb_dec_45(trell);
1645 else if (cr ==
FEC56)
1647 trellis_56 *trell =
new trellis_56();
1649 for (
int s = 0; s < nsyncs; ++s)
1650 syncs[s].dec =
new dvb_dec_56(trell);
1652 else if (cr ==
FEC78)
1654 trellis_78 *trell =
new trellis_78();
1656 for (
int s = 0; s < nsyncs; ++s)
1657 syncs[s].dec =
new dvb_dec_78(trell);
1661 fail(
"CR not supported");
1669 TCS *map =
new TCS[cstln->
nsymbols];
1670 float ca = cosf(angle), sa = sinf(angle);
1680 int8_t RI = I * ca - Q * sa;
1681 int8_t RQ = I * sa + Q * ca;
1683 map[
i] = pr->
ss.nearest;
1692 pin +=
syncs[s].shift;
1696 for (
int i = 0;
i < nshifts; ++
i, ++pin)
1698 cs = (cs << bits_per_symbol) |
syncs[s].map[pin->
nearest];
1702 return syncs[s].dec->update(cs, cost, discr);
1709 int discr_delay = 64 / fec->bits_in;
1713 TPM *totaldiscr =
new TPM[nsyncs];
1715 while ((
long)in.
readable() >= nshifts * chunk_size + (nshifts - 1) && (
long)out.
writable() * 8 >= fec->bits_in * chunk_size)
1717 for (
int s = 0; s < nsyncs; ++s)
1724 for (
int blocknum = 0; blocknum < chunk_size; ++blocknum, pin += nshifts)
1727 TUS result = update_sync(current_sync, pin, &discr);
1728 outstream = (outstream << fec->bits_in) | result;
1729 nout += fec->bits_in;
1731 if (blocknum >= discr_delay)
1732 totaldiscr[current_sync] += discr;
1737 for (
int s = 0; s < nsyncs; ++s)
1739 if (s == current_sync)
1743 (void)update_sync(s, pin, &discr);
1745 if (blocknum >= discr_delay)
1746 totaldiscr[s] += discr;
1752 out.
write(outstream >> (nout - 8));
1757 in.
read(chunk_size * nshifts);
1760 fail(
"overlapping out");
1765 int best = current_sync;
1767 for (
int s = 0; s < nsyncs; ++s)
1768 if (totaldiscr[s] > totaldiscr[best])
1771 if (best != current_sync)
1774 fprintf(stderr,
"{%d->%d}", current_sync, best);
1775 current_sync = best;
1779 if (++resync_phase >= resync_period)
1783 delete[] totaldiscr;
1790 #endif // LEANSDR_DVB_H
viterbi_dec< TS, 64, TUS, 8, TCS, 16, TBM, TPM, path_34 > dvb_dec_34
trellis< TS, 64, TUS, 128, 256 > trellis_78
trellis< TS, 64, TUS, 16, 32 > trellis_45
trellis< TS, 64, TUS, 32, 64 > trellis_56
pipewriter< unsigned long > * locktime_out
trellis< TS, 64, TUS, 2, 4 > trellis_12
deconvol_sync_simple * make_deconvol_sync_simple(scheduler *sch, pipebuf< eucl_ss > &_in, pipebuf< u8 > &_out, enum code_rate rate)
convol_multipoly< uint16_t, 16 > convol
deconvol_sync(scheduler *sch, pipebuf< eucl_ss > &_in, pipebuf< Tbyte > &_out, uint32_t gX, uint32_t gY, uint32_t pX, uint32_t pY)
randomizer(scheduler *sch, pipebuf< tspacket > &_in, pipebuf< tspacket > &_out)
void inverse_convolution()
bitpath< uint32_t, TUS, 1, 32 > path_12
rs_encoder(scheduler *sch, pipebuf< tspacket > &_in, pipebuf< rspacket< u8 >> &_out)
Tbyte data[SIZE_RSPACKET]
rs_decoder(scheduler *sch, pipebuf< rspacket< Tbyte >> &_in, pipebuf< tspacket > &_out, pipebuf< int > *_bitcount=NULL, pipebuf< int > *_errcount=NULL)
deconvol_poly2< Tin, uint32_t, uint64_t, 0x3ba, 0x38f70 > deconv
unsigned long readerrors(sync_t *s, eucl_ss *&p)
static const int traceback
static const int maxsbits
bitpath< uint64_t, TUS, 4, 16 > path_46
pipereader< uncoded_byte > in
viterbi_dec< TS, 64, TUS, 16, TCS, 32, TBM, TPM, path_45 > dvb_dec_45
pipereader< tspacket > in
derandomizer(scheduler *sch, pipebuf< tspacket > &_in, pipebuf< tspacket > &_out)
void run_searching_fast()
bitpath< uint64_t, TUS, 5, 12 > path_56
int hamming_weight(uint8_t x)
pipewriter< int > * errcount
bool correct(u8 synd[16], u8 pout[188], u8 pin[204]=NULL, int *bits_corrected=NULL)
void solve_rec(iq_t prefix, unsigned int nprefix, signal_t exp, iq_t *best)
Fixed< IntType, IntBits > exp(Fixed< IntType, IntBits > const &x)
viterbi_dec< TS, 64, TUS, 4, TCS, 8, TBM, TPM, path_23 > dvb_dec_23
TCS * init_map(bool conj, float angle)
viterbi_sync(scheduler *sch, pipebuf< eucl_ss > &_in, pipebuf< unsigned char > &_out, cstln_lut< eucl_ss, 256 > *_cstln, code_rate cr)
pipereader< rspacket< u8 > > in
bitpath< uint64_t, TUS, 4, 16 > path_45
pipereader< tspacket > in
deconvol_sync< u8, 0 > deconvol_sync_simple
unsigned long lock_timeout
struct leansdr::deconvol_sync::sync_t syncs[NSYNCS]
void precompute_pattern()
trellis< TS, 64, TUS, 16, 64 > trellis_46
dvb_deconvol_sync< u8 > dvb_deconvol_sync_hard
pipewriter< hardsymbol > out
trellis< TS, 64, TUS, 8, 16 > trellis_34
pipereader< rspacket< Tbyte > > in
dvb_deconvol_sync(scheduler *sch, pipebuf< Tin > &_in, pipebuf< decoded_byte > &_out)
result * lookup(float I, float Q)
viterbi_dec< TS, 64, TUS, 2, TCS, 4, TBM, TPM, path_12 > dvb_dec_12
static int log2(uint64_t x)
pipewriter< tspacket > out
pipewriter< rspacket< Tbyte > > out
trellis< TS, 64, TUS, 4, 8 > trellis_23
bitpath< uint64_t, TUS, 7, 9 > path_78
cstln_lut< eucl_ss, 256 > * cstln
pipereader< tspacket > in
dvb_convol(scheduler *sch, pipebuf< uncoded_byte > &_in, pipebuf< hardsymbol > &_out, code_rate fec, int bits_per_symbol)
viterbi_dec< TS, 64, TUS, 32, TCS, 64, TBM, TPM, path_56 > dvb_dec_56
Tbyte readbyte(sync_t *s, eucl_ss *&p)
viterbi_dec< TS, 64, TUS, 16, TCS, 64, TBM, TPM, path_46 > dvb_dec_46
dvb_deconvol_sync< eucl_ss > dvb_deconvol_sync_soft
viterbi_dec< TS, 64, TUS, 128, TCS, 256, TBM, TPM, path_78 > dvb_dec_78
viterbi_dec_interface< TUS, TCS, TBM, TPM > dvb_dec_interface
bool syndromes(const u8 *poly, u8 *synd)
void precompute_pattern()
void init_convolutional(const uint16_t G[])
bitpath< uint64_t, TUS, 3, 21 > path_23
pipewriter< rspacket< u8 > > out
unsigned char parity(uint8_t x)
complex< int8_t > * symbols
unsigned long lock_timeleft
pipewriter< tspacket > out
pipewriter< unsigned char > out
pipewriter< int > * state_out
deinterleaver(scheduler *sch, pipebuf< Tbyte > &_in, pipebuf< rspacket< Tbyte >> &_out)
interleaver(scheduler *sch, pipebuf< rspacket< u8 >> &_in, pipebuf< u8 > &_out)
pipewriter< tspacket > out
void read(unsigned long n)
deconvol_sync< Tbyte, 0 > * deconv
pipewriter< decoded_byte > out
mpeg_sync(scheduler *sch, pipebuf< Tbyte > &_in, pipebuf< Tbyte > &_out, deconvol_sync< Tbyte, 0 > *_deconv, pipebuf< int > *_state_out=NULL, pipebuf< unsigned long > *_locktime_out=NULL)
TUS update_sync(int s, eucl_ss *pin, TPM *discr)
T min(const T &x, const T &y)
unsigned __int64 uint64_t
bitpath< uint64_t, TUS, 3, 21 > path_34
iq_t convolve(signal_t s)