Commit 24ace2b6 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Cleanup decoder backtracking.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 6ce5610b
......@@ -116,14 +116,13 @@ conv_decode (const vector<int>& coded_bits)
unsigned int state = 0;
do
{
int state = error_count[idx][state].last_state;
int bit = error_count[idx][state].bit;
decoded_bits.push_back (bit);
decoded_bits.push_back (error_count[idx][state].bit);
state = error_count[idx][state].last_state;
idx--;
}
while (idx > 1);
while (idx > 0);
std::reverse (decoded_bits.begin(), decoded_bits.end());
decoded_bits.push_back (0);
/* remove termination */
assert (decoded_bits.size() >= order);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment