1 | /* |
2 | Convection Texture Tools |
3 | Copyright (c) 2018-2019 Eric Lasota |
4 | |
5 | Permission is hereby granted, free of charge, to any person obtaining |
6 | a copy of this software and associated documentation files (the |
7 | "Software"), to deal in the Software without restriction, including |
8 | without limitation the rights to use, copy, modify, merge, publish, |
9 | distribute, sublicense, and/or sell copies of the Software, and to |
10 | permit persons to whom the Software is furnished to do so, subject |
11 | to the following conditions: |
12 | |
13 | The above copyright notice and this permission notice shall be included |
14 | in all copies or substantial portions of the Software. |
15 | |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
23 | |
24 | ------------------------------------------------------------------------------------- |
25 | |
26 | Portions based on DirectX Texture Library (DirectXTex) |
27 | |
28 | Copyright (c) Microsoft Corporation. All rights reserved. |
29 | Licensed under the MIT License. |
30 | |
31 | http://go.microsoft.com/fwlink/?LinkId=248926 |
32 | */ |
33 | #include "ConvectionKernels_Config.h" |
34 | |
35 | #if !defined(CVTT_SINGLE_FILE) || defined(CVTT_SINGLE_FILE_IMPL) |
36 | |
37 | #include "ConvectionKernels_BC7_Prio.h" |
38 | |
39 | #define BC7_PARTITION_BITS 6 |
40 | #define BC7_PARTITION_OFFSET_BITS 0 |
41 | |
42 | #define BC7_ROTATION_BITS 2 |
43 | #define BC7_ROTATION_OFFSET_BITS 0 |
44 | |
45 | #define BC7_INDEX_MODE_BITS 1 |
46 | #define BC7_INDEX_MODE_OFFSET_BITS (BC7_ROTATION_OFFSET_BITS + BC7_ROTATION_BITS) |
47 | |
48 | #define BC7_MODE_BITS 3 |
49 | #define BC7_MODE_OFFSET_BITS (BC7_PARTITION_OFFSET_BITS + BC7_PARTITION_BITS) |
50 | #define BC7_SEED_POINT_COUNT_BITS 2 |
51 | #define BC7_SEED_POINT_COUNT_OFFSET_BITS (BC7_MODE_BITS + BC7_MODE_OFFSET_BITS) |
52 | |
53 | |
54 | |
55 | #define BC7_MODE_PRIO_DUAL_PLANE(subData) \ |
56 | ( \ |
57 | ((subData / 10) << BC7_ROTATION_OFFSET_BITS) | \ |
58 | ((subData % 10) << BC7_INDEX_MODE_OFFSET_BITS) \ |
59 | ) |
60 | |
61 | #define BC7_MODE_PRIO_CODE(seedPointCount, mode, subData) \ |
62 | (\ |
63 | ((seedPointCount - 1) << BC7_SEED_POINT_COUNT_OFFSET_BITS) | \ |
64 | (mode << BC7_MODE_OFFSET_BITS) | \ |
65 | ((mode == 4 || mode == 5) ? BC7_MODE_PRIO_DUAL_PLANE(subData) : (subData << BC7_PARTITION_OFFSET_BITS)) \ |
66 | ) |
67 | |
68 | namespace cvtt { namespace Tables { namespace BC7Prio { |
69 | const uint16_t g_bc7PrioCodesRGBData[] = |
70 | { |
71 | BC7_MODE_PRIO_CODE(1, 1, 13), |
72 | BC7_MODE_PRIO_CODE(1, 1, 0), |
73 | BC7_MODE_PRIO_CODE(1, 0, 3), |
74 | BC7_MODE_PRIO_CODE(1, 0, 1), |
75 | BC7_MODE_PRIO_CODE(1, 6, 0), |
76 | BC7_MODE_PRIO_CODE(1, 0, 9), |
77 | BC7_MODE_PRIO_CODE(1, 1, 6), |
78 | BC7_MODE_PRIO_CODE(1, 1, 1), |
79 | BC7_MODE_PRIO_CODE(1, 1, 2), |
80 | BC7_MODE_PRIO_CODE(1, 0, 15), |
81 | BC7_MODE_PRIO_CODE(1, 1, 7), |
82 | BC7_MODE_PRIO_CODE(1, 1, 16), |
83 | BC7_MODE_PRIO_CODE(1, 1, 15), |
84 | BC7_MODE_PRIO_CODE(1, 1, 14), |
85 | BC7_MODE_PRIO_CODE(1, 0, 13), |
86 | BC7_MODE_PRIO_CODE(1, 0, 14), |
87 | BC7_MODE_PRIO_CODE(1, 0, 11), |
88 | BC7_MODE_PRIO_CODE(1, 1, 22), |
89 | BC7_MODE_PRIO_CODE(1, 0, 8), |
90 | BC7_MODE_PRIO_CODE(1, 0, 10), |
91 | BC7_MODE_PRIO_CODE(1, 1, 8), |
92 | BC7_MODE_PRIO_CODE(1, 3, 13), |
93 | BC7_MODE_PRIO_CODE(1, 1, 19), |
94 | BC7_MODE_PRIO_CODE(1, 4, 31), |
95 | BC7_MODE_PRIO_CODE(1, 1, 10), |
96 | BC7_MODE_PRIO_CODE(1, 1, 23), |
97 | BC7_MODE_PRIO_CODE(1, 1, 3), |
98 | BC7_MODE_PRIO_CODE(2, 1, 13), |
99 | BC7_MODE_PRIO_CODE(1, 1, 9), |
100 | BC7_MODE_PRIO_CODE(2, 1, 0), |
101 | BC7_MODE_PRIO_CODE(1, 1, 20), |
102 | BC7_MODE_PRIO_CODE(1, 1, 21), |
103 | BC7_MODE_PRIO_CODE(1, 4, 11), |
104 | BC7_MODE_PRIO_CODE(1, 1, 29), |
105 | BC7_MODE_PRIO_CODE(1, 1, 26), |
106 | BC7_MODE_PRIO_CODE(1, 5, 30), |
107 | BC7_MODE_PRIO_CODE(1, 0, 4), |
108 | BC7_MODE_PRIO_CODE(2, 6, 0), |
109 | BC7_MODE_PRIO_CODE(1, 0, 0), |
110 | BC7_MODE_PRIO_CODE(2, 0, 10), |
111 | BC7_MODE_PRIO_CODE(3, 6, 0), |
112 | BC7_MODE_PRIO_CODE(1, 1, 11), |
113 | BC7_MODE_PRIO_CODE(1, 4, 10), |
114 | BC7_MODE_PRIO_CODE(2, 0, 8), |
115 | BC7_MODE_PRIO_CODE(2, 0, 11), |
116 | BC7_MODE_PRIO_CODE(2, 0, 13), |
117 | BC7_MODE_PRIO_CODE(1, 1, 4), |
118 | BC7_MODE_PRIO_CODE(3, 1, 13), |
119 | BC7_MODE_PRIO_CODE(1, 1, 12), |
120 | BC7_MODE_PRIO_CODE(1, 1, 18), |
121 | BC7_MODE_PRIO_CODE(1, 3, 0), |
122 | BC7_MODE_PRIO_CODE(1, 0, 5), |
123 | BC7_MODE_PRIO_CODE(1, 1, 17), |
124 | BC7_MODE_PRIO_CODE(1, 1, 25), |
125 | BC7_MODE_PRIO_CODE(1, 0, 7), |
126 | BC7_MODE_PRIO_CODE(3, 0, 10), |
127 | BC7_MODE_PRIO_CODE(1, 1, 5), |
128 | BC7_MODE_PRIO_CODE(2, 1, 10), |
129 | BC7_MODE_PRIO_CODE(1, 1, 24), |
130 | BC7_MODE_PRIO_CODE(3, 0, 8), |
131 | BC7_MODE_PRIO_CODE(3, 1, 0), |
132 | BC7_MODE_PRIO_CODE(2, 1, 15), |
133 | BC7_MODE_PRIO_CODE(2, 1, 14), |
134 | BC7_MODE_PRIO_CODE(3, 0, 13), |
135 | BC7_MODE_PRIO_CODE(3, 0, 11), |
136 | BC7_MODE_PRIO_CODE(2, 1, 16), |
137 | BC7_MODE_PRIO_CODE(2, 0, 14), |
138 | BC7_MODE_PRIO_CODE(2, 1, 3), |
139 | BC7_MODE_PRIO_CODE(4, 0, 10), |
140 | BC7_MODE_PRIO_CODE(2, 1, 1), |
141 | BC7_MODE_PRIO_CODE(1, 0, 2), |
142 | BC7_MODE_PRIO_CODE(2, 1, 2), |
143 | BC7_MODE_PRIO_CODE(4, 0, 8), |
144 | BC7_MODE_PRIO_CODE(1, 0, 12), |
145 | BC7_MODE_PRIO_CODE(4, 1, 13), |
146 | BC7_MODE_PRIO_CODE(1, 5, 10), |
147 | BC7_MODE_PRIO_CODE(2, 0, 15), |
148 | BC7_MODE_PRIO_CODE(1, 0, 6), |
149 | BC7_MODE_PRIO_CODE(1, 1, 35), |
150 | BC7_MODE_PRIO_CODE(2, 1, 23), |
151 | BC7_MODE_PRIO_CODE(4, 0, 13), |
152 | BC7_MODE_PRIO_CODE(4, 0, 11), |
153 | BC7_MODE_PRIO_CODE(1, 2, 17), |
154 | BC7_MODE_PRIO_CODE(2, 1, 6), |
155 | BC7_MODE_PRIO_CODE(2, 1, 7), |
156 | BC7_MODE_PRIO_CODE(4, 6, 0), |
157 | BC7_MODE_PRIO_CODE(1, 2, 16), |
158 | BC7_MODE_PRIO_CODE(2, 1, 19), |
159 | BC7_MODE_PRIO_CODE(1, 1, 30), |
160 | BC7_MODE_PRIO_CODE(2, 3, 13), |
161 | BC7_MODE_PRIO_CODE(3, 0, 14), |
162 | BC7_MODE_PRIO_CODE(2, 1, 29), |
163 | BC7_MODE_PRIO_CODE(2, 1, 21), |
164 | BC7_MODE_PRIO_CODE(4, 1, 0), |
165 | BC7_MODE_PRIO_CODE(3, 0, 15), |
166 | BC7_MODE_PRIO_CODE(2, 0, 3), |
167 | BC7_MODE_PRIO_CODE(1, 1, 28), |
168 | BC7_MODE_PRIO_CODE(1, 4, 30), |
169 | BC7_MODE_PRIO_CODE(2, 0, 4), |
170 | BC7_MODE_PRIO_CODE(1, 2, 63), |
171 | BC7_MODE_PRIO_CODE(4, 0, 14), |
172 | BC7_MODE_PRIO_CODE(2, 1, 26), |
173 | BC7_MODE_PRIO_CODE(2, 0, 1), |
174 | BC7_MODE_PRIO_CODE(3, 0, 3), |
175 | BC7_MODE_PRIO_CODE(1, 1, 61), |
176 | BC7_MODE_PRIO_CODE(2, 0, 7), |
177 | BC7_MODE_PRIO_CODE(2, 0, 5), |
178 | BC7_MODE_PRIO_CODE(3, 1, 10), |
179 | BC7_MODE_PRIO_CODE(2, 4, 31), |
180 | BC7_MODE_PRIO_CODE(2, 0, 9), |
181 | BC7_MODE_PRIO_CODE(2, 1, 11), |
182 | BC7_MODE_PRIO_CODE(4, 0, 15), |
183 | BC7_MODE_PRIO_CODE(3, 1, 14), |
184 | BC7_MODE_PRIO_CODE(2, 0, 0), |
185 | BC7_MODE_PRIO_CODE(3, 1, 15), |
186 | BC7_MODE_PRIO_CODE(2, 3, 0), |
187 | BC7_MODE_PRIO_CODE(3, 0, 1), |
188 | BC7_MODE_PRIO_CODE(1, 1, 60), |
189 | BC7_MODE_PRIO_CODE(2, 1, 12), |
190 | BC7_MODE_PRIO_CODE(3, 1, 1), |
191 | BC7_MODE_PRIO_CODE(3, 0, 5), |
192 | BC7_MODE_PRIO_CODE(1, 1, 27), |
193 | BC7_MODE_PRIO_CODE(2, 1, 18), |
194 | BC7_MODE_PRIO_CODE(3, 0, 9), |
195 | BC7_MODE_PRIO_CODE(3, 1, 3), |
196 | BC7_MODE_PRIO_CODE(2, 0, 2), |
197 | BC7_MODE_PRIO_CODE(3, 1, 16), |
198 | BC7_MODE_PRIO_CODE(3, 1, 2), |
199 | BC7_MODE_PRIO_CODE(1, 1, 31), |
200 | BC7_MODE_PRIO_CODE(3, 0, 7), |
201 | BC7_MODE_PRIO_CODE(2, 1, 17), |
202 | BC7_MODE_PRIO_CODE(1, 5, 20), |
203 | BC7_MODE_PRIO_CODE(2, 1, 4), |
204 | BC7_MODE_PRIO_CODE(1, 1, 62), |
205 | BC7_MODE_PRIO_CODE(2, 0, 12), |
206 | BC7_MODE_PRIO_CODE(3, 0, 4), |
207 | BC7_MODE_PRIO_CODE(4, 0, 4), |
208 | BC7_MODE_PRIO_CODE(1, 1, 33), |
209 | BC7_MODE_PRIO_CODE(3, 1, 23), |
210 | BC7_MODE_PRIO_CODE(2, 1, 5), |
211 | BC7_MODE_PRIO_CODE(2, 0, 6), |
212 | BC7_MODE_PRIO_CODE(2, 1, 24), |
213 | BC7_MODE_PRIO_CODE(1, 1, 59), |
214 | BC7_MODE_PRIO_CODE(1, 1, 63), |
215 | BC7_MODE_PRIO_CODE(3, 0, 0), |
216 | BC7_MODE_PRIO_CODE(1, 1, 52), |
217 | BC7_MODE_PRIO_CODE(4, 0, 7), |
218 | BC7_MODE_PRIO_CODE(2, 1, 22), |
219 | BC7_MODE_PRIO_CODE(4, 0, 3), |
220 | BC7_MODE_PRIO_CODE(1, 2, 10), |
221 | BC7_MODE_PRIO_CODE(3, 1, 7), |
222 | BC7_MODE_PRIO_CODE(4, 0, 9), |
223 | BC7_MODE_PRIO_CODE(2, 1, 8), |
224 | BC7_MODE_PRIO_CODE(4, 0, 1), |
225 | BC7_MODE_PRIO_CODE(3, 0, 12), |
226 | BC7_MODE_PRIO_CODE(4, 0, 5), |
227 | BC7_MODE_PRIO_CODE(3, 1, 6), |
228 | BC7_MODE_PRIO_CODE(4, 1, 14), |
229 | BC7_MODE_PRIO_CODE(1, 3, 15), |
230 | BC7_MODE_PRIO_CODE(1, 1, 56), |
231 | BC7_MODE_PRIO_CODE(3, 0, 6), |
232 | BC7_MODE_PRIO_CODE(3, 0, 2), |
233 | BC7_MODE_PRIO_CODE(1, 1, 32), |
234 | BC7_MODE_PRIO_CODE(4, 1, 10), |
235 | BC7_MODE_PRIO_CODE(1, 2, 8), |
236 | BC7_MODE_PRIO_CODE(2, 1, 9), |
237 | BC7_MODE_PRIO_CODE(1, 2, 18), |
238 | BC7_MODE_PRIO_CODE(4, 1, 15), |
239 | BC7_MODE_PRIO_CODE(4, 0, 6), |
240 | BC7_MODE_PRIO_CODE(3, 1, 29), |
241 | BC7_MODE_PRIO_CODE(2, 1, 25), |
242 | BC7_MODE_PRIO_CODE(3, 4, 31), |
243 | BC7_MODE_PRIO_CODE(3, 3, 13), |
244 | BC7_MODE_PRIO_CODE(4, 0, 0), |
245 | BC7_MODE_PRIO_CODE(3, 1, 19), |
246 | BC7_MODE_PRIO_CODE(4, 0, 12), |
247 | BC7_MODE_PRIO_CODE(4, 1, 1), |
248 | BC7_MODE_PRIO_CODE(4, 0, 2), |
249 | BC7_MODE_PRIO_CODE(1, 3, 2), |
250 | BC7_MODE_PRIO_CODE(1, 2, 13), |
251 | BC7_MODE_PRIO_CODE(1, 1, 58), |
252 | BC7_MODE_PRIO_CODE(1, 3, 14), |
253 | BC7_MODE_PRIO_CODE(4, 1, 3), |
254 | BC7_MODE_PRIO_CODE(3, 1, 21), |
255 | BC7_MODE_PRIO_CODE(2, 2, 8), |
256 | BC7_MODE_PRIO_CODE(1, 2, 19), |
257 | BC7_MODE_PRIO_CODE(4, 1, 16), |
258 | BC7_MODE_PRIO_CODE(4, 1, 2), |
259 | BC7_MODE_PRIO_CODE(2, 2, 16), |
260 | BC7_MODE_PRIO_CODE(2, 2, 10), |
261 | BC7_MODE_PRIO_CODE(2, 1, 20), |
262 | BC7_MODE_PRIO_CODE(1, 2, 11), |
263 | BC7_MODE_PRIO_CODE(1, 1, 54), |
264 | BC7_MODE_PRIO_CODE(1, 1, 47), |
265 | BC7_MODE_PRIO_CODE(1, 3, 1), |
266 | BC7_MODE_PRIO_CODE(1, 2, 21), |
267 | BC7_MODE_PRIO_CODE(1, 2, 62), |
268 | BC7_MODE_PRIO_CODE(2, 2, 11), |
269 | BC7_MODE_PRIO_CODE(3, 1, 26), |
270 | BC7_MODE_PRIO_CODE(1, 1, 53), |
271 | BC7_MODE_PRIO_CODE(2, 1, 35), |
272 | BC7_MODE_PRIO_CODE(2, 2, 13), |
273 | BC7_MODE_PRIO_CODE(4, 1, 23), |
274 | BC7_MODE_PRIO_CODE(4, 1, 6), |
275 | BC7_MODE_PRIO_CODE(4, 1, 7), |
276 | BC7_MODE_PRIO_CODE(1, 2, 25), |
277 | BC7_MODE_PRIO_CODE(1, 1, 57), |
278 | BC7_MODE_PRIO_CODE(2, 1, 60), |
279 | BC7_MODE_PRIO_CODE(1, 2, 20), |
280 | BC7_MODE_PRIO_CODE(3, 1, 8), |
281 | BC7_MODE_PRIO_CODE(4, 1, 29), |
282 | BC7_MODE_PRIO_CODE(4, 1, 19), |
283 | BC7_MODE_PRIO_CODE(3, 2, 8), |
284 | BC7_MODE_PRIO_CODE(2, 4, 11), |
285 | BC7_MODE_PRIO_CODE(4, 1, 21), |
286 | BC7_MODE_PRIO_CODE(3, 2, 10), |
287 | BC7_MODE_PRIO_CODE(2, 1, 61), |
288 | BC7_MODE_PRIO_CODE(2, 1, 30), |
289 | BC7_MODE_PRIO_CODE(3, 1, 12), |
290 | BC7_MODE_PRIO_CODE(3, 1, 11), |
291 | BC7_MODE_PRIO_CODE(2, 1, 63), |
292 | BC7_MODE_PRIO_CODE(2, 3, 1), |
293 | BC7_MODE_PRIO_CODE(2, 1, 28), |
294 | BC7_MODE_PRIO_CODE(2, 1, 62), |
295 | BC7_MODE_PRIO_CODE(3, 2, 13), |
296 | BC7_MODE_PRIO_CODE(2, 2, 63), |
297 | BC7_MODE_PRIO_CODE(2, 1, 33), |
298 | BC7_MODE_PRIO_CODE(2, 4, 10), |
299 | BC7_MODE_PRIO_CODE(3, 1, 18), |
300 | BC7_MODE_PRIO_CODE(2, 5, 30), |
301 | BC7_MODE_PRIO_CODE(3, 1, 5), |
302 | BC7_MODE_PRIO_CODE(2, 2, 17), |
303 | BC7_MODE_PRIO_CODE(1, 1, 55), |
304 | BC7_MODE_PRIO_CODE(3, 1, 17), |
305 | BC7_MODE_PRIO_CODE(2, 3, 2), |
306 | BC7_MODE_PRIO_CODE(1, 4, 21), |
307 | BC7_MODE_PRIO_CODE(3, 2, 11), |
308 | BC7_MODE_PRIO_CODE(4, 1, 11), |
309 | BC7_MODE_PRIO_CODE(2, 1, 27), |
310 | BC7_MODE_PRIO_CODE(1, 2, 59), |
311 | BC7_MODE_PRIO_CODE(4, 1, 26), |
312 | BC7_MODE_PRIO_CODE(3, 1, 9), |
313 | BC7_MODE_PRIO_CODE(2, 3, 14), |
314 | BC7_MODE_PRIO_CODE(3, 1, 4), |
315 | BC7_MODE_PRIO_CODE(3, 1, 24), |
316 | BC7_MODE_PRIO_CODE(3, 1, 25), |
317 | BC7_MODE_PRIO_CODE(3, 3, 0), |
318 | BC7_MODE_PRIO_CODE(3, 4, 11), |
319 | BC7_MODE_PRIO_CODE(4, 1, 12), |
320 | BC7_MODE_PRIO_CODE(2, 1, 32), |
321 | BC7_MODE_PRIO_CODE(2, 3, 15), |
322 | BC7_MODE_PRIO_CODE(4, 2, 10), |
323 | BC7_MODE_PRIO_CODE(1, 2, 60), |
324 | BC7_MODE_PRIO_CODE(1, 2, 32), |
325 | BC7_MODE_PRIO_CODE(1, 1, 40), |
326 | BC7_MODE_PRIO_CODE(4, 1, 18), |
327 | BC7_MODE_PRIO_CODE(2, 1, 59), |
328 | BC7_MODE_PRIO_CODE(4, 1, 5), |
329 | BC7_MODE_PRIO_CODE(3, 1, 22), |
330 | BC7_MODE_PRIO_CODE(3, 2, 16), |
331 | BC7_MODE_PRIO_CODE(3, 1, 20), |
332 | BC7_MODE_PRIO_CODE(4, 1, 4), |
333 | BC7_MODE_PRIO_CODE(2, 1, 31), |
334 | BC7_MODE_PRIO_CODE(4, 1, 17), |
335 | BC7_MODE_PRIO_CODE(1, 2, 24), |
336 | BC7_MODE_PRIO_CODE(4, 1, 24), |
337 | BC7_MODE_PRIO_CODE(2, 1, 58), |
338 | BC7_MODE_PRIO_CODE(4, 2, 8), |
339 | BC7_MODE_PRIO_CODE(1, 2, 22), |
340 | BC7_MODE_PRIO_CODE(1, 2, 23), |
341 | BC7_MODE_PRIO_CODE(1, 3, 10), |
342 | BC7_MODE_PRIO_CODE(1, 1, 41), |
343 | BC7_MODE_PRIO_CODE(2, 2, 18), |
344 | BC7_MODE_PRIO_CODE(4, 1, 25), |
345 | BC7_MODE_PRIO_CODE(3, 1, 61), |
346 | BC7_MODE_PRIO_CODE(1, 3, 29), |
347 | BC7_MODE_PRIO_CODE(1, 2, 57), |
348 | BC7_MODE_PRIO_CODE(2, 2, 19), |
349 | BC7_MODE_PRIO_CODE(1, 2, 53), |
350 | BC7_MODE_PRIO_CODE(1, 2, 55), |
351 | BC7_MODE_PRIO_CODE(3, 2, 63), |
352 | BC7_MODE_PRIO_CODE(3, 1, 60), |
353 | BC7_MODE_PRIO_CODE(4, 1, 8), |
354 | BC7_MODE_PRIO_CODE(2, 1, 56), |
355 | BC7_MODE_PRIO_CODE(3, 1, 35), |
356 | BC7_MODE_PRIO_CODE(4, 4, 31), |
357 | BC7_MODE_PRIO_CODE(4, 1, 9), |
358 | BC7_MODE_PRIO_CODE(1, 1, 46), |
359 | BC7_MODE_PRIO_CODE(1, 2, 58), |
360 | BC7_MODE_PRIO_CODE(2, 3, 29), |
361 | BC7_MODE_PRIO_CODE(1, 1, 45), |
362 | BC7_MODE_PRIO_CODE(4, 2, 13), |
363 | BC7_MODE_PRIO_CODE(1, 1, 42), |
364 | BC7_MODE_PRIO_CODE(1, 3, 3), |
365 | BC7_MODE_PRIO_CODE(4, 2, 11), |
366 | BC7_MODE_PRIO_CODE(3, 1, 63), |
367 | BC7_MODE_PRIO_CODE(3, 1, 30), |
368 | BC7_MODE_PRIO_CODE(1, 1, 36), |
369 | BC7_MODE_PRIO_CODE(3, 1, 62), |
370 | BC7_MODE_PRIO_CODE(1, 1, 43), |
371 | BC7_MODE_PRIO_CODE(1, 3, 21), |
372 | BC7_MODE_PRIO_CODE(3, 2, 17), |
373 | BC7_MODE_PRIO_CODE(1, 2, 14), |
374 | BC7_MODE_PRIO_CODE(1, 1, 48), |
375 | BC7_MODE_PRIO_CODE(2, 1, 57), |
376 | BC7_MODE_PRIO_CODE(2, 1, 52), |
377 | BC7_MODE_PRIO_CODE(1, 2, 61), |
378 | BC7_MODE_PRIO_CODE(3, 1, 33), |
379 | BC7_MODE_PRIO_CODE(1, 1, 51), |
380 | BC7_MODE_PRIO_CODE(4, 1, 20), |
381 | BC7_MODE_PRIO_CODE(1, 3, 8), |
382 | BC7_MODE_PRIO_CODE(4, 1, 22), |
383 | BC7_MODE_PRIO_CODE(1, 3, 19), |
384 | BC7_MODE_PRIO_CODE(1, 2, 36), |
385 | BC7_MODE_PRIO_CODE(2, 5, 10), |
386 | BC7_MODE_PRIO_CODE(3, 1, 28), |
387 | BC7_MODE_PRIO_CODE(2, 2, 14), |
388 | BC7_MODE_PRIO_CODE(1, 1, 49), |
389 | BC7_MODE_PRIO_CODE(1, 2, 33), |
390 | BC7_MODE_PRIO_CODE(1, 3, 9), |
391 | BC7_MODE_PRIO_CODE(2, 2, 20), |
392 | BC7_MODE_PRIO_CODE(1, 3, 26), |
393 | BC7_MODE_PRIO_CODE(2, 1, 53), |
394 | BC7_MODE_PRIO_CODE(4, 3, 13), |
395 | BC7_MODE_PRIO_CODE(2, 2, 21), |
396 | BC7_MODE_PRIO_CODE(3, 4, 10), |
397 | BC7_MODE_PRIO_CODE(4, 1, 60), |
398 | BC7_MODE_PRIO_CODE(2, 1, 54), |
399 | BC7_MODE_PRIO_CODE(1, 2, 29), |
400 | BC7_MODE_PRIO_CODE(2, 1, 47), |
401 | BC7_MODE_PRIO_CODE(1, 2, 52), |
402 | BC7_MODE_PRIO_CODE(3, 1, 32), |
403 | BC7_MODE_PRIO_CODE(1, 2, 40), |
404 | BC7_MODE_PRIO_CODE(1, 2, 31), |
405 | BC7_MODE_PRIO_CODE(3, 1, 27), |
406 | BC7_MODE_PRIO_CODE(3, 2, 18), |
407 | BC7_MODE_PRIO_CODE(2, 3, 10), |
408 | BC7_MODE_PRIO_CODE(2, 1, 55), |
409 | BC7_MODE_PRIO_CODE(4, 1, 61), |
410 | BC7_MODE_PRIO_CODE(3, 2, 14), |
411 | BC7_MODE_PRIO_CODE(3, 1, 31), |
412 | BC7_MODE_PRIO_CODE(1, 2, 34), |
413 | BC7_MODE_PRIO_CODE(3, 2, 19), |
414 | BC7_MODE_PRIO_CODE(2, 3, 21), |
415 | BC7_MODE_PRIO_CODE(2, 4, 30), |
416 | BC7_MODE_PRIO_CODE(1, 2, 15), |
417 | BC7_MODE_PRIO_CODE(2, 3, 26), |
418 | BC7_MODE_PRIO_CODE(1, 2, 28), |
419 | BC7_MODE_PRIO_CODE(4, 2, 16), |
420 | BC7_MODE_PRIO_CODE(2, 2, 15), |
421 | BC7_MODE_PRIO_CODE(2, 1, 40), |
422 | BC7_MODE_PRIO_CODE(2, 2, 22), |
423 | BC7_MODE_PRIO_CODE(4, 1, 33), |
424 | BC7_MODE_PRIO_CODE(1, 3, 7), |
425 | BC7_MODE_PRIO_CODE(1, 1, 50), |
426 | BC7_MODE_PRIO_CODE(2, 1, 41), |
427 | BC7_MODE_PRIO_CODE(1, 2, 9), |
428 | BC7_MODE_PRIO_CODE(1, 2, 39), |
429 | BC7_MODE_PRIO_CODE(2, 2, 25), |
430 | BC7_MODE_PRIO_CODE(1, 3, 6), |
431 | BC7_MODE_PRIO_CODE(3, 2, 21), |
432 | BC7_MODE_PRIO_CODE(1, 1, 37), |
433 | BC7_MODE_PRIO_CODE(2, 2, 58), |
434 | BC7_MODE_PRIO_CODE(3, 3, 29), |
435 | BC7_MODE_PRIO_CODE(4, 1, 62), |
436 | BC7_MODE_PRIO_CODE(1, 2, 35), |
437 | BC7_MODE_PRIO_CODE(3, 1, 59), |
438 | BC7_MODE_PRIO_CODE(4, 1, 28), |
439 | BC7_MODE_PRIO_CODE(1, 3, 23), |
440 | BC7_MODE_PRIO_CODE(4, 1, 30), |
441 | BC7_MODE_PRIO_CODE(2, 1, 45), |
442 | BC7_MODE_PRIO_CODE(1, 3, 16), |
443 | BC7_MODE_PRIO_CODE(4, 1, 35), |
444 | BC7_MODE_PRIO_CODE(2, 1, 46), |
445 | BC7_MODE_PRIO_CODE(1, 2, 38), |
446 | BC7_MODE_PRIO_CODE(4, 1, 63), |
447 | BC7_MODE_PRIO_CODE(1, 3, 22), |
448 | BC7_MODE_PRIO_CODE(1, 2, 30), |
449 | BC7_MODE_PRIO_CODE(2, 2, 31), |
450 | BC7_MODE_PRIO_CODE(1, 3, 20), |
451 | BC7_MODE_PRIO_CODE(2, 2, 9), |
452 | BC7_MODE_PRIO_CODE(2, 3, 3), |
453 | BC7_MODE_PRIO_CODE(3, 2, 22), |
454 | BC7_MODE_PRIO_CODE(2, 1, 42), |
455 | BC7_MODE_PRIO_CODE(2, 2, 62), |
456 | BC7_MODE_PRIO_CODE(3, 2, 20), |
457 | BC7_MODE_PRIO_CODE(4, 1, 32), |
458 | BC7_MODE_PRIO_CODE(2, 1, 43), |
459 | BC7_MODE_PRIO_CODE(3, 1, 58), |
460 | BC7_MODE_PRIO_CODE(2, 3, 19), |
461 | BC7_MODE_PRIO_CODE(2, 2, 32), |
462 | BC7_MODE_PRIO_CODE(2, 2, 57), |
463 | BC7_MODE_PRIO_CODE(4, 1, 27), |
464 | BC7_MODE_PRIO_CODE(2, 2, 34), |
465 | BC7_MODE_PRIO_CODE(4, 1, 58), |
466 | BC7_MODE_PRIO_CODE(1, 2, 12), |
467 | BC7_MODE_PRIO_CODE(2, 2, 12), |
468 | BC7_MODE_PRIO_CODE(1, 4, 20), |
469 | BC7_MODE_PRIO_CODE(1, 2, 56), |
470 | BC7_MODE_PRIO_CODE(2, 1, 48), |
471 | BC7_MODE_PRIO_CODE(2, 1, 36), |
472 | BC7_MODE_PRIO_CODE(4, 3, 0), |
473 | BC7_MODE_PRIO_CODE(2, 2, 24), |
474 | BC7_MODE_PRIO_CODE(3, 1, 40), |
475 | BC7_MODE_PRIO_CODE(3, 2, 9), |
476 | BC7_MODE_PRIO_CODE(3, 1, 56), |
477 | BC7_MODE_PRIO_CODE(3, 2, 15), |
478 | BC7_MODE_PRIO_CODE(2, 3, 7), |
479 | BC7_MODE_PRIO_CODE(1, 2, 37), |
480 | BC7_MODE_PRIO_CODE(2, 2, 35), |
481 | BC7_MODE_PRIO_CODE(3, 1, 52), |
482 | BC7_MODE_PRIO_CODE(2, 3, 6), |
483 | BC7_MODE_PRIO_CODE(3, 1, 57), |
484 | BC7_MODE_PRIO_CODE(4, 1, 31), |
485 | BC7_MODE_PRIO_CODE(4, 4, 11), |
486 | BC7_MODE_PRIO_CODE(1, 1, 44), |
487 | BC7_MODE_PRIO_CODE(3, 3, 1), |
488 | BC7_MODE_PRIO_CODE(1, 2, 54), |
489 | BC7_MODE_PRIO_CODE(2, 1, 50), |
490 | BC7_MODE_PRIO_CODE(3, 3, 15), |
491 | BC7_MODE_PRIO_CODE(2, 1, 51), |
492 | BC7_MODE_PRIO_CODE(1, 2, 27), |
493 | BC7_MODE_PRIO_CODE(3, 4, 30), |
494 | BC7_MODE_PRIO_CODE(3, 3, 14), |
495 | BC7_MODE_PRIO_CODE(3, 2, 25), |
496 | BC7_MODE_PRIO_CODE(2, 3, 9), |
497 | BC7_MODE_PRIO_CODE(2, 2, 60), |
498 | BC7_MODE_PRIO_CODE(2, 1, 49), |
499 | BC7_MODE_PRIO_CODE(1, 2, 6), |
500 | BC7_MODE_PRIO_CODE(2, 2, 23), |
501 | BC7_MODE_PRIO_CODE(3, 2, 12), |
502 | BC7_MODE_PRIO_CODE(3, 3, 2), |
503 | BC7_MODE_PRIO_CODE(4, 2, 14), |
504 | BC7_MODE_PRIO_CODE(2, 3, 16), |
505 | BC7_MODE_PRIO_CODE(1, 2, 51), |
506 | BC7_MODE_PRIO_CODE(1, 3, 11), |
507 | BC7_MODE_PRIO_CODE(1, 2, 4), |
508 | BC7_MODE_PRIO_CODE(4, 2, 17), |
509 | BC7_MODE_PRIO_CODE(1, 3, 12), |
510 | BC7_MODE_PRIO_CODE(3, 1, 43), |
511 | BC7_MODE_PRIO_CODE(2, 4, 21), |
512 | BC7_MODE_PRIO_CODE(4, 1, 56), |
513 | BC7_MODE_PRIO_CODE(3, 1, 53), |
514 | BC7_MODE_PRIO_CODE(3, 1, 47), |
515 | BC7_MODE_PRIO_CODE(2, 2, 61), |
516 | BC7_MODE_PRIO_CODE(2, 2, 55), |
517 | BC7_MODE_PRIO_CODE(2, 3, 23), |
518 | BC7_MODE_PRIO_CODE(3, 1, 42), |
519 | BC7_MODE_PRIO_CODE(2, 3, 8), |
520 | BC7_MODE_PRIO_CODE(3, 1, 55), |
521 | BC7_MODE_PRIO_CODE(4, 1, 59), |
522 | BC7_MODE_PRIO_CODE(3, 2, 60), |
523 | BC7_MODE_PRIO_CODE(2, 3, 20), |
524 | BC7_MODE_PRIO_CODE(3, 2, 57), |
525 | BC7_MODE_PRIO_CODE(3, 1, 54), |
526 | BC7_MODE_PRIO_CODE(3, 2, 35), |
527 | BC7_MODE_PRIO_CODE(1, 1, 38), |
528 | BC7_MODE_PRIO_CODE(1, 2, 5), |
529 | BC7_MODE_PRIO_CODE(2, 2, 5), |
530 | BC7_MODE_PRIO_CODE(2, 2, 6), |
531 | BC7_MODE_PRIO_CODE(3, 2, 23), |
532 | BC7_MODE_PRIO_CODE(2, 2, 59), |
533 | BC7_MODE_PRIO_CODE(3, 2, 5), |
534 | BC7_MODE_PRIO_CODE(4, 1, 42), |
535 | BC7_MODE_PRIO_CODE(2, 1, 37), |
536 | BC7_MODE_PRIO_CODE(3, 2, 59), |
537 | BC7_MODE_PRIO_CODE(4, 2, 9), |
538 | BC7_MODE_PRIO_CODE(2, 2, 4), |
539 | BC7_MODE_PRIO_CODE(2, 2, 56), |
540 | BC7_MODE_PRIO_CODE(1, 3, 33), |
541 | BC7_MODE_PRIO_CODE(2, 3, 33), |
542 | BC7_MODE_PRIO_CODE(2, 3, 22), |
543 | BC7_MODE_PRIO_CODE(2, 3, 12), |
544 | BC7_MODE_PRIO_CODE(4, 1, 40), |
545 | BC7_MODE_PRIO_CODE(3, 2, 34), |
546 | BC7_MODE_PRIO_CODE(3, 2, 56), |
547 | BC7_MODE_PRIO_CODE(3, 3, 26), |
548 | BC7_MODE_PRIO_CODE(1, 2, 7), |
549 | BC7_MODE_PRIO_CODE(2, 2, 7), |
550 | BC7_MODE_PRIO_CODE(3, 2, 7), |
551 | BC7_MODE_PRIO_CODE(2, 2, 36), |
552 | BC7_MODE_PRIO_CODE(3, 2, 36), |
553 | BC7_MODE_PRIO_CODE(4, 1, 52), |
554 | BC7_MODE_PRIO_CODE(2, 2, 33), |
555 | BC7_MODE_PRIO_CODE(3, 1, 45), |
556 | BC7_MODE_PRIO_CODE(1, 3, 4), |
557 | BC7_MODE_PRIO_CODE(4, 2, 15), |
558 | BC7_MODE_PRIO_CODE(3, 1, 41), |
559 | BC7_MODE_PRIO_CODE(2, 2, 54), |
560 | BC7_MODE_PRIO_CODE(3, 2, 4), |
561 | BC7_MODE_PRIO_CODE(2, 5, 20), |
562 | BC7_MODE_PRIO_CODE(3, 2, 62), |
563 | BC7_MODE_PRIO_CODE(1, 3, 35), |
564 | BC7_MODE_PRIO_CODE(4, 1, 41), |
565 | BC7_MODE_PRIO_CODE(3, 2, 6), |
566 | BC7_MODE_PRIO_CODE(2, 2, 52), |
567 | BC7_MODE_PRIO_CODE(3, 1, 46), |
568 | BC7_MODE_PRIO_CODE(1, 1, 39), |
569 | BC7_MODE_PRIO_CODE(3, 2, 33), |
570 | BC7_MODE_PRIO_CODE(1, 3, 5), |
571 | BC7_MODE_PRIO_CODE(3, 1, 48), |
572 | BC7_MODE_PRIO_CODE(3, 2, 24), |
573 | BC7_MODE_PRIO_CODE(3, 2, 32), |
574 | BC7_MODE_PRIO_CODE(3, 3, 33), |
575 | BC7_MODE_PRIO_CODE(1, 3, 17), |
576 | BC7_MODE_PRIO_CODE(4, 1, 57), |
577 | BC7_MODE_PRIO_CODE(1, 3, 25), |
578 | BC7_MODE_PRIO_CODE(2, 3, 11), |
579 | BC7_MODE_PRIO_CODE(1, 3, 61), |
580 | BC7_MODE_PRIO_CODE(4, 1, 43), |
581 | BC7_MODE_PRIO_CODE(1, 3, 60), |
582 | BC7_MODE_PRIO_CODE(2, 3, 60), |
583 | BC7_MODE_PRIO_CODE(2, 2, 28), |
584 | BC7_MODE_PRIO_CODE(3, 2, 28), |
585 | BC7_MODE_PRIO_CODE(4, 1, 55), |
586 | BC7_MODE_PRIO_CODE(2, 3, 5), |
587 | BC7_MODE_PRIO_CODE(3, 1, 51), |
588 | BC7_MODE_PRIO_CODE(4, 1, 53), |
589 | BC7_MODE_PRIO_CODE(4, 1, 54), |
590 | BC7_MODE_PRIO_CODE(1, 3, 32), |
591 | BC7_MODE_PRIO_CODE(1, 3, 24), |
592 | BC7_MODE_PRIO_CODE(4, 1, 47), |
593 | BC7_MODE_PRIO_CODE(2, 2, 51), |
594 | BC7_MODE_PRIO_CODE(4, 2, 12), |
595 | BC7_MODE_PRIO_CODE(2, 3, 61), |
596 | BC7_MODE_PRIO_CODE(3, 4, 21), |
597 | BC7_MODE_PRIO_CODE(2, 3, 32), |
598 | BC7_MODE_PRIO_CODE(3, 1, 36), |
599 | BC7_MODE_PRIO_CODE(3, 1, 49), |
600 | BC7_MODE_PRIO_CODE(1, 3, 18), |
601 | BC7_MODE_PRIO_CODE(4, 3, 29), |
602 | BC7_MODE_PRIO_CODE(4, 2, 63), |
603 | BC7_MODE_PRIO_CODE(2, 2, 27), |
604 | BC7_MODE_PRIO_CODE(2, 3, 17), |
605 | BC7_MODE_PRIO_CODE(3, 1, 50), |
606 | BC7_MODE_PRIO_CODE(3, 2, 61), |
607 | BC7_MODE_PRIO_CODE(1, 3, 63), |
608 | BC7_MODE_PRIO_CODE(2, 3, 63), |
609 | BC7_MODE_PRIO_CODE(3, 2, 27), |
610 | BC7_MODE_PRIO_CODE(4, 1, 46), |
611 | BC7_MODE_PRIO_CODE(1, 2, 26), |
612 | BC7_MODE_PRIO_CODE(2, 3, 4), |
613 | BC7_MODE_PRIO_CODE(2, 3, 18), |
614 | BC7_MODE_PRIO_CODE(4, 1, 45), |
615 | BC7_MODE_PRIO_CODE(4, 1, 51), |
616 | BC7_MODE_PRIO_CODE(1, 2, 1), |
617 | BC7_MODE_PRIO_CODE(4, 2, 6), |
618 | BC7_MODE_PRIO_CODE(1, 3, 62), |
619 | BC7_MODE_PRIO_CODE(2, 3, 62), |
620 | BC7_MODE_PRIO_CODE(2, 1, 44), |
621 | BC7_MODE_PRIO_CODE(4, 1, 49), |
622 | BC7_MODE_PRIO_CODE(3, 5, 30), |
623 | BC7_MODE_PRIO_CODE(2, 3, 25), |
624 | BC7_MODE_PRIO_CODE(1, 2, 49), |
625 | BC7_MODE_PRIO_CODE(4, 1, 48), |
626 | BC7_MODE_PRIO_CODE(3, 3, 3), |
627 | BC7_MODE_PRIO_CODE(3, 1, 37), |
628 | BC7_MODE_PRIO_CODE(1, 2, 0), |
629 | BC7_MODE_PRIO_CODE(2, 2, 0), |
630 | BC7_MODE_PRIO_CODE(2, 3, 35), |
631 | BC7_MODE_PRIO_CODE(2, 3, 24), |
632 | BC7_MODE_PRIO_CODE(2, 2, 53), |
633 | BC7_MODE_PRIO_CODE(3, 2, 53), |
634 | BC7_MODE_PRIO_CODE(4, 2, 59), |
635 | BC7_MODE_PRIO_CODE(3, 3, 10), |
636 | BC7_MODE_PRIO_CODE(1, 2, 3), |
637 | BC7_MODE_PRIO_CODE(2, 2, 3), |
638 | BC7_MODE_PRIO_CODE(3, 2, 3), |
639 | BC7_MODE_PRIO_CODE(3, 3, 32), |
640 | BC7_MODE_PRIO_CODE(1, 2, 46), |
641 | BC7_MODE_PRIO_CODE(4, 2, 62), |
642 | BC7_MODE_PRIO_CODE(4, 2, 60), |
643 | BC7_MODE_PRIO_CODE(2, 2, 30), |
644 | BC7_MODE_PRIO_CODE(1, 3, 47), |
645 | BC7_MODE_PRIO_CODE(4, 2, 36), |
646 | BC7_MODE_PRIO_CODE(2, 2, 1), |
647 | BC7_MODE_PRIO_CODE(3, 2, 1), |
648 | BC7_MODE_PRIO_CODE(3, 2, 58), |
649 | BC7_MODE_PRIO_CODE(4, 1, 36), |
650 | BC7_MODE_PRIO_CODE(3, 3, 16), |
651 | BC7_MODE_PRIO_CODE(2, 3, 47), |
652 | BC7_MODE_PRIO_CODE(2, 2, 39), |
653 | BC7_MODE_PRIO_CODE(4, 1, 50), |
654 | BC7_MODE_PRIO_CODE(4, 2, 21), |
655 | BC7_MODE_PRIO_CODE(2, 1, 38), |
656 | BC7_MODE_PRIO_CODE(4, 4, 21), |
657 | BC7_MODE_PRIO_CODE(3, 3, 23), |
658 | BC7_MODE_PRIO_CODE(1, 2, 43), |
659 | BC7_MODE_PRIO_CODE(1, 2, 41), |
660 | BC7_MODE_PRIO_CODE(2, 2, 41), |
661 | BC7_MODE_PRIO_CODE(1, 3, 28), |
662 | BC7_MODE_PRIO_CODE(4, 2, 35), |
663 | BC7_MODE_PRIO_CODE(4, 3, 26), |
664 | BC7_MODE_PRIO_CODE(1, 3, 59), |
665 | BC7_MODE_PRIO_CODE(1, 1, 34), |
666 | BC7_MODE_PRIO_CODE(2, 2, 29), |
667 | BC7_MODE_PRIO_CODE(3, 2, 29), |
668 | BC7_MODE_PRIO_CODE(3, 2, 52), |
669 | BC7_MODE_PRIO_CODE(1, 3, 58), |
670 | BC7_MODE_PRIO_CODE(4, 5, 30), |
671 | BC7_MODE_PRIO_CODE(4, 3, 33), |
672 | BC7_MODE_PRIO_CODE(3, 2, 30), |
673 | BC7_MODE_PRIO_CODE(1, 2, 44), |
674 | BC7_MODE_PRIO_CODE(1, 2, 2), |
675 | BC7_MODE_PRIO_CODE(2, 2, 2), |
676 | BC7_MODE_PRIO_CODE(3, 2, 2), |
677 | BC7_MODE_PRIO_CODE(1, 2, 47), |
678 | BC7_MODE_PRIO_CODE(2, 2, 47), |
679 | BC7_MODE_PRIO_CODE(3, 3, 7), |
680 | BC7_MODE_PRIO_CODE(2, 3, 58), |
681 | BC7_MODE_PRIO_CODE(3, 2, 55), |
682 | BC7_MODE_PRIO_CODE(4, 2, 4), |
683 | BC7_MODE_PRIO_CODE(3, 2, 0), |
684 | BC7_MODE_PRIO_CODE(1, 3, 31), |
685 | BC7_MODE_PRIO_CODE(3, 2, 31), |
686 | BC7_MODE_PRIO_CODE(3, 3, 12), |
687 | BC7_MODE_PRIO_CODE(3, 2, 51), |
688 | BC7_MODE_PRIO_CODE(2, 1, 39), |
689 | BC7_MODE_PRIO_CODE(1, 3, 48), |
690 | BC7_MODE_PRIO_CODE(1, 3, 27), |
691 | BC7_MODE_PRIO_CODE(4, 2, 25), |
692 | BC7_MODE_PRIO_CODE(4, 2, 22), |
693 | BC7_MODE_PRIO_CODE(4, 2, 18), |
694 | BC7_MODE_PRIO_CODE(2, 2, 44), |
695 | BC7_MODE_PRIO_CODE(2, 3, 28), |
696 | BC7_MODE_PRIO_CODE(3, 1, 44), |
697 | BC7_MODE_PRIO_CODE(2, 1, 34), |
698 | BC7_MODE_PRIO_CODE(3, 5, 10), |
699 | BC7_MODE_PRIO_CODE(4, 4, 10), |
700 | BC7_MODE_PRIO_CODE(3, 2, 54), |
701 | BC7_MODE_PRIO_CODE(4, 2, 7), |
702 | BC7_MODE_PRIO_CODE(4, 2, 20), |
703 | BC7_MODE_PRIO_CODE(2, 2, 37), |
704 | BC7_MODE_PRIO_CODE(3, 3, 6), |
705 | BC7_MODE_PRIO_CODE(2, 2, 43), |
706 | BC7_MODE_PRIO_CODE(2, 3, 59), |
707 | BC7_MODE_PRIO_CODE(1, 3, 30), |
708 | BC7_MODE_PRIO_CODE(4, 2, 5), |
709 | BC7_MODE_PRIO_CODE(4, 2, 61), |
710 | BC7_MODE_PRIO_CODE(4, 2, 19), |
711 | BC7_MODE_PRIO_CODE(4, 2, 23), |
712 | BC7_MODE_PRIO_CODE(3, 2, 39), |
713 | BC7_MODE_PRIO_CODE(2, 3, 27), |
714 | BC7_MODE_PRIO_CODE(1, 3, 57), |
715 | BC7_MODE_PRIO_CODE(2, 3, 57), |
716 | BC7_MODE_PRIO_CODE(3, 3, 21), |
717 | BC7_MODE_PRIO_CODE(3, 3, 11), |
718 | BC7_MODE_PRIO_CODE(3, 1, 39), |
719 | BC7_MODE_PRIO_CODE(2, 3, 48), |
720 | BC7_MODE_PRIO_CODE(4, 1, 37), |
721 | BC7_MODE_PRIO_CODE(3, 3, 19), |
722 | BC7_MODE_PRIO_CODE(3, 1, 38), |
723 | BC7_MODE_PRIO_CODE(2, 2, 38), |
724 | BC7_MODE_PRIO_CODE(2, 3, 31), |
725 | BC7_MODE_PRIO_CODE(2, 2, 40), |
726 | BC7_MODE_PRIO_CODE(3, 2, 40), |
727 | BC7_MODE_PRIO_CODE(1, 3, 56), |
728 | BC7_MODE_PRIO_CODE(4, 5, 10), |
729 | BC7_MODE_PRIO_CODE(2, 3, 56), |
730 | BC7_MODE_PRIO_CODE(4, 1, 38), |
731 | BC7_MODE_PRIO_CODE(1, 3, 41), |
732 | BC7_MODE_PRIO_CODE(1, 3, 50), |
733 | BC7_MODE_PRIO_CODE(2, 3, 30), |
734 | BC7_MODE_PRIO_CODE(3, 3, 8), |
735 | BC7_MODE_PRIO_CODE(4, 2, 24), |
736 | BC7_MODE_PRIO_CODE(3, 3, 9), |
737 | BC7_MODE_PRIO_CODE(3, 1, 34), |
738 | BC7_MODE_PRIO_CODE(4, 1, 34), |
739 | BC7_MODE_PRIO_CODE(2, 3, 50), |
740 | BC7_MODE_PRIO_CODE(1, 3, 43), |
741 | BC7_MODE_PRIO_CODE(1, 3, 40), |
742 | BC7_MODE_PRIO_CODE(1, 3, 51), |
743 | BC7_MODE_PRIO_CODE(2, 3, 51), |
744 | BC7_MODE_PRIO_CODE(1, 3, 45), |
745 | BC7_MODE_PRIO_CODE(2, 3, 45), |
746 | BC7_MODE_PRIO_CODE(2, 3, 40), |
747 | BC7_MODE_PRIO_CODE(3, 3, 20), |
748 | BC7_MODE_PRIO_CODE(2, 3, 41), |
749 | BC7_MODE_PRIO_CODE(3, 2, 44), |
750 | BC7_MODE_PRIO_CODE(2, 3, 43), |
751 | BC7_MODE_PRIO_CODE(4, 2, 57), |
752 | BC7_MODE_PRIO_CODE(2, 4, 20), |
753 | BC7_MODE_PRIO_CODE(3, 3, 4), |
754 | BC7_MODE_PRIO_CODE(3, 3, 61), |
755 | BC7_MODE_PRIO_CODE(1, 3, 46), |
756 | BC7_MODE_PRIO_CODE(2, 3, 46), |
757 | BC7_MODE_PRIO_CODE(4, 3, 1), |
758 | BC7_MODE_PRIO_CODE(3, 3, 22), |
759 | BC7_MODE_PRIO_CODE(1, 3, 49), |
760 | BC7_MODE_PRIO_CODE(2, 3, 49), |
761 | BC7_MODE_PRIO_CODE(4, 3, 15), |
762 | BC7_MODE_PRIO_CODE(3, 3, 5), |
763 | BC7_MODE_PRIO_CODE(4, 1, 44), |
764 | BC7_MODE_PRIO_CODE(4, 3, 14), |
765 | BC7_MODE_PRIO_CODE(4, 3, 2), |
766 | BC7_MODE_PRIO_CODE(3, 3, 60), |
767 | BC7_MODE_PRIO_CODE(1, 3, 53), |
768 | BC7_MODE_PRIO_CODE(2, 3, 53), |
769 | BC7_MODE_PRIO_CODE(4, 3, 32), |
770 | BC7_MODE_PRIO_CODE(3, 3, 24), |
771 | BC7_MODE_PRIO_CODE(3, 3, 63), |
772 | BC7_MODE_PRIO_CODE(3, 2, 37), |
773 | BC7_MODE_PRIO_CODE(1, 3, 52), |
774 | BC7_MODE_PRIO_CODE(2, 3, 52), |
775 | BC7_MODE_PRIO_CODE(4, 4, 30), |
776 | BC7_MODE_PRIO_CODE(4, 2, 34), |
777 | BC7_MODE_PRIO_CODE(1, 3, 54), |
778 | BC7_MODE_PRIO_CODE(3, 3, 62), |
779 | BC7_MODE_PRIO_CODE(3, 3, 18), |
780 | BC7_MODE_PRIO_CODE(3, 2, 41), |
781 | BC7_MODE_PRIO_CODE(4, 2, 58), |
782 | BC7_MODE_PRIO_CODE(1, 3, 42), |
783 | BC7_MODE_PRIO_CODE(2, 3, 42), |
784 | BC7_MODE_PRIO_CODE(4, 2, 0), |
785 | BC7_MODE_PRIO_CODE(4, 2, 55), |
786 | BC7_MODE_PRIO_CODE(2, 3, 54), |
787 | BC7_MODE_PRIO_CODE(3, 2, 47), |
788 | BC7_MODE_PRIO_CODE(4, 2, 53), |
789 | BC7_MODE_PRIO_CODE(3, 3, 25), |
790 | BC7_MODE_PRIO_CODE(3, 4, 20), |
791 | BC7_MODE_PRIO_CODE(4, 2, 33), |
792 | BC7_MODE_PRIO_CODE(1, 3, 55), |
793 | BC7_MODE_PRIO_CODE(2, 3, 55), |
794 | BC7_MODE_PRIO_CODE(4, 2, 32), |
795 | BC7_MODE_PRIO_CODE(3, 2, 43), |
796 | BC7_MODE_PRIO_CODE(3, 3, 17), |
797 | BC7_MODE_PRIO_CODE(3, 5, 20), |
798 | BC7_MODE_PRIO_CODE(4, 5, 20), |
799 | BC7_MODE_PRIO_CODE(1, 3, 36), |
800 | BC7_MODE_PRIO_CODE(2, 3, 36), |
801 | BC7_MODE_PRIO_CODE(4, 2, 54), |
802 | BC7_MODE_PRIO_CODE(2, 2, 49), |
803 | BC7_MODE_PRIO_CODE(3, 2, 49), |
804 | BC7_MODE_PRIO_CODE(4, 1, 39), |
805 | BC7_MODE_PRIO_CODE(4, 2, 3), |
806 | BC7_MODE_PRIO_CODE(3, 3, 35), |
807 | BC7_MODE_PRIO_CODE(4, 2, 52), |
808 | BC7_MODE_PRIO_CODE(4, 2, 1), |
809 | BC7_MODE_PRIO_CODE(1, 2, 50), |
810 | BC7_MODE_PRIO_CODE(4, 2, 49), |
811 | BC7_MODE_PRIO_CODE(4, 3, 16), |
812 | BC7_MODE_PRIO_CODE(2, 2, 50), |
813 | BC7_MODE_PRIO_CODE(3, 2, 50), |
814 | BC7_MODE_PRIO_CODE(4, 2, 31), |
815 | BC7_MODE_PRIO_CODE(4, 3, 3), |
816 | BC7_MODE_PRIO_CODE(1, 2, 48), |
817 | BC7_MODE_PRIO_CODE(2, 2, 48), |
818 | BC7_MODE_PRIO_CODE(3, 2, 48), |
819 | BC7_MODE_PRIO_CODE(3, 3, 28), |
820 | BC7_MODE_PRIO_CODE(4, 3, 9), |
821 | BC7_MODE_PRIO_CODE(1, 3, 38), |
822 | BC7_MODE_PRIO_CODE(4, 3, 10), |
823 | BC7_MODE_PRIO_CODE(3, 3, 31), |
824 | BC7_MODE_PRIO_CODE(4, 2, 51), |
825 | BC7_MODE_PRIO_CODE(1, 3, 37), |
826 | BC7_MODE_PRIO_CODE(2, 3, 37), |
827 | BC7_MODE_PRIO_CODE(3, 3, 50), |
828 | BC7_MODE_PRIO_CODE(2, 3, 38), |
829 | BC7_MODE_PRIO_CODE(4, 3, 20), |
830 | BC7_MODE_PRIO_CODE(3, 3, 41), |
831 | BC7_MODE_PRIO_CODE(3, 3, 56), |
832 | BC7_MODE_PRIO_CODE(4, 3, 6), |
833 | BC7_MODE_PRIO_CODE(4, 3, 8), |
834 | BC7_MODE_PRIO_CODE(4, 2, 37), |
835 | BC7_MODE_PRIO_CODE(3, 3, 58), |
836 | BC7_MODE_PRIO_CODE(3, 3, 59), |
837 | BC7_MODE_PRIO_CODE(4, 2, 56), |
838 | BC7_MODE_PRIO_CODE(1, 3, 39), |
839 | BC7_MODE_PRIO_CODE(2, 3, 39), |
840 | BC7_MODE_PRIO_CODE(4, 2, 43), |
841 | BC7_MODE_PRIO_CODE(1, 3, 44), |
842 | BC7_MODE_PRIO_CODE(2, 3, 44), |
843 | BC7_MODE_PRIO_CODE(4, 3, 7), |
844 | BC7_MODE_PRIO_CODE(3, 3, 27), |
845 | BC7_MODE_PRIO_CODE(4, 3, 23), |
846 | BC7_MODE_PRIO_CODE(3, 3, 45), |
847 | BC7_MODE_PRIO_CODE(4, 3, 22), |
848 | BC7_MODE_PRIO_CODE(3, 3, 30), |
849 | BC7_MODE_PRIO_CODE(3, 3, 48), |
850 | BC7_MODE_PRIO_CODE(3, 3, 51), |
851 | BC7_MODE_PRIO_CODE(1, 2, 42), |
852 | BC7_MODE_PRIO_CODE(2, 2, 42), |
853 | BC7_MODE_PRIO_CODE(3, 2, 42), |
854 | BC7_MODE_PRIO_CODE(4, 3, 19), |
855 | BC7_MODE_PRIO_CODE(4, 3, 21), |
856 | BC7_MODE_PRIO_CODE(2, 2, 46), |
857 | BC7_MODE_PRIO_CODE(3, 3, 36), |
858 | BC7_MODE_PRIO_CODE(4, 2, 28), |
859 | BC7_MODE_PRIO_CODE(3, 3, 49), |
860 | BC7_MODE_PRIO_CODE(3, 3, 53), |
861 | BC7_MODE_PRIO_CODE(3, 3, 55), |
862 | BC7_MODE_PRIO_CODE(2, 2, 26), |
863 | BC7_MODE_PRIO_CODE(3, 2, 26), |
864 | BC7_MODE_PRIO_CODE(4, 2, 30), |
865 | BC7_MODE_PRIO_CODE(3, 3, 52), |
866 | BC7_MODE_PRIO_CODE(4, 2, 41), |
867 | BC7_MODE_PRIO_CODE(4, 2, 29), |
868 | BC7_MODE_PRIO_CODE(1, 3, 34), |
869 | BC7_MODE_PRIO_CODE(2, 3, 34), |
870 | BC7_MODE_PRIO_CODE(4, 2, 44), |
871 | BC7_MODE_PRIO_CODE(3, 3, 43), |
872 | BC7_MODE_PRIO_CODE(4, 2, 47), |
873 | BC7_MODE_PRIO_CODE(4, 3, 18), |
874 | BC7_MODE_PRIO_CODE(4, 3, 17), |
875 | BC7_MODE_PRIO_CODE(3, 3, 47), |
876 | BC7_MODE_PRIO_CODE(4, 3, 11), |
877 | BC7_MODE_PRIO_CODE(3, 3, 57), |
878 | BC7_MODE_PRIO_CODE(3, 2, 38), |
879 | BC7_MODE_PRIO_CODE(3, 3, 46), |
880 | BC7_MODE_PRIO_CODE(4, 3, 25), |
881 | BC7_MODE_PRIO_CODE(4, 3, 4), |
882 | BC7_MODE_PRIO_CODE(3, 3, 42), |
883 | BC7_MODE_PRIO_CODE(4, 3, 61), |
884 | BC7_MODE_PRIO_CODE(4, 2, 48), |
885 | BC7_MODE_PRIO_CODE(4, 3, 5), |
886 | BC7_MODE_PRIO_CODE(3, 3, 54), |
887 | BC7_MODE_PRIO_CODE(4, 4, 20), |
888 | BC7_MODE_PRIO_CODE(4, 3, 24), |
889 | BC7_MODE_PRIO_CODE(4, 3, 12), |
890 | BC7_MODE_PRIO_CODE(4, 2, 40), |
891 | BC7_MODE_PRIO_CODE(3, 3, 40), |
892 | BC7_MODE_PRIO_CODE(3, 3, 44), |
893 | BC7_MODE_PRIO_CODE(4, 3, 63), |
894 | BC7_MODE_PRIO_CODE(4, 3, 50), |
895 | BC7_MODE_PRIO_CODE(4, 2, 50), |
896 | BC7_MODE_PRIO_CODE(4, 3, 60), |
897 | BC7_MODE_PRIO_CODE(4, 2, 39), |
898 | BC7_MODE_PRIO_CODE(4, 3, 62), |
899 | BC7_MODE_PRIO_CODE(4, 3, 49), |
900 | BC7_MODE_PRIO_CODE(4, 3, 58), |
901 | BC7_MODE_PRIO_CODE(4, 3, 47), |
902 | BC7_MODE_PRIO_CODE(4, 3, 56), |
903 | BC7_MODE_PRIO_CODE(4, 2, 26), |
904 | BC7_MODE_PRIO_CODE(4, 2, 27), |
905 | BC7_MODE_PRIO_CODE(3, 3, 37), |
906 | BC7_MODE_PRIO_CODE(4, 3, 57), |
907 | BC7_MODE_PRIO_CODE(4, 3, 48), |
908 | BC7_MODE_PRIO_CODE(4, 3, 31), |
909 | BC7_MODE_PRIO_CODE(4, 3, 51), |
910 | BC7_MODE_PRIO_CODE(4, 3, 28), |
911 | BC7_MODE_PRIO_CODE(4, 3, 53), |
912 | BC7_MODE_PRIO_CODE(3, 3, 39), |
913 | BC7_MODE_PRIO_CODE(4, 3, 40), |
914 | BC7_MODE_PRIO_CODE(4, 3, 27), |
915 | BC7_MODE_PRIO_CODE(4, 2, 2), |
916 | BC7_MODE_PRIO_CODE(3, 3, 34), |
917 | BC7_MODE_PRIO_CODE(4, 2, 38), |
918 | BC7_MODE_PRIO_CODE(4, 3, 54), |
919 | BC7_MODE_PRIO_CODE(3, 3, 38), |
920 | BC7_MODE_PRIO_CODE(4, 3, 52), |
921 | BC7_MODE_PRIO_CODE(4, 3, 30), |
922 | BC7_MODE_PRIO_CODE(4, 3, 59), |
923 | BC7_MODE_PRIO_CODE(1, 2, 45), |
924 | BC7_MODE_PRIO_CODE(4, 3, 45), |
925 | BC7_MODE_PRIO_CODE(4, 2, 42), |
926 | BC7_MODE_PRIO_CODE(4, 3, 35), |
927 | BC7_MODE_PRIO_CODE(4, 3, 41), |
928 | BC7_MODE_PRIO_CODE(3, 2, 46), |
929 | BC7_MODE_PRIO_CODE(4, 2, 46), |
930 | BC7_MODE_PRIO_CODE(4, 3, 46), |
931 | BC7_MODE_PRIO_CODE(2, 2, 45), |
932 | BC7_MODE_PRIO_CODE(4, 3, 43), |
933 | BC7_MODE_PRIO_CODE(4, 3, 37), |
934 | BC7_MODE_PRIO_CODE(4, 3, 38), |
935 | BC7_MODE_PRIO_CODE(4, 3, 36), |
936 | BC7_MODE_PRIO_CODE(4, 3, 42), |
937 | BC7_MODE_PRIO_CODE(4, 3, 34), |
938 | BC7_MODE_PRIO_CODE(4, 3, 39), |
939 | BC7_MODE_PRIO_CODE(4, 3, 55), |
940 | BC7_MODE_PRIO_CODE(4, 3, 44), |
941 | BC7_MODE_PRIO_CODE(3, 2, 45), |
942 | BC7_MODE_PRIO_CODE(1, 4, 0), |
943 | BC7_MODE_PRIO_CODE(1, 4, 1), |
944 | BC7_MODE_PRIO_CODE(1, 5, 0), |
945 | BC7_MODE_PRIO_CODE(4, 2, 45), |
946 | BC7_MODE_PRIO_CODE(2, 4, 0), |
947 | BC7_MODE_PRIO_CODE(2, 4, 1), |
948 | BC7_MODE_PRIO_CODE(2, 5, 0), |
949 | BC7_MODE_PRIO_CODE(3, 4, 0), |
950 | BC7_MODE_PRIO_CODE(3, 4, 1), |
951 | BC7_MODE_PRIO_CODE(3, 5, 0), |
952 | BC7_MODE_PRIO_CODE(4, 4, 0), |
953 | BC7_MODE_PRIO_CODE(4, 4, 1), |
954 | BC7_MODE_PRIO_CODE(4, 5, 0), |
955 | }; |
956 | |
957 | const uint16_t *g_bc7PrioCodesRGB = g_bc7PrioCodesRGBData; |
958 | const int g_bc7NumPrioCodesRGB = sizeof(g_bc7PrioCodesRGBData) / sizeof(g_bc7PrioCodesRGBData[0]); |
959 | |
960 | const uint16_t g_bc7PrioCodesRGBAData[] = |
961 | { |
962 | BC7_MODE_PRIO_CODE(1, 4, 1), |
963 | BC7_MODE_PRIO_CODE(1, 6, 0), |
964 | BC7_MODE_PRIO_CODE(1, 4, 31), |
965 | BC7_MODE_PRIO_CODE(1, 4, 11), |
966 | BC7_MODE_PRIO_CODE(1, 4, 0), |
967 | BC7_MODE_PRIO_CODE(1, 7, 13), |
968 | BC7_MODE_PRIO_CODE(1, 5, 0), |
969 | BC7_MODE_PRIO_CODE(1, 7, 0), |
970 | BC7_MODE_PRIO_CODE(2, 4, 1), |
971 | BC7_MODE_PRIO_CODE(3, 4, 1), |
972 | BC7_MODE_PRIO_CODE(2, 4, 0), |
973 | BC7_MODE_PRIO_CODE(2, 6, 0), |
974 | BC7_MODE_PRIO_CODE(1, 7, 6), |
975 | BC7_MODE_PRIO_CODE(1, 4, 10), |
976 | BC7_MODE_PRIO_CODE(1, 7, 15), |
977 | BC7_MODE_PRIO_CODE(1, 7, 14), |
978 | BC7_MODE_PRIO_CODE(1, 4, 30), |
979 | BC7_MODE_PRIO_CODE(1, 7, 7), |
980 | BC7_MODE_PRIO_CODE(3, 6, 0), |
981 | BC7_MODE_PRIO_CODE(1, 7, 19), |
982 | BC7_MODE_PRIO_CODE(3, 4, 0), |
983 | BC7_MODE_PRIO_CODE(2, 7, 13), |
984 | BC7_MODE_PRIO_CODE(1, 5, 30), |
985 | BC7_MODE_PRIO_CODE(1, 7, 2), |
986 | BC7_MODE_PRIO_CODE(1, 7, 1), |
987 | BC7_MODE_PRIO_CODE(1, 7, 21), |
988 | BC7_MODE_PRIO_CODE(4, 4, 1), |
989 | BC7_MODE_PRIO_CODE(1, 4, 21), |
990 | BC7_MODE_PRIO_CODE(2, 4, 31), |
991 | BC7_MODE_PRIO_CODE(1, 7, 10), |
992 | BC7_MODE_PRIO_CODE(1, 7, 3), |
993 | BC7_MODE_PRIO_CODE(4, 6, 0), |
994 | BC7_MODE_PRIO_CODE(3, 7, 13), |
995 | BC7_MODE_PRIO_CODE(1, 7, 16), |
996 | BC7_MODE_PRIO_CODE(1, 7, 8), |
997 | BC7_MODE_PRIO_CODE(2, 5, 0), |
998 | BC7_MODE_PRIO_CODE(2, 7, 0), |
999 | BC7_MODE_PRIO_CODE(1, 7, 23), |
1000 | BC7_MODE_PRIO_CODE(1, 7, 9), |
1001 | BC7_MODE_PRIO_CODE(2, 4, 11), |
1002 | BC7_MODE_PRIO_CODE(3, 4, 31), |
1003 | BC7_MODE_PRIO_CODE(1, 7, 20), |
1004 | BC7_MODE_PRIO_CODE(1, 7, 22), |
1005 | BC7_MODE_PRIO_CODE(4, 4, 0), |
1006 | BC7_MODE_PRIO_CODE(1, 5, 10), |
1007 | BC7_MODE_PRIO_CODE(4, 7, 13), |
1008 | BC7_MODE_PRIO_CODE(3, 7, 0), |
1009 | BC7_MODE_PRIO_CODE(1, 7, 12), |
1010 | BC7_MODE_PRIO_CODE(1, 7, 29), |
1011 | BC7_MODE_PRIO_CODE(3, 4, 11), |
1012 | BC7_MODE_PRIO_CODE(1, 7, 11), |
1013 | BC7_MODE_PRIO_CODE(1, 7, 18), |
1014 | BC7_MODE_PRIO_CODE(1, 7, 4), |
1015 | BC7_MODE_PRIO_CODE(2, 7, 15), |
1016 | BC7_MODE_PRIO_CODE(2, 7, 14), |
1017 | BC7_MODE_PRIO_CODE(1, 7, 5), |
1018 | BC7_MODE_PRIO_CODE(1, 7, 25), |
1019 | BC7_MODE_PRIO_CODE(1, 7, 17), |
1020 | BC7_MODE_PRIO_CODE(1, 7, 24), |
1021 | BC7_MODE_PRIO_CODE(1, 7, 26), |
1022 | BC7_MODE_PRIO_CODE(3, 5, 0), |
1023 | BC7_MODE_PRIO_CODE(2, 7, 2), |
1024 | BC7_MODE_PRIO_CODE(1, 5, 20), |
1025 | BC7_MODE_PRIO_CODE(2, 7, 1), |
1026 | BC7_MODE_PRIO_CODE(2, 7, 29), |
1027 | BC7_MODE_PRIO_CODE(2, 4, 10), |
1028 | BC7_MODE_PRIO_CODE(4, 7, 0), |
1029 | BC7_MODE_PRIO_CODE(2, 7, 6), |
1030 | BC7_MODE_PRIO_CODE(2, 7, 7), |
1031 | BC7_MODE_PRIO_CODE(3, 7, 14), |
1032 | BC7_MODE_PRIO_CODE(3, 7, 15), |
1033 | BC7_MODE_PRIO_CODE(4, 4, 31), |
1034 | BC7_MODE_PRIO_CODE(2, 7, 21), |
1035 | BC7_MODE_PRIO_CODE(2, 4, 30), |
1036 | BC7_MODE_PRIO_CODE(2, 4, 21), |
1037 | BC7_MODE_PRIO_CODE(3, 7, 29), |
1038 | BC7_MODE_PRIO_CODE(2, 7, 19), |
1039 | BC7_MODE_PRIO_CODE(2, 7, 10), |
1040 | BC7_MODE_PRIO_CODE(3, 7, 1), |
1041 | BC7_MODE_PRIO_CODE(4, 7, 29), |
1042 | BC7_MODE_PRIO_CODE(3, 7, 7), |
1043 | BC7_MODE_PRIO_CODE(1, 4, 20), |
1044 | BC7_MODE_PRIO_CODE(3, 7, 2), |
1045 | BC7_MODE_PRIO_CODE(2, 7, 16), |
1046 | BC7_MODE_PRIO_CODE(2, 7, 3), |
1047 | BC7_MODE_PRIO_CODE(2, 5, 30), |
1048 | BC7_MODE_PRIO_CODE(2, 7, 23), |
1049 | BC7_MODE_PRIO_CODE(3, 7, 6), |
1050 | BC7_MODE_PRIO_CODE(2, 7, 12), |
1051 | BC7_MODE_PRIO_CODE(1, 7, 61), |
1052 | BC7_MODE_PRIO_CODE(4, 4, 11), |
1053 | BC7_MODE_PRIO_CODE(3, 4, 10), |
1054 | BC7_MODE_PRIO_CODE(3, 7, 10), |
1055 | BC7_MODE_PRIO_CODE(2, 7, 8), |
1056 | BC7_MODE_PRIO_CODE(2, 7, 22), |
1057 | BC7_MODE_PRIO_CODE(2, 7, 26), |
1058 | BC7_MODE_PRIO_CODE(3, 4, 30), |
1059 | BC7_MODE_PRIO_CODE(2, 7, 9), |
1060 | BC7_MODE_PRIO_CODE(3, 7, 19), |
1061 | BC7_MODE_PRIO_CODE(2, 7, 25), |
1062 | BC7_MODE_PRIO_CODE(3, 4, 21), |
1063 | BC7_MODE_PRIO_CODE(2, 7, 24), |
1064 | BC7_MODE_PRIO_CODE(1, 7, 60), |
1065 | BC7_MODE_PRIO_CODE(2, 7, 11), |
1066 | BC7_MODE_PRIO_CODE(2, 7, 18), |
1067 | BC7_MODE_PRIO_CODE(2, 7, 17), |
1068 | BC7_MODE_PRIO_CODE(2, 7, 4), |
1069 | BC7_MODE_PRIO_CODE(2, 7, 5), |
1070 | BC7_MODE_PRIO_CODE(3, 7, 3), |
1071 | BC7_MODE_PRIO_CODE(3, 7, 16), |
1072 | BC7_MODE_PRIO_CODE(3, 7, 26), |
1073 | BC7_MODE_PRIO_CODE(3, 7, 21), |
1074 | BC7_MODE_PRIO_CODE(1, 7, 62), |
1075 | BC7_MODE_PRIO_CODE(2, 7, 20), |
1076 | BC7_MODE_PRIO_CODE(3, 7, 23), |
1077 | BC7_MODE_PRIO_CODE(1, 7, 33), |
1078 | BC7_MODE_PRIO_CODE(2, 7, 33), |
1079 | BC7_MODE_PRIO_CODE(3, 7, 33), |
1080 | BC7_MODE_PRIO_CODE(4, 7, 33), |
1081 | BC7_MODE_PRIO_CODE(3, 7, 11), |
1082 | BC7_MODE_PRIO_CODE(3, 7, 12), |
1083 | BC7_MODE_PRIO_CODE(4, 7, 26), |
1084 | BC7_MODE_PRIO_CODE(3, 7, 25), |
1085 | BC7_MODE_PRIO_CODE(1, 7, 63), |
1086 | BC7_MODE_PRIO_CODE(2, 5, 10), |
1087 | BC7_MODE_PRIO_CODE(3, 7, 8), |
1088 | BC7_MODE_PRIO_CODE(4, 5, 0), |
1089 | BC7_MODE_PRIO_CODE(3, 7, 24), |
1090 | BC7_MODE_PRIO_CODE(3, 7, 22), |
1091 | BC7_MODE_PRIO_CODE(3, 7, 9), |
1092 | BC7_MODE_PRIO_CODE(1, 7, 32), |
1093 | BC7_MODE_PRIO_CODE(2, 7, 61), |
1094 | BC7_MODE_PRIO_CODE(3, 7, 4), |
1095 | BC7_MODE_PRIO_CODE(3, 5, 30), |
1096 | BC7_MODE_PRIO_CODE(3, 7, 20), |
1097 | BC7_MODE_PRIO_CODE(1, 7, 35), |
1098 | BC7_MODE_PRIO_CODE(4, 7, 14), |
1099 | BC7_MODE_PRIO_CODE(3, 7, 5), |
1100 | BC7_MODE_PRIO_CODE(3, 7, 18), |
1101 | BC7_MODE_PRIO_CODE(1, 7, 30), |
1102 | BC7_MODE_PRIO_CODE(1, 7, 43), |
1103 | BC7_MODE_PRIO_CODE(4, 4, 21), |
1104 | BC7_MODE_PRIO_CODE(4, 7, 15), |
1105 | BC7_MODE_PRIO_CODE(3, 7, 17), |
1106 | BC7_MODE_PRIO_CODE(2, 7, 32), |
1107 | BC7_MODE_PRIO_CODE(3, 7, 32), |
1108 | BC7_MODE_PRIO_CODE(2, 5, 20), |
1109 | BC7_MODE_PRIO_CODE(4, 7, 1), |
1110 | BC7_MODE_PRIO_CODE(4, 7, 2), |
1111 | BC7_MODE_PRIO_CODE(1, 7, 28), |
1112 | BC7_MODE_PRIO_CODE(1, 7, 54), |
1113 | BC7_MODE_PRIO_CODE(4, 7, 32), |
1114 | BC7_MODE_PRIO_CODE(1, 7, 27), |
1115 | BC7_MODE_PRIO_CODE(4, 4, 10), |
1116 | BC7_MODE_PRIO_CODE(3, 5, 10), |
1117 | BC7_MODE_PRIO_CODE(2, 7, 60), |
1118 | BC7_MODE_PRIO_CODE(2, 4, 20), |
1119 | BC7_MODE_PRIO_CODE(2, 7, 63), |
1120 | BC7_MODE_PRIO_CODE(4, 4, 30), |
1121 | BC7_MODE_PRIO_CODE(2, 7, 62), |
1122 | BC7_MODE_PRIO_CODE(1, 7, 41), |
1123 | BC7_MODE_PRIO_CODE(1, 7, 58), |
1124 | BC7_MODE_PRIO_CODE(3, 7, 60), |
1125 | BC7_MODE_PRIO_CODE(1, 7, 40), |
1126 | BC7_MODE_PRIO_CODE(1, 7, 55), |
1127 | BC7_MODE_PRIO_CODE(2, 7, 35), |
1128 | BC7_MODE_PRIO_CODE(4, 7, 8), |
1129 | BC7_MODE_PRIO_CODE(4, 7, 6), |
1130 | BC7_MODE_PRIO_CODE(1, 7, 53), |
1131 | BC7_MODE_PRIO_CODE(4, 7, 9), |
1132 | BC7_MODE_PRIO_CODE(3, 7, 61), |
1133 | BC7_MODE_PRIO_CODE(3, 4, 20), |
1134 | BC7_MODE_PRIO_CODE(4, 7, 22), |
1135 | BC7_MODE_PRIO_CODE(4, 7, 20), |
1136 | BC7_MODE_PRIO_CODE(3, 7, 62), |
1137 | BC7_MODE_PRIO_CODE(4, 7, 7), |
1138 | BC7_MODE_PRIO_CODE(1, 7, 42), |
1139 | BC7_MODE_PRIO_CODE(1, 7, 52), |
1140 | BC7_MODE_PRIO_CODE(4, 5, 30), |
1141 | BC7_MODE_PRIO_CODE(1, 7, 56), |
1142 | BC7_MODE_PRIO_CODE(1, 7, 31), |
1143 | BC7_MODE_PRIO_CODE(3, 5, 20), |
1144 | BC7_MODE_PRIO_CODE(1, 7, 48), |
1145 | BC7_MODE_PRIO_CODE(2, 7, 28), |
1146 | BC7_MODE_PRIO_CODE(3, 7, 28), |
1147 | BC7_MODE_PRIO_CODE(4, 7, 19), |
1148 | BC7_MODE_PRIO_CODE(3, 7, 35), |
1149 | BC7_MODE_PRIO_CODE(1, 7, 59), |
1150 | BC7_MODE_PRIO_CODE(2, 7, 30), |
1151 | BC7_MODE_PRIO_CODE(3, 7, 63), |
1152 | BC7_MODE_PRIO_CODE(4, 7, 21), |
1153 | BC7_MODE_PRIO_CODE(4, 7, 10), |
1154 | BC7_MODE_PRIO_CODE(4, 7, 3), |
1155 | BC7_MODE_PRIO_CODE(1, 7, 47), |
1156 | BC7_MODE_PRIO_CODE(1, 7, 37), |
1157 | BC7_MODE_PRIO_CODE(4, 5, 10), |
1158 | BC7_MODE_PRIO_CODE(4, 7, 23), |
1159 | BC7_MODE_PRIO_CODE(1, 7, 57), |
1160 | BC7_MODE_PRIO_CODE(4, 7, 17), |
1161 | BC7_MODE_PRIO_CODE(1, 7, 45), |
1162 | BC7_MODE_PRIO_CODE(4, 7, 24), |
1163 | BC7_MODE_PRIO_CODE(4, 7, 60), |
1164 | BC7_MODE_PRIO_CODE(1, 7, 50), |
1165 | BC7_MODE_PRIO_CODE(2, 7, 41), |
1166 | BC7_MODE_PRIO_CODE(4, 7, 25), |
1167 | BC7_MODE_PRIO_CODE(3, 7, 30), |
1168 | BC7_MODE_PRIO_CODE(2, 7, 59), |
1169 | BC7_MODE_PRIO_CODE(2, 7, 55), |
1170 | BC7_MODE_PRIO_CODE(4, 7, 18), |
1171 | BC7_MODE_PRIO_CODE(4, 7, 12), |
1172 | BC7_MODE_PRIO_CODE(4, 7, 5), |
1173 | BC7_MODE_PRIO_CODE(3, 7, 59), |
1174 | BC7_MODE_PRIO_CODE(1, 7, 51), |
1175 | BC7_MODE_PRIO_CODE(4, 7, 16), |
1176 | BC7_MODE_PRIO_CODE(4, 7, 11), |
1177 | BC7_MODE_PRIO_CODE(2, 7, 58), |
1178 | BC7_MODE_PRIO_CODE(3, 7, 41), |
1179 | BC7_MODE_PRIO_CODE(4, 4, 20), |
1180 | BC7_MODE_PRIO_CODE(4, 7, 4), |
1181 | BC7_MODE_PRIO_CODE(1, 7, 49), |
1182 | BC7_MODE_PRIO_CODE(2, 7, 27), |
1183 | BC7_MODE_PRIO_CODE(3, 7, 27), |
1184 | BC7_MODE_PRIO_CODE(4, 7, 62), |
1185 | BC7_MODE_PRIO_CODE(3, 7, 58), |
1186 | BC7_MODE_PRIO_CODE(4, 5, 20), |
1187 | BC7_MODE_PRIO_CODE(2, 7, 53), |
1188 | BC7_MODE_PRIO_CODE(3, 7, 53), |
1189 | BC7_MODE_PRIO_CODE(2, 7, 40), |
1190 | BC7_MODE_PRIO_CODE(3, 7, 40), |
1191 | BC7_MODE_PRIO_CODE(2, 7, 31), |
1192 | BC7_MODE_PRIO_CODE(3, 7, 31), |
1193 | BC7_MODE_PRIO_CODE(4, 7, 61), |
1194 | BC7_MODE_PRIO_CODE(1, 7, 36), |
1195 | BC7_MODE_PRIO_CODE(4, 7, 63), |
1196 | BC7_MODE_PRIO_CODE(1, 7, 46), |
1197 | BC7_MODE_PRIO_CODE(3, 7, 55), |
1198 | BC7_MODE_PRIO_CODE(2, 7, 52), |
1199 | BC7_MODE_PRIO_CODE(2, 7, 56), |
1200 | BC7_MODE_PRIO_CODE(2, 7, 42), |
1201 | BC7_MODE_PRIO_CODE(2, 7, 37), |
1202 | BC7_MODE_PRIO_CODE(2, 7, 57), |
1203 | BC7_MODE_PRIO_CODE(3, 7, 57), |
1204 | BC7_MODE_PRIO_CODE(2, 7, 45), |
1205 | BC7_MODE_PRIO_CODE(4, 7, 57), |
1206 | BC7_MODE_PRIO_CODE(2, 7, 49), |
1207 | BC7_MODE_PRIO_CODE(3, 7, 42), |
1208 | BC7_MODE_PRIO_CODE(2, 7, 43), |
1209 | BC7_MODE_PRIO_CODE(3, 7, 43), |
1210 | BC7_MODE_PRIO_CODE(4, 7, 28), |
1211 | BC7_MODE_PRIO_CODE(2, 7, 48), |
1212 | BC7_MODE_PRIO_CODE(3, 7, 52), |
1213 | BC7_MODE_PRIO_CODE(3, 7, 49), |
1214 | BC7_MODE_PRIO_CODE(4, 7, 59), |
1215 | BC7_MODE_PRIO_CODE(4, 7, 40), |
1216 | BC7_MODE_PRIO_CODE(4, 7, 27), |
1217 | BC7_MODE_PRIO_CODE(3, 7, 45), |
1218 | BC7_MODE_PRIO_CODE(4, 7, 55), |
1219 | BC7_MODE_PRIO_CODE(3, 7, 56), |
1220 | BC7_MODE_PRIO_CODE(4, 7, 42), |
1221 | BC7_MODE_PRIO_CODE(2, 7, 54), |
1222 | BC7_MODE_PRIO_CODE(3, 7, 54), |
1223 | BC7_MODE_PRIO_CODE(4, 7, 54), |
1224 | BC7_MODE_PRIO_CODE(2, 7, 47), |
1225 | BC7_MODE_PRIO_CODE(3, 7, 47), |
1226 | BC7_MODE_PRIO_CODE(4, 7, 43), |
1227 | BC7_MODE_PRIO_CODE(4, 7, 31), |
1228 | BC7_MODE_PRIO_CODE(3, 7, 37), |
1229 | BC7_MODE_PRIO_CODE(3, 7, 48), |
1230 | BC7_MODE_PRIO_CODE(4, 7, 48), |
1231 | BC7_MODE_PRIO_CODE(4, 7, 45), |
1232 | BC7_MODE_PRIO_CODE(4, 7, 47), |
1233 | BC7_MODE_PRIO_CODE(2, 7, 36), |
1234 | BC7_MODE_PRIO_CODE(1, 7, 44), |
1235 | BC7_MODE_PRIO_CODE(4, 7, 35), |
1236 | BC7_MODE_PRIO_CODE(4, 7, 58), |
1237 | BC7_MODE_PRIO_CODE(3, 7, 36), |
1238 | BC7_MODE_PRIO_CODE(2, 7, 50), |
1239 | BC7_MODE_PRIO_CODE(3, 7, 50), |
1240 | BC7_MODE_PRIO_CODE(4, 7, 50), |
1241 | BC7_MODE_PRIO_CODE(4, 7, 52), |
1242 | BC7_MODE_PRIO_CODE(1, 7, 39), |
1243 | BC7_MODE_PRIO_CODE(1, 7, 34), |
1244 | BC7_MODE_PRIO_CODE(1, 7, 38), |
1245 | BC7_MODE_PRIO_CODE(2, 7, 38), |
1246 | BC7_MODE_PRIO_CODE(3, 7, 38), |
1247 | BC7_MODE_PRIO_CODE(4, 7, 30), |
1248 | BC7_MODE_PRIO_CODE(2, 7, 51), |
1249 | BC7_MODE_PRIO_CODE(4, 7, 41), |
1250 | BC7_MODE_PRIO_CODE(4, 7, 53), |
1251 | BC7_MODE_PRIO_CODE(2, 7, 46), |
1252 | BC7_MODE_PRIO_CODE(3, 7, 46), |
1253 | BC7_MODE_PRIO_CODE(4, 7, 49), |
1254 | BC7_MODE_PRIO_CODE(4, 7, 56), |
1255 | BC7_MODE_PRIO_CODE(4, 7, 37), |
1256 | BC7_MODE_PRIO_CODE(2, 7, 44), |
1257 | BC7_MODE_PRIO_CODE(3, 7, 44), |
1258 | BC7_MODE_PRIO_CODE(4, 7, 36), |
1259 | BC7_MODE_PRIO_CODE(2, 7, 39), |
1260 | BC7_MODE_PRIO_CODE(2, 7, 34), |
1261 | BC7_MODE_PRIO_CODE(4, 7, 38), |
1262 | BC7_MODE_PRIO_CODE(3, 7, 51), |
1263 | BC7_MODE_PRIO_CODE(4, 7, 51), |
1264 | BC7_MODE_PRIO_CODE(4, 7, 46), |
1265 | BC7_MODE_PRIO_CODE(4, 7, 44), |
1266 | BC7_MODE_PRIO_CODE(3, 7, 39), |
1267 | BC7_MODE_PRIO_CODE(3, 7, 34), |
1268 | BC7_MODE_PRIO_CODE(4, 7, 39), |
1269 | BC7_MODE_PRIO_CODE(4, 7, 34), |
1270 | }; |
1271 | |
1272 | const uint16_t *g_bc7PrioCodesRGBA = g_bc7PrioCodesRGBAData; |
1273 | const int g_bc7NumPrioCodesRGBA = sizeof(g_bc7PrioCodesRGBAData) / sizeof(g_bc7PrioCodesRGBA[0]); |
1274 | |
1275 | int UnpackMode(uint16_t packed) |
1276 | { |
1277 | return static_cast<int>((packed >> BC7_MODE_OFFSET_BITS) & ((1 << BC7_MODE_BITS) - 1)); |
1278 | } |
1279 | |
1280 | int UnpackSeedPointCount(uint16_t packed) |
1281 | { |
1282 | return static_cast<int>((packed >> BC7_SEED_POINT_COUNT_OFFSET_BITS) & ((1 << BC7_SEED_POINT_COUNT_BITS) - 1)) + 1; |
1283 | } |
1284 | |
1285 | int UnpackPartition(uint16_t packed) |
1286 | { |
1287 | return static_cast<int>((packed >> BC7_PARTITION_OFFSET_BITS) & ((1 << BC7_PARTITION_BITS) - 1)); |
1288 | } |
1289 | |
1290 | int UnpackRotation(uint16_t packed) |
1291 | { |
1292 | return static_cast<int>((packed >> BC7_ROTATION_OFFSET_BITS) & ((1 << BC7_ROTATION_BITS) - 1)); |
1293 | } |
1294 | |
1295 | int UnpackIndexSelector(uint16_t packed) |
1296 | { |
1297 | return static_cast<int>((packed >> BC7_INDEX_MODE_OFFSET_BITS) & ((1 << BC7_INDEX_MODE_BITS) - 1)); |
1298 | } |
1299 | }}} |
1300 | |
1301 | #endif |
1302 | |