diff --git a/decode.cc b/decode.cc index 5a761f8..93a0fc6 100644 --- a/decode.cc +++ b/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 seq; + dest[0] = src[0]; + for (int i = 1; i < 2048; ++i) + dest[seq()] = src[i]; + } else if (code_order == 12) { CODE::XorShiftMask 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 seq; + dest[0] = src[0]; + for (int i = 1; i < 32768; ++i) + dest[seq()] = src[i]; + } else if (code_order == 16) { + CODE::XorShiftMask seq; + dest[0] = src[0]; + for (int i = 1; i < 65536; ++i) + dest[seq()] = src[i]; } } const cmplx *next_sample() diff --git a/encode.cc b/encode.cc index aae167e..31626d9 100644 --- a/encode.cc +++ b/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 seq; + dest[0] = src[0]; + for (int i = 1; i < 2048; ++i) + dest[i] = src[seq()]; + } else if (code_order == 12) { CODE::XorShiftMask 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 seq; + dest[0] = src[0]; + for (int i = 1; i < 32768; ++i) + dest[i] = src[seq()]; + } else if (code_order == 16) { + CODE::XorShiftMask seq; + dest[0] = src[0]; + for (int i = 1; i < 65536; ++i) + dest[i] = src[seq()]; } } Encoder(DSP::WritePCM *pcm, const char *const *input_names, int input_count, int freq_off, uint64_t call_sign, int oper_mode) :