Orion
high-rate readout
cmdluts.hpp
Go to the documentation of this file.
1 // ╭─╮╭─╴╷╭─╮┌─╮
2 // ╰─╯╵ ╵╰─╯╵ ╵
8 #pragma once
9 
10 #include <cinttypes>
11 
12 namespace itk::itkpix::cmd {
13 
15 constexpr static uint16_t enc_symb[54] = {
16  0x6A, 0x6C, 0x71, 0x72, 0x74, 0x8B, 0x8D, 0x8E,
17  0x93, 0x95, 0x96, 0x99, 0x9A, 0x9C, 0xA3, 0xA5,
18  0xA6, 0xA9, 0x59, 0xAC, 0xB1, 0xB2, 0xB4, 0xC3,
19  0xC5, 0xC6, 0xC9, 0xCA, 0xCC, 0xD1, 0xD2, 0xD4,
20  0x63, 0x5A, 0x5C, 0xAA, 0x65, 0x69, 0x2B, 0x2D,
21  0x2E, 0x33, 0x35, 0x36, 0x39, 0x3A, 0x3C, 0x4B,
22  0x4D, 0x4E, 0x53, 0x55, 0x56, 0x66
23 };
24 
25 
26 constexpr uint16_t none = 0xFFFF;
27 
29 constexpr uint16_t dec_symb[256] = {
30  none, none, none, none, none, none, none, none, none, none, none, 0x2f, none, 0x30, 0x31, none,
31  none, none, none, 0x32, none, 0x33, 0x34, none, none, 0x2c, 0x2d, none, 0x2e, none, none, none,
32  none, none, none, 0x29, none, 0x2a, 0x35, none, none, 0x2c, 0x2d, 0x26, 0x2e, 0x27, 0x28, 0x28,
33  none, 0x2c, 0x2d, 0x29, 0x2e, 0x2a, 0x2b, 0x2b, 0x2e, 0x2c, 0x2d, 0x2d, 0x2e, 0x2e, 0x2e, none,
34  none, none, none, 0x32, none, 0x33, 0x35, none, none, 0x30, 0x31, 0x2f, 0x31, 0x30, 0x31, 0x31,
35  none, 0x33, 0x34, 0x32, 0x34, 0x33, 0x34, 0x34, 0x22, 0x12, 0x21, 0x32, 0x22, 0x33, 0x34, none,
36  none, 0x25, 0x35, 0x20, 0x35, 0x24, 0x35, 0x35, 0x25, 0x25, 0x00, 0x2f, 0x01, 0x30, 0x35, none,
37  0x04, 0x02, 0x03, 0x32, 0x04, 0x33, 0x35, none, none, 0x2c, 0x2d, none, 0x2e, none, none, none,
38  none, none, none, 0x17, none, 0x18, 0x19, none, none, 0x1a, 0x23, 0x05, 0x1c, 0x06, 0x07, 0x07,
39  none, 0x1d, 0x1e, 0x08, 0x1f, 0x09, 0x0a, 0x0a, 0x0d, 0x0b, 0x0c, 0x0c, 0x0d, 0x0d, 0x0d, none,
40  none, 0x14, 0x23, 0x0e, 0x16, 0x0f, 0x10, 0x10, 0x23, 0x11, 0x23, 0x26, 0x13, 0x27, 0x28, none,
41  0x16, 0x14, 0x15, 0x29, 0x16, 0x2a, 0x2b, none, none, 0x2c, 0x2d, none, 0x2e, none, none, none,
42  none, 0x1d, 0x1e, 0x17, 0x1f, 0x18, 0x19, 0x19, 0x1c, 0x1a, 0x1b, 0x2f, 0x1c, 0x30, 0x31, none,
43  0x1f, 0x1d, 0x1e, 0x32, 0x1f, 0x33, 0x34, none, none, 0x1d, 0x21, none, 0x22, none, none, none,
44  none, none, none, 0x20, none, 0x24, 0x35, none, none, 0x25, 0x23, none, 0x1c, none, none, none,
45  none, 0x1d, 0x1e, none, 0x1f, none, none, none, none, none, none, none, none, none, none, none,
46 };
47 
52 constexpr uint8_t bitflip[256] = {
53  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0xff, 0x40, 0x40, 0xff,
54  0xff, 0xff, 0xff, 0x40, 0xff, 0x40, 0x40, 0xff, 0xff, 0x20, 0x20, 0xff, 0x20, 0xff, 0xff, 0xff,
55  0xff, 0xff, 0xff, 0x10, 0xff, 0x10, 0x40, 0xff, 0xff, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x01,
56  0xff, 0x08, 0x08, 0x00, 0x08, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x02, 0xff,
57  0xff, 0xff, 0xff, 0x10, 0xff, 0x10, 0x20, 0xff, 0xff, 0x04, 0x04, 0x00, 0x02, 0x00, 0x00, 0x01,
58  0xff, 0x04, 0x04, 0x00, 0x02, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x08, 0x00, 0x08, 0x08, 0xff,
59  0xff, 0x08, 0x04, 0x00, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x20, 0x00, 0x20, 0x08, 0xff,
60  0x04, 0x00, 0x00, 0x20, 0x00, 0x20, 0x10, 0xff, 0xff, 0x40, 0x40, 0xff, 0x40, 0xff, 0xff, 0xff,
61  0xff, 0xff, 0xff, 0x40, 0xff, 0x40, 0x40, 0xff, 0xff, 0x40, 0x20, 0x00, 0x40, 0x00, 0x00, 0x01,
62  0xff, 0x40, 0x40, 0x00, 0x40, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x02, 0xff,
63  0xff, 0x10, 0x08, 0x00, 0x10, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0xff,
64  0x04, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0xff, 0xff, 0x80, 0x80, 0xff, 0x80, 0xff, 0xff, 0xff,
65  0xff, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0xff,
66  0x04, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0xff, 0xff, 0x08, 0x80, 0xff, 0x80, 0xff, 0xff, 0xff,
67  0xff, 0xff, 0xff, 0x80, 0xff, 0x80, 0x80, 0xff, 0xff, 0x80, 0x40, 0xff, 0x20, 0xff, 0xff, 0xff,
68  0xff, 0x20, 0x20, 0xff, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
69 };
70 
71 } // itk::tikpix::cmd
constexpr uint8_t bitflip[256]
Bit-flips for encoded symbol: 0x00 - no bitflip 0x1 << i - bitflip in i-th position 0xFF - more then ...
Definition: cmdluts.hpp:52
constexpr uint16_t dec_symb[256]
Decode encoded symbol.
Definition: cmdluts.hpp:29