Attention is currently required from: pespin.
1 comment:
Commit Message:
Patch Set #2, Line 14: Converting to hard-bits is not really needed.
Why? I see you now moved the conversion inside the implementation. […]
Initially I was planning to simplify the code to calculate a sum of all soft-bits, so that we could avoid conditionals in the loops. Basically id_marker[]s would contain multipliers: -1 (for bit 1) and +1 (for bit 0), so then:
sum = 0
for (...)
sum -= *sbits * id_marker[k];
if (sum >= (n_bits * 127 * 0.8))
/* tolerate up to 20% bit errors */
This works fine, unless you want to calculate BER. You cannot just do:
max = n_bits * 127
n_errors = (sum - max) / 127
Because this is not accurate at all. So we still have to convert to hard-bits for the BER calculation. I believe doing this in the same loop (where we match the marker) is better. Also this allows us to handle soft-bit value 0 properly (see my other comment).
I can clarify the commit message.
To view, visit change 28176. To unsubscribe, or for help writing mail filters, visit settings.