Commit 7a73d2d4 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Fix bit error rate script output if max error is 0.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 489c8a2f
......@@ -71,6 +71,9 @@ do
echo "unknown transform $TRANSFORM" >&2
exit 1
fi
# blind decoding
audiowmark cmp t.wav $PATTERN $AWM_PARAMS --seed $SEED
# decoding with original
# audiowmark cmp-delta "$i" t.wav $PATTERN $AWM_PARAMS --seed $SEED
done
done | grep bit_error_rate | awk '{ er += $2; n++; if ($2 > max_er) max_er = $2;} END { print er / n, max_er; }'
done | grep bit_error_rate | awk 'BEGIN { max_er = er = n = 0 } { er += $2; n++; if ($2 > max_er) max_er = $2;} END { print er / n, max_er; }'
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