mirror of
https://github.com/aicodix/modem.git
synced 2026-04-27 14:30:34 +00:00
added more shuffles
This commit is contained in:
parent
8cb6f44085
commit
77719cc63b
2 changed files with 34 additions and 4 deletions
19
decode.cc
19
decode.cc
|
|
@ -51,7 +51,7 @@ struct Decoder
|
|||
static const int guard_len = symbol_len / 8;
|
||||
static const int extended_len = symbol_len + guard_len;
|
||||
static const int mod_max = 6;
|
||||
static const int code_max = 14;
|
||||
static const int code_max = 16;
|
||||
static const int bits_max = 1 << code_max;
|
||||
static const int data_max = 1024;
|
||||
static const int cols_max = 273 + 16;
|
||||
|
|
@ -153,7 +153,12 @@ struct Decoder
|
|||
}
|
||||
void shuffle(code_type *dest, const code_type *src)
|
||||
{
|
||||
if (code_order == 12) {
|
||||
if (code_order == 11) {
|
||||
CODE::XorShiftMask<int, 11, 1, 3, 4, 1> seq;
|
||||
dest[0] = src[0];
|
||||
for (int i = 1; i < 2048; ++i)
|
||||
dest[seq()] = src[i];
|
||||
} else if (code_order == 12) {
|
||||
CODE::XorShiftMask<int, 12, 1, 1, 4, 1> seq;
|
||||
dest[0] = src[0];
|
||||
for (int i = 1; i < 4096; ++i)
|
||||
|
|
@ -168,6 +173,16 @@ struct Decoder
|
|||
dest[0] = src[0];
|
||||
for (int i = 1; i < 16384; ++i)
|
||||
dest[seq()] = src[i];
|
||||
} else if (code_order == 15) {
|
||||
CODE::XorShiftMask<int, 15, 1, 1, 3, 1> seq;
|
||||
dest[0] = src[0];
|
||||
for (int i = 1; i < 32768; ++i)
|
||||
dest[seq()] = src[i];
|
||||
} else if (code_order == 16) {
|
||||
CODE::XorShiftMask<int, 16, 1, 1, 14, 1> seq;
|
||||
dest[0] = src[0];
|
||||
for (int i = 1; i < 65536; ++i)
|
||||
dest[seq()] = src[i];
|
||||
}
|
||||
}
|
||||
const cmplx *next_sample()
|
||||
|
|
|
|||
19
encode.cc
19
encode.cc
|
|
@ -29,7 +29,7 @@ struct Encoder
|
|||
typedef int8_t code_type;
|
||||
static const int symbol_len = (1280 * rate) / 8000;
|
||||
static const int guard_len = symbol_len / 8;
|
||||
static const int bits_max = 16384;
|
||||
static const int bits_max = 65536;
|
||||
static const int data_max = 1024;
|
||||
static const int cols_max = 273 + 16;
|
||||
static const int mls0_len = 127;
|
||||
|
|
@ -224,7 +224,12 @@ struct Encoder
|
|||
}
|
||||
void shuffle(code_type *dest, const code_type *src)
|
||||
{
|
||||
if (code_order == 12) {
|
||||
if (code_order == 11) {
|
||||
CODE::XorShiftMask<int, 11, 1, 3, 4, 1> seq;
|
||||
dest[0] = src[0];
|
||||
for (int i = 1; i < 2048; ++i)
|
||||
dest[i] = src[seq()];
|
||||
} else if (code_order == 12) {
|
||||
CODE::XorShiftMask<int, 12, 1, 1, 4, 1> seq;
|
||||
dest[0] = src[0];
|
||||
for (int i = 1; i < 4096; ++i)
|
||||
|
|
@ -239,6 +244,16 @@ struct Encoder
|
|||
dest[0] = src[0];
|
||||
for (int i = 1; i < 16384; ++i)
|
||||
dest[i] = src[seq()];
|
||||
} else if (code_order == 15) {
|
||||
CODE::XorShiftMask<int, 15, 1, 1, 3, 1> seq;
|
||||
dest[0] = src[0];
|
||||
for (int i = 1; i < 32768; ++i)
|
||||
dest[i] = src[seq()];
|
||||
} else if (code_order == 16) {
|
||||
CODE::XorShiftMask<int, 16, 1, 1, 14, 1> seq;
|
||||
dest[0] = src[0];
|
||||
for (int i = 1; i < 65536; ++i)
|
||||
dest[i] = src[seq()];
|
||||
}
|
||||
}
|
||||
Encoder(DSP::WritePCM<value> *pcm, const char *const *input_names, int input_count, int freq_off, uint64_t call_sign, int oper_mode) :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue