]> git.sesse.net Git - hamming/commitdiff
Update the permutation table for hamming32.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 2 Mar 2006 13:29:01 +0000 (13:29 +0000)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 2 Mar 2006 13:29:01 +0000 (13:29 +0000)
hamming32.c

index a27725318e5fab6893bcb653dd89c9162afb2abc..cbfb447fbb841ddb5e675b42c3cf9d354dc25c0c 100644 (file)
@@ -11,10 +11,10 @@ unsigned char hamming_parity_lookup[256];
 /* 
  * Needed since we store all the parity at the end of the word, not at the expected
  * power-of-two bit positions. This is the inverse of the mapping
- * (0..15) -> (0, 8, 4, 2, 1, the rest in ascending order)
+ * (0..31) -> (0, 16, 8, 4, 2, 1, the rest in ascending order)
  */
 unsigned char permutation_table[CODE_BITS] = {
-       0, 4, 3, 5, 2, 6, 7, 8, 1, 9, 10, 11, 12, 13, 14, 15
+       0, 5, 4, 6, 3, 7, 8, 9, 2, 10, 11, 12, 13, 14, 15, 16, 1, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
 };
 
 /* FIXME: check if the lookup table actually helps us any here */