Commit 92a9ca9c authored by Kalinka's avatar Kalinka

fix reedsolomon encoder

parent 1350bebd
......@@ -59,6 +59,8 @@ class ReedSolomon
$codeword_length = 0;
$codeword = self::emptyArray(sizeof(self::initialCodeword));
do {
$new_length = 0;
$digit_32 = 0;
......@@ -88,6 +90,10 @@ class ReedSolomon
$p[0] = self::gmult(17, $fb);
}
for ($i = 0; $i < 4; $i++) {
$codeword[$i+self::b32len] = $p[$i];
}
$csb = '';
for ($i = 0; $i < 17; $i++) {
$alphabet_index = $codeword[self::codewordMap[$i]];
......
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