-
Notifications
You must be signed in to change notification settings - Fork 0
/
lut.h
216 lines (215 loc) · 14.3 KB
/
lut.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
// ----------------------------------------------------------------------------
//
// ----------------------------------------------------------------------------
// Lookup table for:
// int(np.log2(1.0 + (x / 1024)) * 65536.0)
// ----------------------------------------------------------------------------
#include <stdint.h>
// ----------------------------------------------------------------------------
const int32_t lut_log2[1025] = {
0, 92, 184, 276, 368,
460, 552, 644, 735, 827,
918, 1010, 1101, 1192, 1283,
1374, 1465, 1556, 1647, 1738,
1828, 1919, 2009, 2100, 2190,
2280, 2370, 2460, 2550, 2640,
2730, 2819, 2909, 2998, 3088,
3177, 3266, 3356, 3445, 3534,
3622, 3711, 3800, 3889, 3977,
4066, 4154, 4242, 4331, 4419,
4507, 4595, 4683, 4771, 4858,
4946, 5034, 5121, 5209, 5296,
5383, 5470, 5558, 5645, 5731,
5818, 5905, 5992, 6078, 6165,
6251, 6338, 6424, 6510, 6597,
6683, 6769, 6854, 6940, 7026,
7112, 7197, 7283, 7368, 7454,
7539, 7624, 7709, 7794, 7879,
7964, 8049, 8134, 8219, 8303,
8388, 8472, 8557, 8641, 8725,
8809, 8893, 8977, 9061, 9145,
9229, 9313, 9396, 9480, 9563,
9647, 9730, 9813, 9897, 9980,
10063, 10146, 10229, 10311, 10394,
10477, 10559, 10642, 10724, 10807,
10889, 10971, 11054, 11136, 11218,
11300, 11382, 11463, 11545, 11627,
11708, 11790, 11871, 11953, 12034,
12115, 12197, 12278, 12359, 12440,
12521, 12602, 12682, 12763, 12844,
12924, 13005, 13085, 13166, 13246,
13326, 13406, 13486, 13566, 13646,
13726, 13806, 13886, 13965, 14045,
14125, 14204, 14284, 14363, 14442,
14521, 14601, 14680, 14759, 14838,
14917, 14995, 15074, 15153, 15231,
15310, 15388, 15467, 15545, 15624,
15702, 15780, 15858, 15936, 16014,
16092, 16170, 16248, 16325, 16403,
16481, 16558, 16636, 16713, 16790,
16868, 16945, 17022, 17099, 17176,
17253, 17330, 17407, 17484, 17560,
17637, 17714, 17790, 17867, 17943,
18019, 18096, 18172, 18248, 18324,
18400, 18476, 18552, 18628, 18704,
18779, 18855, 18931, 19006, 19082,
19157, 19232, 19308, 19383, 19458,
19533, 19608, 19683, 19758, 19833,
19908, 19983, 20058, 20132, 20207,
20281, 20356, 20430, 20505, 20579,
20653, 20727, 20801, 20876, 20950,
21023, 21097, 21171, 21245, 21319,
21392, 21466, 21540, 21613, 21686,
21760, 21833, 21906, 21980, 22053,
22126, 22199, 22272, 22345, 22418,
22491, 22563, 22636, 22709, 22781,
22854, 22926, 22999, 23071, 23143,
23216, 23288, 23360, 23432, 23504,
23576, 23648, 23720, 23792, 23863,
23935, 24007, 24078, 24150, 24221,
24293, 24364, 24436, 24507, 24578,
24649, 24720, 24791, 24862, 24933,
25004, 25075, 25146, 25217, 25287,
25358, 25429, 25499, 25570, 25640,
25710, 25781, 25851, 25921, 25991,
26062, 26132, 26202, 26272, 26341,
26411, 26481, 26551, 26621, 26690,
26760, 26829, 26899, 26968, 27038,
27107, 27176, 27246, 27315, 27384,
27453, 27522, 27591, 27660, 27729,
27798, 27866, 27935, 28004, 28073,
28141, 28210, 28278, 28347, 28415,
28483, 28552, 28620, 28688, 28756,
28824, 28892, 28960, 29028, 29096,
29164, 29232, 29300, 29367, 29435,
29503, 29570, 29638, 29705, 29772,
29840, 29907, 29974, 30042, 30109,
30176, 30243, 30310, 30377, 30444,
30511, 30578, 30644, 30711, 30778,
30845, 30911, 30978, 31044, 31111,
31177, 31244, 31310, 31376, 31442,
31509, 31575, 31641, 31707, 31773,
31839, 31905, 31971, 32036, 32102,
32168, 32234, 32299, 32365, 32430,
32496, 32561, 32627, 32692, 32757,
32823, 32888, 32953, 33018, 33083,
33148, 33213, 33278, 33343, 33408,
33473, 33538, 33602, 33667, 33732,
33796, 33861, 33925, 33990, 34054,
34119, 34183, 34247, 34312, 34376,
34440, 34504, 34568, 34632, 34696,
34760, 34824, 34888, 34952, 35016,
35079, 35143, 35207, 35270, 35334,
35397, 35461, 35524, 35588, 35651,
35714, 35778, 35841, 35904, 35967,
36030, 36093, 36156, 36219, 36282,
36345, 36408, 36471, 36533, 36596,
36659, 36721, 36784, 36847, 36909,
36972, 37034, 37096, 37159, 37221,
37283, 37346, 37408, 37470, 37532,
37594, 37656, 37718, 37780, 37842,
37904, 37966, 38027, 38089, 38151,
38212, 38274, 38336, 38397, 38459,
38520, 38582, 38643, 38704, 38766,
38827, 38888, 38949, 39010, 39071,
39132, 39193, 39254, 39315, 39376,
39437, 39498, 39559, 39620, 39680,
39741, 39801, 39862, 39923, 39983,
40044, 40104, 40164, 40225, 40285,
40345, 40406, 40466, 40526, 40586,
40646, 40706, 40766, 40826, 40886,
40946, 41006, 41066, 41126, 41185,
41245, 41305, 41364, 41424, 41483,
41543, 41602, 41662, 41721, 41781,
41840, 41899, 41959, 42018, 42077,
42136, 42195, 42254, 42313, 42372,
42431, 42490, 42549, 42608, 42667,
42726, 42784, 42843, 42902, 42960,
43019, 43078, 43136, 43195, 43253,
43311, 43370, 43428, 43486, 43545,
43603, 43661, 43719, 43777, 43836,
43894, 43952, 44010, 44068, 44125,
44183, 44241, 44299, 44357, 44415,
44472, 44530, 44588, 44645, 44703,
44760, 44818, 44875, 44933, 44990,
45047, 45105, 45162, 45219, 45276,
45334, 45391, 45448, 45505, 45562,
45619, 45676, 45733, 45790, 45847,
45904, 45960, 46017, 46074, 46131,
46187, 46244, 46300, 46357, 46414,
46470, 46526, 46583, 46639, 46696,
46752, 46808, 46865, 46921, 46977,
47033, 47089, 47145, 47201, 47257,
47313, 47369, 47425, 47481, 47537,
47593, 47649, 47704, 47760, 47816,
47872, 47927, 47983, 48038, 48094,
48149, 48205, 48260, 48316, 48371,
48426, 48482, 48537, 48592, 48647,
48703, 48758, 48813, 48868, 48923,
48978, 49033, 49088, 49143, 49198,
49253, 49308, 49362, 49417, 49472,
49527, 49581, 49636, 49690, 49745,
49800, 49854, 49909, 49963, 50017,
50072, 50126, 50180, 50235, 50289,
50343, 50397, 50452, 50506, 50560,
50614, 50668, 50722, 50776, 50830,
50884, 50938, 50992, 51045, 51099,
51153, 51207, 51260, 51314, 51368,
51421, 51475, 51528, 51582, 51635,
51689, 51742, 51796, 51849, 51902,
51956, 52009, 52062, 52116, 52169,
52222, 52275, 52328, 52381, 52434,
52487, 52540, 52593, 52646, 52699,
52752, 52805, 52858, 52910, 52963,
53016, 53068, 53121, 53174, 53226,
53279, 53331, 53384, 53436, 53489,
53541, 53594, 53646, 53698, 53751,
53803, 53855, 53908, 53960, 54012,
54064, 54116, 54168, 54220, 54272,
54324, 54376, 54428, 54480, 54532,
54584, 54636, 54687, 54739, 54791,
54843, 54894, 54946, 54998, 55049,
55101, 55152, 55204, 55255, 55307,
55358, 55410, 55461, 55512, 55564,
55615, 55666, 55717, 55769, 55820,
55871, 55922, 55973, 56024, 56075,
56126, 56177, 56228, 56279, 56330,
56381, 56432, 56483, 56533, 56584,
56635, 56686, 56736, 56787, 56837,
56888, 56939, 56989, 57040, 57090,
57141, 57191, 57242, 57292, 57342,
57393, 57443, 57493, 57543, 57594,
57644, 57694, 57744, 57794, 57844,
57894, 57944, 57995, 58044, 58094,
58144, 58194, 58244, 58294, 58344,
58394, 58443, 58493, 58543, 58593,
58642, 58692, 58742, 58791, 58841,
58890, 58940, 58989, 59039, 59088,
59138, 59187, 59236, 59286, 59335,
59384, 59433, 59483, 59532, 59581,
59630, 59679, 59728, 59778, 59827,
59876, 59925, 59974, 60023, 60071,
60120, 60169, 60218, 60267, 60316,
60365, 60413, 60462, 60511, 60559,
60608, 60657, 60705, 60754, 60802,
60851, 60899, 60948, 60996, 61045,
61093, 61142, 61190, 61238, 61286,
61335, 61383, 61431, 61479, 61528,
61576, 61624, 61672, 61720, 61768,
61816, 61864, 61912, 61960, 62008,
62056, 62104, 62152, 62200, 62247,
62295, 62343, 62391, 62438, 62486,
62534, 62581, 62629, 62677, 62724,
62772, 62819, 62867, 62914, 62962,
63009, 63056, 63104, 63151, 63199,
63246, 63293, 63340, 63388, 63435,
63482, 63529, 63576, 63623, 63671,
63718, 63765, 63812, 63859, 63906,
63953, 64000, 64047, 64093, 64140,
64187, 64234, 64281, 64327, 64374,
64421, 64468, 64514, 64561, 64608,
64654, 64701, 64747, 64794, 64840,
64887, 64933, 64980, 65026, 65073,
65119, 65165, 65212, 65258, 65304,
65351, 65397, 65443, 65489, 65535
};