From 53593d3350c4f81dbb95d3542ffbb227aaa4b71c Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Tue, 1 Jul 2025 23:41:18 +0200 Subject: [PATCH] use a shorter MLS for leading noise --- decode.cc | 2 +- encode.cc | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/decode.cc b/decode.cc index fd1e4b1..067b85d 100644 --- a/decode.cc +++ b/decode.cc @@ -46,7 +46,7 @@ struct Decoder static const int bits_max = 1 << code_max; static const int data_max = 4096; static const int symbols_max = 44; - static const int mls0_poly = 0b1100110001; + static const int mls0_poly = 0x331; static const int mls0_seed = 214; static const int mls1_poly = 0x25; static const int buffer_len = 5 * extended_len; diff --git a/encode.cc b/encode.cc index 099e605..7b224dd 100644 --- a/encode.cc +++ b/encode.cc @@ -31,10 +31,9 @@ struct Encoder static const int symbol_len = guard_len * 16; static const int bits_max = 65536; static const int data_max = 4096; - static const int mls0_poly = 0b1100110001; + static const int mls0_poly = 0x331; static const int mls0_seed = 214; static const int mls1_poly = 0x25; - static const int mls2_poly = 0b100101010001; static const int data_tones = 256; static const int pilot_tones = 32; static const int reserved_tones = 32; @@ -148,11 +147,11 @@ struct Encoder for (int i = 0; i < guard_len; ++i) guard[i] = tdom[i]; } - void pilot_block() + void leading_noise() { - CODE::MLS seq2(mls2_poly); + CODE::MLS noise(0x163); for (int i = 0; i < tone_count; ++i) - tone[i] = nrz(seq2()); + tone[i] = nrz(noise()); symbol(false); } void schmidl_cox() @@ -369,7 +368,7 @@ struct Encoder setup(oper_mode, freq_off); guard_interval_weights(); papr_min = 1000, papr_max = -1000; - pilot_block(); + leading_noise(); hadamardenc(mode, oper_mode); if (!oper_mode) { schmidl_cox();