fix reorder bits
This commit is contained in:
+24
-2
@@ -63,11 +63,33 @@ def F32_7(x0, x1, y0, y1):
|
|||||||
return (x0 & x1 & y1) ^ (x0 & y0 & y1) ^ (x0 & y0) ^ (x1 & y0 & y1) ^ x1 ^ y0 ^ y1 ^ 1
|
return (x0 & x1 & y1) ^ (x0 & y0 & y1) ^ (x0 & y0) ^ (x1 & y0 & y1) ^ x1 ^ y0 ^ y1 ^ 1
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
F31_orders = [
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(3, 0, 1, 2),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
]
|
||||||
|
|
||||||
|
F32_orders = [
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(3, 0, 1, 2),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
(0, 1, 2, 3),
|
||||||
|
]
|
||||||
|
|
||||||
F31_coords = [F31_0, F31_1, F31_2, F31_3, F31_4, F31_5, F31_6, F31_7]
|
F31_coords = [F31_0, F31_1, F31_2, F31_3, F31_4, F31_5, F31_6, F31_7]
|
||||||
F32_coords = [F32_0, F32_1, F32_2, F32_3, F32_4, F32_5, F32_6, F32_7]
|
F32_coords = [F32_0, F32_1, F32_2, F32_3, F32_4, F32_5, F32_6, F32_7]
|
||||||
|
|
||||||
lut_B = [pack_lut_4(f) for f in F31_coords]
|
lut_B = [pack_lut_4(f, o) for f, o in zip(F31_coords, F31_orders)]
|
||||||
lut_A = [pack_lut_4(f) for f in F32_coords]
|
lut_A = [pack_lut_4(f, o) for f, o in zip(F32_coords, F32_orders)]
|
||||||
|
|
||||||
print("TEA3_LUT_A = [", end="")
|
print("TEA3_LUT_A = [", end="")
|
||||||
for x in lut_A:
|
for x in lut_A:
|
||||||
|
|||||||
Reference in New Issue
Block a user