+static uint8 prg_perm[4][4] = {
+ {0, 1, 2, 3,},
+ {3, 2, 1, 0,},
+ {0, 2, 1, 3,},
+ {3, 1, 2, 0,},
+};
+
+static uint8 chr_perm[8][8] = {
+ {0, 1, 2, 3, 4, 5, 6, 7,},
+ {0, 2, 1, 3, 4, 6, 5, 7,},
+ {0, 1, 4, 5, 2, 3, 6, 7,},
+ {0, 4, 1, 5, 2, 6, 3, 7,},
+ {0, 4, 2, 6, 1, 5, 3, 7,},
+ {0, 2, 4, 6, 1, 3, 5, 7,},
+ {7, 6, 5, 4, 3, 2, 1, 0,},
+ {7, 6, 5, 4, 3, 2, 1, 0,},
+};