FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hqxvlc.c
Go to the documentation of this file.
1 /*
2  * Canopus HQX decoder
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #include "hqx.h"
22 
23 static const uint8_t cbp_vlc_bits[16] = {
24  0x04, 0x1C, 0x1D, 0x09, 0x1E, 0x0B, 0x1B, 0x08,
25  0x1F, 0x1A, 0x0C, 0x07, 0x0A, 0x06, 0x05, 0x00,
26 };
27 
28 static const uint8_t cbp_vlc_lens[16] = {
29  4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 4, 2,
30 };
31 
32 static const uint16_t dc9_vlc_bits[512] = {
33  0x0010, 0x0008, 0x0022, 0x0024, 0x0026, 0x0028, 0x002A, 0x002C,
34  0x002E, 0x0030, 0x0032, 0x0034, 0x0074, 0x0076, 0x0078, 0x007A,
35  0x007C, 0x0000, 0x0002, 0x0004, 0x0006, 0x0008, 0x000A, 0x000C,
36  0x000E, 0x0050, 0x0052, 0x0054, 0x0056, 0x0058, 0x005A, 0x005C,
37  0x005E, 0x0020, 0x0022, 0x0024, 0x0026, 0x0028, 0x002A, 0x002C,
38  0x002E, 0x0030, 0x0032, 0x0034, 0x0036, 0x0038, 0x003A, 0x003C,
39  0x003E, 0x00C0, 0x00C2, 0x00C4, 0x00C6, 0x00C8, 0x00CA, 0x00CC,
40  0x00CE, 0x00D0, 0x00D2, 0x00D4, 0x00D6, 0x00D8, 0x00DA, 0x00DC,
41  0x00DE, 0x01C0, 0x01C2, 0x01C4, 0x01C6, 0x01C8, 0x01CA, 0x01CC,
42  0x01CE, 0x01D0, 0x01D2, 0x01D4, 0x01D6, 0x01D8, 0x01DA, 0x01DC,
43  0x01DE, 0x01E0, 0x01E2, 0x01E4, 0x01E6, 0x01E8, 0x01EA, 0x01EC,
44  0x01EE, 0x01F0, 0x01F2, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FC,
45  0x01FE, 0x06C0, 0x06C2, 0x06C4, 0x06C6, 0x06C8, 0x06CA, 0x06CC,
46  0x06CE, 0x06D0, 0x06D2, 0x06D4, 0x06D6, 0x06D8, 0x06DA, 0x06DC,
47  0x06DE, 0x06E0, 0x06E2, 0x06E4, 0x06E6, 0x06E8, 0x06EA, 0x06EC,
48  0x06EE, 0x06F0, 0x06F2, 0x06F4, 0x06F6, 0x06F8, 0x06FA, 0x06FC,
49  0x06FE, 0x0E00, 0x0E02, 0x0E04, 0x0E06, 0x0E08, 0x0E0A, 0x0E0C,
50  0x0E0E, 0x0E10, 0x0E12, 0x0E14, 0x0E16, 0x0E18, 0x0E1A, 0x0E1C,
51  0x0E1E, 0x0E20, 0x0E22, 0x0E24, 0x0E26, 0x0E28, 0x0E2A, 0x0E2C,
52  0x0E2E, 0x0E30, 0x0E32, 0x0E34, 0x0E36, 0x0E38, 0x0E3A, 0x0E3C,
53  0x0E3E, 0x0E40, 0x0E42, 0x0E44, 0x0E46, 0x0E48, 0x0E4A, 0x0E4C,
54  0x0E4E, 0x0E50, 0x0E52, 0x0E54, 0x0E56, 0x0E58, 0x0E5A, 0x0E5C,
55  0x0E5E, 0x0E60, 0x0E62, 0x0E64, 0x0E66, 0x0E68, 0x0E6A, 0x0E6C,
56  0x0E6E, 0x0E70, 0x0E72, 0x0E74, 0x0E76, 0x0E78, 0x0E7A, 0x0E7C,
57  0x0E7E, 0x1F80, 0x1F82, 0x1F84, 0x1F86, 0x1F88, 0x1F8A, 0x1F8C,
58  0x1F8E, 0x1F90, 0x1F92, 0x1F94, 0x1F96, 0x1F98, 0x1F9A, 0x1F9C,
59  0x1F9E, 0x1FA0, 0x1FA2, 0x1FA4, 0x1FA6, 0x1FA8, 0x1FAA, 0x1FAC,
60  0x1FAE, 0x1FB0, 0x1FB2, 0x1FB4, 0x1FB6, 0x1FB8, 0x1FBA, 0x1FBC,
61  0x1FBE, 0x1FC0, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FC8, 0x1FCA, 0x1FCC,
62  0x1FCE, 0x1FD0, 0x1FD2, 0x1FD4, 0x1FD6, 0x1FD8, 0x1FDA, 0x1FDC,
63  0x1FDE, 0x1FE0, 0x1FE2, 0x1FE4, 0x1FE6, 0x1FE8, 0x1FEA, 0x1FEC,
64  0x1FEE, 0x1FF0, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FF8, 0x1FFA, 0x1FFC,
65  0x0FFF, 0x1FFD, 0x1FFB, 0x1FF9, 0x1FF7, 0x1FF5, 0x1FF3, 0x1FF1,
66  0x1FEF, 0x1FED, 0x1FEB, 0x1FE9, 0x1FE7, 0x1FE5, 0x1FE3, 0x1FE1,
67  0x1FDF, 0x1FDD, 0x1FDB, 0x1FD9, 0x1FD7, 0x1FD5, 0x1FD3, 0x1FD1,
68  0x1FCF, 0x1FCD, 0x1FCB, 0x1FC9, 0x1FC7, 0x1FC5, 0x1FC3, 0x1FC1,
69  0x1FBF, 0x1FBD, 0x1FBB, 0x1FB9, 0x1FB7, 0x1FB5, 0x1FB3, 0x1FB1,
70  0x1FAF, 0x1FAD, 0x1FAB, 0x1FA9, 0x1FA7, 0x1FA5, 0x1FA3, 0x1FA1,
71  0x1F9F, 0x1F9D, 0x1F9B, 0x1F99, 0x1F97, 0x1F95, 0x1F93, 0x1F91,
72  0x1F8F, 0x1F8D, 0x1F8B, 0x1F89, 0x1F87, 0x1F85, 0x1F83, 0x1F81,
73  0x0E7F, 0x0E7D, 0x0E7B, 0x0E79, 0x0E77, 0x0E75, 0x0E73, 0x0E71,
74  0x0E6F, 0x0E6D, 0x0E6B, 0x0E69, 0x0E67, 0x0E65, 0x0E63, 0x0E61,
75  0x0E5F, 0x0E5D, 0x0E5B, 0x0E59, 0x0E57, 0x0E55, 0x0E53, 0x0E51,
76  0x0E4F, 0x0E4D, 0x0E4B, 0x0E49, 0x0E47, 0x0E45, 0x0E43, 0x0E41,
77  0x0E3F, 0x0E3D, 0x0E3B, 0x0E39, 0x0E37, 0x0E35, 0x0E33, 0x0E31,
78  0x0E2F, 0x0E2D, 0x0E2B, 0x0E29, 0x0E27, 0x0E25, 0x0E23, 0x0E21,
79  0x0E1F, 0x0E1D, 0x0E1B, 0x0E19, 0x0E17, 0x0E15, 0x0E13, 0x0E11,
80  0x0E0F, 0x0E0D, 0x0E0B, 0x0E09, 0x0E07, 0x0E05, 0x0E03, 0x0E01,
81  0x06FF, 0x06FD, 0x06FB, 0x06F9, 0x06F7, 0x06F5, 0x06F3, 0x06F1,
82  0x06EF, 0x06ED, 0x06EB, 0x06E9, 0x06E7, 0x06E5, 0x06E3, 0x06E1,
83  0x06DF, 0x06DD, 0x06DB, 0x06D9, 0x06D7, 0x06D5, 0x06D3, 0x06D1,
84  0x06CF, 0x06CD, 0x06CB, 0x06C9, 0x06C7, 0x06C5, 0x06C3, 0x06C1,
85  0x01FF, 0x01FD, 0x01FB, 0x01F9, 0x01F7, 0x01F5, 0x01F3, 0x01F1,
86  0x01EF, 0x01ED, 0x01EB, 0x01E9, 0x01E7, 0x01E5, 0x01E3, 0x01E1,
87  0x01DF, 0x01DD, 0x01DB, 0x01D9, 0x01D7, 0x01D5, 0x01D3, 0x01D1,
88  0x01CF, 0x01CD, 0x01CB, 0x01C9, 0x01C7, 0x01C5, 0x01C3, 0x01C1,
89  0x00DF, 0x00DD, 0x00DB, 0x00D9, 0x00D7, 0x00D5, 0x00D3, 0x00D1,
90  0x00CF, 0x00CD, 0x00CB, 0x00C9, 0x00C7, 0x00C5, 0x00C3, 0x00C1,
91  0x003F, 0x003D, 0x003B, 0x0039, 0x0037, 0x0035, 0x0033, 0x0031,
92  0x002F, 0x002D, 0x002B, 0x0029, 0x0027, 0x0025, 0x0023, 0x0021,
93  0x005F, 0x005D, 0x005B, 0x0059, 0x0057, 0x0055, 0x0053, 0x0051,
94  0x000F, 0x000D, 0x000B, 0x0009, 0x0007, 0x0005, 0x0003, 0x0001,
95  0x007D, 0x007B, 0x0079, 0x0077, 0x0075, 0x0035, 0x0033, 0x0031,
96  0x002F, 0x002D, 0x002B, 0x0029, 0x0027, 0x0025, 0x0023, 0x0009,
97 };
98 
99 static const uint8_t dc9_vlc_lens[512] = {
100  5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7,
101  7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8,
102  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
103  8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
104  9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
105  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
106  10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
107  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
108  11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
109  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
110  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
111  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
112  12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
113  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
114  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
115  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
116  12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
117  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
118  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
119  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
120  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
121  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
122  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
123  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
124  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
125  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
126  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
127  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
128  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
129  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
130  8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7,
131  7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
132 };
133 
134 static const uint16_t dc10_vlc_bits[1024] = {
135  0x0014, 0x002A, 0x002C, 0x002E, 0x0064, 0x0066, 0x0068, 0x006A,
136  0x006C, 0x006E, 0x0070, 0x0072, 0x0074, 0x0076, 0x0078, 0x007A,
137  0x007C, 0x0040, 0x0042, 0x0044, 0x0046, 0x0048, 0x004A, 0x004C,
138  0x004E, 0x0050, 0x0052, 0x0054, 0x0056, 0x0058, 0x005A, 0x005C,
139  0x005E, 0x0000, 0x0002, 0x0004, 0x0006, 0x0008, 0x000A, 0x000C,
140  0x000E, 0x0010, 0x0012, 0x0014, 0x0016, 0x0018, 0x001A, 0x001C,
141  0x001E, 0x00C0, 0x00C2, 0x00C4, 0x00C6, 0x00C8, 0x00CA, 0x00CC,
142  0x00CE, 0x00D0, 0x00D2, 0x00D4, 0x00D6, 0x00D8, 0x00DA, 0x00DC,
143  0x00DE, 0x0040, 0x0042, 0x0044, 0x0046, 0x0048, 0x004A, 0x004C,
144  0x004E, 0x0050, 0x0052, 0x0054, 0x0056, 0x0058, 0x005A, 0x005C,
145  0x005E, 0x0060, 0x0062, 0x0064, 0x0066, 0x0068, 0x006A, 0x006C,
146  0x006E, 0x0070, 0x0072, 0x0074, 0x0076, 0x0078, 0x007A, 0x007C,
147  0x007E, 0x01C0, 0x01C2, 0x01C4, 0x01C6, 0x01C8, 0x01CA, 0x01CC,
148  0x01CE, 0x01D0, 0x01D2, 0x01D4, 0x01D6, 0x01D8, 0x01DA, 0x01DC,
149  0x01DE, 0x01E0, 0x01E2, 0x01E4, 0x01E6, 0x01E8, 0x01EA, 0x01EC,
150  0x01EE, 0x01F0, 0x01F2, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FC,
151  0x01FE, 0x0400, 0x0402, 0x0404, 0x0406, 0x0408, 0x040A, 0x040C,
152  0x040E, 0x0410, 0x0412, 0x0414, 0x0416, 0x0418, 0x041A, 0x041C,
153  0x041E, 0x0420, 0x0422, 0x0424, 0x0426, 0x0428, 0x042A, 0x042C,
154  0x042E, 0x0430, 0x0432, 0x0434, 0x0436, 0x0438, 0x043A, 0x043C,
155  0x043E, 0x0440, 0x0442, 0x0444, 0x0446, 0x0448, 0x044A, 0x044C,
156  0x044E, 0x0450, 0x0452, 0x0454, 0x0456, 0x0458, 0x045A, 0x045C,
157  0x045E, 0x0460, 0x0462, 0x0464, 0x0466, 0x0468, 0x046A, 0x046C,
158  0x046E, 0x0470, 0x0472, 0x0474, 0x0476, 0x0478, 0x047A, 0x047C,
159  0x047E, 0x0C00, 0x0C02, 0x0C04, 0x0C06, 0x0C08, 0x0C0A, 0x0C0C,
160  0x0C0E, 0x0C10, 0x0C12, 0x0C14, 0x0C16, 0x0C18, 0x0C1A, 0x0C1C,
161  0x0C1E, 0x0C20, 0x0C22, 0x0C24, 0x0C26, 0x0C28, 0x0C2A, 0x0C2C,
162  0x0C2E, 0x0C30, 0x0C32, 0x0C34, 0x0C36, 0x0C38, 0x0C3A, 0x0C3C,
163  0x0C3E, 0x0C40, 0x0C42, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4C,
164  0x0C4E, 0x0C50, 0x0C52, 0x0C54, 0x0C56, 0x0C58, 0x0C5A, 0x0C5C,
165  0x0C5E, 0x0C60, 0x0C62, 0x0C64, 0x0C66, 0x0C68, 0x0C6A, 0x0C6C,
166  0x0C6E, 0x0C70, 0x0C72, 0x0C74, 0x0C76, 0x0C78, 0x0C7A, 0x0C7C,
167  0x0C7E, 0x0900, 0x0902, 0x0904, 0x0906, 0x0908, 0x090A, 0x090C,
168  0x090E, 0x0910, 0x0912, 0x0914, 0x0916, 0x0918, 0x091A, 0x091C,
169  0x091E, 0x0920, 0x0922, 0x0924, 0x0926, 0x0928, 0x092A, 0x092C,
170  0x092E, 0x0930, 0x0932, 0x0934, 0x0936, 0x0938, 0x093A, 0x093C,
171  0x093E, 0x0940, 0x0942, 0x0944, 0x0946, 0x0948, 0x094A, 0x094C,
172  0x094E, 0x0950, 0x0952, 0x0954, 0x0956, 0x0958, 0x095A, 0x095C,
173  0x095E, 0x0960, 0x0962, 0x0964, 0x0966, 0x0968, 0x096A, 0x096C,
174  0x096E, 0x0970, 0x0972, 0x0974, 0x0976, 0x0978, 0x097A, 0x097C,
175  0x097E, 0x0980, 0x0982, 0x0984, 0x0986, 0x0988, 0x098A, 0x098C,
176  0x098E, 0x0990, 0x0992, 0x0994, 0x0996, 0x0998, 0x099A, 0x099C,
177  0x099E, 0x09A0, 0x09A2, 0x09A4, 0x09A6, 0x09A8, 0x09AA, 0x09AC,
178  0x09AE, 0x09B0, 0x09B2, 0x09B4, 0x09B6, 0x09B8, 0x09BA, 0x09BC,
179  0x09BE, 0x09C0, 0x09C2, 0x09C4, 0x09C6, 0x09C8, 0x09CA, 0x09CC,
180  0x09CE, 0x09D0, 0x09D2, 0x09D4, 0x09D6, 0x09D8, 0x09DA, 0x09DC,
181  0x09DE, 0x09E0, 0x09E2, 0x09E4, 0x09E6, 0x09E8, 0x09EA, 0x09EC,
182  0x09EE, 0x09F0, 0x09F2, 0x09F4, 0x09F6, 0x09F8, 0x09FA, 0x09FC,
183  0x09FE, 0x3F00, 0x3F02, 0x3F04, 0x3F06, 0x3F08, 0x3F0A, 0x3F0C,
184  0x3F0E, 0x3F10, 0x3F12, 0x3F14, 0x3F16, 0x3F18, 0x3F1A, 0x3F1C,
185  0x3F1E, 0x3F20, 0x3F22, 0x3F24, 0x3F26, 0x3F28, 0x3F2A, 0x3F2C,
186  0x3F2E, 0x3F30, 0x3F32, 0x3F34, 0x3F36, 0x3F38, 0x3F3A, 0x3F3C,
187  0x3F3E, 0x3F40, 0x3F42, 0x3F44, 0x3F46, 0x3F48, 0x3F4A, 0x3F4C,
188  0x3F4E, 0x3F50, 0x3F52, 0x3F54, 0x3F56, 0x3F58, 0x3F5A, 0x3F5C,
189  0x3F5E, 0x3F60, 0x3F62, 0x3F64, 0x3F66, 0x3F68, 0x3F6A, 0x3F6C,
190  0x3F6E, 0x3F70, 0x3F72, 0x3F74, 0x3F76, 0x3F78, 0x3F7A, 0x3F7C,
191  0x3F7E, 0x3F80, 0x3F82, 0x3F84, 0x3F86, 0x3F88, 0x3F8A, 0x3F8C,
192  0x3F8E, 0x3F90, 0x3F92, 0x3F94, 0x3F96, 0x3F98, 0x3F9A, 0x3F9C,
193  0x3F9E, 0x3FA0, 0x3FA2, 0x3FA4, 0x3FA6, 0x3FA8, 0x3FAA, 0x3FAC,
194  0x3FAE, 0x3FB0, 0x3FB2, 0x3FB4, 0x3FB6, 0x3FB8, 0x3FBA, 0x3FBC,
195  0x3FBE, 0x3FC0, 0x3FC2, 0x3FC4, 0x3FC6, 0x3FC8, 0x3FCA, 0x3FCC,
196  0x3FCE, 0x3FD0, 0x3FD2, 0x3FD4, 0x3FD6, 0x3FD8, 0x3FDA, 0x3FDC,
197  0x3FDE, 0x3FE0, 0x3FE2, 0x3FE4, 0x3FE6, 0x3FE8, 0x3FEA, 0x3FEC,
198  0x3FEE, 0x3FF0, 0x3FF2, 0x3FF4, 0x3FF6, 0x3FF8, 0x3FFA, 0x3FFC,
199  0x1FFF, 0x3FFD, 0x3FFB, 0x3FF9, 0x3FF7, 0x3FF5, 0x3FF3, 0x3FF1,
200  0x3FEF, 0x3FED, 0x3FEB, 0x3FE9, 0x3FE7, 0x3FE5, 0x3FE3, 0x3FE1,
201  0x3FDF, 0x3FDD, 0x3FDB, 0x3FD9, 0x3FD7, 0x3FD5, 0x3FD3, 0x3FD1,
202  0x3FCF, 0x3FCD, 0x3FCB, 0x3FC9, 0x3FC7, 0x3FC5, 0x3FC3, 0x3FC1,
203  0x3FBF, 0x3FBD, 0x3FBB, 0x3FB9, 0x3FB7, 0x3FB5, 0x3FB3, 0x3FB1,
204  0x3FAF, 0x3FAD, 0x3FAB, 0x3FA9, 0x3FA7, 0x3FA5, 0x3FA3, 0x3FA1,
205  0x3F9F, 0x3F9D, 0x3F9B, 0x3F99, 0x3F97, 0x3F95, 0x3F93, 0x3F91,
206  0x3F8F, 0x3F8D, 0x3F8B, 0x3F89, 0x3F87, 0x3F85, 0x3F83, 0x3F81,
207  0x3F7F, 0x3F7D, 0x3F7B, 0x3F79, 0x3F77, 0x3F75, 0x3F73, 0x3F71,
208  0x3F6F, 0x3F6D, 0x3F6B, 0x3F69, 0x3F67, 0x3F65, 0x3F63, 0x3F61,
209  0x3F5F, 0x3F5D, 0x3F5B, 0x3F59, 0x3F57, 0x3F55, 0x3F53, 0x3F51,
210  0x3F4F, 0x3F4D, 0x3F4B, 0x3F49, 0x3F47, 0x3F45, 0x3F43, 0x3F41,
211  0x3F3F, 0x3F3D, 0x3F3B, 0x3F39, 0x3F37, 0x3F35, 0x3F33, 0x3F31,
212  0x3F2F, 0x3F2D, 0x3F2B, 0x3F29, 0x3F27, 0x3F25, 0x3F23, 0x3F21,
213  0x3F1F, 0x3F1D, 0x3F1B, 0x3F19, 0x3F17, 0x3F15, 0x3F13, 0x3F11,
214  0x3F0F, 0x3F0D, 0x3F0B, 0x3F09, 0x3F07, 0x3F05, 0x3F03, 0x3F01,
215  0x09FF, 0x09FD, 0x09FB, 0x09F9, 0x09F7, 0x09F5, 0x09F3, 0x09F1,
216  0x09EF, 0x09ED, 0x09EB, 0x09E9, 0x09E7, 0x09E5, 0x09E3, 0x09E1,
217  0x09DF, 0x09DD, 0x09DB, 0x09D9, 0x09D7, 0x09D5, 0x09D3, 0x09D1,
218  0x09CF, 0x09CD, 0x09CB, 0x09C9, 0x09C7, 0x09C5, 0x09C3, 0x09C1,
219  0x09BF, 0x09BD, 0x09BB, 0x09B9, 0x09B7, 0x09B5, 0x09B3, 0x09B1,
220  0x09AF, 0x09AD, 0x09AB, 0x09A9, 0x09A7, 0x09A5, 0x09A3, 0x09A1,
221  0x099F, 0x099D, 0x099B, 0x0999, 0x0997, 0x0995, 0x0993, 0x0991,
222  0x098F, 0x098D, 0x098B, 0x0989, 0x0987, 0x0985, 0x0983, 0x0981,
223  0x097F, 0x097D, 0x097B, 0x0979, 0x0977, 0x0975, 0x0973, 0x0971,
224  0x096F, 0x096D, 0x096B, 0x0969, 0x0967, 0x0965, 0x0963, 0x0961,
225  0x095F, 0x095D, 0x095B, 0x0959, 0x0957, 0x0955, 0x0953, 0x0951,
226  0x094F, 0x094D, 0x094B, 0x0949, 0x0947, 0x0945, 0x0943, 0x0941,
227  0x093F, 0x093D, 0x093B, 0x0939, 0x0937, 0x0935, 0x0933, 0x0931,
228  0x092F, 0x092D, 0x092B, 0x0929, 0x0927, 0x0925, 0x0923, 0x0921,
229  0x091F, 0x091D, 0x091B, 0x0919, 0x0917, 0x0915, 0x0913, 0x0911,
230  0x090F, 0x090D, 0x090B, 0x0909, 0x0907, 0x0905, 0x0903, 0x0901,
231  0x0C7F, 0x0C7D, 0x0C7B, 0x0C79, 0x0C77, 0x0C75, 0x0C73, 0x0C71,
232  0x0C6F, 0x0C6D, 0x0C6B, 0x0C69, 0x0C67, 0x0C65, 0x0C63, 0x0C61,
233  0x0C5F, 0x0C5D, 0x0C5B, 0x0C59, 0x0C57, 0x0C55, 0x0C53, 0x0C51,
234  0x0C4F, 0x0C4D, 0x0C4B, 0x0C49, 0x0C47, 0x0C45, 0x0C43, 0x0C41,
235  0x0C3F, 0x0C3D, 0x0C3B, 0x0C39, 0x0C37, 0x0C35, 0x0C33, 0x0C31,
236  0x0C2F, 0x0C2D, 0x0C2B, 0x0C29, 0x0C27, 0x0C25, 0x0C23, 0x0C21,
237  0x0C1F, 0x0C1D, 0x0C1B, 0x0C19, 0x0C17, 0x0C15, 0x0C13, 0x0C11,
238  0x0C0F, 0x0C0D, 0x0C0B, 0x0C09, 0x0C07, 0x0C05, 0x0C03, 0x0C01,
239  0x047F, 0x047D, 0x047B, 0x0479, 0x0477, 0x0475, 0x0473, 0x0471,
240  0x046F, 0x046D, 0x046B, 0x0469, 0x0467, 0x0465, 0x0463, 0x0461,
241  0x045F, 0x045D, 0x045B, 0x0459, 0x0457, 0x0455, 0x0453, 0x0451,
242  0x044F, 0x044D, 0x044B, 0x0449, 0x0447, 0x0445, 0x0443, 0x0441,
243  0x043F, 0x043D, 0x043B, 0x0439, 0x0437, 0x0435, 0x0433, 0x0431,
244  0x042F, 0x042D, 0x042B, 0x0429, 0x0427, 0x0425, 0x0423, 0x0421,
245  0x041F, 0x041D, 0x041B, 0x0419, 0x0417, 0x0415, 0x0413, 0x0411,
246  0x040F, 0x040D, 0x040B, 0x0409, 0x0407, 0x0405, 0x0403, 0x0401,
247  0x01FF, 0x01FD, 0x01FB, 0x01F9, 0x01F7, 0x01F5, 0x01F3, 0x01F1,
248  0x01EF, 0x01ED, 0x01EB, 0x01E9, 0x01E7, 0x01E5, 0x01E3, 0x01E1,
249  0x01DF, 0x01DD, 0x01DB, 0x01D9, 0x01D7, 0x01D5, 0x01D3, 0x01D1,
250  0x01CF, 0x01CD, 0x01CB, 0x01C9, 0x01C7, 0x01C5, 0x01C3, 0x01C1,
251  0x007F, 0x007D, 0x007B, 0x0079, 0x0077, 0x0075, 0x0073, 0x0071,
252  0x006F, 0x006D, 0x006B, 0x0069, 0x0067, 0x0065, 0x0063, 0x0061,
253  0x005F, 0x005D, 0x005B, 0x0059, 0x0057, 0x0055, 0x0053, 0x0051,
254  0x004F, 0x004D, 0x004B, 0x0049, 0x0047, 0x0045, 0x0043, 0x0041,
255  0x00DF, 0x00DD, 0x00DB, 0x00D9, 0x00D7, 0x00D5, 0x00D3, 0x00D1,
256  0x00CF, 0x00CD, 0x00CB, 0x00C9, 0x00C7, 0x00C5, 0x00C3, 0x00C1,
257  0x001F, 0x001D, 0x001B, 0x0019, 0x0017, 0x0015, 0x0013, 0x0011,
258  0x000F, 0x000D, 0x000B, 0x0009, 0x0007, 0x0005, 0x0003, 0x0001,
259  0x005F, 0x005D, 0x005B, 0x0059, 0x0057, 0x0055, 0x0053, 0x0051,
260  0x004F, 0x004D, 0x004B, 0x0049, 0x0047, 0x0045, 0x0043, 0x0041,
261  0x007D, 0x007B, 0x0079, 0x0077, 0x0075, 0x0073, 0x0071, 0x006F,
262  0x006D, 0x006B, 0x0069, 0x0067, 0x0065, 0x002F, 0x002D, 0x002B,
263 };
264 
265 static const uint8_t dc10_vlc_lens[1024] = {
266  5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
267  7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
268  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
269  8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
270  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
271  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
272  9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
273  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
274  10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
275  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
276  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
277  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
278  11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
279  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
280  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
281  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
282  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
283  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
284  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
285  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
286  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
287  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
288  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
289  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
290  12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
291  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
292  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
293  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
294  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
295  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
296  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
297  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
298  13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
299  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
300  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
301  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
302  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
303  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
304  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
305  14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
306  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
307  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
308  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
309  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
310  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
311  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
312  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
313  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
314  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
315  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
316  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
317  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
318  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
319  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
320  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
321  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
322  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
323  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
324  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
325  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
326  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
327  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
328  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
329  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6,
330 };
331 
332 static const uint16_t dc11_vlc_bits[2048] = {
333  0x0032, 0x0066, 0x0068, 0x006A, 0x006C, 0x006E, 0x0070, 0x0072,
334  0x0074, 0x00F0, 0x00F2, 0x00F4, 0x00F6, 0x00F8, 0x00FA, 0x00FC,
335  0x00FE, 0x0040, 0x0042, 0x0044, 0x0046, 0x0048, 0x004A, 0x004C,
336  0x004E, 0x0050, 0x0052, 0x0054, 0x0056, 0x0058, 0x005A, 0x005C,
337  0x005E, 0x00C0, 0x00C2, 0x00C4, 0x00C6, 0x00C8, 0x00CA, 0x00CC,
338  0x00CE, 0x00D0, 0x00D2, 0x00D4, 0x00D6, 0x00D8, 0x00DA, 0x00DC,
339  0x00DE, 0x00E0, 0x00E2, 0x00E4, 0x00E6, 0x00E8, 0x00EA, 0x00EC,
340  0x00EE, 0x00F0, 0x00F2, 0x00F4, 0x00F6, 0x00F8, 0x00FA, 0x00FC,
341  0x00FE, 0x0000, 0x0002, 0x0004, 0x0006, 0x0008, 0x000A, 0x000C,
342  0x000E, 0x0010, 0x0012, 0x0014, 0x0016, 0x0018, 0x001A, 0x001C,
343  0x001E, 0x0020, 0x0022, 0x0024, 0x0026, 0x0028, 0x002A, 0x002C,
344  0x002E, 0x0030, 0x0032, 0x0034, 0x0036, 0x0038, 0x003A, 0x003C,
345  0x003E, 0x0200, 0x0202, 0x0204, 0x0206, 0x0208, 0x020A, 0x020C,
346  0x020E, 0x0210, 0x0212, 0x0214, 0x0216, 0x0218, 0x021A, 0x021C,
347  0x021E, 0x0220, 0x0222, 0x0224, 0x0226, 0x0228, 0x022A, 0x022C,
348  0x022E, 0x0230, 0x0232, 0x0234, 0x0236, 0x0238, 0x023A, 0x023C,
349  0x023E, 0x0080, 0x0082, 0x0084, 0x0086, 0x0088, 0x008A, 0x008C,
350  0x008E, 0x0090, 0x0092, 0x0094, 0x0096, 0x0098, 0x009A, 0x009C,
351  0x009E, 0x00A0, 0x00A2, 0x00A4, 0x00A6, 0x00A8, 0x00AA, 0x00AC,
352  0x00AE, 0x00B0, 0x00B2, 0x00B4, 0x00B6, 0x00B8, 0x00BA, 0x00BC,
353  0x00BE, 0x00C0, 0x00C2, 0x00C4, 0x00C6, 0x00C8, 0x00CA, 0x00CC,
354  0x00CE, 0x00D0, 0x00D2, 0x00D4, 0x00D6, 0x00D8, 0x00DA, 0x00DC,
355  0x00DE, 0x00E0, 0x00E2, 0x00E4, 0x00E6, 0x00E8, 0x00EA, 0x00EC,
356  0x00EE, 0x00F0, 0x00F2, 0x00F4, 0x00F6, 0x00F8, 0x00FA, 0x00FC,
357  0x00FE, 0x0480, 0x0482, 0x0484, 0x0486, 0x0488, 0x048A, 0x048C,
358  0x048E, 0x0490, 0x0492, 0x0494, 0x0496, 0x0498, 0x049A, 0x049C,
359  0x049E, 0x04A0, 0x04A2, 0x04A4, 0x04A6, 0x04A8, 0x04AA, 0x04AC,
360  0x04AE, 0x04B0, 0x04B2, 0x04B4, 0x04B6, 0x04B8, 0x04BA, 0x04BC,
361  0x04BE, 0x04C0, 0x04C2, 0x04C4, 0x04C6, 0x04C8, 0x04CA, 0x04CC,
362  0x04CE, 0x04D0, 0x04D2, 0x04D4, 0x04D6, 0x04D8, 0x04DA, 0x04DC,
363  0x04DE, 0x04E0, 0x04E2, 0x04E4, 0x04E6, 0x04E8, 0x04EA, 0x04EC,
364  0x04EE, 0x04F0, 0x04F2, 0x04F4, 0x04F6, 0x04F8, 0x04FA, 0x04FC,
365  0x04FE, 0x0A00, 0x0A02, 0x0A04, 0x0A06, 0x0A08, 0x0A0A, 0x0A0C,
366  0x0A0E, 0x0A10, 0x0A12, 0x0A14, 0x0A16, 0x0A18, 0x0A1A, 0x0A1C,
367  0x0A1E, 0x0A20, 0x0A22, 0x0A24, 0x0A26, 0x0A28, 0x0A2A, 0x0A2C,
368  0x0A2E, 0x0A30, 0x0A32, 0x0A34, 0x0A36, 0x0A38, 0x0A3A, 0x0A3C,
369  0x0A3E, 0x0A40, 0x0A42, 0x0A44, 0x0A46, 0x0A48, 0x0A4A, 0x0A4C,
370  0x0A4E, 0x0A50, 0x0A52, 0x0A54, 0x0A56, 0x0A58, 0x0A5A, 0x0A5C,
371  0x0A5E, 0x0A60, 0x0A62, 0x0A64, 0x0A66, 0x0A68, 0x0A6A, 0x0A6C,
372  0x0A6E, 0x0A70, 0x0A72, 0x0A74, 0x0A76, 0x0A78, 0x0A7A, 0x0A7C,
373  0x0A7E, 0x0A80, 0x0A82, 0x0A84, 0x0A86, 0x0A88, 0x0A8A, 0x0A8C,
374  0x0A8E, 0x0A90, 0x0A92, 0x0A94, 0x0A96, 0x0A98, 0x0A9A, 0x0A9C,
375  0x0A9E, 0x0AA0, 0x0AA2, 0x0AA4, 0x0AA6, 0x0AA8, 0x0AAA, 0x0AAC,
376  0x0AAE, 0x0AB0, 0x0AB2, 0x0AB4, 0x0AB6, 0x0AB8, 0x0ABA, 0x0ABC,
377  0x0ABE, 0x0AC0, 0x0AC2, 0x0AC4, 0x0AC6, 0x0AC8, 0x0ACA, 0x0ACC,
378  0x0ACE, 0x0AD0, 0x0AD2, 0x0AD4, 0x0AD6, 0x0AD8, 0x0ADA, 0x0ADC,
379  0x0ADE, 0x0AE0, 0x0AE2, 0x0AE4, 0x0AE6, 0x0AE8, 0x0AEA, 0x0AEC,
380  0x0AEE, 0x0AF0, 0x0AF2, 0x0AF4, 0x0AF6, 0x0AF8, 0x0AFA, 0x0AFC,
381  0x0AFE, 0x1800, 0x1802, 0x1804, 0x1806, 0x1808, 0x180A, 0x180C,
382  0x180E, 0x1810, 0x1812, 0x1814, 0x1816, 0x1818, 0x181A, 0x181C,
383  0x181E, 0x1820, 0x1822, 0x1824, 0x1826, 0x1828, 0x182A, 0x182C,
384  0x182E, 0x1830, 0x1832, 0x1834, 0x1836, 0x1838, 0x183A, 0x183C,
385  0x183E, 0x1840, 0x1842, 0x1844, 0x1846, 0x1848, 0x184A, 0x184C,
386  0x184E, 0x1850, 0x1852, 0x1854, 0x1856, 0x1858, 0x185A, 0x185C,
387  0x185E, 0x1860, 0x1862, 0x1864, 0x1866, 0x1868, 0x186A, 0x186C,
388  0x186E, 0x1870, 0x1872, 0x1874, 0x1876, 0x1878, 0x187A, 0x187C,
389  0x187E, 0x1880, 0x1882, 0x1884, 0x1886, 0x1888, 0x188A, 0x188C,
390  0x188E, 0x1890, 0x1892, 0x1894, 0x1896, 0x1898, 0x189A, 0x189C,
391  0x189E, 0x18A0, 0x18A2, 0x18A4, 0x18A6, 0x18A8, 0x18AA, 0x18AC,
392  0x18AE, 0x18B0, 0x18B2, 0x18B4, 0x18B6, 0x18B8, 0x18BA, 0x18BC,
393  0x18BE, 0x18C0, 0x18C2, 0x18C4, 0x18C6, 0x18C8, 0x18CA, 0x18CC,
394  0x18CE, 0x18D0, 0x18D2, 0x18D4, 0x18D6, 0x18D8, 0x18DA, 0x18DC,
395  0x18DE, 0x18E0, 0x18E2, 0x18E4, 0x18E6, 0x18E8, 0x18EA, 0x18EC,
396  0x18EE, 0x18F0, 0x18F2, 0x18F4, 0x18F6, 0x18F8, 0x18FA, 0x18FC,
397  0x18FE, 0x1600, 0x1602, 0x1604, 0x1606, 0x1608, 0x160A, 0x160C,
398  0x160E, 0x1610, 0x1612, 0x1614, 0x1616, 0x1618, 0x161A, 0x161C,
399  0x161E, 0x1620, 0x1622, 0x1624, 0x1626, 0x1628, 0x162A, 0x162C,
400  0x162E, 0x1630, 0x1632, 0x1634, 0x1636, 0x1638, 0x163A, 0x163C,
401  0x163E, 0x1640, 0x1642, 0x1644, 0x1646, 0x1648, 0x164A, 0x164C,
402  0x164E, 0x1650, 0x1652, 0x1654, 0x1656, 0x1658, 0x165A, 0x165C,
403  0x165E, 0x1660, 0x1662, 0x1664, 0x1666, 0x1668, 0x166A, 0x166C,
404  0x166E, 0x1670, 0x1672, 0x1674, 0x1676, 0x1678, 0x167A, 0x167C,
405  0x167E, 0x1680, 0x1682, 0x1684, 0x1686, 0x1688, 0x168A, 0x168C,
406  0x168E, 0x1690, 0x1692, 0x1694, 0x1696, 0x1698, 0x169A, 0x169C,
407  0x169E, 0x16A0, 0x16A2, 0x16A4, 0x16A6, 0x16A8, 0x16AA, 0x16AC,
408  0x16AE, 0x16B0, 0x16B2, 0x16B4, 0x16B6, 0x16B8, 0x16BA, 0x16BC,
409  0x16BE, 0x16C0, 0x16C2, 0x16C4, 0x16C6, 0x16C8, 0x16CA, 0x16CC,
410  0x16CE, 0x16D0, 0x16D2, 0x16D4, 0x16D6, 0x16D8, 0x16DA, 0x16DC,
411  0x16DE, 0x16E0, 0x16E2, 0x16E4, 0x16E6, 0x16E8, 0x16EA, 0x16EC,
412  0x16EE, 0x16F0, 0x16F2, 0x16F4, 0x16F6, 0x16F8, 0x16FA, 0x16FC,
413  0x16FE, 0x1700, 0x1702, 0x1704, 0x1706, 0x1708, 0x170A, 0x170C,
414  0x170E, 0x1710, 0x1712, 0x1714, 0x1716, 0x1718, 0x171A, 0x171C,
415  0x171E, 0x1720, 0x1722, 0x1724, 0x1726, 0x1728, 0x172A, 0x172C,
416  0x172E, 0x1730, 0x1732, 0x1734, 0x1736, 0x1738, 0x173A, 0x173C,
417  0x173E, 0x1740, 0x1742, 0x1744, 0x1746, 0x1748, 0x174A, 0x174C,
418  0x174E, 0x1750, 0x1752, 0x1754, 0x1756, 0x1758, 0x175A, 0x175C,
419  0x175E, 0x1760, 0x1762, 0x1764, 0x1766, 0x1768, 0x176A, 0x176C,
420  0x176E, 0x1770, 0x1772, 0x1774, 0x1776, 0x1778, 0x177A, 0x177C,
421  0x177E, 0x1780, 0x1782, 0x1784, 0x1786, 0x1788, 0x178A, 0x178C,
422  0x178E, 0x1790, 0x1792, 0x1794, 0x1796, 0x1798, 0x179A, 0x179C,
423  0x179E, 0x17A0, 0x17A2, 0x17A4, 0x17A6, 0x17A8, 0x17AA, 0x17AC,
424  0x17AE, 0x17B0, 0x17B2, 0x17B4, 0x17B6, 0x17B8, 0x17BA, 0x17BC,
425  0x17BE, 0x17C0, 0x17C2, 0x17C4, 0x17C6, 0x17C8, 0x17CA, 0x17CC,
426  0x17CE, 0x17D0, 0x17D2, 0x17D4, 0x17D6, 0x17D8, 0x17DA, 0x17DC,
427  0x17DE, 0x17E0, 0x17E2, 0x17E4, 0x17E6, 0x17E8, 0x17EA, 0x17EC,
428  0x17EE, 0x17F0, 0x17F2, 0x17F4, 0x17F6, 0x17F8, 0x17FA, 0x17FC,
429  0x17FE, 0x7600, 0x7602, 0x7604, 0x7606, 0x7608, 0x760A, 0x760C,
430  0x760E, 0x7610, 0x7612, 0x7614, 0x7616, 0x7618, 0x761A, 0x761C,
431  0x761E, 0x7620, 0x7622, 0x7624, 0x7626, 0x7628, 0x762A, 0x762C,
432  0x762E, 0x7630, 0x7632, 0x7634, 0x7636, 0x7638, 0x763A, 0x763C,
433  0x763E, 0x7640, 0x7642, 0x7644, 0x7646, 0x7648, 0x764A, 0x764C,
434  0x764E, 0x7650, 0x7652, 0x7654, 0x7656, 0x7658, 0x765A, 0x765C,
435  0x765E, 0x7660, 0x7662, 0x7664, 0x7666, 0x7668, 0x766A, 0x766C,
436  0x766E, 0x7670, 0x7672, 0x7674, 0x7676, 0x7678, 0x767A, 0x767C,
437  0x767E, 0x7680, 0x7682, 0x7684, 0x7686, 0x7688, 0x768A, 0x768C,
438  0x768E, 0x7690, 0x7692, 0x7694, 0x7696, 0x7698, 0x769A, 0x769C,
439  0x769E, 0x76A0, 0x76A2, 0x76A4, 0x76A6, 0x76A8, 0x76AA, 0x76AC,
440  0x76AE, 0x76B0, 0x76B2, 0x76B4, 0x76B6, 0x76B8, 0x76BA, 0x76BC,
441  0x76BE, 0x76C0, 0x76C2, 0x76C4, 0x76C6, 0x76C8, 0x76CA, 0x76CC,
442  0x76CE, 0x76D0, 0x76D2, 0x76D4, 0x76D6, 0x76D8, 0x76DA, 0x76DC,
443  0x76DE, 0x76E0, 0x76E2, 0x76E4, 0x76E6, 0x76E8, 0x76EA, 0x76EC,
444  0x76EE, 0x76F0, 0x76F2, 0x76F4, 0x76F6, 0x76F8, 0x76FA, 0x76FC,
445  0x76FE, 0x7700, 0x7702, 0x7704, 0x7706, 0x7708, 0x770A, 0x770C,
446  0x770E, 0x7710, 0x7712, 0x7714, 0x7716, 0x7718, 0x771A, 0x771C,
447  0x771E, 0x7720, 0x7722, 0x7724, 0x7726, 0x7728, 0x772A, 0x772C,
448  0x772E, 0x7730, 0x7732, 0x7734, 0x7736, 0x7738, 0x773A, 0x773C,
449  0x773E, 0x7740, 0x7742, 0x7744, 0x7746, 0x7748, 0x774A, 0x774C,
450  0x774E, 0x7750, 0x7752, 0x7754, 0x7756, 0x7758, 0x775A, 0x775C,
451  0x775E, 0x7760, 0x7762, 0x7764, 0x7766, 0x7768, 0x776A, 0x776C,
452  0x776E, 0x7770, 0x7772, 0x7774, 0x7776, 0x7778, 0x777A, 0x777C,
453  0x777E, 0x7780, 0x7782, 0x7784, 0x7786, 0x7788, 0x778A, 0x778C,
454  0x778E, 0x7790, 0x7792, 0x7794, 0x7796, 0x7798, 0x779A, 0x779C,
455  0x779E, 0x77A0, 0x77A2, 0x77A4, 0x77A6, 0x77A8, 0x77AA, 0x77AC,
456  0x77AE, 0x77B0, 0x77B2, 0x77B4, 0x77B6, 0x77B8, 0x77BA, 0x77BC,
457  0x77BE, 0x77C0, 0x77C2, 0x77C4, 0x77C6, 0x77C8, 0x77CA, 0x77CC,
458  0x77CE, 0x77D0, 0x77D2, 0x77D4, 0x77D6, 0x77D8, 0x77DA, 0x77DC,
459  0x77DE, 0x77E0, 0x77E2, 0x77E4, 0x77E6, 0x77E8, 0x77EA, 0x77EC,
460  0x77EE, 0x77F0, 0x77F2, 0x77F4, 0x77F6, 0x77F8, 0x77FA, 0x77FC,
461  0x3BFF, 0x77FD, 0x77FB, 0x77F9, 0x77F7, 0x77F5, 0x77F3, 0x77F1,
462  0x77EF, 0x77ED, 0x77EB, 0x77E9, 0x77E7, 0x77E5, 0x77E3, 0x77E1,
463  0x77DF, 0x77DD, 0x77DB, 0x77D9, 0x77D7, 0x77D5, 0x77D3, 0x77D1,
464  0x77CF, 0x77CD, 0x77CB, 0x77C9, 0x77C7, 0x77C5, 0x77C3, 0x77C1,
465  0x77BF, 0x77BD, 0x77BB, 0x77B9, 0x77B7, 0x77B5, 0x77B3, 0x77B1,
466  0x77AF, 0x77AD, 0x77AB, 0x77A9, 0x77A7, 0x77A5, 0x77A3, 0x77A1,
467  0x779F, 0x779D, 0x779B, 0x7799, 0x7797, 0x7795, 0x7793, 0x7791,
468  0x778F, 0x778D, 0x778B, 0x7789, 0x7787, 0x7785, 0x7783, 0x7781,
469  0x777F, 0x777D, 0x777B, 0x7779, 0x7777, 0x7775, 0x7773, 0x7771,
470  0x776F, 0x776D, 0x776B, 0x7769, 0x7767, 0x7765, 0x7763, 0x7761,
471  0x775F, 0x775D, 0x775B, 0x7759, 0x7757, 0x7755, 0x7753, 0x7751,
472  0x774F, 0x774D, 0x774B, 0x7749, 0x7747, 0x7745, 0x7743, 0x7741,
473  0x773F, 0x773D, 0x773B, 0x7739, 0x7737, 0x7735, 0x7733, 0x7731,
474  0x772F, 0x772D, 0x772B, 0x7729, 0x7727, 0x7725, 0x7723, 0x7721,
475  0x771F, 0x771D, 0x771B, 0x7719, 0x7717, 0x7715, 0x7713, 0x7711,
476  0x770F, 0x770D, 0x770B, 0x7709, 0x7707, 0x7705, 0x7703, 0x7701,
477  0x76FF, 0x76FD, 0x76FB, 0x76F9, 0x76F7, 0x76F5, 0x76F3, 0x76F1,
478  0x76EF, 0x76ED, 0x76EB, 0x76E9, 0x76E7, 0x76E5, 0x76E3, 0x76E1,
479  0x76DF, 0x76DD, 0x76DB, 0x76D9, 0x76D7, 0x76D5, 0x76D3, 0x76D1,
480  0x76CF, 0x76CD, 0x76CB, 0x76C9, 0x76C7, 0x76C5, 0x76C3, 0x76C1,
481  0x76BF, 0x76BD, 0x76BB, 0x76B9, 0x76B7, 0x76B5, 0x76B3, 0x76B1,
482  0x76AF, 0x76AD, 0x76AB, 0x76A9, 0x76A7, 0x76A5, 0x76A3, 0x76A1,
483  0x769F, 0x769D, 0x769B, 0x7699, 0x7697, 0x7695, 0x7693, 0x7691,
484  0x768F, 0x768D, 0x768B, 0x7689, 0x7687, 0x7685, 0x7683, 0x7681,
485  0x767F, 0x767D, 0x767B, 0x7679, 0x7677, 0x7675, 0x7673, 0x7671,
486  0x766F, 0x766D, 0x766B, 0x7669, 0x7667, 0x7665, 0x7663, 0x7661,
487  0x765F, 0x765D, 0x765B, 0x7659, 0x7657, 0x7655, 0x7653, 0x7651,
488  0x764F, 0x764D, 0x764B, 0x7649, 0x7647, 0x7645, 0x7643, 0x7641,
489  0x763F, 0x763D, 0x763B, 0x7639, 0x7637, 0x7635, 0x7633, 0x7631,
490  0x762F, 0x762D, 0x762B, 0x7629, 0x7627, 0x7625, 0x7623, 0x7621,
491  0x761F, 0x761D, 0x761B, 0x7619, 0x7617, 0x7615, 0x7613, 0x7611,
492  0x760F, 0x760D, 0x760B, 0x7609, 0x7607, 0x7605, 0x7603, 0x7601,
493  0x17FF, 0x17FD, 0x17FB, 0x17F9, 0x17F7, 0x17F5, 0x17F3, 0x17F1,
494  0x17EF, 0x17ED, 0x17EB, 0x17E9, 0x17E7, 0x17E5, 0x17E3, 0x17E1,
495  0x17DF, 0x17DD, 0x17DB, 0x17D9, 0x17D7, 0x17D5, 0x17D3, 0x17D1,
496  0x17CF, 0x17CD, 0x17CB, 0x17C9, 0x17C7, 0x17C5, 0x17C3, 0x17C1,
497  0x17BF, 0x17BD, 0x17BB, 0x17B9, 0x17B7, 0x17B5, 0x17B3, 0x17B1,
498  0x17AF, 0x17AD, 0x17AB, 0x17A9, 0x17A7, 0x17A5, 0x17A3, 0x17A1,
499  0x179F, 0x179D, 0x179B, 0x1799, 0x1797, 0x1795, 0x1793, 0x1791,
500  0x178F, 0x178D, 0x178B, 0x1789, 0x1787, 0x1785, 0x1783, 0x1781,
501  0x177F, 0x177D, 0x177B, 0x1779, 0x1777, 0x1775, 0x1773, 0x1771,
502  0x176F, 0x176D, 0x176B, 0x1769, 0x1767, 0x1765, 0x1763, 0x1761,
503  0x175F, 0x175D, 0x175B, 0x1759, 0x1757, 0x1755, 0x1753, 0x1751,
504  0x174F, 0x174D, 0x174B, 0x1749, 0x1747, 0x1745, 0x1743, 0x1741,
505  0x173F, 0x173D, 0x173B, 0x1739, 0x1737, 0x1735, 0x1733, 0x1731,
506  0x172F, 0x172D, 0x172B, 0x1729, 0x1727, 0x1725, 0x1723, 0x1721,
507  0x171F, 0x171D, 0x171B, 0x1719, 0x1717, 0x1715, 0x1713, 0x1711,
508  0x170F, 0x170D, 0x170B, 0x1709, 0x1707, 0x1705, 0x1703, 0x1701,
509  0x16FF, 0x16FD, 0x16FB, 0x16F9, 0x16F7, 0x16F5, 0x16F3, 0x16F1,
510  0x16EF, 0x16ED, 0x16EB, 0x16E9, 0x16E7, 0x16E5, 0x16E3, 0x16E1,
511  0x16DF, 0x16DD, 0x16DB, 0x16D9, 0x16D7, 0x16D5, 0x16D3, 0x16D1,
512  0x16CF, 0x16CD, 0x16CB, 0x16C9, 0x16C7, 0x16C5, 0x16C3, 0x16C1,
513  0x16BF, 0x16BD, 0x16BB, 0x16B9, 0x16B7, 0x16B5, 0x16B3, 0x16B1,
514  0x16AF, 0x16AD, 0x16AB, 0x16A9, 0x16A7, 0x16A5, 0x16A3, 0x16A1,
515  0x169F, 0x169D, 0x169B, 0x1699, 0x1697, 0x1695, 0x1693, 0x1691,
516  0x168F, 0x168D, 0x168B, 0x1689, 0x1687, 0x1685, 0x1683, 0x1681,
517  0x167F, 0x167D, 0x167B, 0x1679, 0x1677, 0x1675, 0x1673, 0x1671,
518  0x166F, 0x166D, 0x166B, 0x1669, 0x1667, 0x1665, 0x1663, 0x1661,
519  0x165F, 0x165D, 0x165B, 0x1659, 0x1657, 0x1655, 0x1653, 0x1651,
520  0x164F, 0x164D, 0x164B, 0x1649, 0x1647, 0x1645, 0x1643, 0x1641,
521  0x163F, 0x163D, 0x163B, 0x1639, 0x1637, 0x1635, 0x1633, 0x1631,
522  0x162F, 0x162D, 0x162B, 0x1629, 0x1627, 0x1625, 0x1623, 0x1621,
523  0x161F, 0x161D, 0x161B, 0x1619, 0x1617, 0x1615, 0x1613, 0x1611,
524  0x160F, 0x160D, 0x160B, 0x1609, 0x1607, 0x1605, 0x1603, 0x1601,
525  0x18FF, 0x18FD, 0x18FB, 0x18F9, 0x18F7, 0x18F5, 0x18F3, 0x18F1,
526  0x18EF, 0x18ED, 0x18EB, 0x18E9, 0x18E7, 0x18E5, 0x18E3, 0x18E1,
527  0x18DF, 0x18DD, 0x18DB, 0x18D9, 0x18D7, 0x18D5, 0x18D3, 0x18D1,
528  0x18CF, 0x18CD, 0x18CB, 0x18C9, 0x18C7, 0x18C5, 0x18C3, 0x18C1,
529  0x18BF, 0x18BD, 0x18BB, 0x18B9, 0x18B7, 0x18B5, 0x18B3, 0x18B1,
530  0x18AF, 0x18AD, 0x18AB, 0x18A9, 0x18A7, 0x18A5, 0x18A3, 0x18A1,
531  0x189F, 0x189D, 0x189B, 0x1899, 0x1897, 0x1895, 0x1893, 0x1891,
532  0x188F, 0x188D, 0x188B, 0x1889, 0x1887, 0x1885, 0x1883, 0x1881,
533  0x187F, 0x187D, 0x187B, 0x1879, 0x1877, 0x1875, 0x1873, 0x1871,
534  0x186F, 0x186D, 0x186B, 0x1869, 0x1867, 0x1865, 0x1863, 0x1861,
535  0x185F, 0x185D, 0x185B, 0x1859, 0x1857, 0x1855, 0x1853, 0x1851,
536  0x184F, 0x184D, 0x184B, 0x1849, 0x1847, 0x1845, 0x1843, 0x1841,
537  0x183F, 0x183D, 0x183B, 0x1839, 0x1837, 0x1835, 0x1833, 0x1831,
538  0x182F, 0x182D, 0x182B, 0x1829, 0x1827, 0x1825, 0x1823, 0x1821,
539  0x181F, 0x181D, 0x181B, 0x1819, 0x1817, 0x1815, 0x1813, 0x1811,
540  0x180F, 0x180D, 0x180B, 0x1809, 0x1807, 0x1805, 0x1803, 0x1801,
541  0x0AFF, 0x0AFD, 0x0AFB, 0x0AF9, 0x0AF7, 0x0AF5, 0x0AF3, 0x0AF1,
542  0x0AEF, 0x0AED, 0x0AEB, 0x0AE9, 0x0AE7, 0x0AE5, 0x0AE3, 0x0AE1,
543  0x0ADF, 0x0ADD, 0x0ADB, 0x0AD9, 0x0AD7, 0x0AD5, 0x0AD3, 0x0AD1,
544  0x0ACF, 0x0ACD, 0x0ACB, 0x0AC9, 0x0AC7, 0x0AC5, 0x0AC3, 0x0AC1,
545  0x0ABF, 0x0ABD, 0x0ABB, 0x0AB9, 0x0AB7, 0x0AB5, 0x0AB3, 0x0AB1,
546  0x0AAF, 0x0AAD, 0x0AAB, 0x0AA9, 0x0AA7, 0x0AA5, 0x0AA3, 0x0AA1,
547  0x0A9F, 0x0A9D, 0x0A9B, 0x0A99, 0x0A97, 0x0A95, 0x0A93, 0x0A91,
548  0x0A8F, 0x0A8D, 0x0A8B, 0x0A89, 0x0A87, 0x0A85, 0x0A83, 0x0A81,
549  0x0A7F, 0x0A7D, 0x0A7B, 0x0A79, 0x0A77, 0x0A75, 0x0A73, 0x0A71,
550  0x0A6F, 0x0A6D, 0x0A6B, 0x0A69, 0x0A67, 0x0A65, 0x0A63, 0x0A61,
551  0x0A5F, 0x0A5D, 0x0A5B, 0x0A59, 0x0A57, 0x0A55, 0x0A53, 0x0A51,
552  0x0A4F, 0x0A4D, 0x0A4B, 0x0A49, 0x0A47, 0x0A45, 0x0A43, 0x0A41,
553  0x0A3F, 0x0A3D, 0x0A3B, 0x0A39, 0x0A37, 0x0A35, 0x0A33, 0x0A31,
554  0x0A2F, 0x0A2D, 0x0A2B, 0x0A29, 0x0A27, 0x0A25, 0x0A23, 0x0A21,
555  0x0A1F, 0x0A1D, 0x0A1B, 0x0A19, 0x0A17, 0x0A15, 0x0A13, 0x0A11,
556  0x0A0F, 0x0A0D, 0x0A0B, 0x0A09, 0x0A07, 0x0A05, 0x0A03, 0x0A01,
557  0x04FF, 0x04FD, 0x04FB, 0x04F9, 0x04F7, 0x04F5, 0x04F3, 0x04F1,
558  0x04EF, 0x04ED, 0x04EB, 0x04E9, 0x04E7, 0x04E5, 0x04E3, 0x04E1,
559  0x04DF, 0x04DD, 0x04DB, 0x04D9, 0x04D7, 0x04D5, 0x04D3, 0x04D1,
560  0x04CF, 0x04CD, 0x04CB, 0x04C9, 0x04C7, 0x04C5, 0x04C3, 0x04C1,
561  0x04BF, 0x04BD, 0x04BB, 0x04B9, 0x04B7, 0x04B5, 0x04B3, 0x04B1,
562  0x04AF, 0x04AD, 0x04AB, 0x04A9, 0x04A7, 0x04A5, 0x04A3, 0x04A1,
563  0x049F, 0x049D, 0x049B, 0x0499, 0x0497, 0x0495, 0x0493, 0x0491,
564  0x048F, 0x048D, 0x048B, 0x0489, 0x0487, 0x0485, 0x0483, 0x0481,
565  0x00FF, 0x00FD, 0x00FB, 0x00F9, 0x00F7, 0x00F5, 0x00F3, 0x00F1,
566  0x00EF, 0x00ED, 0x00EB, 0x00E9, 0x00E7, 0x00E5, 0x00E3, 0x00E1,
567  0x00DF, 0x00DD, 0x00DB, 0x00D9, 0x00D7, 0x00D5, 0x00D3, 0x00D1,
568  0x00CF, 0x00CD, 0x00CB, 0x00C9, 0x00C7, 0x00C5, 0x00C3, 0x00C1,
569  0x00BF, 0x00BD, 0x00BB, 0x00B9, 0x00B7, 0x00B5, 0x00B3, 0x00B1,
570  0x00AF, 0x00AD, 0x00AB, 0x00A9, 0x00A7, 0x00A5, 0x00A3, 0x00A1,
571  0x009F, 0x009D, 0x009B, 0x0099, 0x0097, 0x0095, 0x0093, 0x0091,
572  0x008F, 0x008D, 0x008B, 0x0089, 0x0087, 0x0085, 0x0083, 0x0081,
573  0x023F, 0x023D, 0x023B, 0x0239, 0x0237, 0x0235, 0x0233, 0x0231,
574  0x022F, 0x022D, 0x022B, 0x0229, 0x0227, 0x0225, 0x0223, 0x0221,
575  0x021F, 0x021D, 0x021B, 0x0219, 0x0217, 0x0215, 0x0213, 0x0211,
576  0x020F, 0x020D, 0x020B, 0x0209, 0x0207, 0x0205, 0x0203, 0x0201,
577  0x003F, 0x003D, 0x003B, 0x0039, 0x0037, 0x0035, 0x0033, 0x0031,
578  0x002F, 0x002D, 0x002B, 0x0029, 0x0027, 0x0025, 0x0023, 0x0021,
579  0x001F, 0x001D, 0x001B, 0x0019, 0x0017, 0x0015, 0x0013, 0x0011,
580  0x000F, 0x000D, 0x000B, 0x0009, 0x0007, 0x0005, 0x0003, 0x0001,
581  0x00FF, 0x00FD, 0x00FB, 0x00F9, 0x00F7, 0x00F5, 0x00F3, 0x00F1,
582  0x00EF, 0x00ED, 0x00EB, 0x00E9, 0x00E7, 0x00E5, 0x00E3, 0x00E1,
583  0x00DF, 0x00DD, 0x00DB, 0x00D9, 0x00D7, 0x00D5, 0x00D3, 0x00D1,
584  0x00CF, 0x00CD, 0x00CB, 0x00C9, 0x00C7, 0x00C5, 0x00C3, 0x00C1,
585  0x005F, 0x005D, 0x005B, 0x0059, 0x0057, 0x0055, 0x0053, 0x0051,
586  0x004F, 0x004D, 0x004B, 0x0049, 0x0047, 0x0045, 0x0043, 0x0041,
587  0x00FF, 0x00FD, 0x00FB, 0x00F9, 0x00F7, 0x00F5, 0x00F3, 0x00F1,
588  0x0075, 0x0073, 0x0071, 0x006F, 0x006D, 0x006B, 0x0069, 0x0067,
589 };
590 
591 static const uint8_t dc11_vlc_lens[2048] = {
592  6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8,
593  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
594  8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
595  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
596  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
597  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
598  9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
599  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
600  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
601  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
602  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
603  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
604  10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
605  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
606  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
607  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
608  11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
609  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
610  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
611  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
612  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
613  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
614  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
615  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
616  12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
617  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
618  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
619  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
620  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
621  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
622  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
623  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
624  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
625  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
626  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
627  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
628  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
629  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
630  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
631  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
632  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
633  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
634  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
635  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
636  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
637  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
638  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
639  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
640  13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
641  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
642  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
643  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
644  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
645  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
646  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
647  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
648  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
649  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
650  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
651  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
652  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
653  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
654  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
655  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
656  14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
657  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
658  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
659  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
660  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
661  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
662  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
663  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
664  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
665  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
666  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
667  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
668  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
669  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
670  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
671  15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
672  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
673  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
674  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
675  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
676  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
677  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
678  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
679  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
680  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
681  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
682  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
683  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
684  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
685  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
686  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
687  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
688  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
689  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
690  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
691  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
692  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
693  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
694  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
695  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
696  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
697  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
698  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
699  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
700  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
701  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
702  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
703  12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
704  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
705  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
706  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
707  11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
708  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
709  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
710  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
711  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
712  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
713  10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
714  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
715  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
716  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
717  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
718  8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
719  8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7,
720 };
721 
722 #define RPT_2(a, b, c) { a, b, c }, { a, b, c }
723 #define RPT_4(a, b, c) RPT_2( a, b, c), RPT_2( a, b, c)
724 #define RPT_8(a, b, c) RPT_4( a, b, c), RPT_4( a, b, c)
725 #define RPT_16(a, b, c) RPT_8( a, b, c), RPT_8( a, b, c)
726 #define RPT_32(a, b, c) RPT_16( a, b, c), RPT_16( a, b, c)
727 #define RPT_64(a, b, c) RPT_32( a, b, c), RPT_32( a, b, c)
728 #define RPT_128(a, b, c) RPT_64( a, b, c), RPT_64( a, b, c)
729 #define RPT_256(a, b, c) RPT_128(a, b, c), RPT_128(a, b, c)
730 #define RPT_512(a, b, c) RPT_256(a, b, c), RPT_256(a, b, c)
731 #define RPT_1024(a, b, c) RPT_512(a, b, c), RPT_512(a, b, c)
732 
733 static const HQXLUT ac0_lut[] = {
734  RPT_64 ( 1, 0, 4 ), RPT_64 ( -1, 0, 4 ),
735  RPT_64 ( 2, 0, 4 ), RPT_64 ( -2, 0, 4 ),
736  RPT_32 ( 3, 0, 5 ), RPT_32 ( -3, 0, 5 ),
737  RPT_32 ( 4, 0, 5 ), RPT_32 ( -4, 0, 5 ),
738  RPT_32 ( 1, 1, 5 ), RPT_32 ( -1, 1, 5 ),
739  RPT_16 ( 5, 0, 6 ), RPT_16 ( -5, 0, 6 ),
740  RPT_16 ( 6, 0, 6 ), RPT_16 ( -6, 0, 6 ),
741  RPT_16 ( 7, 0, 6 ), RPT_16 ( -7, 0, 6 ),
742  RPT_16 ( 8, 0, 6 ), RPT_16 ( -8, 0, 6 ),
743  { 1024, 0, -1 }, { 1056, 0, -1 }, { 1088, 0, -1 }, { 1120, 0, -1 },
744  { 1152, 0, -1 }, { 1184, 0, -1 }, { 1216, 0, -1 }, { 1248, 0, -1 },
745  { 1280, 0, -1 }, { 1312, 0, -1 }, { 1344, 0, -1 }, { 1376, 0, -1 },
746  { 1408, 0, -1 }, { 1440, 0, -1 }, { 1472, 0, -1 }, { 1504, 0, -1 },
747  { 1536, 0, -1 }, { 1568, 0, -1 }, { 1600, 0, -1 }, { 1632, 0, -1 },
748  { 1664, 0, -1 }, { 1696, 0, -1 }, { 1728, 0, -1 }, { 1760, 0, -1 },
749  { 1792, 0, -1 }, { 1824, 0, -1 }, { 1856, 0, -1 }, { 1888, 0, -1 },
750  { 1920, 0, -1 }, { 1952, 0, -1 }, { 1984, 0, -1 }, { 2016, 0, -1 },
751  RPT_32 ( 0, 64, 5 ), RPT_8 ( 9, 0, 7 ),
752  RPT_8 ( -9, 0, 7 ), RPT_8 ( 10, 0, 7 ),
753  RPT_8 ( -10, 0, 7 ), RPT_8 ( 11, 0, 7 ),
754  RPT_8 ( -11, 0, 7 ), RPT_8 ( 12, 0, 7 ),
755  RPT_8 ( -12, 0, 7 ), RPT_8 ( 13, 0, 7 ),
756  RPT_8 ( -13, 0, 7 ), RPT_8 ( 14, 0, 7 ),
757  RPT_8 ( -14, 0, 7 ), RPT_8 ( 2, 1, 7 ),
758  RPT_8 ( -2, 1, 7 ), RPT_8 ( 1, 2, 7 ),
759  RPT_8 ( -1, 2, 7 ), RPT_4 ( 15, 0, 8 ),
760  RPT_4 ( -15, 0, 8 ), RPT_4 ( 16, 0, 8 ),
761  RPT_4 ( -16, 0, 8 ), RPT_4 ( 17, 0, 8 ),
762  RPT_4 ( -17, 0, 8 ), RPT_4 ( 18, 0, 8 ),
763  RPT_4 ( -18, 0, 8 ), RPT_4 ( 19, 0, 8 ),
764  RPT_4 ( -19, 0, 8 ), RPT_4 ( 20, 0, 8 ),
765  RPT_4 ( -20, 0, 8 ), RPT_4 ( 21, 0, 8 ),
766  RPT_4 ( -21, 0, 8 ), RPT_4 ( 3, 1, 8 ),
767  RPT_4 ( -3, 1, 8 ), RPT_4 ( 4, 1, 8 ),
768  RPT_4 ( -4, 1, 8 ), RPT_4 ( 1, 3, 8 ),
769  RPT_4 ( -1, 3, 8 ), RPT_4 ( 1, 4, 8 ),
770  RPT_4 ( -1, 4, 8 ), RPT_4 ( 0, 0, 8 ),
771  RPT_2 ( 22, 0, 9 ), RPT_2 ( -22, 0, 9 ),
772  RPT_2 ( 23, 0, 9 ), RPT_2 ( -23, 0, 9 ),
773  RPT_2 ( 24, 0, 9 ), RPT_2 ( -24, 0, 9 ),
774  RPT_2 ( 25, 0, 9 ), RPT_2 ( -25, 0, 9 ),
775  RPT_2 ( 26, 0, 9 ), RPT_2 ( -26, 0, 9 ),
776  RPT_2 ( 27, 0, 9 ), RPT_2 ( -27, 0, 9 ),
777  RPT_2 ( 28, 0, 9 ), RPT_2 ( -28, 0, 9 ),
778  RPT_2 ( 29, 0, 9 ), RPT_2 ( -29, 0, 9 ),
779  RPT_2 ( 30, 0, 9 ), RPT_2 ( -30, 0, 9 ),
780  RPT_2 ( 31, 0, 9 ), RPT_2 ( -31, 0, 9 ),
781  RPT_2 ( 32, 0, 9 ), RPT_2 ( -32, 0, 9 ),
782  RPT_2 ( 33, 0, 9 ), RPT_2 ( -33, 0, 9 ),
783  RPT_2 ( 5, 1, 9 ), RPT_2 ( -5, 1, 9 ),
784  RPT_2 ( 6, 1, 9 ), RPT_2 ( -6, 1, 9 ),
785  RPT_2 ( 2, 2, 9 ), RPT_2 ( -2, 2, 9 ),
786  RPT_2 ( 1, 5, 9 ), RPT_2 ( -1, 5, 9 ),
787  RPT_2 ( 1, 6, 9 ), RPT_2 ( -1, 6, 9 ),
788  { 34, 0, 10 }, { -34, 0, 10 }, { 35, 0, 10 }, { -35, 0, 10 },
789  { 36, 0, 10 }, { -36, 0, 10 }, { 37, 0, 10 }, { -37, 0, 10 },
790  { 38, 0, 10 }, { -38, 0, 10 }, { 39, 0, 10 }, { -39, 0, 10 },
791  { 40, 0, 10 }, { -40, 0, 10 }, { 41, 0, 10 }, { -41, 0, 10 },
792  { 42, 0, 10 }, { -42, 0, 10 }, { 43, 0, 10 }, { -43, 0, 10 },
793  { 44, 0, 10 }, { -44, 0, 10 }, { 45, 0, 10 }, { -45, 0, 10 },
794  { 46, 0, 10 }, { -46, 0, 10 }, { 47, 0, 10 }, { -47, 0, 10 },
795  { 48, 0, 10 }, { -48, 0, 10 }, { 49, 0, 10 }, { -49, 0, 10 },
796  { 50, 0, 10 }, { -50, 0, 10 }, RPT_2 ( 0, 1, 9 ),
797  { 7, 1, 10 }, { -7, 1, 10 }, { 8, 1, 10 }, { -8, 1, 10 },
798  { 9, 1, 10 }, { -9, 1, 10 }, { 10, 1, 10 }, { -10, 1, 10 },
799  RPT_2 ( 0, 2, 9 ), { 3, 2, 10 }, { -3, 2, 10 },
800  RPT_2 ( 0, 3, 9 ), { 2, 3, 10 }, { -2, 3, 10 },
801  { 1, 7, 10 }, { -1, 7, 10 }, { 1, 8, 10 }, { -1, 8, 10 },
802  { 2048, 0, -1 }, { 2080, 0, -1 }, { 2112, 0, -1 }, { 2144, 0, -1 },
803  { 2176, 0, -1 }, { 2208, 0, -1 }, { 2240, 0, -1 }, { 2272, 0, -1 },
804  { 2304, 0, -1 }, { 2336, 0, -1 }, { 2368, 0, -1 }, { 2400, 0, -1 },
805  { 2432, 0, -1 }, { 2464, 0, -1 }, { 2496, 0, -1 }, { 2528, 0, -1 },
806  { 2560, 0, -1 }, { 2592, 0, -1 }, { 2624, 0, -1 }, { 2656, 0, -1 },
807  { 2688, 0, -1 }, { 2720, 0, -1 }, { 2752, 0, -1 }, { 0, 4, 10 },
808  { 2784, 0, -1 }, { 0, 5, 10 }, { 0, 6, 10 }, { 2816, 0, -1 },
809  { 2848, 0, -1 }, { 2880, 0, -1 }, { 2912, 0, -1 }, { 2944, 0, -1 },
810  { 2976, 0, -1 }, { 3008, 0, -1 }, { 3040, 0, -1 }, { 3072, 0, -1 },
811  { 3104, 0, -1 }, { 3136, 0, -1 }, { 3168, 0, -1 }, { 3200, 0, -1 },
812  RPT_4 ( 0, 0, 13 ), RPT_2 ( 1, 0, 14 ),
813  RPT_2 ( -1, 0, 14 ), RPT_2 ( 2, 0, 14 ),
814  RPT_2 ( -2, 0, 14 ), RPT_2 ( 3, 0, 14 ),
815  RPT_2 ( -3, 0, 14 ), RPT_2 ( 4, 0, 14 ),
816  RPT_2 ( -4, 0, 14 ), RPT_2 ( 5, 0, 14 ),
817  RPT_2 ( -5, 0, 14 ), RPT_2 ( 6, 0, 14 ),
818  RPT_2 ( -6, 0, 14 ), RPT_2 ( 7, 0, 14 ),
819  RPT_2 ( -7, 0, 14 ), RPT_2 ( 8, 0, 14 ),
820  RPT_2 ( -8, 0, 14 ), RPT_2 ( 9, 0, 14 ),
821  RPT_2 ( -9, 0, 14 ), RPT_2 ( 10, 0, 14 ),
822  RPT_2 ( -10, 0, 14 ), RPT_2 ( 11, 0, 14 ),
823  RPT_2 ( -11, 0, 14 ), RPT_2 ( 12, 0, 14 ),
824  RPT_2 ( -12, 0, 14 ), RPT_2 ( 13, 0, 14 ),
825  RPT_2 ( -13, 0, 14 ), RPT_2 ( 14, 0, 14 ),
826  RPT_2 ( -14, 0, 14 ), RPT_2 ( 15, 0, 14 ),
827  RPT_2 ( -15, 0, 14 ), RPT_2 ( 16, 0, 14 ),
828  RPT_2 ( -16, 0, 14 ), RPT_2 ( 17, 0, 14 ),
829  RPT_2 ( -17, 0, 14 ), RPT_2 ( 18, 0, 14 ),
830  RPT_2 ( -18, 0, 14 ), RPT_2 ( 19, 0, 14 ),
831  RPT_2 ( -19, 0, 14 ), RPT_2 ( 20, 0, 14 ),
832  RPT_2 ( -20, 0, 14 ), RPT_2 ( 21, 0, 14 ),
833  RPT_2 ( -21, 0, 14 ), RPT_2 ( 22, 0, 14 ),
834  RPT_2 ( -22, 0, 14 ), RPT_2 ( 23, 0, 14 ),
835  RPT_2 ( -23, 0, 14 ), RPT_2 ( 24, 0, 14 ),
836  RPT_2 ( -24, 0, 14 ), RPT_2 ( 25, 0, 14 ),
837  RPT_2 ( -25, 0, 14 ), RPT_2 ( 26, 0, 14 ),
838  RPT_2 ( -26, 0, 14 ), RPT_2 ( 27, 0, 14 ),
839  RPT_2 ( -27, 0, 14 ), RPT_2 ( 28, 0, 14 ),
840  RPT_2 ( -28, 0, 14 ), RPT_2 ( 29, 0, 14 ),
841  RPT_2 ( -29, 0, 14 ), RPT_2 ( 30, 0, 14 ),
842  RPT_2 ( -30, 0, 14 ), RPT_2 ( 31, 0, 14 ),
843  RPT_2 ( -31, 0, 14 ), RPT_2 ( 32, 0, 14 ),
844  RPT_2 ( -32, 0, 14 ), RPT_2 ( 33, 0, 14 ),
845  RPT_2 ( -33, 0, 14 ), RPT_2 ( 34, 0, 14 ),
846  RPT_2 ( -34, 0, 14 ), RPT_2 ( 35, 0, 14 ),
847  RPT_2 ( -35, 0, 14 ), RPT_2 ( 36, 0, 14 ),
848  RPT_2 ( -36, 0, 14 ), RPT_2 ( 37, 0, 14 ),
849  RPT_2 ( -37, 0, 14 ), RPT_2 ( 38, 0, 14 ),
850  RPT_2 ( -38, 0, 14 ), RPT_2 ( 39, 0, 14 ),
851  RPT_2 ( -39, 0, 14 ), RPT_2 ( 40, 0, 14 ),
852  RPT_2 ( -40, 0, 14 ), RPT_2 ( 41, 0, 14 ),
853  RPT_2 ( -41, 0, 14 ), RPT_2 ( 42, 0, 14 ),
854  RPT_2 ( -42, 0, 14 ), RPT_2 ( 43, 0, 14 ),
855  RPT_2 ( -43, 0, 14 ), RPT_2 ( 44, 0, 14 ),
856  RPT_2 ( -44, 0, 14 ), RPT_2 ( 45, 0, 14 ),
857  RPT_2 ( -45, 0, 14 ), RPT_2 ( 46, 0, 14 ),
858  RPT_2 ( -46, 0, 14 ), RPT_2 ( 47, 0, 14 ),
859  RPT_2 ( -47, 0, 14 ), RPT_2 ( 48, 0, 14 ),
860  RPT_2 ( -48, 0, 14 ), RPT_2 ( 49, 0, 14 ),
861  RPT_2 ( -49, 0, 14 ), RPT_2 ( 50, 0, 14 ),
862  RPT_2 ( -50, 0, 14 ), RPT_2 ( 51, 0, 14 ),
863  RPT_2 ( -51, 0, 14 ), RPT_2 ( 52, 0, 14 ),
864  RPT_2 ( -52, 0, 14 ), RPT_2 ( 53, 0, 14 ),
865  RPT_2 ( -53, 0, 14 ), RPT_2 ( 54, 0, 14 ),
866  RPT_2 ( -54, 0, 14 ), RPT_2 ( 55, 0, 14 ),
867  RPT_2 ( -55, 0, 14 ), RPT_2 ( 56, 0, 14 ),
868  RPT_2 ( -56, 0, 14 ), RPT_2 ( 57, 0, 14 ),
869  RPT_2 ( -57, 0, 14 ), RPT_2 ( 58, 0, 14 ),
870  RPT_2 ( -58, 0, 14 ), RPT_2 ( 59, 0, 14 ),
871  RPT_2 ( -59, 0, 14 ), RPT_2 ( 60, 0, 14 ),
872  RPT_2 ( -60, 0, 14 ), RPT_2 ( 61, 0, 14 ),
873  RPT_2 ( -61, 0, 14 ), RPT_2 ( 62, 0, 14 ),
874  RPT_2 ( -62, 0, 14 ), RPT_2 ( 63, 0, 14 ),
875  RPT_2 ( -63, 0, 14 ), RPT_2 ( 64, 0, 14 ),
876  RPT_2 ( -64, 0, 14 ), RPT_2 ( 65, 0, 14 ),
877  RPT_2 ( -65, 0, 14 ), RPT_2 ( 66, 0, 14 ),
878  RPT_2 ( -66, 0, 14 ), RPT_2 ( 67, 0, 14 ),
879  RPT_2 ( -67, 0, 14 ), RPT_2 ( 68, 0, 14 ),
880  RPT_2 ( -68, 0, 14 ), RPT_2 ( 69, 0, 14 ),
881  RPT_2 ( -69, 0, 14 ), RPT_2 ( 70, 0, 14 ),
882  RPT_2 ( -70, 0, 14 ), RPT_2 ( 71, 0, 14 ),
883  RPT_2 ( -71, 0, 14 ), RPT_2 ( 72, 0, 14 ),
884  RPT_2 ( -72, 0, 14 ), RPT_2 ( 73, 0, 14 ),
885  RPT_2 ( -73, 0, 14 ), RPT_2 ( 74, 0, 14 ),
886  RPT_2 ( -74, 0, 14 ), RPT_2 ( 75, 0, 14 ),
887  RPT_2 ( -75, 0, 14 ), RPT_2 ( 76, 0, 14 ),
888  RPT_2 ( -76, 0, 14 ), RPT_2 ( 77, 0, 14 ),
889  RPT_2 ( -77, 0, 14 ), RPT_2 ( 78, 0, 14 ),
890  RPT_2 ( -78, 0, 14 ), RPT_2 ( 79, 0, 14 ),
891  RPT_2 ( -79, 0, 14 ), RPT_2 ( 80, 0, 14 ),
892  RPT_2 ( -80, 0, 14 ), RPT_2 ( 81, 0, 14 ),
893  RPT_2 ( -81, 0, 14 ), RPT_2 ( 82, 0, 14 ),
894  RPT_2 ( -82, 0, 14 ), RPT_2 ( 83, 0, 14 ),
895  RPT_2 ( -83, 0, 14 ), RPT_2 ( 84, 0, 14 ),
896  RPT_2 ( -84, 0, 14 ), RPT_2 ( 85, 0, 14 ),
897  RPT_2 ( -85, 0, 14 ), RPT_2 ( 86, 0, 14 ),
898  RPT_2 ( -86, 0, 14 ), RPT_2 ( 87, 0, 14 ),
899  RPT_2 ( -87, 0, 14 ), RPT_2 ( 88, 0, 14 ),
900  RPT_2 ( -88, 0, 14 ), RPT_2 ( 89, 0, 14 ),
901  RPT_2 ( -89, 0, 14 ), RPT_2 ( 90, 0, 14 ),
902  RPT_2 ( -90, 0, 14 ), RPT_2 ( 91, 0, 14 ),
903  RPT_2 ( -91, 0, 14 ), RPT_2 ( 92, 0, 14 ),
904  RPT_2 ( -92, 0, 14 ), RPT_2 ( 93, 0, 14 ),
905  RPT_2 ( -93, 0, 14 ), RPT_2 ( 94, 0, 14 ),
906  RPT_2 ( -94, 0, 14 ), RPT_2 ( 95, 0, 14 ),
907  RPT_2 ( -95, 0, 14 ), RPT_2 ( 96, 0, 14 ),
908  RPT_2 ( -96, 0, 14 ), RPT_2 ( 97, 0, 14 ),
909  RPT_2 ( -97, 0, 14 ), RPT_2 ( 98, 0, 14 ),
910  RPT_2 ( -98, 0, 14 ), RPT_2 ( 99, 0, 14 ),
911  RPT_2 ( -99, 0, 14 ), RPT_2 ( 100, 0, 14 ),
912  RPT_2 (-100, 0, 14 ), RPT_2 ( 101, 0, 14 ),
913  RPT_2 (-101, 0, 14 ), RPT_2 ( 102, 0, 14 ),
914  RPT_2 (-102, 0, 14 ), RPT_2 ( 103, 0, 14 ),
915  RPT_2 (-103, 0, 14 ), RPT_2 ( 104, 0, 14 ),
916  RPT_2 (-104, 0, 14 ), RPT_2 ( 105, 0, 14 ),
917  RPT_2 (-105, 0, 14 ), RPT_2 ( 106, 0, 14 ),
918  RPT_2 (-106, 0, 14 ), RPT_2 ( 107, 0, 14 ),
919  RPT_2 (-107, 0, 14 ), RPT_2 ( 108, 0, 14 ),
920  RPT_2 (-108, 0, 14 ), RPT_2 ( 109, 0, 14 ),
921  RPT_2 (-109, 0, 14 ), RPT_2 ( 110, 0, 14 ),
922  RPT_2 (-110, 0, 14 ), RPT_2 ( 111, 0, 14 ),
923  RPT_2 (-111, 0, 14 ), RPT_2 ( 112, 0, 14 ),
924  RPT_2 (-112, 0, 14 ), RPT_2 ( 113, 0, 14 ),
925  RPT_2 (-113, 0, 14 ), RPT_2 ( 114, 0, 14 ),
926  RPT_2 (-114, 0, 14 ), RPT_2 ( 115, 0, 14 ),
927  RPT_2 (-115, 0, 14 ), RPT_2 ( 116, 0, 14 ),
928  RPT_2 (-116, 0, 14 ), RPT_2 ( 117, 0, 14 ),
929  RPT_2 (-117, 0, 14 ), RPT_2 ( 118, 0, 14 ),
930  RPT_2 (-118, 0, 14 ), RPT_2 ( 119, 0, 14 ),
931  RPT_2 (-119, 0, 14 ), RPT_2 ( 120, 0, 14 ),
932  RPT_2 (-120, 0, 14 ), RPT_2 ( 121, 0, 14 ),
933  RPT_2 (-121, 0, 14 ), RPT_2 ( 122, 0, 14 ),
934  RPT_2 (-122, 0, 14 ), RPT_2 ( 123, 0, 14 ),
935  RPT_2 (-123, 0, 14 ), RPT_2 ( 124, 0, 14 ),
936  RPT_2 (-124, 0, 14 ), RPT_2 ( 125, 0, 14 ),
937  RPT_2 (-125, 0, 14 ), RPT_2 ( 126, 0, 14 ),
938  RPT_2 (-126, 0, 14 ), RPT_2 ( 127, 0, 14 ),
939  RPT_2 (-127, 0, 14 ), RPT_2 ( 128, 0, 14 ),
940  RPT_2 (-128, 0, 14 ), RPT_2 ( 129, 0, 14 ),
941  RPT_2 (-129, 0, 14 ), RPT_2 ( 130, 0, 14 ),
942  RPT_2 (-130, 0, 14 ), RPT_2 ( 131, 0, 14 ),
943  RPT_2 (-131, 0, 14 ), RPT_2 ( 132, 0, 14 ),
944  RPT_2 (-132, 0, 14 ), RPT_2 ( 133, 0, 14 ),
945  RPT_2 (-133, 0, 14 ), RPT_2 ( 134, 0, 14 ),
946  RPT_2 (-134, 0, 14 ), RPT_2 ( 135, 0, 14 ),
947  RPT_2 (-135, 0, 14 ), RPT_2 ( 136, 0, 14 ),
948  RPT_2 (-136, 0, 14 ), RPT_2 ( 137, 0, 14 ),
949  RPT_2 (-137, 0, 14 ), RPT_2 ( 138, 0, 14 ),
950  RPT_2 (-138, 0, 14 ), RPT_2 ( 139, 0, 14 ),
951  RPT_2 (-139, 0, 14 ), RPT_2 ( 140, 0, 14 ),
952  RPT_2 (-140, 0, 14 ), RPT_2 ( 141, 0, 14 ),
953  RPT_2 (-141, 0, 14 ), RPT_2 ( 142, 0, 14 ),
954  RPT_2 (-142, 0, 14 ), RPT_2 ( 143, 0, 14 ),
955  RPT_2 (-143, 0, 14 ), RPT_2 ( 144, 0, 14 ),
956  RPT_2 (-144, 0, 14 ), RPT_2 ( 145, 0, 14 ),
957  RPT_2 (-145, 0, 14 ), RPT_2 ( 146, 0, 14 ),
958  RPT_2 (-146, 0, 14 ), RPT_2 ( 147, 0, 14 ),
959  RPT_2 (-147, 0, 14 ), RPT_2 ( 148, 0, 14 ),
960  RPT_2 (-148, 0, 14 ), RPT_2 ( 149, 0, 14 ),
961  RPT_2 (-149, 0, 14 ), RPT_2 ( 150, 0, 14 ),
962  RPT_2 (-150, 0, 14 ), RPT_2 ( 151, 0, 14 ),
963  RPT_2 (-151, 0, 14 ), RPT_2 ( 152, 0, 14 ),
964  RPT_2 (-152, 0, 14 ), RPT_2 ( 153, 0, 14 ),
965  RPT_2 (-153, 0, 14 ), RPT_2 ( 154, 0, 14 ),
966  RPT_2 (-154, 0, 14 ), RPT_2 ( 155, 0, 14 ),
967  RPT_2 (-155, 0, 14 ), RPT_2 ( 156, 0, 14 ),
968  RPT_2 (-156, 0, 14 ), RPT_2 ( 157, 0, 14 ),
969  RPT_2 (-157, 0, 14 ), RPT_2 ( 158, 0, 14 ),
970  RPT_2 (-158, 0, 14 ), RPT_2 ( 159, 0, 14 ),
971  RPT_2 (-159, 0, 14 ), RPT_2 ( 160, 0, 14 ),
972  RPT_2 (-160, 0, 14 ), RPT_2 ( 161, 0, 14 ),
973  RPT_2 (-161, 0, 14 ), RPT_2 ( 162, 0, 14 ),
974  RPT_2 (-162, 0, 14 ), RPT_2 ( 163, 0, 14 ),
975  RPT_2 (-163, 0, 14 ), RPT_2 ( 164, 0, 14 ),
976  RPT_2 (-164, 0, 14 ), RPT_2 ( 165, 0, 14 ),
977  RPT_2 (-165, 0, 14 ), RPT_2 ( 166, 0, 14 ),
978  RPT_2 (-166, 0, 14 ), RPT_2 ( 167, 0, 14 ),
979  RPT_2 (-167, 0, 14 ), RPT_2 ( 168, 0, 14 ),
980  RPT_2 (-168, 0, 14 ), RPT_2 ( 169, 0, 14 ),
981  RPT_2 (-169, 0, 14 ), RPT_2 ( 170, 0, 14 ),
982  RPT_2 (-170, 0, 14 ), RPT_2 ( 171, 0, 14 ),
983  RPT_2 (-171, 0, 14 ), RPT_2 ( 172, 0, 14 ),
984  RPT_2 (-172, 0, 14 ), RPT_2 ( 173, 0, 14 ),
985  RPT_2 (-173, 0, 14 ), RPT_2 ( 174, 0, 14 ),
986  RPT_2 (-174, 0, 14 ), RPT_2 ( 175, 0, 14 ),
987  RPT_2 (-175, 0, 14 ), RPT_2 ( 176, 0, 14 ),
988  RPT_2 (-176, 0, 14 ), RPT_2 ( 177, 0, 14 ),
989  RPT_2 (-177, 0, 14 ), RPT_2 ( 178, 0, 14 ),
990  RPT_2 (-178, 0, 14 ), RPT_2 ( 179, 0, 14 ),
991  RPT_2 (-179, 0, 14 ), RPT_2 ( 180, 0, 14 ),
992  RPT_2 (-180, 0, 14 ), RPT_2 ( 181, 0, 14 ),
993  RPT_2 (-181, 0, 14 ), RPT_2 ( 182, 0, 14 ),
994  RPT_2 (-182, 0, 14 ), RPT_2 ( 183, 0, 14 ),
995  RPT_2 (-183, 0, 14 ), RPT_2 ( 184, 0, 14 ),
996  RPT_2 (-184, 0, 14 ), RPT_2 ( 185, 0, 14 ),
997  RPT_2 (-185, 0, 14 ), RPT_2 ( 186, 0, 14 ),
998  RPT_2 (-186, 0, 14 ), RPT_2 ( 187, 0, 14 ),
999  RPT_2 (-187, 0, 14 ), RPT_2 ( 188, 0, 14 ),
1000  RPT_2 (-188, 0, 14 ), RPT_2 ( 189, 0, 14 ),
1001  RPT_2 (-189, 0, 14 ), RPT_2 ( 190, 0, 14 ),
1002  RPT_2 (-190, 0, 14 ), RPT_2 ( 191, 0, 14 ),
1003  RPT_2 (-191, 0, 14 ), RPT_2 ( 192, 0, 14 ),
1004  RPT_2 (-192, 0, 14 ), RPT_2 ( 193, 0, 14 ),
1005  RPT_2 (-193, 0, 14 ), RPT_2 ( 194, 0, 14 ),
1006  RPT_2 (-194, 0, 14 ), RPT_2 ( 195, 0, 14 ),
1007  RPT_2 (-195, 0, 14 ), RPT_2 ( 196, 0, 14 ),
1008  RPT_2 (-196, 0, 14 ), RPT_2 ( 197, 0, 14 ),
1009  RPT_2 (-197, 0, 14 ), RPT_2 ( 198, 0, 14 ),
1010  RPT_2 (-198, 0, 14 ), RPT_2 ( 199, 0, 14 ),
1011  RPT_2 (-199, 0, 14 ), RPT_2 ( 200, 0, 14 ),
1012  RPT_2 (-200, 0, 14 ), RPT_2 ( 201, 0, 14 ),
1013  RPT_2 (-201, 0, 14 ), RPT_2 ( 202, 0, 14 ),
1014  RPT_2 (-202, 0, 14 ), RPT_2 ( 203, 0, 14 ),
1015  RPT_2 (-203, 0, 14 ), RPT_2 ( 204, 0, 14 ),
1016  RPT_2 (-204, 0, 14 ), RPT_2 ( 205, 0, 14 ),
1017  RPT_2 (-205, 0, 14 ), RPT_2 ( 206, 0, 14 ),
1018  RPT_2 (-206, 0, 14 ), RPT_2 ( 207, 0, 14 ),
1019  RPT_2 (-207, 0, 14 ), RPT_2 ( 208, 0, 14 ),
1020  RPT_2 (-208, 0, 14 ), RPT_2 ( 209, 0, 14 ),
1021  RPT_2 (-209, 0, 14 ), RPT_2 ( 210, 0, 14 ),
1022  RPT_2 (-210, 0, 14 ), RPT_2 ( 211, 0, 14 ),
1023  RPT_2 (-211, 0, 14 ), RPT_2 ( 212, 0, 14 ),
1024  RPT_2 (-212, 0, 14 ), RPT_2 ( 213, 0, 14 ),
1025  RPT_2 (-213, 0, 14 ), RPT_2 ( 214, 0, 14 ),
1026  RPT_2 (-214, 0, 14 ), RPT_2 ( 215, 0, 14 ),
1027  RPT_2 (-215, 0, 14 ), RPT_2 ( 216, 0, 14 ),
1028  RPT_2 (-216, 0, 14 ), RPT_2 ( 217, 0, 14 ),
1029  RPT_2 (-217, 0, 14 ), RPT_2 ( 218, 0, 14 ),
1030  RPT_2 (-218, 0, 14 ), RPT_2 ( 219, 0, 14 ),
1031  RPT_2 (-219, 0, 14 ), RPT_2 ( 220, 0, 14 ),
1032  RPT_2 (-220, 0, 14 ), RPT_2 ( 221, 0, 14 ),
1033  RPT_2 (-221, 0, 14 ), RPT_2 ( 222, 0, 14 ),
1034  RPT_2 (-222, 0, 14 ), RPT_2 ( 223, 0, 14 ),
1035  RPT_2 (-223, 0, 14 ), RPT_2 ( 224, 0, 14 ),
1036  RPT_2 (-224, 0, 14 ), RPT_2 ( 225, 0, 14 ),
1037  RPT_2 (-225, 0, 14 ), RPT_2 ( 226, 0, 14 ),
1038  RPT_2 (-226, 0, 14 ), RPT_2 ( 227, 0, 14 ),
1039  RPT_2 (-227, 0, 14 ), RPT_2 ( 228, 0, 14 ),
1040  RPT_2 (-228, 0, 14 ), RPT_2 ( 229, 0, 14 ),
1041  RPT_2 (-229, 0, 14 ), RPT_2 ( 230, 0, 14 ),
1042  RPT_2 (-230, 0, 14 ), RPT_2 ( 231, 0, 14 ),
1043  RPT_2 (-231, 0, 14 ), RPT_2 ( 232, 0, 14 ),
1044  RPT_2 (-232, 0, 14 ), RPT_2 ( 233, 0, 14 ),
1045  RPT_2 (-233, 0, 14 ), RPT_2 ( 234, 0, 14 ),
1046  RPT_2 (-234, 0, 14 ), RPT_2 ( 235, 0, 14 ),
1047  RPT_2 (-235, 0, 14 ), RPT_2 ( 236, 0, 14 ),
1048  RPT_2 (-236, 0, 14 ), RPT_2 ( 237, 0, 14 ),
1049  RPT_2 (-237, 0, 14 ), RPT_2 ( 238, 0, 14 ),
1050  RPT_2 (-238, 0, 14 ), RPT_2 ( 239, 0, 14 ),
1051  RPT_2 (-239, 0, 14 ), RPT_2 ( 240, 0, 14 ),
1052  RPT_2 (-240, 0, 14 ), RPT_2 ( 241, 0, 14 ),
1053  RPT_2 (-241, 0, 14 ), RPT_2 ( 242, 0, 14 ),
1054  RPT_2 (-242, 0, 14 ), RPT_2 ( 243, 0, 14 ),
1055  RPT_2 (-243, 0, 14 ), RPT_2 ( 244, 0, 14 ),
1056  RPT_2 (-244, 0, 14 ), RPT_2 ( 245, 0, 14 ),
1057  RPT_2 (-245, 0, 14 ), RPT_2 ( 246, 0, 14 ),
1058  RPT_2 (-246, 0, 14 ), RPT_2 ( 247, 0, 14 ),
1059  RPT_2 (-247, 0, 14 ), RPT_2 ( 248, 0, 14 ),
1060  RPT_2 (-248, 0, 14 ), RPT_2 ( 249, 0, 14 ),
1061  RPT_2 (-249, 0, 14 ), RPT_2 ( 250, 0, 14 ),
1062  RPT_2 (-250, 0, 14 ), RPT_2 ( 251, 0, 14 ),
1063  RPT_2 (-251, 0, 14 ), RPT_2 ( 252, 0, 14 ),
1064  RPT_2 (-252, 0, 14 ), RPT_2 ( 253, 0, 14 ),
1065  RPT_2 (-253, 0, 14 ), RPT_2 ( 254, 0, 14 ),
1066  RPT_2 (-254, 0, 14 ), RPT_2 ( 255, 0, 14 ),
1067  RPT_2 (-255, 0, 14 ), { 0, 0, 15 }, { 0, 1, 15 },
1068  { 0, 2, 15 }, { 0, 3, 15 }, { 0, 4, 15 }, { 0, 5, 15 },
1069  { 0, 6, 15 }, { 0, 7, 15 }, { 0, 8, 15 }, { 0, 9, 15 },
1070  { 0, 10, 15 }, { 0, 11, 15 }, { 0, 12, 15 }, { 0, 13, 15 },
1071  { 0, 14, 15 }, { 0, 15, 15 }, { 0, 16, 15 }, { 0, 17, 15 },
1072  { 0, 18, 15 }, { 0, 19, 15 }, { 0, 20, 15 }, { 0, 21, 15 },
1073  { 0, 22, 15 }, { 0, 23, 15 }, { 0, 24, 15 }, { 0, 25, 15 },
1074  { 0, 26, 15 }, { 0, 27, 15 }, { 0, 28, 15 }, { 0, 29, 15 },
1075  { 0, 30, 15 }, { 0, 31, 15 }, { 0, 32, 15 }, { 0, 33, 15 },
1076  { 0, 34, 15 }, { 0, 35, 15 }, { 0, 36, 15 }, { 0, 37, 15 },
1077  { 0, 38, 15 }, { 0, 39, 15 }, { 0, 40, 15 }, { 0, 41, 15 },
1078  { 0, 42, 15 }, { 0, 43, 15 }, { 0, 44, 15 }, { 0, 45, 15 },
1079  { 0, 46, 15 }, { 0, 47, 15 }, { 0, 48, 15 }, { 0, 49, 15 },
1080  { 0, 50, 15 }, { 0, 51, 15 }, { 0, 52, 15 }, { 0, 53, 15 },
1081  { 0, 54, 15 }, { 0, 55, 15 }, { 0, 56, 15 }, { 0, 57, 15 },
1082  { 0, 58, 15 }, { 0, 59, 15 }, { 0, 60, 15 }, { 0, 61, 15 },
1083  { 0, 62, 15 }, { 0, 63, 15 }, RPT_16 ( 51, 0, 11 ),
1084  RPT_16 ( -51, 0, 11 ), RPT_16 ( 52, 0, 11 ),
1085  RPT_16 ( -52, 0, 11 ), RPT_16 ( 53, 0, 11 ),
1086  RPT_16 ( -53, 0, 11 ), RPT_16 ( 54, 0, 11 ),
1087  RPT_16 ( -54, 0, 11 ), RPT_16 ( 55, 0, 11 ),
1088  RPT_16 ( -55, 0, 11 ), RPT_16 ( 56, 0, 11 ),
1089  RPT_16 ( -56, 0, 11 ), RPT_16 ( 57, 0, 11 ),
1090  RPT_16 ( -57, 0, 11 ), RPT_16 ( 58, 0, 11 ),
1091  RPT_16 ( -58, 0, 11 ), RPT_16 ( 59, 0, 11 ),
1092  RPT_16 ( -59, 0, 11 ), RPT_16 ( 60, 0, 11 ),
1093  RPT_16 ( -60, 0, 11 ), RPT_16 ( 61, 0, 11 ),
1094  RPT_16 ( -61, 0, 11 ), RPT_16 ( 62, 0, 11 ),
1095  RPT_16 ( -62, 0, 11 ), RPT_16 ( 63, 0, 11 ),
1096  RPT_16 ( -63, 0, 11 ), RPT_16 ( 11, 1, 11 ),
1097  RPT_16 ( -11, 1, 11 ), RPT_16 ( 12, 1, 11 ),
1098  RPT_16 ( -12, 1, 11 ), RPT_16 ( 13, 1, 11 ),
1099  RPT_16 ( -13, 1, 11 ), RPT_16 ( 14, 1, 11 ),
1100  RPT_16 ( -14, 1, 11 ), RPT_16 ( 4, 2, 11 ),
1101  RPT_16 ( -4, 2, 11 ), RPT_16 ( 5, 2, 11 ),
1102  RPT_16 ( -5, 2, 11 ), RPT_16 ( 6, 2, 11 ),
1103  RPT_16 ( -6, 2, 11 ), RPT_16 ( 3, 3, 11 ),
1104  RPT_16 ( -3, 3, 11 ), RPT_16 ( 2, 4, 11 ),
1105  RPT_16 ( -2, 4, 11 ), RPT_16 ( 1, 9, 11 ),
1106  RPT_16 ( -1, 9, 11 ), RPT_16 ( 1, 10, 11 ),
1107  RPT_16 ( -1, 10, 11 ), RPT_8 ( 15, 1, 12 ),
1108  RPT_8 ( -15, 1, 12 ), RPT_8 ( 16, 1, 12 ),
1109  RPT_8 ( -16, 1, 12 ), RPT_8 ( 17, 1, 12 ),
1110  RPT_8 ( -17, 1, 12 ), RPT_8 ( 18, 1, 12 ),
1111  RPT_8 ( -18, 1, 12 ), RPT_8 ( 7, 2, 12 ),
1112  RPT_8 ( -7, 2, 12 ), RPT_8 ( 8, 2, 12 ),
1113  RPT_8 ( -8, 2, 12 ), RPT_8 ( 9, 2, 12 ),
1114  RPT_8 ( -9, 2, 12 ), RPT_8 ( 10, 2, 12 ),
1115  RPT_8 ( -10, 2, 12 ), RPT_8 ( 4, 3, 12 ),
1116  RPT_8 ( -4, 3, 12 ), RPT_8 ( 5, 3, 12 ),
1117  RPT_8 ( -5, 3, 12 ), RPT_8 ( 6, 3, 12 ),
1118  RPT_8 ( -6, 3, 12 ), RPT_8 ( 2, 5, 12 ),
1119  RPT_8 ( -2, 5, 12 ), RPT_16 ( 0, 7, 11 ),
1120  RPT_16 ( 0, 8, 11 ), RPT_16 ( 0, 9, 11 ),
1121  RPT_16 ( 0, 10, 11 ), RPT_8 ( 1, 11, 12 ),
1122  RPT_8 ( -1, 11, 12 ), RPT_8 ( 1, 12, 12 ),
1123  RPT_8 ( -1, 12, 12 ), RPT_8 ( 1, 13, 12 ),
1124  RPT_8 ( -1, 13, 12 ), RPT_8 ( 1, 14, 12 ),
1125  RPT_8 ( -1, 14, 12 ), RPT_4 ( 19, 1, 13 ),
1126  RPT_4 ( -19, 1, 13 ), RPT_4 ( 20, 1, 13 ),
1127  RPT_4 ( -20, 1, 13 ), RPT_4 ( 3, 4, 13 ),
1128  RPT_4 ( -3, 4, 13 ), RPT_4 ( 2, 6, 13 ),
1129  RPT_4 ( -2, 6, 13 ),
1130 };
1131 
1132 static const HQXLUT ac8_lut[] = {
1133  RPT_128 ( 1, 0, 4 ), RPT_128 ( -1, 0, 4 ),
1134  RPT_128 ( 2, 0, 4 ), RPT_128 ( -2, 0, 4 ),
1135  RPT_64 ( 3, 0, 5 ), RPT_64 ( -3, 0, 5 ),
1136  RPT_64 ( 4, 0, 5 ), RPT_64 ( -4, 0, 5 ),
1137  RPT_128 ( 0, 64, 4 ), RPT_32 ( 5, 0, 6 ),
1138  RPT_32 ( -5, 0, 6 ), RPT_32 ( 6, 0, 6 ),
1139  RPT_32 ( -6, 0, 6 ), RPT_32 ( 7, 0, 6 ),
1140  RPT_32 ( -7, 0, 6 ), RPT_32 ( 8, 0, 6 ),
1141  RPT_32 ( -8, 0, 6 ), RPT_32 ( 1, 1, 6 ),
1142  RPT_32 ( -1, 1, 6 ), RPT_32 ( 2, 1, 6 ),
1143  RPT_32 ( -2, 1, 6 ), RPT_16 ( 9, 0, 7 ),
1144  RPT_16 ( -9, 0, 7 ), RPT_16 ( 10, 0, 7 ),
1145  RPT_16 ( -10, 0, 7 ), RPT_16 ( 11, 0, 7 ),
1146  RPT_16 ( -11, 0, 7 ), RPT_16 ( 12, 0, 7 ),
1147  RPT_16 ( -12, 0, 7 ), RPT_16 ( 3, 1, 7 ),
1148  RPT_16 ( -3, 1, 7 ), RPT_16 ( 4, 1, 7 ),
1149  RPT_16 ( -4, 1, 7 ), RPT_16 ( 1, 2, 7 ),
1150  RPT_16 ( -1, 2, 7 ), { 2048, 0, -1 }, { 2112, 0, -1 },
1151  { 2176, 0, -1 }, { 2240, 0, -1 }, { 2304, 0, -1 }, { 2368, 0, -1 },
1152  { 2432, 0, -1 }, { 2496, 0, -1 }, { 2560, 0, -1 }, { 2624, 0, -1 },
1153  { 2688, 0, -1 }, { 2752, 0, -1 }, { 2816, 0, -1 }, { 2880, 0, -1 },
1154  { 2944, 0, -1 }, { 3008, 0, -1 }, { 3072, 0, -1 }, { 3136, 0, -1 },
1155  { 3200, 0, -1 }, { 3264, 0, -1 }, { 3328, 0, -1 }, { 3392, 0, -1 },
1156  { 3456, 0, -1 }, { 3520, 0, -1 }, { 3584, 0, -1 }, { 3648, 0, -1 },
1157  { 3712, 0, -1 }, { 3776, 0, -1 }, { 3840, 0, -1 }, { 3904, 0, -1 },
1158  { 3968, 0, -1 }, { 4032, 0, -1 }, RPT_8 ( 13, 0, 8 ),
1159  RPT_8 ( -13, 0, 8 ), RPT_8 ( 14, 0, 8 ),
1160  RPT_8 ( -14, 0, 8 ), RPT_8 ( 15, 0, 8 ),
1161  RPT_8 ( -15, 0, 8 ), RPT_8 ( 16, 0, 8 ),
1162  RPT_8 ( -16, 0, 8 ), RPT_8 ( 17, 0, 8 ),
1163  RPT_8 ( -17, 0, 8 ), RPT_8 ( 18, 0, 8 ),
1164  RPT_8 ( -18, 0, 8 ), RPT_8 ( 5, 1, 8 ),
1165  RPT_8 ( -5, 1, 8 ), RPT_8 ( 6, 1, 8 ),
1166  RPT_8 ( -6, 1, 8 ), RPT_8 ( 2, 2, 8 ),
1167  RPT_8 ( -2, 2, 8 ), RPT_8 ( 1, 3, 8 ),
1168  RPT_8 ( -1, 3, 8 ), RPT_8 ( 0, 0, 8 ),
1169  RPT_4 ( 19, 0, 9 ), RPT_4 ( -19, 0, 9 ),
1170  RPT_4 ( 20, 0, 9 ), RPT_4 ( -20, 0, 9 ),
1171  RPT_4 ( 21, 0, 9 ), RPT_4 ( -21, 0, 9 ),
1172  RPT_4 ( 22, 0, 9 ), RPT_4 ( -22, 0, 9 ),
1173  RPT_4 ( 23, 0, 9 ), RPT_4 ( -23, 0, 9 ),
1174  RPT_4 ( 24, 0, 9 ), RPT_4 ( -24, 0, 9 ),
1175  RPT_4 ( 25, 0, 9 ), RPT_4 ( -25, 0, 9 ),
1176  RPT_4 ( 7, 1, 9 ), RPT_4 ( -7, 1, 9 ),
1177  RPT_4 ( 8, 1, 9 ), RPT_4 ( -8, 1, 9 ),
1178  RPT_4 ( 3, 2, 9 ), RPT_4 ( -3, 2, 9 ),
1179  RPT_4 ( 2, 3, 9 ), RPT_4 ( -2, 3, 9 ),
1180  RPT_4 ( 1, 4, 9 ), RPT_4 ( -1, 4, 9 ),
1181  RPT_4 ( 1, 5, 9 ), RPT_4 ( -1, 5, 9 ),
1182  RPT_2 ( 26, 0, 10 ), RPT_2 ( -26, 0, 10 ),
1183  RPT_2 ( 27, 0, 10 ), RPT_2 ( -27, 0, 10 ),
1184  RPT_2 ( 28, 0, 10 ), RPT_2 ( -28, 0, 10 ),
1185  RPT_2 ( 29, 0, 10 ), RPT_2 ( -29, 0, 10 ),
1186  RPT_2 ( 30, 0, 10 ), RPT_2 ( -30, 0, 10 ),
1187  RPT_2 ( 31, 0, 10 ), RPT_2 ( -31, 0, 10 ),
1188  RPT_2 ( 32, 0, 10 ), RPT_2 ( -32, 0, 10 ),
1189  RPT_2 ( 33, 0, 10 ), RPT_2 ( -33, 0, 10 ),
1190  RPT_2 ( 34, 0, 10 ), RPT_2 ( -34, 0, 10 ),
1191  RPT_2 ( 35, 0, 10 ), RPT_2 ( -35, 0, 10 ),
1192  RPT_2 ( 36, 0, 10 ), RPT_2 ( -36, 0, 10 ),
1193  RPT_4 ( 0, 1, 9 ), RPT_2 ( 9, 1, 10 ),
1194  RPT_2 ( -9, 1, 10 ), RPT_2 ( 10, 1, 10 ),
1195  RPT_2 ( -10, 1, 10 ), RPT_2 ( 11, 1, 10 ),
1196  RPT_2 ( -11, 1, 10 ), RPT_2 ( 12, 1, 10 ),
1197  RPT_2 ( -12, 1, 10 ), RPT_4 ( 0, 2, 9 ),
1198  RPT_2 ( 4, 2, 10 ), RPT_2 ( -4, 2, 10 ),
1199  RPT_2 ( 5, 2, 10 ), RPT_2 ( -5, 2, 10 ),
1200  RPT_2 ( 6, 2, 10 ), RPT_2 ( -6, 2, 10 ),
1201  RPT_4 ( 0, 3, 9 ), RPT_2 ( 3, 3, 10 ),
1202  RPT_2 ( -3, 3, 10 ), RPT_2 ( 4, 3, 10 ),
1203  RPT_2 ( -4, 3, 10 ), RPT_4 ( 0, 4, 9 ),
1204  RPT_2 ( 2, 4, 10 ), RPT_2 ( -2, 4, 10 ),
1205  RPT_4 ( 0, 5, 9 ), RPT_2 ( 1, 6, 10 ),
1206  RPT_2 ( -1, 6, 10 ), RPT_2 ( 1, 7, 10 ),
1207  RPT_2 ( -1, 7, 10 ), RPT_2 ( 1, 8, 10 ),
1208  RPT_2 ( -1, 8, 10 ), { 37, 0, 11 }, { -37, 0, 11 },
1209  { 38, 0, 11 }, { -38, 0, 11 }, { 39, 0, 11 }, { -39, 0, 11 },
1210  { 40, 0, 11 }, { -40, 0, 11 }, { 41, 0, 11 }, { -41, 0, 11 },
1211  { 42, 0, 11 }, { -42, 0, 11 }, { 43, 0, 11 }, { -43, 0, 11 },
1212  { 44, 0, 11 }, { -44, 0, 11 }, { 45, 0, 11 }, { -45, 0, 11 },
1213  { 46, 0, 11 }, { -46, 0, 11 }, { 47, 0, 11 }, { -47, 0, 11 },
1214  { 48, 0, 11 }, { -48, 0, 11 }, { 13, 1, 11 }, { -13, 1, 11 },
1215  { 14, 1, 11 }, { -14, 1, 11 }, { 15, 1, 11 }, { -15, 1, 11 },
1216  { 16, 1, 11 }, { -16, 1, 11 }, { 7, 2, 11 }, { -7, 2, 11 },
1217  { 8, 2, 11 }, { -8, 2, 11 }, { 5, 3, 11 }, { -5, 3, 11 },
1218  { 6, 3, 11 }, { -6, 3, 11 }, { 3, 4, 11 }, { -3, 4, 11 },
1219  { 4, 4, 11 }, { -4, 4, 11 }, { 2, 5, 11 }, { -2, 5, 11 },
1220  RPT_2 ( 0, 6, 10 ), { 2, 6, 11 }, { -2, 6, 11 },
1221  RPT_2 ( 0, 7, 10 ), RPT_2 ( 0, 8, 10 ),
1222  RPT_2 ( 0, 9, 10 ), { 1, 9, 11 }, { -1, 9, 11 },
1223  { 1, 10, 11 }, { -1, 10, 11 }, { 1, 11, 11 }, { -1, 11, 11 },
1224  { 1, 12, 11 }, { -1, 12, 11 }, { 4096, 0, -1 }, { 4160, 0, -1 },
1225  { 4224, 0, -1 }, { 4288, 0, -1 }, { 4352, 0, -1 }, { 4416, 0, -1 },
1226  { 4480, 0, -1 }, { 4544, 0, -1 }, { 4608, 0, -1 }, { 4672, 0, -1 },
1227  { 4736, 0, -1 }, { 4800, 0, -1 }, { 4864, 0, -1 }, { 4928, 0, -1 },
1228  { 4992, 0, -1 }, { 5056, 0, -1 }, { 5120, 0, -1 }, { 5184, 0, -1 },
1229  { 5248, 0, -1 }, { 5312, 0, -1 }, { 5376, 0, -1 }, { 5440, 0, -1 },
1230  { 5504, 0, -1 }, { 5568, 0, -1 }, { 5632, 0, -1 }, { 5696, 0, -1 },
1231  { 5760, 0, -1 }, { 5824, 0, -1 }, { 5888, 0, -1 }, { 5952, 0, -1 },
1232  { 6016, 0, -1 }, { 6080, 0, -1 }, { 6144, 0, -1 }, { 6208, 0, -1 },
1233  { 6272, 0, -1 }, { 6336, 0, -1 }, { 6400, 0, -1 }, { 6464, 0, -1 },
1234  { 6528, 0, -1 }, { 6592, 0, -1 }, { 0, 10, 11 }, { 6656, 0, -1 },
1235  { 0, 11, 11 }, { 0, 12, 11 }, { 0, 13, 11 }, { 6720, 0, -1 },
1236  { 6784, 0, -1 }, { 6848, 0, -1 }, { 6912, 0, -1 }, { 6976, 0, -1 },
1237  { 7040, 0, -1 }, { 7104, 0, -1 }, { 7168, 0, -1 }, { 7232, 0, -1 },
1238  { 7296, 0, -1 }, { 7360, 0, -1 }, { 7424, 0, -1 }, { 7488, 0, -1 },
1239  { 7552, 0, -1 }, { 7616, 0, -1 }, RPT_8 ( 0, 0, 14 ),
1240  RPT_4 ( 1, 0, 15 ), RPT_4 ( -1, 0, 15 ),
1241  RPT_4 ( 2, 0, 15 ), RPT_4 ( -2, 0, 15 ),
1242  RPT_4 ( 3, 0, 15 ), RPT_4 ( -3, 0, 15 ),
1243  RPT_4 ( 4, 0, 15 ), RPT_4 ( -4, 0, 15 ),
1244  RPT_4 ( 5, 0, 15 ), RPT_4 ( -5, 0, 15 ),
1245  RPT_4 ( 6, 0, 15 ), RPT_4 ( -6, 0, 15 ),
1246  RPT_4 ( 7, 0, 15 ), RPT_4 ( -7, 0, 15 ),
1247  RPT_4 ( 8, 0, 15 ), RPT_4 ( -8, 0, 15 ),
1248  RPT_4 ( 9, 0, 15 ), RPT_4 ( -9, 0, 15 ),
1249  RPT_4 ( 10, 0, 15 ), RPT_4 ( -10, 0, 15 ),
1250  RPT_4 ( 11, 0, 15 ), RPT_4 ( -11, 0, 15 ),
1251  RPT_4 ( 12, 0, 15 ), RPT_4 ( -12, 0, 15 ),
1252  RPT_4 ( 13, 0, 15 ), RPT_4 ( -13, 0, 15 ),
1253  RPT_4 ( 14, 0, 15 ), RPT_4 ( -14, 0, 15 ),
1254  RPT_4 ( 15, 0, 15 ), RPT_4 ( -15, 0, 15 ),
1255  RPT_4 ( 16, 0, 15 ), RPT_4 ( -16, 0, 15 ),
1256  RPT_4 ( 17, 0, 15 ), RPT_4 ( -17, 0, 15 ),
1257  RPT_4 ( 18, 0, 15 ), RPT_4 ( -18, 0, 15 ),
1258  RPT_4 ( 19, 0, 15 ), RPT_4 ( -19, 0, 15 ),
1259  RPT_4 ( 20, 0, 15 ), RPT_4 ( -20, 0, 15 ),
1260  RPT_4 ( 21, 0, 15 ), RPT_4 ( -21, 0, 15 ),
1261  RPT_4 ( 22, 0, 15 ), RPT_4 ( -22, 0, 15 ),
1262  RPT_4 ( 23, 0, 15 ), RPT_4 ( -23, 0, 15 ),
1263  RPT_4 ( 24, 0, 15 ), RPT_4 ( -24, 0, 15 ),
1264  RPT_4 ( 25, 0, 15 ), RPT_4 ( -25, 0, 15 ),
1265  RPT_4 ( 26, 0, 15 ), RPT_4 ( -26, 0, 15 ),
1266  RPT_4 ( 27, 0, 15 ), RPT_4 ( -27, 0, 15 ),
1267  RPT_4 ( 28, 0, 15 ), RPT_4 ( -28, 0, 15 ),
1268  RPT_4 ( 29, 0, 15 ), RPT_4 ( -29, 0, 15 ),
1269  RPT_4 ( 30, 0, 15 ), RPT_4 ( -30, 0, 15 ),
1270  RPT_4 ( 31, 0, 15 ), RPT_4 ( -31, 0, 15 ),
1271  RPT_4 ( 32, 0, 15 ), RPT_4 ( -32, 0, 15 ),
1272  RPT_4 ( 33, 0, 15 ), RPT_4 ( -33, 0, 15 ),
1273  RPT_4 ( 34, 0, 15 ), RPT_4 ( -34, 0, 15 ),
1274  RPT_4 ( 35, 0, 15 ), RPT_4 ( -35, 0, 15 ),
1275  RPT_4 ( 36, 0, 15 ), RPT_4 ( -36, 0, 15 ),
1276  RPT_4 ( 37, 0, 15 ), RPT_4 ( -37, 0, 15 ),
1277  RPT_4 ( 38, 0, 15 ), RPT_4 ( -38, 0, 15 ),
1278  RPT_4 ( 39, 0, 15 ), RPT_4 ( -39, 0, 15 ),
1279  RPT_4 ( 40, 0, 15 ), RPT_4 ( -40, 0, 15 ),
1280  RPT_4 ( 41, 0, 15 ), RPT_4 ( -41, 0, 15 ),
1281  RPT_4 ( 42, 0, 15 ), RPT_4 ( -42, 0, 15 ),
1282  RPT_4 ( 43, 0, 15 ), RPT_4 ( -43, 0, 15 ),
1283  RPT_4 ( 44, 0, 15 ), RPT_4 ( -44, 0, 15 ),
1284  RPT_4 ( 45, 0, 15 ), RPT_4 ( -45, 0, 15 ),
1285  RPT_4 ( 46, 0, 15 ), RPT_4 ( -46, 0, 15 ),
1286  RPT_4 ( 47, 0, 15 ), RPT_4 ( -47, 0, 15 ),
1287  RPT_4 ( 48, 0, 15 ), RPT_4 ( -48, 0, 15 ),
1288  RPT_4 ( 49, 0, 15 ), RPT_4 ( -49, 0, 15 ),
1289  RPT_4 ( 50, 0, 15 ), RPT_4 ( -50, 0, 15 ),
1290  RPT_4 ( 51, 0, 15 ), RPT_4 ( -51, 0, 15 ),
1291  RPT_4 ( 52, 0, 15 ), RPT_4 ( -52, 0, 15 ),
1292  RPT_4 ( 53, 0, 15 ), RPT_4 ( -53, 0, 15 ),
1293  RPT_4 ( 54, 0, 15 ), RPT_4 ( -54, 0, 15 ),
1294  RPT_4 ( 55, 0, 15 ), RPT_4 ( -55, 0, 15 ),
1295  RPT_4 ( 56, 0, 15 ), RPT_4 ( -56, 0, 15 ),
1296  RPT_4 ( 57, 0, 15 ), RPT_4 ( -57, 0, 15 ),
1297  RPT_4 ( 58, 0, 15 ), RPT_4 ( -58, 0, 15 ),
1298  RPT_4 ( 59, 0, 15 ), RPT_4 ( -59, 0, 15 ),
1299  RPT_4 ( 60, 0, 15 ), RPT_4 ( -60, 0, 15 ),
1300  RPT_4 ( 61, 0, 15 ), RPT_4 ( -61, 0, 15 ),
1301  RPT_4 ( 62, 0, 15 ), RPT_4 ( -62, 0, 15 ),
1302  RPT_4 ( 63, 0, 15 ), RPT_4 ( -63, 0, 15 ),
1303  RPT_4 ( 64, 0, 15 ), RPT_4 ( -64, 0, 15 ),
1304  RPT_4 ( 65, 0, 15 ), RPT_4 ( -65, 0, 15 ),
1305  RPT_4 ( 66, 0, 15 ), RPT_4 ( -66, 0, 15 ),
1306  RPT_4 ( 67, 0, 15 ), RPT_4 ( -67, 0, 15 ),
1307  RPT_4 ( 68, 0, 15 ), RPT_4 ( -68, 0, 15 ),
1308  RPT_4 ( 69, 0, 15 ), RPT_4 ( -69, 0, 15 ),
1309  RPT_4 ( 70, 0, 15 ), RPT_4 ( -70, 0, 15 ),
1310  RPT_4 ( 71, 0, 15 ), RPT_4 ( -71, 0, 15 ),
1311  RPT_4 ( 72, 0, 15 ), RPT_4 ( -72, 0, 15 ),
1312  RPT_4 ( 73, 0, 15 ), RPT_4 ( -73, 0, 15 ),
1313  RPT_4 ( 74, 0, 15 ), RPT_4 ( -74, 0, 15 ),
1314  RPT_4 ( 75, 0, 15 ), RPT_4 ( -75, 0, 15 ),
1315  RPT_4 ( 76, 0, 15 ), RPT_4 ( -76, 0, 15 ),
1316  RPT_4 ( 77, 0, 15 ), RPT_4 ( -77, 0, 15 ),
1317  RPT_4 ( 78, 0, 15 ), RPT_4 ( -78, 0, 15 ),
1318  RPT_4 ( 79, 0, 15 ), RPT_4 ( -79, 0, 15 ),
1319  RPT_4 ( 80, 0, 15 ), RPT_4 ( -80, 0, 15 ),
1320  RPT_4 ( 81, 0, 15 ), RPT_4 ( -81, 0, 15 ),
1321  RPT_4 ( 82, 0, 15 ), RPT_4 ( -82, 0, 15 ),
1322  RPT_4 ( 83, 0, 15 ), RPT_4 ( -83, 0, 15 ),
1323  RPT_4 ( 84, 0, 15 ), RPT_4 ( -84, 0, 15 ),
1324  RPT_4 ( 85, 0, 15 ), RPT_4 ( -85, 0, 15 ),
1325  RPT_4 ( 86, 0, 15 ), RPT_4 ( -86, 0, 15 ),
1326  RPT_4 ( 87, 0, 15 ), RPT_4 ( -87, 0, 15 ),
1327  RPT_4 ( 88, 0, 15 ), RPT_4 ( -88, 0, 15 ),
1328  RPT_4 ( 89, 0, 15 ), RPT_4 ( -89, 0, 15 ),
1329  RPT_4 ( 90, 0, 15 ), RPT_4 ( -90, 0, 15 ),
1330  RPT_4 ( 91, 0, 15 ), RPT_4 ( -91, 0, 15 ),
1331  RPT_4 ( 92, 0, 15 ), RPT_4 ( -92, 0, 15 ),
1332  RPT_4 ( 93, 0, 15 ), RPT_4 ( -93, 0, 15 ),
1333  RPT_4 ( 94, 0, 15 ), RPT_4 ( -94, 0, 15 ),
1334  RPT_4 ( 95, 0, 15 ), RPT_4 ( -95, 0, 15 ),
1335  RPT_4 ( 96, 0, 15 ), RPT_4 ( -96, 0, 15 ),
1336  RPT_4 ( 97, 0, 15 ), RPT_4 ( -97, 0, 15 ),
1337  RPT_4 ( 98, 0, 15 ), RPT_4 ( -98, 0, 15 ),
1338  RPT_4 ( 99, 0, 15 ), RPT_4 ( -99, 0, 15 ),
1339  RPT_4 ( 100, 0, 15 ), RPT_4 (-100, 0, 15 ),
1340  RPT_4 ( 101, 0, 15 ), RPT_4 (-101, 0, 15 ),
1341  RPT_4 ( 102, 0, 15 ), RPT_4 (-102, 0, 15 ),
1342  RPT_4 ( 103, 0, 15 ), RPT_4 (-103, 0, 15 ),
1343  RPT_4 ( 104, 0, 15 ), RPT_4 (-104, 0, 15 ),
1344  RPT_4 ( 105, 0, 15 ), RPT_4 (-105, 0, 15 ),
1345  RPT_4 ( 106, 0, 15 ), RPT_4 (-106, 0, 15 ),
1346  RPT_4 ( 107, 0, 15 ), RPT_4 (-107, 0, 15 ),
1347  RPT_4 ( 108, 0, 15 ), RPT_4 (-108, 0, 15 ),
1348  RPT_4 ( 109, 0, 15 ), RPT_4 (-109, 0, 15 ),
1349  RPT_4 ( 110, 0, 15 ), RPT_4 (-110, 0, 15 ),
1350  RPT_4 ( 111, 0, 15 ), RPT_4 (-111, 0, 15 ),
1351  RPT_4 ( 112, 0, 15 ), RPT_4 (-112, 0, 15 ),
1352  RPT_4 ( 113, 0, 15 ), RPT_4 (-113, 0, 15 ),
1353  RPT_4 ( 114, 0, 15 ), RPT_4 (-114, 0, 15 ),
1354  RPT_4 ( 115, 0, 15 ), RPT_4 (-115, 0, 15 ),
1355  RPT_4 ( 116, 0, 15 ), RPT_4 (-116, 0, 15 ),
1356  RPT_4 ( 117, 0, 15 ), RPT_4 (-117, 0, 15 ),
1357  RPT_4 ( 118, 0, 15 ), RPT_4 (-118, 0, 15 ),
1358  RPT_4 ( 119, 0, 15 ), RPT_4 (-119, 0, 15 ),
1359  RPT_4 ( 120, 0, 15 ), RPT_4 (-120, 0, 15 ),
1360  RPT_4 ( 121, 0, 15 ), RPT_4 (-121, 0, 15 ),
1361  RPT_4 ( 122, 0, 15 ), RPT_4 (-122, 0, 15 ),
1362  RPT_4 ( 123, 0, 15 ), RPT_4 (-123, 0, 15 ),
1363  RPT_4 ( 124, 0, 15 ), RPT_4 (-124, 0, 15 ),
1364  RPT_4 ( 125, 0, 15 ), RPT_4 (-125, 0, 15 ),
1365  RPT_4 ( 126, 0, 15 ), RPT_4 (-126, 0, 15 ),
1366  RPT_4 ( 127, 0, 15 ), RPT_4 (-127, 0, 15 ),
1367  RPT_4 ( 128, 0, 15 ), RPT_4 (-128, 0, 15 ),
1368  RPT_4 ( 129, 0, 15 ), RPT_4 (-129, 0, 15 ),
1369  RPT_4 ( 130, 0, 15 ), RPT_4 (-130, 0, 15 ),
1370  RPT_4 ( 131, 0, 15 ), RPT_4 (-131, 0, 15 ),
1371  RPT_4 ( 132, 0, 15 ), RPT_4 (-132, 0, 15 ),
1372  RPT_4 ( 133, 0, 15 ), RPT_4 (-133, 0, 15 ),
1373  RPT_4 ( 134, 0, 15 ), RPT_4 (-134, 0, 15 ),
1374  RPT_4 ( 135, 0, 15 ), RPT_4 (-135, 0, 15 ),
1375  RPT_4 ( 136, 0, 15 ), RPT_4 (-136, 0, 15 ),
1376  RPT_4 ( 137, 0, 15 ), RPT_4 (-137, 0, 15 ),
1377  RPT_4 ( 138, 0, 15 ), RPT_4 (-138, 0, 15 ),
1378  RPT_4 ( 139, 0, 15 ), RPT_4 (-139, 0, 15 ),
1379  RPT_4 ( 140, 0, 15 ), RPT_4 (-140, 0, 15 ),
1380  RPT_4 ( 141, 0, 15 ), RPT_4 (-141, 0, 15 ),
1381  RPT_4 ( 142, 0, 15 ), RPT_4 (-142, 0, 15 ),
1382  RPT_4 ( 143, 0, 15 ), RPT_4 (-143, 0, 15 ),
1383  RPT_4 ( 144, 0, 15 ), RPT_4 (-144, 0, 15 ),
1384  RPT_4 ( 145, 0, 15 ), RPT_4 (-145, 0, 15 ),
1385  RPT_4 ( 146, 0, 15 ), RPT_4 (-146, 0, 15 ),
1386  RPT_4 ( 147, 0, 15 ), RPT_4 (-147, 0, 15 ),
1387  RPT_4 ( 148, 0, 15 ), RPT_4 (-148, 0, 15 ),
1388  RPT_4 ( 149, 0, 15 ), RPT_4 (-149, 0, 15 ),
1389  RPT_4 ( 150, 0, 15 ), RPT_4 (-150, 0, 15 ),
1390  RPT_4 ( 151, 0, 15 ), RPT_4 (-151, 0, 15 ),
1391  RPT_4 ( 152, 0, 15 ), RPT_4 (-152, 0, 15 ),
1392  RPT_4 ( 153, 0, 15 ), RPT_4 (-153, 0, 15 ),
1393  RPT_4 ( 154, 0, 15 ), RPT_4 (-154, 0, 15 ),
1394  RPT_4 ( 155, 0, 15 ), RPT_4 (-155, 0, 15 ),
1395  RPT_4 ( 156, 0, 15 ), RPT_4 (-156, 0, 15 ),
1396  RPT_4 ( 157, 0, 15 ), RPT_4 (-157, 0, 15 ),
1397  RPT_4 ( 158, 0, 15 ), RPT_4 (-158, 0, 15 ),
1398  RPT_4 ( 159, 0, 15 ), RPT_4 (-159, 0, 15 ),
1399  RPT_4 ( 160, 0, 15 ), RPT_4 (-160, 0, 15 ),
1400  RPT_4 ( 161, 0, 15 ), RPT_4 (-161, 0, 15 ),
1401  RPT_4 ( 162, 0, 15 ), RPT_4 (-162, 0, 15 ),
1402  RPT_4 ( 163, 0, 15 ), RPT_4 (-163, 0, 15 ),
1403  RPT_4 ( 164, 0, 15 ), RPT_4 (-164, 0, 15 ),
1404  RPT_4 ( 165, 0, 15 ), RPT_4 (-165, 0, 15 ),
1405  RPT_4 ( 166, 0, 15 ), RPT_4 (-166, 0, 15 ),
1406  RPT_4 ( 167, 0, 15 ), RPT_4 (-167, 0, 15 ),
1407  RPT_4 ( 168, 0, 15 ), RPT_4 (-168, 0, 15 ),
1408  RPT_4 ( 169, 0, 15 ), RPT_4 (-169, 0, 15 ),
1409  RPT_4 ( 170, 0, 15 ), RPT_4 (-170, 0, 15 ),
1410  RPT_4 ( 171, 0, 15 ), RPT_4 (-171, 0, 15 ),
1411  RPT_4 ( 172, 0, 15 ), RPT_4 (-172, 0, 15 ),
1412  RPT_4 ( 173, 0, 15 ), RPT_4 (-173, 0, 15 ),
1413  RPT_4 ( 174, 0, 15 ), RPT_4 (-174, 0, 15 ),
1414  RPT_4 ( 175, 0, 15 ), RPT_4 (-175, 0, 15 ),
1415  RPT_4 ( 176, 0, 15 ), RPT_4 (-176, 0, 15 ),
1416  RPT_4 ( 177, 0, 15 ), RPT_4 (-177, 0, 15 ),
1417  RPT_4 ( 178, 0, 15 ), RPT_4 (-178, 0, 15 ),
1418  RPT_4 ( 179, 0, 15 ), RPT_4 (-179, 0, 15 ),
1419  RPT_4 ( 180, 0, 15 ), RPT_4 (-180, 0, 15 ),
1420  RPT_4 ( 181, 0, 15 ), RPT_4 (-181, 0, 15 ),
1421  RPT_4 ( 182, 0, 15 ), RPT_4 (-182, 0, 15 ),
1422  RPT_4 ( 183, 0, 15 ), RPT_4 (-183, 0, 15 ),
1423  RPT_4 ( 184, 0, 15 ), RPT_4 (-184, 0, 15 ),
1424  RPT_4 ( 185, 0, 15 ), RPT_4 (-185, 0, 15 ),
1425  RPT_4 ( 186, 0, 15 ), RPT_4 (-186, 0, 15 ),
1426  RPT_4 ( 187, 0, 15 ), RPT_4 (-187, 0, 15 ),
1427  RPT_4 ( 188, 0, 15 ), RPT_4 (-188, 0, 15 ),
1428  RPT_4 ( 189, 0, 15 ), RPT_4 (-189, 0, 15 ),
1429  RPT_4 ( 190, 0, 15 ), RPT_4 (-190, 0, 15 ),
1430  RPT_4 ( 191, 0, 15 ), RPT_4 (-191, 0, 15 ),
1431  RPT_4 ( 192, 0, 15 ), RPT_4 (-192, 0, 15 ),
1432  RPT_4 ( 193, 0, 15 ), RPT_4 (-193, 0, 15 ),
1433  RPT_4 ( 194, 0, 15 ), RPT_4 (-194, 0, 15 ),
1434  RPT_4 ( 195, 0, 15 ), RPT_4 (-195, 0, 15 ),
1435  RPT_4 ( 196, 0, 15 ), RPT_4 (-196, 0, 15 ),
1436  RPT_4 ( 197, 0, 15 ), RPT_4 (-197, 0, 15 ),
1437  RPT_4 ( 198, 0, 15 ), RPT_4 (-198, 0, 15 ),
1438  RPT_4 ( 199, 0, 15 ), RPT_4 (-199, 0, 15 ),
1439  RPT_4 ( 200, 0, 15 ), RPT_4 (-200, 0, 15 ),
1440  RPT_4 ( 201, 0, 15 ), RPT_4 (-201, 0, 15 ),
1441  RPT_4 ( 202, 0, 15 ), RPT_4 (-202, 0, 15 ),
1442  RPT_4 ( 203, 0, 15 ), RPT_4 (-203, 0, 15 ),
1443  RPT_4 ( 204, 0, 15 ), RPT_4 (-204, 0, 15 ),
1444  RPT_4 ( 205, 0, 15 ), RPT_4 (-205, 0, 15 ),
1445  RPT_4 ( 206, 0, 15 ), RPT_4 (-206, 0, 15 ),
1446  RPT_4 ( 207, 0, 15 ), RPT_4 (-207, 0, 15 ),
1447  RPT_4 ( 208, 0, 15 ), RPT_4 (-208, 0, 15 ),
1448  RPT_4 ( 209, 0, 15 ), RPT_4 (-209, 0, 15 ),
1449  RPT_4 ( 210, 0, 15 ), RPT_4 (-210, 0, 15 ),
1450  RPT_4 ( 211, 0, 15 ), RPT_4 (-211, 0, 15 ),
1451  RPT_4 ( 212, 0, 15 ), RPT_4 (-212, 0, 15 ),
1452  RPT_4 ( 213, 0, 15 ), RPT_4 (-213, 0, 15 ),
1453  RPT_4 ( 214, 0, 15 ), RPT_4 (-214, 0, 15 ),
1454  RPT_4 ( 215, 0, 15 ), RPT_4 (-215, 0, 15 ),
1455  RPT_4 ( 216, 0, 15 ), RPT_4 (-216, 0, 15 ),
1456  RPT_4 ( 217, 0, 15 ), RPT_4 (-217, 0, 15 ),
1457  RPT_4 ( 218, 0, 15 ), RPT_4 (-218, 0, 15 ),
1458  RPT_4 ( 219, 0, 15 ), RPT_4 (-219, 0, 15 ),
1459  RPT_4 ( 220, 0, 15 ), RPT_4 (-220, 0, 15 ),
1460  RPT_4 ( 221, 0, 15 ), RPT_4 (-221, 0, 15 ),
1461  RPT_4 ( 222, 0, 15 ), RPT_4 (-222, 0, 15 ),
1462  RPT_4 ( 223, 0, 15 ), RPT_4 (-223, 0, 15 ),
1463  RPT_4 ( 224, 0, 15 ), RPT_4 (-224, 0, 15 ),
1464  RPT_4 ( 225, 0, 15 ), RPT_4 (-225, 0, 15 ),
1465  RPT_4 ( 226, 0, 15 ), RPT_4 (-226, 0, 15 ),
1466  RPT_4 ( 227, 0, 15 ), RPT_4 (-227, 0, 15 ),
1467  RPT_4 ( 228, 0, 15 ), RPT_4 (-228, 0, 15 ),
1468  RPT_4 ( 229, 0, 15 ), RPT_4 (-229, 0, 15 ),
1469  RPT_4 ( 230, 0, 15 ), RPT_4 (-230, 0, 15 ),
1470  RPT_4 ( 231, 0, 15 ), RPT_4 (-231, 0, 15 ),
1471  RPT_4 ( 232, 0, 15 ), RPT_4 (-232, 0, 15 ),
1472  RPT_4 ( 233, 0, 15 ), RPT_4 (-233, 0, 15 ),
1473  RPT_4 ( 234, 0, 15 ), RPT_4 (-234, 0, 15 ),
1474  RPT_4 ( 235, 0, 15 ), RPT_4 (-235, 0, 15 ),
1475  RPT_4 ( 236, 0, 15 ), RPT_4 (-236, 0, 15 ),
1476  RPT_4 ( 237, 0, 15 ), RPT_4 (-237, 0, 15 ),
1477  RPT_4 ( 238, 0, 15 ), RPT_4 (-238, 0, 15 ),
1478  RPT_4 ( 239, 0, 15 ), RPT_4 (-239, 0, 15 ),
1479  RPT_4 ( 240, 0, 15 ), RPT_4 (-240, 0, 15 ),
1480  RPT_4 ( 241, 0, 15 ), RPT_4 (-241, 0, 15 ),
1481  RPT_4 ( 242, 0, 15 ), RPT_4 (-242, 0, 15 ),
1482  RPT_4 ( 243, 0, 15 ), RPT_4 (-243, 0, 15 ),
1483  RPT_4 ( 244, 0, 15 ), RPT_4 (-244, 0, 15 ),
1484  RPT_4 ( 245, 0, 15 ), RPT_4 (-245, 0, 15 ),
1485  RPT_4 ( 246, 0, 15 ), RPT_4 (-246, 0, 15 ),
1486  RPT_4 ( 247, 0, 15 ), RPT_4 (-247, 0, 15 ),
1487  RPT_4 ( 248, 0, 15 ), RPT_4 (-248, 0, 15 ),
1488  RPT_4 ( 249, 0, 15 ), RPT_4 (-249, 0, 15 ),
1489  RPT_4 ( 250, 0, 15 ), RPT_4 (-250, 0, 15 ),
1490  RPT_4 ( 251, 0, 15 ), RPT_4 (-251, 0, 15 ),
1491  RPT_4 ( 252, 0, 15 ), RPT_4 (-252, 0, 15 ),
1492  RPT_4 ( 253, 0, 15 ), RPT_4 (-253, 0, 15 ),
1493  RPT_4 ( 254, 0, 15 ), RPT_4 (-254, 0, 15 ),
1494  RPT_4 ( 255, 0, 15 ), RPT_4 (-255, 0, 15 ),
1495  RPT_32 ( 49, 0, 12 ), RPT_32 ( -49, 0, 12 ),
1496  RPT_32 ( 50, 0, 12 ), RPT_32 ( -50, 0, 12 ),
1497  RPT_32 ( 51, 0, 12 ), RPT_32 ( -51, 0, 12 ),
1498  RPT_32 ( 52, 0, 12 ), RPT_32 ( -52, 0, 12 ),
1499  RPT_32 ( 53, 0, 12 ), RPT_32 ( -53, 0, 12 ),
1500  RPT_32 ( 54, 0, 12 ), RPT_32 ( -54, 0, 12 ),
1501  RPT_32 ( 55, 0, 12 ), RPT_32 ( -55, 0, 12 ),
1502  RPT_32 ( 56, 0, 12 ), RPT_32 ( -56, 0, 12 ),
1503  RPT_32 ( 57, 0, 12 ), RPT_32 ( -57, 0, 12 ),
1504  RPT_32 ( 58, 0, 12 ), RPT_32 ( -58, 0, 12 ),
1505  RPT_32 ( 59, 0, 12 ), RPT_32 ( -59, 0, 12 ),
1506  RPT_32 ( 60, 0, 12 ), RPT_32 ( -60, 0, 12 ),
1507  RPT_32 ( 61, 0, 12 ), RPT_32 ( -61, 0, 12 ),
1508  RPT_32 ( 62, 0, 12 ), RPT_32 ( -62, 0, 12 ),
1509  RPT_32 ( 63, 0, 12 ), RPT_32 ( -63, 0, 12 ),
1510  RPT_32 ( 17, 1, 12 ), RPT_32 ( -17, 1, 12 ),
1511  RPT_32 ( 18, 1, 12 ), RPT_32 ( -18, 1, 12 ),
1512  RPT_32 ( 19, 1, 12 ), RPT_32 ( -19, 1, 12 ),
1513  RPT_32 ( 20, 1, 12 ), RPT_32 ( -20, 1, 12 ),
1514  RPT_32 ( 21, 1, 12 ), RPT_32 ( -21, 1, 12 ),
1515  RPT_32 ( 22, 1, 12 ), RPT_32 ( -22, 1, 12 ),
1516  RPT_32 ( 23, 1, 12 ), RPT_32 ( -23, 1, 12 ),
1517  RPT_32 ( 24, 1, 12 ), RPT_32 ( -24, 1, 12 ),
1518  RPT_32 ( 9, 2, 12 ), RPT_32 ( -9, 2, 12 ),
1519  RPT_32 ( 10, 2, 12 ), RPT_32 ( -10, 2, 12 ),
1520  RPT_32 ( 11, 2, 12 ), RPT_32 ( -11, 2, 12 ),
1521  RPT_32 ( 12, 2, 12 ), RPT_32 ( -12, 2, 12 ),
1522  RPT_32 ( 7, 3, 12 ), RPT_32 ( -7, 3, 12 ),
1523  RPT_32 ( 8, 3, 12 ), RPT_32 ( -8, 3, 12 ),
1524  RPT_32 ( 5, 4, 12 ), RPT_32 ( -5, 4, 12 ),
1525  RPT_32 ( 6, 4, 12 ), RPT_32 ( -6, 4, 12 ),
1526  RPT_32 ( 3, 5, 12 ), RPT_32 ( -3, 5, 12 ),
1527  RPT_32 ( 4, 5, 12 ), RPT_32 ( -4, 5, 12 ),
1528  RPT_32 ( 5, 5, 12 ), RPT_32 ( -5, 5, 12 ),
1529  RPT_32 ( 6, 5, 12 ), RPT_32 ( -6, 5, 12 ),
1530  RPT_32 ( 3, 6, 12 ), RPT_32 ( -3, 6, 12 ),
1531  RPT_32 ( 4, 6, 12 ), RPT_32 ( -4, 6, 12 ),
1532  RPT_32 ( 2, 7, 12 ), RPT_32 ( -2, 7, 12 ),
1533  RPT_32 ( 2, 8, 12 ), RPT_32 ( -2, 8, 12 ),
1534  RPT_32 ( 2, 9, 12 ), RPT_32 ( -2, 9, 12 ),
1535  RPT_32 ( 2, 10, 12 ), RPT_32 ( -2, 10, 12 ),
1536  RPT_32 ( 1, 13, 12 ), RPT_32 ( -1, 13, 12 ),
1537  RPT_32 ( 1, 14, 12 ), RPT_32 ( -1, 14, 12 ),
1538  { 0, 0, 17 }, { 0, 1, 17 }, { 0, 2, 17 }, { 0, 3, 17 },
1539  { 0, 4, 17 }, { 0, 5, 17 }, { 0, 6, 17 }, { 0, 7, 17 },
1540  { 0, 8, 17 }, { 0, 9, 17 }, { 0, 10, 17 }, { 0, 11, 17 },
1541  { 0, 12, 17 }, { 0, 13, 17 }, { 0, 14, 17 }, { 0, 15, 17 },
1542  { 0, 16, 17 }, { 0, 17, 17 }, { 0, 18, 17 }, { 0, 19, 17 },
1543  { 0, 20, 17 }, { 0, 21, 17 }, { 0, 22, 17 }, { 0, 23, 17 },
1544  { 0, 24, 17 }, { 0, 25, 17 }, { 0, 26, 17 }, { 0, 27, 17 },
1545  { 0, 28, 17 }, { 0, 29, 17 }, { 0, 30, 17 }, { 0, 31, 17 },
1546  { 0, 32, 17 }, { 0, 33, 17 }, { 0, 34, 17 }, { 0, 35, 17 },
1547  { 0, 36, 17 }, { 0, 37, 17 }, { 0, 38, 17 }, { 0, 39, 17 },
1548  { 0, 40, 17 }, { 0, 41, 17 }, { 0, 42, 17 }, { 0, 43, 17 },
1549  { 0, 44, 17 }, { 0, 45, 17 }, { 0, 46, 17 }, { 0, 47, 17 },
1550  { 0, 48, 17 }, { 0, 49, 17 }, { 0, 50, 17 }, { 0, 51, 17 },
1551  { 0, 52, 17 }, { 0, 53, 17 }, { 0, 54, 17 }, { 0, 55, 17 },
1552  { 0, 56, 17 }, { 0, 57, 17 }, { 0, 58, 17 }, { 0, 59, 17 },
1553  { 0, 60, 17 }, { 0, 61, 17 }, { 0, 62, 17 }, { 0, 63, 17 },
1554  RPT_16 ( 25, 1, 13 ), RPT_16 ( -25, 1, 13 ),
1555  RPT_16 ( 26, 1, 13 ), RPT_16 ( -26, 1, 13 ),
1556  RPT_16 ( 27, 1, 13 ), RPT_16 ( -27, 1, 13 ),
1557  RPT_16 ( 28, 1, 13 ), RPT_16 ( -28, 1, 13 ),
1558  RPT_16 ( 29, 1, 13 ), RPT_16 ( -29, 1, 13 ),
1559  RPT_16 ( 30, 1, 13 ), RPT_16 ( -30, 1, 13 ),
1560  RPT_16 ( 31, 1, 13 ), RPT_16 ( -31, 1, 13 ),
1561  RPT_16 ( 32, 1, 13 ), RPT_16 ( -32, 1, 13 ),
1562  RPT_16 ( 13, 2, 13 ), RPT_16 ( -13, 2, 13 ),
1563  RPT_16 ( 14, 2, 13 ), RPT_16 ( -14, 2, 13 ),
1564  RPT_16 ( 15, 2, 13 ), RPT_16 ( -15, 2, 13 ),
1565  RPT_16 ( 16, 2, 13 ), RPT_16 ( -16, 2, 13 ),
1566  RPT_16 ( 9, 3, 13 ), RPT_16 ( -9, 3, 13 ),
1567  RPT_16 ( 10, 3, 13 ), RPT_16 ( -10, 3, 13 ),
1568  RPT_16 ( 11, 3, 13 ), RPT_16 ( -11, 3, 13 ),
1569  RPT_16 ( 7, 4, 13 ), RPT_16 ( -7, 4, 13 ),
1570  RPT_16 ( 3, 7, 13 ), RPT_16 ( -3, 7, 13 ),
1571  RPT_16 ( 4, 7, 13 ), RPT_16 ( -4, 7, 13 ),
1572  RPT_16 ( 3, 8, 13 ), RPT_16 ( -3, 8, 13 ),
1573  RPT_16 ( 4, 8, 13 ), RPT_16 ( -4, 8, 13 ),
1574  RPT_16 ( 3, 9, 13 ), RPT_16 ( -3, 9, 13 ),
1575  RPT_16 ( 2, 11, 13 ), RPT_16 ( -2, 11, 13 ),
1576  RPT_16 ( 2, 12, 13 ), RPT_16 ( -2, 12, 13 ),
1577  RPT_32 ( 0, 14, 12 ),
1578 };
1579 
1580 static const HQXLUT ac16_lut[] = {
1581  RPT_256 ( 1, 0, 3 ), RPT_256 ( -1, 0, 3 ),
1582  RPT_128 ( 2, 0, 4 ), RPT_128 ( -2, 0, 4 ),
1583  RPT_64 ( 3, 0, 5 ), RPT_64 ( -3, 0, 5 ),
1584  RPT_64 ( 4, 0, 5 ), RPT_64 ( -4, 0, 5 ),
1585  RPT_64 ( 1, 1, 5 ), RPT_64 ( -1, 1, 5 ),
1586  RPT_128 ( 0, 64, 4 ), RPT_32 ( 5, 0, 6 ),
1587  RPT_32 ( -5, 0, 6 ), RPT_32 ( 6, 0, 6 ),
1588  RPT_32 ( -6, 0, 6 ), RPT_32 ( 2, 1, 6 ),
1589  RPT_32 ( -2, 1, 6 ), RPT_32 ( 1, 2, 6 ),
1590  RPT_32 ( -1, 2, 6 ), RPT_16 ( 7, 0, 7 ),
1591  RPT_16 ( -7, 0, 7 ), RPT_16 ( 8, 0, 7 ),
1592  RPT_16 ( -8, 0, 7 ), RPT_16 ( 9, 0, 7 ),
1593  RPT_16 ( -9, 0, 7 ), RPT_16 ( 3, 1, 7 ),
1594  RPT_16 ( -3, 1, 7 ), RPT_16 ( 1, 3, 7 ),
1595  RPT_16 ( -1, 3, 7 ), RPT_16 ( 1, 4, 7 ),
1596  RPT_16 ( -1, 4, 7 ), RPT_8 ( 10, 0, 8 ),
1597  RPT_8 ( -10, 0, 8 ), RPT_8 ( 11, 0, 8 ),
1598  RPT_8 ( -11, 0, 8 ), RPT_8 ( 12, 0, 8 ),
1599  RPT_8 ( -12, 0, 8 ), RPT_8 ( 4, 1, 8 ),
1600  RPT_8 ( -4, 1, 8 ), RPT_8 ( 2, 2, 8 ),
1601  RPT_8 ( -2, 2, 8 ), RPT_8 ( 1, 5, 8 ),
1602  RPT_8 ( -1, 5, 8 ), RPT_8 ( 1, 6, 8 ),
1603  RPT_8 ( -1, 6, 8 ), RPT_4 ( 13, 0, 9 ),
1604  RPT_4 ( -13, 0, 9 ), RPT_4 ( 14, 0, 9 ),
1605  RPT_4 ( -14, 0, 9 ), RPT_4 ( 15, 0, 9 ),
1606  RPT_4 ( -15, 0, 9 ), RPT_4 ( 16, 0, 9 ),
1607  RPT_4 ( -16, 0, 9 ), RPT_4 ( 17, 0, 9 ),
1608  RPT_4 ( -17, 0, 9 ), RPT_4 ( 5, 1, 9 ),
1609  RPT_4 ( -5, 1, 9 ), RPT_4 ( 2, 3, 9 ),
1610  RPT_4 ( -2, 3, 9 ), RPT_4 ( 1, 7, 9 ),
1611  RPT_4 ( -1, 7, 9 ), RPT_4 ( 1, 8, 9 ),
1612  RPT_4 ( -1, 8, 9 ), RPT_4 ( 1, 9, 9 ),
1613  RPT_4 ( -1, 9, 9 ), RPT_4 ( 1, 10, 9 ),
1614  RPT_4 ( -1, 10, 9 ), RPT_4 ( 0, 0, 9 ),
1615  RPT_2 ( 18, 0, 10 ), RPT_2 ( -18, 0, 10 ),
1616  RPT_2 ( 19, 0, 10 ), RPT_2 ( -19, 0, 10 ),
1617  RPT_2 ( 20, 0, 10 ), RPT_2 ( -20, 0, 10 ),
1618  RPT_2 ( 21, 0, 10 ), RPT_2 ( -21, 0, 10 ),
1619  RPT_2 ( 22, 0, 10 ), RPT_2 ( -22, 0, 10 ),
1620  RPT_2 ( 6, 1, 10 ), RPT_2 ( -6, 1, 10 ),
1621  RPT_2 ( 7, 1, 10 ), RPT_2 ( -7, 1, 10 ),
1622  RPT_2 ( 3, 2, 10 ), RPT_2 ( -3, 2, 10 ),
1623  RPT_2 ( 2, 4, 10 ), RPT_2 ( -2, 4, 10 ),
1624  RPT_2 ( 2, 5, 10 ), RPT_2 ( -2, 5, 10 ),
1625  RPT_2 ( 1, 11, 10 ), RPT_2 ( -1, 11, 10 ),
1626  RPT_2 ( 1, 12, 10 ), RPT_2 ( -1, 12, 10 ),
1627  RPT_2 ( 1, 13, 10 ), RPT_2 ( -1, 13, 10 ),
1628  { 2048, 0, -1 }, { 2112, 0, -1 }, { 2176, 0, -1 }, { 2240, 0, -1 },
1629  { 2304, 0, -1 }, { 2368, 0, -1 }, { 2432, 0, -1 }, { 2496, 0, -1 },
1630  { 23, 0, 11 }, { -23, 0, 11 }, { 24, 0, 11 }, { -24, 0, 11 },
1631  { 25, 0, 11 }, { -25, 0, 11 }, { 26, 0, 11 }, { -26, 0, 11 },
1632  { 27, 0, 11 }, { -27, 0, 11 }, { 28, 0, 11 }, { -28, 0, 11 },
1633  { 8, 1, 11 }, { -8, 1, 11 }, { 9, 1, 11 }, { -9, 1, 11 },
1634  { 4, 2, 11 }, { -4, 2, 11 }, { 3, 3, 11 }, { -3, 3, 11 },
1635  { 3, 4, 11 }, { -3, 4, 11 }, { 2, 6, 11 }, { -2, 6, 11 },
1636  { 2, 7, 11 }, { -2, 7, 11 }, { 2560, 0, -1 }, { 2624, 0, -1 },
1637  { 2688, 0, -1 }, { 2752, 0, -1 }, { 2816, 0, -1 }, { 2880, 0, -1 },
1638  { 2944, 0, -1 }, { 0, 1, 11 }, { 3008, 0, -1 }, { 3072, 0, -1 },
1639  { 3136, 0, -1 }, { 0, 2, 11 }, { 3200, 0, -1 }, { 0, 3, 11 },
1640  { 3264, 0, -1 }, { 3328, 0, -1 }, { 3392, 0, -1 }, { 3456, 0, -1 },
1641  { 3520, 0, -1 }, { 3584, 0, -1 }, { 3648, 0, -1 }, { 3712, 0, -1 },
1642  { 3776, 0, -1 }, { 3840, 0, -1 }, { 3904, 0, -1 }, { 3968, 0, -1 },
1643  { 4032, 0, -1 }, { 4096, 0, -1 }, { 4160, 0, -1 }, { 4224, 0, -1 },
1644  RPT_4 ( 0, 0, 15 ), RPT_4 ( 0, 1, 15 ),
1645  RPT_4 ( 0, 2, 15 ), RPT_4 ( 0, 3, 15 ),
1646  RPT_4 ( 0, 4, 15 ), RPT_4 ( 0, 5, 15 ),
1647  RPT_4 ( 0, 6, 15 ), RPT_4 ( 0, 7, 15 ),
1648  RPT_4 ( 0, 8, 15 ), RPT_4 ( 0, 9, 15 ),
1649  RPT_4 ( 0, 10, 15 ), RPT_4 ( 0, 11, 15 ),
1650  RPT_4 ( 0, 12, 15 ), RPT_4 ( 0, 13, 15 ),
1651  RPT_4 ( 0, 14, 15 ), RPT_4 ( 0, 15, 15 ),
1652  RPT_4 ( 0, 16, 15 ), RPT_4 ( 0, 17, 15 ),
1653  RPT_4 ( 0, 18, 15 ), RPT_4 ( 0, 19, 15 ),
1654  RPT_4 ( 0, 20, 15 ), RPT_4 ( 0, 21, 15 ),
1655  RPT_4 ( 0, 22, 15 ), RPT_4 ( 0, 23, 15 ),
1656  RPT_4 ( 0, 24, 15 ), RPT_4 ( 0, 25, 15 ),
1657  RPT_4 ( 0, 26, 15 ), RPT_4 ( 0, 27, 15 ),
1658  RPT_4 ( 0, 28, 15 ), RPT_4 ( 0, 29, 15 ),
1659  RPT_4 ( 0, 30, 15 ), RPT_4 ( 0, 31, 15 ),
1660  RPT_4 ( 0, 32, 15 ), RPT_4 ( 0, 33, 15 ),
1661  RPT_4 ( 0, 34, 15 ), RPT_4 ( 0, 35, 15 ),
1662  RPT_4 ( 0, 36, 15 ), RPT_4 ( 0, 37, 15 ),
1663  RPT_4 ( 0, 38, 15 ), RPT_4 ( 0, 39, 15 ),
1664  RPT_4 ( 0, 40, 15 ), RPT_4 ( 0, 41, 15 ),
1665  RPT_4 ( 0, 42, 15 ), RPT_4 ( 0, 43, 15 ),
1666  RPT_4 ( 0, 44, 15 ), RPT_4 ( 0, 45, 15 ),
1667  RPT_4 ( 0, 46, 15 ), RPT_4 ( 0, 47, 15 ),
1668  RPT_4 ( 0, 48, 15 ), RPT_4 ( 0, 49, 15 ),
1669  RPT_4 ( 0, 50, 15 ), RPT_4 ( 0, 51, 15 ),
1670  RPT_4 ( 0, 52, 15 ), RPT_4 ( 0, 53, 15 ),
1671  RPT_4 ( 0, 54, 15 ), RPT_4 ( 0, 55, 15 ),
1672  RPT_4 ( 0, 56, 15 ), RPT_4 ( 0, 57, 15 ),
1673  RPT_4 ( 0, 58, 15 ), RPT_4 ( 0, 59, 15 ),
1674  RPT_4 ( 0, 60, 15 ), RPT_4 ( 0, 61, 15 ),
1675  RPT_4 ( 0, 62, 15 ), RPT_4 ( 0, 63, 15 ),
1676  RPT_2 ( 0, 0, 16 ), { 1, 0, 17 }, { -1, 0, 17 },
1677  { 2, 0, 17 }, { -2, 0, 17 }, { 3, 0, 17 }, { -3, 0, 17 },
1678  { 4, 0, 17 }, { -4, 0, 17 }, { 5, 0, 17 }, { -5, 0, 17 },
1679  { 6, 0, 17 }, { -6, 0, 17 }, { 7, 0, 17 }, { -7, 0, 17 },
1680  { 8, 0, 17 }, { -8, 0, 17 }, { 9, 0, 17 }, { -9, 0, 17 },
1681  { 10, 0, 17 }, { -10, 0, 17 }, { 11, 0, 17 }, { -11, 0, 17 },
1682  { 12, 0, 17 }, { -12, 0, 17 }, { 13, 0, 17 }, { -13, 0, 17 },
1683  { 14, 0, 17 }, { -14, 0, 17 }, { 15, 0, 17 }, { -15, 0, 17 },
1684  { 16, 0, 17 }, { -16, 0, 17 }, { 17, 0, 17 }, { -17, 0, 17 },
1685  { 18, 0, 17 }, { -18, 0, 17 }, { 19, 0, 17 }, { -19, 0, 17 },
1686  { 20, 0, 17 }, { -20, 0, 17 }, { 21, 0, 17 }, { -21, 0, 17 },
1687  { 22, 0, 17 }, { -22, 0, 17 }, { 23, 0, 17 }, { -23, 0, 17 },
1688  { 24, 0, 17 }, { -24, 0, 17 }, { 25, 0, 17 }, { -25, 0, 17 },
1689  { 26, 0, 17 }, { -26, 0, 17 }, { 27, 0, 17 }, { -27, 0, 17 },
1690  { 28, 0, 17 }, { -28, 0, 17 }, { 29, 0, 17 }, { -29, 0, 17 },
1691  { 30, 0, 17 }, { -30, 0, 17 }, { 31, 0, 17 }, { -31, 0, 17 },
1692  { 32, 0, 17 }, { -32, 0, 17 }, { 33, 0, 17 }, { -33, 0, 17 },
1693  { 34, 0, 17 }, { -34, 0, 17 }, { 35, 0, 17 }, { -35, 0, 17 },
1694  { 36, 0, 17 }, { -36, 0, 17 }, { 37, 0, 17 }, { -37, 0, 17 },
1695  { 38, 0, 17 }, { -38, 0, 17 }, { 39, 0, 17 }, { -39, 0, 17 },
1696  { 40, 0, 17 }, { -40, 0, 17 }, { 41, 0, 17 }, { -41, 0, 17 },
1697  { 42, 0, 17 }, { -42, 0, 17 }, { 43, 0, 17 }, { -43, 0, 17 },
1698  { 44, 0, 17 }, { -44, 0, 17 }, { 45, 0, 17 }, { -45, 0, 17 },
1699  { 46, 0, 17 }, { -46, 0, 17 }, { 47, 0, 17 }, { -47, 0, 17 },
1700  { 48, 0, 17 }, { -48, 0, 17 }, { 49, 0, 17 }, { -49, 0, 17 },
1701  { 50, 0, 17 }, { -50, 0, 17 }, { 51, 0, 17 }, { -51, 0, 17 },
1702  { 52, 0, 17 }, { -52, 0, 17 }, { 53, 0, 17 }, { -53, 0, 17 },
1703  { 54, 0, 17 }, { -54, 0, 17 }, { 55, 0, 17 }, { -55, 0, 17 },
1704  { 56, 0, 17 }, { -56, 0, 17 }, { 57, 0, 17 }, { -57, 0, 17 },
1705  { 58, 0, 17 }, { -58, 0, 17 }, { 59, 0, 17 }, { -59, 0, 17 },
1706  { 60, 0, 17 }, { -60, 0, 17 }, { 61, 0, 17 }, { -61, 0, 17 },
1707  { 62, 0, 17 }, { -62, 0, 17 }, { 63, 0, 17 }, { -63, 0, 17 },
1708  { 64, 0, 17 }, { -64, 0, 17 }, { 65, 0, 17 }, { -65, 0, 17 },
1709  { 66, 0, 17 }, { -66, 0, 17 }, { 67, 0, 17 }, { -67, 0, 17 },
1710  { 68, 0, 17 }, { -68, 0, 17 }, { 69, 0, 17 }, { -69, 0, 17 },
1711  { 70, 0, 17 }, { -70, 0, 17 }, { 71, 0, 17 }, { -71, 0, 17 },
1712  { 72, 0, 17 }, { -72, 0, 17 }, { 73, 0, 17 }, { -73, 0, 17 },
1713  { 74, 0, 17 }, { -74, 0, 17 }, { 75, 0, 17 }, { -75, 0, 17 },
1714  { 76, 0, 17 }, { -76, 0, 17 }, { 77, 0, 17 }, { -77, 0, 17 },
1715  { 78, 0, 17 }, { -78, 0, 17 }, { 79, 0, 17 }, { -79, 0, 17 },
1716  { 80, 0, 17 }, { -80, 0, 17 }, { 81, 0, 17 }, { -81, 0, 17 },
1717  { 82, 0, 17 }, { -82, 0, 17 }, { 83, 0, 17 }, { -83, 0, 17 },
1718  { 84, 0, 17 }, { -84, 0, 17 }, { 85, 0, 17 }, { -85, 0, 17 },
1719  { 86, 0, 17 }, { -86, 0, 17 }, { 87, 0, 17 }, { -87, 0, 17 },
1720  { 88, 0, 17 }, { -88, 0, 17 }, { 89, 0, 17 }, { -89, 0, 17 },
1721  { 90, 0, 17 }, { -90, 0, 17 }, { 91, 0, 17 }, { -91, 0, 17 },
1722  { 92, 0, 17 }, { -92, 0, 17 }, { 93, 0, 17 }, { -93, 0, 17 },
1723  { 94, 0, 17 }, { -94, 0, 17 }, { 95, 0, 17 }, { -95, 0, 17 },
1724  { 96, 0, 17 }, { -96, 0, 17 }, { 97, 0, 17 }, { -97, 0, 17 },
1725  { 98, 0, 17 }, { -98, 0, 17 }, { 99, 0, 17 }, { -99, 0, 17 },
1726  { 100, 0, 17 }, { -100, 0, 17 }, { 101, 0, 17 }, { -101, 0, 17 },
1727  { 102, 0, 17 }, { -102, 0, 17 }, { 103, 0, 17 }, { -103, 0, 17 },
1728  { 104, 0, 17 }, { -104, 0, 17 }, { 105, 0, 17 }, { -105, 0, 17 },
1729  { 106, 0, 17 }, { -106, 0, 17 }, { 107, 0, 17 }, { -107, 0, 17 },
1730  { 108, 0, 17 }, { -108, 0, 17 }, { 109, 0, 17 }, { -109, 0, 17 },
1731  { 110, 0, 17 }, { -110, 0, 17 }, { 111, 0, 17 }, { -111, 0, 17 },
1732  { 112, 0, 17 }, { -112, 0, 17 }, { 113, 0, 17 }, { -113, 0, 17 },
1733  { 114, 0, 17 }, { -114, 0, 17 }, { 115, 0, 17 }, { -115, 0, 17 },
1734  { 116, 0, 17 }, { -116, 0, 17 }, { 117, 0, 17 }, { -117, 0, 17 },
1735  { 118, 0, 17 }, { -118, 0, 17 }, { 119, 0, 17 }, { -119, 0, 17 },
1736  { 120, 0, 17 }, { -120, 0, 17 }, { 121, 0, 17 }, { -121, 0, 17 },
1737  { 122, 0, 17 }, { -122, 0, 17 }, { 123, 0, 17 }, { -123, 0, 17 },
1738  { 124, 0, 17 }, { -124, 0, 17 }, { 125, 0, 17 }, { -125, 0, 17 },
1739  { 126, 0, 17 }, { -126, 0, 17 }, { 127, 0, 17 }, { -127, 0, 17 },
1740  RPT_32 ( 29, 0, 12 ), RPT_32 ( -29, 0, 12 ),
1741  RPT_32 ( 30, 0, 12 ), RPT_32 ( -30, 0, 12 ),
1742  RPT_32 ( 31, 0, 12 ), RPT_32 ( -31, 0, 12 ),
1743  RPT_32 ( 32, 0, 12 ), RPT_32 ( -32, 0, 12 ),
1744  RPT_32 ( 33, 0, 12 ), RPT_32 ( -33, 0, 12 ),
1745  RPT_32 ( 34, 0, 12 ), RPT_32 ( -34, 0, 12 ),
1746  RPT_32 ( 35, 0, 12 ), RPT_32 ( -35, 0, 12 ),
1747  RPT_32 ( 10, 1, 12 ), RPT_32 ( -10, 1, 12 ),
1748  RPT_32 ( 11, 1, 12 ), RPT_32 ( -11, 1, 12 ),
1749  RPT_32 ( 12, 1, 12 ), RPT_32 ( -12, 1, 12 ),
1750  RPT_32 ( 5, 2, 12 ), RPT_32 ( -5, 2, 12 ),
1751  RPT_32 ( 4, 3, 12 ), RPT_32 ( -4, 3, 12 ),
1752  RPT_32 ( 3, 5, 12 ), RPT_32 ( -3, 5, 12 ),
1753  RPT_32 ( 2, 8, 12 ), RPT_32 ( -2, 8, 12 ),
1754  RPT_32 ( 2, 9, 12 ), RPT_32 ( -2, 9, 12 ),
1755  RPT_32 ( 1, 14, 12 ), RPT_32 ( -1, 14, 12 ),
1756  RPT_32 ( 1, 15, 12 ), RPT_32 ( -1, 15, 12 ),
1757  RPT_16 ( 36, 0, 13 ), RPT_16 ( -36, 0, 13 ),
1758  RPT_16 ( 37, 0, 13 ), RPT_16 ( -37, 0, 13 ),
1759  RPT_16 ( 38, 0, 13 ), RPT_16 ( -38, 0, 13 ),
1760  RPT_16 ( 39, 0, 13 ), RPT_16 ( -39, 0, 13 ),
1761  RPT_16 ( 40, 0, 13 ), RPT_16 ( -40, 0, 13 ),
1762  RPT_16 ( 13, 1, 13 ), RPT_16 ( -13, 1, 13 ),
1763  RPT_16 ( 14, 1, 13 ), RPT_16 ( -14, 1, 13 ),
1764  RPT_16 ( 15, 1, 13 ), RPT_16 ( -15, 1, 13 ),
1765  RPT_16 ( 6, 2, 13 ), RPT_16 ( -6, 2, 13 ),
1766  RPT_16 ( 7, 2, 13 ), RPT_16 ( -7, 2, 13 ),
1767  RPT_16 ( 5, 3, 13 ), RPT_16 ( -5, 3, 13 ),
1768  RPT_32 ( 0, 4, 12 ), RPT_16 ( 4, 4, 13 ),
1769  RPT_16 ( -4, 4, 13 ), RPT_32 ( 0, 5, 12 ),
1770  RPT_32 ( 0, 6, 12 ), RPT_16 ( 3, 6, 13 ),
1771  RPT_16 ( -3, 6, 13 ), RPT_32 ( 0, 7, 12 ),
1772  RPT_16 ( 3, 7, 13 ), RPT_16 ( -3, 7, 13 ),
1773  RPT_16 ( 2, 10, 13 ), RPT_16 ( -2, 10, 13 ),
1774  RPT_16 ( 1, 16, 13 ), RPT_16 ( -1, 16, 13 ),
1775 };
1776 
1777 static const HQXLUT ac32_lut[] = {
1778  RPT_256 ( 1, 0, 3 ), RPT_256 ( -1, 0, 3 ),
1779  RPT_128 ( 2, 0, 4 ), RPT_128 ( -2, 0, 4 ),
1780  RPT_256 ( 0, 64, 3 ), RPT_64 ( 3, 0, 5 ),
1781  RPT_64 ( -3, 0, 5 ), RPT_64 ( 1, 1, 5 ),
1782  RPT_64 ( -1, 1, 5 ), RPT_32 ( 4, 0, 6 ),
1783  RPT_32 ( -4, 0, 6 ), RPT_32 ( 5, 0, 6 ),
1784  RPT_32 ( -5, 0, 6 ), RPT_32 ( 2, 1, 6 ),
1785  RPT_32 ( -2, 1, 6 ), RPT_32 ( 1, 2, 6 ),
1786  RPT_32 ( -1, 2, 6 ), RPT_32 ( 1, 3, 6 ),
1787  RPT_32 ( -1, 3, 6 ), RPT_16 ( 6, 0, 7 ),
1788  RPT_16 ( -6, 0, 7 ), RPT_16 ( 7, 0, 7 ),
1789  RPT_16 ( -7, 0, 7 ), RPT_16 ( 3, 1, 7 ),
1790  RPT_16 ( -3, 1, 7 ), RPT_16 ( 1, 4, 7 ),
1791  RPT_16 ( -1, 4, 7 ), RPT_16 ( 1, 5, 7 ),
1792  RPT_16 ( -1, 5, 7 ), RPT_8 ( 8, 0, 8 ),
1793  RPT_8 ( -8, 0, 8 ), RPT_8 ( 9, 0, 8 ),
1794  RPT_8 ( -9, 0, 8 ), RPT_8 ( 10, 0, 8 ),
1795  RPT_8 ( -10, 0, 8 ), RPT_8 ( 4, 1, 8 ),
1796  RPT_8 ( -4, 1, 8 ), RPT_8 ( 2, 2, 8 ),
1797  RPT_8 ( -2, 2, 8 ), RPT_8 ( 1, 6, 8 ),
1798  RPT_8 ( -1, 6, 8 ), RPT_8 ( 1, 7, 8 ),
1799  RPT_8 ( -1, 7, 8 ), RPT_8 ( 1, 8, 8 ),
1800  RPT_8 ( -1, 8, 8 ), RPT_4 ( 11, 0, 9 ),
1801  RPT_4 ( -11, 0, 9 ), RPT_4 ( 12, 0, 9 ),
1802  RPT_4 ( -12, 0, 9 ), RPT_4 ( 13, 0, 9 ),
1803  RPT_4 ( -13, 0, 9 ), RPT_4 ( 5, 1, 9 ),
1804  RPT_4 ( -5, 1, 9 ), RPT_4 ( 2, 3, 9 ),
1805  RPT_4 ( -2, 3, 9 ), RPT_4 ( 1, 9, 9 ),
1806  RPT_4 ( -1, 9, 9 ), RPT_4 ( 1, 10, 9 ),
1807  RPT_4 ( -1, 10, 9 ), RPT_2 ( 14, 0, 10 ),
1808  RPT_2 ( -14, 0, 10 ), RPT_2 ( 15, 0, 10 ),
1809  RPT_2 ( -15, 0, 10 ), RPT_2 ( 16, 0, 10 ),
1810  RPT_2 ( -16, 0, 10 ), RPT_2 ( 6, 1, 10 ),
1811  RPT_2 ( -6, 1, 10 ), RPT_2 ( 7, 1, 10 ),
1812  RPT_2 ( -7, 1, 10 ), RPT_2 ( 3, 2, 10 ),
1813  RPT_2 ( -3, 2, 10 ), RPT_2 ( 3, 3, 10 ),
1814  RPT_2 ( -3, 3, 10 ), RPT_2 ( 2, 4, 10 ),
1815  RPT_2 ( -2, 4, 10 ), RPT_2 ( 2, 5, 10 ),
1816  RPT_2 ( -2, 5, 10 ), RPT_2 ( 1, 11, 10 ),
1817  RPT_2 ( -1, 11, 10 ), RPT_2 ( 1, 12, 10 ),
1818  RPT_2 ( -1, 12, 10 ), RPT_2 ( 1, 13, 10 ),
1819  RPT_2 ( -1, 13, 10 ), { 2048, 0, -1 }, { 2112, 0, -1 },
1820  { 2176, 0, -1 }, { 2240, 0, -1 }, RPT_2 ( 0, 0, 10 ),
1821  { 17, 0, 11 }, { -17, 0, 11 }, { 18, 0, 11 }, { -18, 0, 11 },
1822  { 19, 0, 11 }, { -19, 0, 11 }, { 20, 0, 11 }, { -20, 0, 11 },
1823  { 8, 1, 11 }, { -8, 1, 11 }, { 9, 1, 11 }, { -9, 1, 11 },
1824  { 4, 2, 11 }, { -4, 2, 11 }, { 3, 4, 11 }, { -3, 4, 11 },
1825  { 2, 6, 11 }, { -2, 6, 11 }, { 2, 7, 11 }, { -2, 7, 11 },
1826  { 2, 8, 11 }, { -2, 8, 11 }, { 1, 14, 11 }, { -1, 14, 11 },
1827  { 2304, 0, -1 }, { 2368, 0, -1 }, { 2432, 0, -1 }, { 2496, 0, -1 },
1828  { 2560, 0, -1 }, { 0, 1, 11 }, { 2624, 0, -1 }, { 2688, 0, -1 },
1829  { 0, 2, 11 }, { 2752, 0, -1 }, { 2816, 0, -1 }, { 0, 3, 11 },
1830  { 2880, 0, -1 }, { 0, 4, 11 }, { 2944, 0, -1 }, { 3008, 0, -1 },
1831  { 3072, 0, -1 }, { 3136, 0, -1 }, { 3200, 0, -1 }, { 3264, 0, -1 },
1832  { 3328, 0, -1 }, { 3392, 0, -1 }, { 3456, 0, -1 }, { 3520, 0, -1 },
1833  { 3584, 0, -1 }, { 3648, 0, -1 }, RPT_4 ( 0, 0, 15 ),
1834  RPT_4 ( 0, 1, 15 ), RPT_4 ( 0, 2, 15 ),
1835  RPT_4 ( 0, 3, 15 ), RPT_4 ( 0, 4, 15 ),
1836  RPT_4 ( 0, 5, 15 ), RPT_4 ( 0, 6, 15 ),
1837  RPT_4 ( 0, 7, 15 ), RPT_4 ( 0, 8, 15 ),
1838  RPT_4 ( 0, 9, 15 ), RPT_4 ( 0, 10, 15 ),
1839  RPT_4 ( 0, 11, 15 ), RPT_4 ( 0, 12, 15 ),
1840  RPT_4 ( 0, 13, 15 ), RPT_4 ( 0, 14, 15 ),
1841  RPT_4 ( 0, 15, 15 ), RPT_4 ( 0, 16, 15 ),
1842  RPT_4 ( 0, 17, 15 ), RPT_4 ( 0, 18, 15 ),
1843  RPT_4 ( 0, 19, 15 ), RPT_4 ( 0, 20, 15 ),
1844  RPT_4 ( 0, 21, 15 ), RPT_4 ( 0, 22, 15 ),
1845  RPT_4 ( 0, 23, 15 ), RPT_4 ( 0, 24, 15 ),
1846  RPT_4 ( 0, 25, 15 ), RPT_4 ( 0, 26, 15 ),
1847  RPT_4 ( 0, 27, 15 ), RPT_4 ( 0, 28, 15 ),
1848  RPT_4 ( 0, 29, 15 ), RPT_4 ( 0, 30, 15 ),
1849  RPT_4 ( 0, 31, 15 ), RPT_4 ( 0, 32, 15 ),
1850  RPT_4 ( 0, 33, 15 ), RPT_4 ( 0, 34, 15 ),
1851  RPT_4 ( 0, 35, 15 ), RPT_4 ( 0, 36, 15 ),
1852  RPT_4 ( 0, 37, 15 ), RPT_4 ( 0, 38, 15 ),
1853  RPT_4 ( 0, 39, 15 ), RPT_4 ( 0, 40, 15 ),
1854  RPT_4 ( 0, 41, 15 ), RPT_4 ( 0, 42, 15 ),
1855  RPT_4 ( 0, 43, 15 ), RPT_4 ( 0, 44, 15 ),
1856  RPT_4 ( 0, 45, 15 ), RPT_4 ( 0, 46, 15 ),
1857  RPT_4 ( 0, 47, 15 ), RPT_4 ( 0, 48, 15 ),
1858  RPT_4 ( 0, 49, 15 ), RPT_4 ( 0, 50, 15 ),
1859  RPT_4 ( 0, 51, 15 ), RPT_4 ( 0, 52, 15 ),
1860  RPT_4 ( 0, 53, 15 ), RPT_4 ( 0, 54, 15 ),
1861  RPT_4 ( 0, 55, 15 ), RPT_4 ( 0, 56, 15 ),
1862  RPT_4 ( 0, 57, 15 ), RPT_4 ( 0, 58, 15 ),
1863  RPT_4 ( 0, 59, 15 ), RPT_4 ( 0, 60, 15 ),
1864  RPT_4 ( 0, 61, 15 ), RPT_4 ( 0, 62, 15 ),
1865  RPT_4 ( 0, 63, 15 ), RPT_2 ( 0, 0, 16 ),
1866  { 1, 0, 17 }, { -1, 0, 17 }, { 2, 0, 17 }, { -2, 0, 17 },
1867  { 3, 0, 17 }, { -3, 0, 17 }, { 4, 0, 17 }, { -4, 0, 17 },
1868  { 5, 0, 17 }, { -5, 0, 17 }, { 6, 0, 17 }, { -6, 0, 17 },
1869  { 7, 0, 17 }, { -7, 0, 17 }, { 8, 0, 17 }, { -8, 0, 17 },
1870  { 9, 0, 17 }, { -9, 0, 17 }, { 10, 0, 17 }, { -10, 0, 17 },
1871  { 11, 0, 17 }, { -11, 0, 17 }, { 12, 0, 17 }, { -12, 0, 17 },
1872  { 13, 0, 17 }, { -13, 0, 17 }, { 14, 0, 17 }, { -14, 0, 17 },
1873  { 15, 0, 17 }, { -15, 0, 17 }, { 16, 0, 17 }, { -16, 0, 17 },
1874  { 17, 0, 17 }, { -17, 0, 17 }, { 18, 0, 17 }, { -18, 0, 17 },
1875  { 19, 0, 17 }, { -19, 0, 17 }, { 20, 0, 17 }, { -20, 0, 17 },
1876  { 21, 0, 17 }, { -21, 0, 17 }, { 22, 0, 17 }, { -22, 0, 17 },
1877  { 23, 0, 17 }, { -23, 0, 17 }, { 24, 0, 17 }, { -24, 0, 17 },
1878  { 25, 0, 17 }, { -25, 0, 17 }, { 26, 0, 17 }, { -26, 0, 17 },
1879  { 27, 0, 17 }, { -27, 0, 17 }, { 28, 0, 17 }, { -28, 0, 17 },
1880  { 29, 0, 17 }, { -29, 0, 17 }, { 30, 0, 17 }, { -30, 0, 17 },
1881  { 31, 0, 17 }, { -31, 0, 17 }, { 32, 0, 17 }, { -32, 0, 17 },
1882  { 33, 0, 17 }, { -33, 0, 17 }, { 34, 0, 17 }, { -34, 0, 17 },
1883  { 35, 0, 17 }, { -35, 0, 17 }, { 36, 0, 17 }, { -36, 0, 17 },
1884  { 37, 0, 17 }, { -37, 0, 17 }, { 38, 0, 17 }, { -38, 0, 17 },
1885  { 39, 0, 17 }, { -39, 0, 17 }, { 40, 0, 17 }, { -40, 0, 17 },
1886  { 41, 0, 17 }, { -41, 0, 17 }, { 42, 0, 17 }, { -42, 0, 17 },
1887  { 43, 0, 17 }, { -43, 0, 17 }, { 44, 0, 17 }, { -44, 0, 17 },
1888  { 45, 0, 17 }, { -45, 0, 17 }, { 46, 0, 17 }, { -46, 0, 17 },
1889  { 47, 0, 17 }, { -47, 0, 17 }, { 48, 0, 17 }, { -48, 0, 17 },
1890  { 49, 0, 17 }, { -49, 0, 17 }, { 50, 0, 17 }, { -50, 0, 17 },
1891  { 51, 0, 17 }, { -51, 0, 17 }, { 52, 0, 17 }, { -52, 0, 17 },
1892  { 53, 0, 17 }, { -53, 0, 17 }, { 54, 0, 17 }, { -54, 0, 17 },
1893  { 55, 0, 17 }, { -55, 0, 17 }, { 56, 0, 17 }, { -56, 0, 17 },
1894  { 57, 0, 17 }, { -57, 0, 17 }, { 58, 0, 17 }, { -58, 0, 17 },
1895  { 59, 0, 17 }, { -59, 0, 17 }, { 60, 0, 17 }, { -60, 0, 17 },
1896  { 61, 0, 17 }, { -61, 0, 17 }, { 62, 0, 17 }, { -62, 0, 17 },
1897  { 63, 0, 17 }, { -63, 0, 17 }, RPT_32 ( 21, 0, 12 ),
1898  RPT_32 ( -21, 0, 12 ), RPT_32 ( 22, 0, 12 ),
1899  RPT_32 ( -22, 0, 12 ), RPT_32 ( 23, 0, 12 ),
1900  RPT_32 ( -23, 0, 12 ), RPT_32 ( 10, 1, 12 ),
1901  RPT_32 ( -10, 1, 12 ), RPT_32 ( 11, 1, 12 ),
1902  RPT_32 ( -11, 1, 12 ), RPT_32 ( 5, 2, 12 ),
1903  RPT_32 ( -5, 2, 12 ), RPT_32 ( 6, 2, 12 ),
1904  RPT_32 ( -6, 2, 12 ), RPT_32 ( 4, 3, 12 ),
1905  RPT_32 ( -4, 3, 12 ), RPT_32 ( 3, 5, 12 ),
1906  RPT_32 ( -3, 5, 12 ), RPT_32 ( 3, 6, 12 ),
1907  RPT_32 ( -3, 6, 12 ), RPT_32 ( 2, 9, 12 ),
1908  RPT_32 ( -2, 9, 12 ), RPT_32 ( 1, 15, 12 ),
1909  RPT_32 ( -1, 15, 12 ), RPT_16 ( 24, 0, 13 ),
1910  RPT_16 ( -24, 0, 13 ), RPT_16 ( 25, 0, 13 ),
1911  RPT_16 ( -25, 0, 13 ), RPT_16 ( 26, 0, 13 ),
1912  RPT_16 ( -26, 0, 13 ), RPT_16 ( 12, 1, 13 ),
1913  RPT_16 ( -12, 1, 13 ), RPT_16 ( 13, 1, 13 ),
1914  RPT_16 ( -13, 1, 13 ), RPT_16 ( 5, 3, 13 ),
1915  RPT_16 ( -5, 3, 13 ), RPT_16 ( 4, 4, 13 ),
1916  RPT_16 ( -4, 4, 13 ), RPT_32 ( 0, 5, 12 ),
1917  RPT_16 ( 4, 5, 13 ), RPT_16 ( -4, 5, 13 ),
1918  RPT_32 ( 0, 6, 12 ), RPT_32 ( 0, 7, 12 ),
1919  RPT_16 ( 3, 7, 13 ), RPT_16 ( -3, 7, 13 ),
1920  RPT_32 ( 0, 8, 12 ), RPT_16 ( 3, 8, 13 ),
1921  RPT_16 ( -3, 8, 13 ), RPT_32 ( 0, 9, 12 ),
1922  RPT_16 ( 1, 16, 13 ), RPT_16 ( -1, 16, 13 ),
1923 };
1924 
1925 static const HQXLUT ac64_lut[] = {
1926  RPT_512 ( 1, 0, 3 ), RPT_512 ( -1, 0, 3 ),
1927  RPT_1024( 0, 64, 2 ), RPT_256 ( 2, 0, 4 ),
1928  RPT_256 ( -2, 0, 4 ), RPT_128 ( 3, 0, 5 ),
1929  RPT_128 ( -3, 0, 5 ), RPT_128 ( 1, 1, 5 ),
1930  RPT_128 ( -1, 1, 5 ), RPT_64 ( 4, 0, 6 ),
1931  RPT_64 ( -4, 0, 6 ), RPT_64 ( 2, 1, 6 ),
1932  RPT_64 ( -2, 1, 6 ), RPT_64 ( 1, 2, 6 ),
1933  RPT_64 ( -1, 2, 6 ), RPT_32 ( 5, 0, 7 ),
1934  RPT_32 ( -5, 0, 7 ), RPT_32 ( 1, 3, 7 ),
1935  RPT_32 ( -1, 3, 7 ), RPT_32 ( 1, 4, 7 ),
1936  RPT_32 ( -1, 4, 7 ), RPT_16 ( 6, 0, 8 ),
1937  RPT_16 ( -6, 0, 8 ), RPT_16 ( 3, 1, 8 ),
1938  RPT_16 ( -3, 1, 8 ), RPT_16 ( 2, 2, 8 ),
1939  RPT_16 ( -2, 2, 8 ), RPT_16 ( 1, 5, 8 ),
1940  RPT_16 ( -1, 5, 8 ), RPT_16 ( 1, 6, 8 ),
1941  RPT_16 ( -1, 6, 8 ), RPT_16 ( 1, 7, 8 ),
1942  RPT_16 ( -1, 7, 8 ), RPT_8 ( 7, 0, 9 ),
1943  RPT_8 ( -7, 0, 9 ), RPT_8 ( 8, 0, 9 ),
1944  RPT_8 ( -8, 0, 9 ), RPT_8 ( 4, 1, 9 ),
1945  RPT_8 ( -4, 1, 9 ), RPT_8 ( 2, 3, 9 ),
1946  RPT_8 ( -2, 3, 9 ), RPT_8 ( 1, 8, 9 ),
1947  RPT_8 ( -1, 8, 9 ), RPT_8 ( 1, 9, 9 ),
1948  RPT_8 ( -1, 9, 9 ), RPT_4 ( 9, 0, 10 ),
1949  RPT_4 ( -9, 0, 10 ), RPT_4 ( 10, 0, 10 ),
1950  RPT_4 ( -10, 0, 10 ), RPT_4 ( 5, 1, 10 ),
1951  RPT_4 ( -5, 1, 10 ), RPT_4 ( 3, 2, 10 ),
1952  RPT_4 ( -3, 2, 10 ), RPT_4 ( 2, 4, 10 ),
1953  RPT_4 ( -2, 4, 10 ), RPT_4 ( 2, 5, 10 ),
1954  RPT_4 ( -2, 5, 10 ), RPT_4 ( 1, 10, 10 ),
1955  RPT_4 ( -1, 10, 10 ), RPT_4 ( 1, 11, 10 ),
1956  RPT_4 ( -1, 11, 10 ), { 4096, 0, -1 }, { 4128, 0, -1 },
1957  { 4160, 0, -1 }, { 4192, 0, -1 }, { 4224, 0, -1 }, { 4256, 0, -1 },
1958  { 4288, 0, -1 }, { 4320, 0, -1 }, RPT_4 ( 0, 0, 10 ),
1959  RPT_2 ( 11, 0, 11 ), RPT_2 ( -11, 0, 11 ),
1960  RPT_2 ( 12, 0, 11 ), RPT_2 ( -12, 0, 11 ),
1961  RPT_2 ( 6, 1, 11 ), RPT_2 ( -6, 1, 11 ),
1962  RPT_2 ( 7, 1, 11 ), RPT_2 ( -7, 1, 11 ),
1963  RPT_2 ( 3, 3, 11 ), RPT_2 ( -3, 3, 11 ),
1964  RPT_2 ( 3, 4, 11 ), RPT_2 ( -3, 4, 11 ),
1965  RPT_2 ( 3, 5, 11 ), RPT_2 ( -3, 5, 11 ),
1966  RPT_2 ( 2, 6, 11 ), RPT_2 ( -2, 6, 11 ),
1967  RPT_2 ( 2, 7, 11 ), RPT_2 ( -2, 7, 11 ),
1968  RPT_2 ( 1, 12, 11 ), RPT_2 ( -1, 12, 11 ),
1969  RPT_2 ( 1, 13, 11 ), RPT_2 ( -1, 13, 11 ),
1970  RPT_2 ( 1, 14, 11 ), RPT_2 ( -1, 14, 11 ),
1971  { 13, 0, 12 }, { -13, 0, 12 }, { 14, 0, 12 }, { -14, 0, 12 },
1972  RPT_2 ( 0, 1, 11 ), { 8, 1, 12 }, { -8, 1, 12 },
1973  { 4, 2, 12 }, { -4, 2, 12 }, { 4, 3, 12 }, { -4, 3, 12 },
1974  { 2, 8, 12 }, { -2, 8, 12 }, { 2, 9, 12 }, { -2, 9, 12 },
1975  { 1, 15, 12 }, { -1, 15, 12 }, { 4352, 0, -1 }, { 4384, 0, -1 },
1976  { 4416, 0, -1 }, { 4448, 0, -1 }, { 4480, 0, -1 }, { 0, 2, 12 },
1977  { 4512, 0, -1 }, { 0, 3, 12 }, { 4544, 0, -1 }, { 0, 4, 12 },
1978  { 4576, 0, -1 }, { 0, 5, 12 }, { 4608, 0, -1 }, { 0, 6, 12 },
1979  { 4640, 0, -1 }, { 4672, 0, -1 }, { 4704, 0, -1 }, { 4736, 0, -1 },
1980  RPT_4 ( 0, 0, 15 ), RPT_4 ( 0, 1, 15 ),
1981  RPT_4 ( 0, 2, 15 ), RPT_4 ( 0, 3, 15 ),
1982  RPT_4 ( 0, 4, 15 ), RPT_4 ( 0, 5, 15 ),
1983  RPT_4 ( 0, 6, 15 ), RPT_4 ( 0, 7, 15 ),
1984  RPT_4 ( 0, 8, 15 ), RPT_4 ( 0, 9, 15 ),
1985  RPT_4 ( 0, 10, 15 ), RPT_4 ( 0, 11, 15 ),
1986  RPT_4 ( 0, 12, 15 ), RPT_4 ( 0, 13, 15 ),
1987  RPT_4 ( 0, 14, 15 ), RPT_4 ( 0, 15, 15 ),
1988  RPT_4 ( 0, 16, 15 ), RPT_4 ( 0, 17, 15 ),
1989  RPT_4 ( 0, 18, 15 ), RPT_4 ( 0, 19, 15 ),
1990  RPT_4 ( 0, 20, 15 ), RPT_4 ( 0, 21, 15 ),
1991  RPT_4 ( 0, 22, 15 ), RPT_4 ( 0, 23, 15 ),
1992  RPT_4 ( 0, 24, 15 ), RPT_4 ( 0, 25, 15 ),
1993  RPT_4 ( 0, 26, 15 ), RPT_4 ( 0, 27, 15 ),
1994  RPT_4 ( 0, 28, 15 ), RPT_4 ( 0, 29, 15 ),
1995  RPT_4 ( 0, 30, 15 ), RPT_4 ( 0, 31, 15 ),
1996  RPT_4 ( 0, 32, 15 ), RPT_4 ( 0, 33, 15 ),
1997  RPT_4 ( 0, 34, 15 ), RPT_4 ( 0, 35, 15 ),
1998  RPT_4 ( 0, 36, 15 ), RPT_4 ( 0, 37, 15 ),
1999  RPT_4 ( 0, 38, 15 ), RPT_4 ( 0, 39, 15 ),
2000  RPT_4 ( 0, 40, 15 ), RPT_4 ( 0, 41, 15 ),
2001  RPT_4 ( 0, 42, 15 ), RPT_4 ( 0, 43, 15 ),
2002  RPT_4 ( 0, 44, 15 ), RPT_4 ( 0, 45, 15 ),
2003  RPT_4 ( 0, 46, 15 ), RPT_4 ( 0, 47, 15 ),
2004  RPT_4 ( 0, 48, 15 ), RPT_4 ( 0, 49, 15 ),
2005  RPT_4 ( 0, 50, 15 ), RPT_4 ( 0, 51, 15 ),
2006  RPT_4 ( 0, 52, 15 ), RPT_4 ( 0, 53, 15 ),
2007  RPT_4 ( 0, 54, 15 ), RPT_4 ( 0, 55, 15 ),
2008  RPT_4 ( 0, 56, 15 ), RPT_4 ( 0, 57, 15 ),
2009  RPT_4 ( 0, 58, 15 ), RPT_4 ( 0, 59, 15 ),
2010  RPT_4 ( 0, 60, 15 ), RPT_4 ( 0, 61, 15 ),
2011  RPT_4 ( 0, 62, 15 ), RPT_4 ( 0, 63, 15 ),
2012  RPT_2 ( 0, 0, 16 ), { 1, 0, 17 }, { -1, 0, 17 },
2013  { 2, 0, 17 }, { -2, 0, 17 }, { 3, 0, 17 }, { -3, 0, 17 },
2014  { 4, 0, 17 }, { -4, 0, 17 }, { 5, 0, 17 }, { -5, 0, 17 },
2015  { 6, 0, 17 }, { -6, 0, 17 }, { 7, 0, 17 }, { -7, 0, 17 },
2016  { 8, 0, 17 }, { -8, 0, 17 }, { 9, 0, 17 }, { -9, 0, 17 },
2017  { 10, 0, 17 }, { -10, 0, 17 }, { 11, 0, 17 }, { -11, 0, 17 },
2018  { 12, 0, 17 }, { -12, 0, 17 }, { 13, 0, 17 }, { -13, 0, 17 },
2019  { 14, 0, 17 }, { -14, 0, 17 }, { 15, 0, 17 }, { -15, 0, 17 },
2020  { 16, 0, 17 }, { -16, 0, 17 }, { 17, 0, 17 }, { -17, 0, 17 },
2021  { 18, 0, 17 }, { -18, 0, 17 }, { 19, 0, 17 }, { -19, 0, 17 },
2022  { 20, 0, 17 }, { -20, 0, 17 }, { 21, 0, 17 }, { -21, 0, 17 },
2023  { 22, 0, 17 }, { -22, 0, 17 }, { 23, 0, 17 }, { -23, 0, 17 },
2024  { 24, 0, 17 }, { -24, 0, 17 }, { 25, 0, 17 }, { -25, 0, 17 },
2025  { 26, 0, 17 }, { -26, 0, 17 }, { 27, 0, 17 }, { -27, 0, 17 },
2026  { 28, 0, 17 }, { -28, 0, 17 }, { 29, 0, 17 }, { -29, 0, 17 },
2027  { 30, 0, 17 }, { -30, 0, 17 }, { 31, 0, 17 }, { -31, 0, 17 },
2028  RPT_16 ( 15, 0, 13 ), RPT_16 ( -15, 0, 13 ),
2029  RPT_16 ( 9, 1, 13 ), RPT_16 ( -9, 1, 13 ),
2030  RPT_16 ( 10, 1, 13 ), RPT_16 ( -10, 1, 13 ),
2031  RPT_16 ( 5, 2, 13 ), RPT_16 ( -5, 2, 13 ),
2032  RPT_16 ( 5, 3, 13 ), RPT_16 ( -5, 3, 13 ),
2033  RPT_16 ( 4, 4, 13 ), RPT_16 ( -4, 4, 13 ),
2034  RPT_16 ( 4, 5, 13 ), RPT_16 ( -4, 5, 13 ),
2035  RPT_16 ( 3, 6, 13 ), RPT_16 ( -3, 6, 13 ),
2036  RPT_16 ( 3, 7, 13 ), RPT_16 ( -3, 7, 13 ),
2037  RPT_16 ( 1, 16, 13 ), RPT_16 ( -1, 16, 13 ),
2038  RPT_16 ( 1, 17, 13 ), RPT_16 ( -1, 17, 13 ),
2039 };
2040 
2041 static const HQXLUT ac128_lut[] = {
2042  RPT_256 ( 1, 0, 3 ), RPT_256 ( -1, 0, 3 ),
2043  RPT_512 ( 0, 64, 2 ), RPT_128 ( 1, 1, 4 ),
2044  RPT_128 ( -1, 1, 4 ), RPT_64 ( 2, 0, 5 ),
2045  RPT_64 ( -2, 0, 5 ), RPT_32 ( 3, 0, 6 ),
2046  RPT_32 ( -3, 0, 6 ), RPT_32 ( 2, 1, 6 ),
2047  RPT_32 ( -2, 1, 6 ), RPT_32 ( 1, 2, 6 ),
2048  RPT_32 ( -1, 2, 6 ), RPT_32 ( 1, 3, 6 ),
2049  RPT_32 ( -1, 3, 6 ), RPT_32 ( 1, 4, 6 ),
2050  RPT_32 ( -1, 4, 6 ), RPT_16 ( 4, 0, 7 ),
2051  RPT_16 ( -4, 0, 7 ), RPT_16 ( 1, 5, 7 ),
2052  RPT_16 ( -1, 5, 7 ), RPT_16 ( 1, 6, 7 ),
2053  RPT_16 ( -1, 6, 7 ), RPT_16 ( 1, 7, 7 ),
2054  RPT_16 ( -1, 7, 7 ), RPT_8 ( 5, 0, 8 ),
2055  RPT_8 ( -5, 0, 8 ), RPT_8 ( 3, 1, 8 ),
2056  RPT_8 ( -3, 1, 8 ), RPT_8 ( 2, 2, 8 ),
2057  RPT_8 ( -2, 2, 8 ), RPT_8 ( 2, 3, 8 ),
2058  RPT_8 ( -2, 3, 8 ), RPT_8 ( 1, 8, 8 ),
2059  RPT_8 ( -1, 8, 8 ), RPT_8 ( 1, 9, 8 ),
2060  RPT_8 ( -1, 9, 8 ), RPT_4 ( 6, 0, 9 ),
2061  RPT_4 ( -6, 0, 9 ), RPT_4 ( 4, 1, 9 ),
2062  RPT_4 ( -4, 1, 9 ), RPT_4 ( 2, 4, 9 ),
2063  RPT_4 ( -2, 4, 9 ), RPT_4 ( 2, 5, 9 ),
2064  RPT_4 ( -2, 5, 9 ), RPT_4 ( 1, 10, 9 ),
2065  RPT_4 ( -1, 10, 9 ), RPT_2 ( 7, 0, 10 ),
2066  RPT_2 ( -7, 0, 10 ), RPT_2 ( 5, 1, 10 ),
2067  RPT_2 ( -5, 1, 10 ), RPT_2 ( 3, 2, 10 ),
2068  RPT_2 ( -3, 2, 10 ), RPT_2 ( 3, 3, 10 ),
2069  RPT_2 ( -3, 3, 10 ), RPT_2 ( 2, 6, 10 ),
2070  RPT_2 ( -2, 6, 10 ), { 2048, 0, -1 }, { 2112, 0, -1 },
2071  { 2176, 0, -1 }, { 2240, 0, -1 }, { 6, 1, 11 }, { -6, 1, 11 },
2072  { 7, 1, 11 }, { -7, 1, 11 }, { 3, 4, 11 }, { -3, 4, 11 },
2073  { 3, 5, 11 }, { -3, 5, 11 }, { 2, 7, 11 }, { -2, 7, 11 },
2074  { 2, 8, 11 }, { -2, 8, 11 }, { 2, 9, 11 }, { -2, 9, 11 },
2075  { 1, 11, 11 }, { -1, 11, 11 }, { 1, 12, 11 }, { -1, 12, 11 },
2076  { 1, 13, 11 }, { -1, 13, 11 }, { 0, 0, 11 }, { 2304, 0, -1 },
2077  { 2368, 0, -1 }, { 2432, 0, -1 }, { 2496, 0, -1 }, { 2560, 0, -1 },
2078  { 2624, 0, -1 }, { 2688, 0, -1 }, { 2752, 0, -1 }, { 2816, 0, -1 },
2079  { 2880, 0, -1 }, { 2944, 0, -1 }, RPT_4 ( 0, 0, 15 ),
2080  RPT_4 ( 0, 1, 15 ), RPT_4 ( 0, 2, 15 ),
2081  RPT_4 ( 0, 3, 15 ), RPT_4 ( 0, 4, 15 ),
2082  RPT_4 ( 0, 5, 15 ), RPT_4 ( 0, 6, 15 ),
2083  RPT_4 ( 0, 7, 15 ), RPT_4 ( 0, 8, 15 ),
2084  RPT_4 ( 0, 9, 15 ), RPT_4 ( 0, 10, 15 ),
2085  RPT_4 ( 0, 11, 15 ), RPT_4 ( 0, 12, 15 ),
2086  RPT_4 ( 0, 13, 15 ), RPT_4 ( 0, 14, 15 ),
2087  RPT_4 ( 0, 15, 15 ), RPT_4 ( 0, 16, 15 ),
2088  RPT_4 ( 0, 17, 15 ), RPT_4 ( 0, 18, 15 ),
2089  RPT_4 ( 0, 19, 15 ), RPT_4 ( 0, 20, 15 ),
2090  RPT_4 ( 0, 21, 15 ), RPT_4 ( 0, 22, 15 ),
2091  RPT_4 ( 0, 23, 15 ), RPT_4 ( 0, 24, 15 ),
2092  RPT_4 ( 0, 25, 15 ), RPT_4 ( 0, 26, 15 ),
2093  RPT_4 ( 0, 27, 15 ), RPT_4 ( 0, 28, 15 ),
2094  RPT_4 ( 0, 29, 15 ), RPT_4 ( 0, 30, 15 ),
2095  RPT_4 ( 0, 31, 15 ), RPT_4 ( 0, 32, 15 ),
2096  RPT_4 ( 0, 33, 15 ), RPT_4 ( 0, 34, 15 ),
2097  RPT_4 ( 0, 35, 15 ), RPT_4 ( 0, 36, 15 ),
2098  RPT_4 ( 0, 37, 15 ), RPT_4 ( 0, 38, 15 ),
2099  RPT_4 ( 0, 39, 15 ), RPT_4 ( 0, 40, 15 ),
2100  RPT_4 ( 0, 41, 15 ), RPT_4 ( 0, 42, 15 ),
2101  RPT_4 ( 0, 43, 15 ), RPT_4 ( 0, 44, 15 ),
2102  RPT_4 ( 0, 45, 15 ), RPT_4 ( 0, 46, 15 ),
2103  RPT_4 ( 0, 47, 15 ), RPT_4 ( 0, 48, 15 ),
2104  RPT_4 ( 0, 49, 15 ), RPT_4 ( 0, 50, 15 ),
2105  RPT_4 ( 0, 51, 15 ), RPT_4 ( 0, 52, 15 ),
2106  RPT_4 ( 0, 53, 15 ), RPT_4 ( 0, 54, 15 ),
2107  RPT_4 ( 0, 55, 15 ), RPT_4 ( 0, 56, 15 ),
2108  RPT_4 ( 0, 57, 15 ), RPT_4 ( 0, 58, 15 ),
2109  RPT_4 ( 0, 59, 15 ), RPT_4 ( 0, 60, 15 ),
2110  RPT_4 ( 0, 61, 15 ), RPT_4 ( 0, 62, 15 ),
2111  RPT_4 ( 0, 63, 15 ), RPT_32 ( 8, 0, 12 ),
2112  RPT_32 ( -8, 0, 12 ), RPT_32 ( 9, 0, 12 ),
2113  RPT_32 ( -9, 0, 12 ), RPT_32 ( 8, 1, 12 ),
2114  RPT_32 ( -8, 1, 12 ), RPT_32 ( 4, 2, 12 ),
2115  RPT_32 ( -4, 2, 12 ), RPT_32 ( 4, 3, 12 ),
2116  RPT_32 ( -4, 3, 12 ), RPT_32 ( 3, 6, 12 ),
2117  RPT_32 ( -3, 6, 12 ), RPT_32 ( 1, 14, 12 ),
2118  RPT_32 ( -1, 14, 12 ), RPT_32 ( 1, 15, 12 ),
2119  RPT_32 ( -1, 15, 12 ), RPT_32 ( 1, 16, 12 ),
2120  RPT_32 ( -1, 16, 12 ), RPT_32 ( 0, 1, 12 ),
2121  RPT_32 ( 0, 2, 12 ), RPT_32 ( 0, 3, 12 ),
2122  RPT_2 ( 0, 0, 16 ), { 1, 0, 17 }, { -1, 0, 17 },
2123  { 2, 0, 17 }, { -2, 0, 17 }, { 3, 0, 17 }, { -3, 0, 17 },
2124  { 4, 0, 17 }, { -4, 0, 17 }, { 5, 0, 17 }, { -5, 0, 17 },
2125  { 6, 0, 17 }, { -6, 0, 17 }, { 7, 0, 17 }, { -7, 0, 17 },
2126  { 8, 0, 17 }, { -8, 0, 17 }, { 9, 0, 17 }, { -9, 0, 17 },
2127  { 10, 0, 17 }, { -10, 0, 17 }, { 11, 0, 17 }, { -11, 0, 17 },
2128  { 12, 0, 17 }, { -12, 0, 17 }, { 13, 0, 17 }, { -13, 0, 17 },
2129  { 14, 0, 17 }, { -14, 0, 17 }, { 15, 0, 17 }, { -15, 0, 17 },
2130 };
2131 
2133  { 10, 5, ac0_lut },
2134  { 11, 6, ac8_lut },
2135  { 11, 6, ac16_lut },
2136  { 11, 6, ac32_lut },
2137  { 12, 5, ac64_lut },
2138  { 11, 6, ac128_lut },
2139 };
2140 
2141 static const int table_off[] = {
2142  0, 32, 928, 2272, 4640,
2143 };
2144 
2145 #define INIT_DC_TABLE(idx, name) \
2146  do { \
2147  ret = init_vlc(&ctx->dc_vlc[idx], HQX_DC_VLC_BITS, \
2148  FF_ARRAY_ELEMS(name ## _vlc_lens), \
2149  name ## _vlc_lens, 1, 1, \
2150  name ## _vlc_bits, 2, 2, 0); \
2151  if (ret < 0) \
2152  return ret; \
2153  } while (0)
2154 
2156 {
2157  int ret = init_vlc(&ctx->cbp_vlc, 5, FF_ARRAY_ELEMS(cbp_vlc_lens),
2158  cbp_vlc_lens, 1, 1, cbp_vlc_bits, 1, 1, 0);
2159  if (ret < 0)
2160  return ret;
2161 
2162  INIT_DC_TABLE(0, dc9);
2163  INIT_DC_TABLE(1, dc10);
2164  INIT_DC_TABLE(2, dc11);
2165 
2166  return 0;
2167 }