mirror of
https://github.com/aicodix/modem.git
synced 2026-04-27 22:35:41 +00:00
try all seeds
This commit is contained in:
parent
80b2cb4483
commit
b72a2b3f31
2 changed files with 13 additions and 6 deletions
11
encode.cc
11
encode.cc
|
|
@ -80,17 +80,20 @@ struct Encoder : public Common
|
|||
for (int i = 0; differential && symbol_number > 0 && i < tone_count; ++i)
|
||||
tone[i] *= prev[i];
|
||||
value best_papr = 1000;
|
||||
int trials = symbol_number ? 16 * 64 : 64;
|
||||
int trials = symbol_number ? 16 * 256 : 64;
|
||||
for (int trial = 0; trial < trials; ++trial) {
|
||||
for (int i = 0; i < tone_count; ++i)
|
||||
temp[i] = tone[i];
|
||||
if (symbol_number >= 0) {
|
||||
int poly_index = trial >> 6;
|
||||
int meta_data = symbol_number ? poly_index : oper_mode;
|
||||
int seed_value = trial & 255;
|
||||
if (seed_value == 0)
|
||||
continue;
|
||||
int poly_index = trial >> 8;
|
||||
int meta_data = symbol_number ? (poly_index << 2 | ((trial >> 6) & 3)) : oper_mode;
|
||||
hadamard_encoder(meta, meta_data);
|
||||
int seed_data = trial & 63;
|
||||
hadamard_encoder(seed, seed_data);
|
||||
CODE::MLS seq(slm_poly[poly_index], seed_data + 1);
|
||||
CODE::MLS seq(slm_poly[poly_index], seed_value);
|
||||
for (int i = 0, m = 0, s = 0; i < tone_count; ++i)
|
||||
if (i % block_length == meta_off)
|
||||
temp[i] *= meta[m++];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue