1 /*
2 * Copyright (C) 2003 Maxim Stepin ( maxst@hiend3d.com )
3 *
4 * Copyright (C) 2010 Cameron Zemek ( grom@zeminvaders.net)
5 *
6 * This program 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 * This program 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 this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #include "../stdafx.h"
22 #include <stdint.h>
23 #include "common.h"
24 #include "hqx.h"
25
26 #define PIXEL00_0 *dp = w[5];
27 #define PIXEL00_11 *dp = Interp1(w[5], w[4]);
28 #define PIXEL00_12 *dp = Interp1(w[5], w[2]);
29 #define PIXEL00_20 *dp = Interp2(w[5], w[2], w[4]);
30 #define PIXEL00_50 *dp = Interp5(w[2], w[4]);
31 #define PIXEL00_80 *dp = Interp8(w[5], w[1]);
32 #define PIXEL00_81 *dp = Interp8(w[5], w[4]);
33 #define PIXEL00_82 *dp = Interp8(w[5], w[2]);
34 #define PIXEL01_0 *(dp+1) = w[5];
35 #define PIXEL01_10 *(dp+1) = Interp1(w[5], w[1]);
36 #define PIXEL01_12 *(dp+1) = Interp1(w[5], w[2]);
37 #define PIXEL01_14 *(dp+1) = Interp1(w[2], w[5]);
38 #define PIXEL01_21 *(dp+1) = Interp2(w[2], w[5], w[4]);
39 #define PIXEL01_31 *(dp+1) = Interp3(w[5], w[4]);
40 #define PIXEL01_50 *(dp+1) = Interp5(w[2], w[5]);
41 #define PIXEL01_60 *(dp+1) = Interp6(w[5], w[2], w[4]);
42 #define PIXEL01_61 *(dp+1) = Interp6(w[5], w[2], w[1]);
43 #define PIXEL01_82 *(dp+1) = Interp8(w[5], w[2]);
44 #define PIXEL01_83 *(dp+1) = Interp8(w[2], w[4]);
45 #define PIXEL02_0 *(dp+2) = w[5];
46 #define PIXEL02_10 *(dp+2) = Interp1(w[5], w[3]);
47 #define PIXEL02_11 *(dp+2) = Interp1(w[5], w[2]);
48 #define PIXEL02_13 *(dp+2) = Interp1(w[2], w[5]);
49 #define PIXEL02_21 *(dp+2) = Interp2(w[2], w[5], w[6]);
50 #define PIXEL02_32 *(dp+2) = Interp3(w[5], w[6]);
51 #define PIXEL02_50 *(dp+2) = Interp5(w[2], w[5]);
52 #define PIXEL02_60 *(dp+2) = Interp6(w[5], w[2], w[6]);
53 #define PIXEL02_61 *(dp+2) = Interp6(w[5], w[2], w[3]);
54 #define PIXEL02_81 *(dp+2) = Interp8(w[5], w[2]);
55 #define PIXEL02_83 *(dp+2) = Interp8(w[2], w[6]);
56 #define PIXEL03_0 *(dp+3) = w[5];
57 #define PIXEL03_11 *(dp+3) = Interp1(w[5], w[2]);
58 #define PIXEL03_12 *(dp+3) = Interp1(w[5], w[6]);
59 #define PIXEL03_20 *(dp+3) = Interp2(w[5], w[2], w[6]);
60 #define PIXEL03_50 *(dp+3) = Interp5(w[2], w[6]);
61 #define PIXEL03_80 *(dp+3) = Interp8(w[5], w[3]);
62 #define PIXEL03_81 *(dp+3) = Interp8(w[5], w[2]);
63 #define PIXEL03_82 *(dp+3) = Interp8(w[5], w[6]);
64 #define PIXEL10_0 *(dp+dpL) = w[5];
65 #define PIXEL10_10 *(dp+dpL) = Interp1(w[5], w[1]);
66 #define PIXEL10_11 *(dp+dpL) = Interp1(w[5], w[4]);
67 #define PIXEL10_13 *(dp+dpL) = Interp1(w[4], w[5]);
68 #define PIXEL10_21 *(dp+dpL) = Interp2(w[4], w[5], w[2]);
69 #define PIXEL10_32 *(dp+dpL) = Interp3(w[5], w[2]);
70 #define PIXEL10_50 *(dp+dpL) = Interp5(w[4], w[5]);
71 #define PIXEL10_60 *(dp+dpL) = Interp6(w[5], w[4], w[2]);
72 #define PIXEL10_61 *(dp+dpL) = Interp6(w[5], w[4], w[1]);
73 #define PIXEL10_81 *(dp+dpL) = Interp8(w[5], w[4]);
74 #define PIXEL10_83 *(dp+dpL) = Interp8(w[4], w[2]);
75 #define PIXEL11_0 *(dp+dpL+1) = w[5];
76 #define PIXEL11_30 *(dp+dpL+1) = Interp3(w[5], w[1]);
77 #define PIXEL11_31 *(dp+dpL+1) = Interp3(w[5], w[4]);
78 #define PIXEL11_32 *(dp+dpL+1) = Interp3(w[5], w[2]);
79 #define PIXEL11_70 *(dp+dpL+1) = Interp7(w[5], w[4], w[2]);
80 #define PIXEL12_0 *(dp+dpL+2) = w[5];
81 #define PIXEL12_30 *(dp+dpL+2) = Interp3(w[5], w[3]);
82 #define PIXEL12_31 *(dp+dpL+2) = Interp3(w[5], w[2]);
83 #define PIXEL12_32 *(dp+dpL+2) = Interp3(w[5], w[6]);
84 #define PIXEL12_70 *(dp+dpL+2) = Interp7(w[5], w[6], w[2]);
85 #define PIXEL13_0 *(dp+dpL+3) = w[5];
86 #define PIXEL13_10 *(dp+dpL+3) = Interp1(w[5], w[3]);
87 #define PIXEL13_12 *(dp+dpL+3) = Interp1(w[5], w[6]);
88 #define PIXEL13_14 *(dp+dpL+3) = Interp1(w[6], w[5]);
89 #define PIXEL13_21 *(dp+dpL+3) = Interp2(w[6], w[5], w[2]);
90 #define PIXEL13_31 *(dp+dpL+3) = Interp3(w[5], w[2]);
91 #define PIXEL13_50 *(dp+dpL+3) = Interp5(w[6], w[5]);
92 #define PIXEL13_60 *(dp+dpL+3) = Interp6(w[5], w[6], w[2]);
93 #define PIXEL13_61 *(dp+dpL+3) = Interp6(w[5], w[6], w[3]);
94 #define PIXEL13_82 *(dp+dpL+3) = Interp8(w[5], w[6]);
95 #define PIXEL13_83 *(dp+dpL+3) = Interp8(w[6], w[2]);
96 #define PIXEL20_0 *(dp+dpL+dpL) = w[5];
97 #define PIXEL20_10 *(dp+dpL+dpL) = Interp1(w[5], w[7]);
98 #define PIXEL20_12 *(dp+dpL+dpL) = Interp1(w[5], w[4]);
99 #define PIXEL20_14 *(dp+dpL+dpL) = Interp1(w[4], w[5]);
100 #define PIXEL20_21 *(dp+dpL+dpL) = Interp2(w[4], w[5], w[8]);
101 #define PIXEL20_31 *(dp+dpL+dpL) = Interp3(w[5], w[8]);
102 #define PIXEL20_50 *(dp+dpL+dpL) = Interp5(w[4], w[5]);
103 #define PIXEL20_60 *(dp+dpL+dpL) = Interp6(w[5], w[4], w[8]);
104 #define PIXEL20_61 *(dp+dpL+dpL) = Interp6(w[5], w[4], w[7]);
105 #define PIXEL20_82 *(dp+dpL+dpL) = Interp8(w[5], w[4]);
106 #define PIXEL20_83 *(dp+dpL+dpL) = Interp8(w[4], w[8]);
107 #define PIXEL21_0 *(dp+dpL+dpL+1) = w[5];
108 #define PIXEL21_30 *(dp+dpL+dpL+1) = Interp3(w[5], w[7]);
109 #define PIXEL21_31 *(dp+dpL+dpL+1) = Interp3(w[5], w[8]);
110 #define PIXEL21_32 *(dp+dpL+dpL+1) = Interp3(w[5], w[4]);
111 #define PIXEL21_70 *(dp+dpL+dpL+1) = Interp7(w[5], w[4], w[8]);
112 #define PIXEL22_0 *(dp+dpL+dpL+2) = w[5];
113 #define PIXEL22_30 *(dp+dpL+dpL+2) = Interp3(w[5], w[9]);
114 #define PIXEL22_31 *(dp+dpL+dpL+2) = Interp3(w[5], w[6]);
115 #define PIXEL22_32 *(dp+dpL+dpL+2) = Interp3(w[5], w[8]);
116 #define PIXEL22_70 *(dp+dpL+dpL+2) = Interp7(w[5], w[6], w[8]);
117 #define PIXEL23_0 *(dp+dpL+dpL+3) = w[5];
118 #define PIXEL23_10 *(dp+dpL+dpL+3) = Interp1(w[5], w[9]);
119 #define PIXEL23_11 *(dp+dpL+dpL+3) = Interp1(w[5], w[6]);
120 #define PIXEL23_13 *(dp+dpL+dpL+3) = Interp1(w[6], w[5]);
121 #define PIXEL23_21 *(dp+dpL+dpL+3) = Interp2(w[6], w[5], w[8]);
122 #define PIXEL23_32 *(dp+dpL+dpL+3) = Interp3(w[5], w[8]);
123 #define PIXEL23_50 *(dp+dpL+dpL+3) = Interp5(w[6], w[5]);
124 #define PIXEL23_60 *(dp+dpL+dpL+3) = Interp6(w[5], w[6], w[8]);
125 #define PIXEL23_61 *(dp+dpL+dpL+3) = Interp6(w[5], w[6], w[9]);
126 #define PIXEL23_81 *(dp+dpL+dpL+3) = Interp8(w[5], w[6]);
127 #define PIXEL23_83 *(dp+dpL+dpL+3) = Interp8(w[6], w[8]);
128 #define PIXEL30_0 *(dp+dpL+dpL+dpL) = w[5];
129 #define PIXEL30_11 *(dp+dpL+dpL+dpL) = Interp1(w[5], w[8]);
130 #define PIXEL30_12 *(dp+dpL+dpL+dpL) = Interp1(w[5], w[4]);
131 #define PIXEL30_20 *(dp+dpL+dpL+dpL) = Interp2(w[5], w[8], w[4]);
132 #define PIXEL30_50 *(dp+dpL+dpL+dpL) = Interp5(w[8], w[4]);
133 #define PIXEL30_80 *(dp+dpL+dpL+dpL) = Interp8(w[5], w[7]);
134 #define PIXEL30_81 *(dp+dpL+dpL+dpL) = Interp8(w[5], w[8]);
135 #define PIXEL30_82 *(dp+dpL+dpL+dpL) = Interp8(w[5], w[4]);
136 #define PIXEL31_0 *(dp+dpL+dpL+dpL+1) = w[5];
137 #define PIXEL31_10 *(dp+dpL+dpL+dpL+1) = Interp1(w[5], w[7]);
138 #define PIXEL31_11 *(dp+dpL+dpL+dpL+1) = Interp1(w[5], w[8]);
139 #define PIXEL31_13 *(dp+dpL+dpL+dpL+1) = Interp1(w[8], w[5]);
140 #define PIXEL31_21 *(dp+dpL+dpL+dpL+1) = Interp2(w[8], w[5], w[4]);
141 #define PIXEL31_32 *(dp+dpL+dpL+dpL+1) = Interp3(w[5], w[4]);
142 #define PIXEL31_50 *(dp+dpL+dpL+dpL+1) = Interp5(w[8], w[5]);
143 #define PIXEL31_60 *(dp+dpL+dpL+dpL+1) = Interp6(w[5], w[8], w[4]);
144 #define PIXEL31_61 *(dp+dpL+dpL+dpL+1) = Interp6(w[5], w[8], w[7]);
145 #define PIXEL31_81 *(dp+dpL+dpL+dpL+1) = Interp8(w[5], w[8]);
146 #define PIXEL31_83 *(dp+dpL+dpL+dpL+1) = Interp8(w[8], w[4]);
147 #define PIXEL32_0 *(dp+dpL+dpL+dpL+2) = w[5];
148 #define PIXEL32_10 *(dp+dpL+dpL+dpL+2) = Interp1(w[5], w[9]);
149 #define PIXEL32_12 *(dp+dpL+dpL+dpL+2) = Interp1(w[5], w[8]);
150 #define PIXEL32_14 *(dp+dpL+dpL+dpL+2) = Interp1(w[8], w[5]);
151 #define PIXEL32_21 *(dp+dpL+dpL+dpL+2) = Interp2(w[8], w[5], w[6]);
152 #define PIXEL32_31 *(dp+dpL+dpL+dpL+2) = Interp3(w[5], w[6]);
153 #define PIXEL32_50 *(dp+dpL+dpL+dpL+2) = Interp5(w[8], w[5]);
154 #define PIXEL32_60 *(dp+dpL+dpL+dpL+2) = Interp6(w[5], w[8], w[6]);
155 #define PIXEL32_61 *(dp+dpL+dpL+dpL+2) = Interp6(w[5], w[8], w[9]);
156 #define PIXEL32_82 *(dp+dpL+dpL+dpL+2) = Interp8(w[5], w[8]);
157 #define PIXEL32_83 *(dp+dpL+dpL+dpL+2) = Interp8(w[8], w[6]);
158 #define PIXEL33_0 *(dp+dpL+dpL+dpL+3) = w[5];
159 #define PIXEL33_11 *(dp+dpL+dpL+dpL+3) = Interp1(w[5], w[6]);
160 #define PIXEL33_12 *(dp+dpL+dpL+dpL+3) = Interp1(w[5], w[8]);
161 #define PIXEL33_20 *(dp+dpL+dpL+dpL+3) = Interp2(w[5], w[8], w[6]);
162 #define PIXEL33_50 *(dp+dpL+dpL+dpL+3) = Interp5(w[8], w[6]);
163 #define PIXEL33_80 *(dp+dpL+dpL+dpL+3) = Interp8(w[5], w[9]);
164 #define PIXEL33_81 *(dp+dpL+dpL+dpL+3) = Interp8(w[5], w[6]);
165 #define PIXEL33_82 *(dp+dpL+dpL+dpL+3) = Interp8(w[5], w[8]);
166
hq4x_32_rb(uint32_t * sp,uint32_t srb,uint32_t * dp,uint32_t drb,int Xres,int Yres)167 void HQX_CALLCONV hq4x_32_rb( uint32_t * sp, uint32_t srb, uint32_t * dp, uint32_t drb, int Xres, int Yres )
168 {
169 int i, j, k;
170 int prevline, nextline;
171 uint32_t w[10];
172 int dpL = (drb >> 2);
173 int spL = (srb >> 2);
174 uint8_t *sRowP = (uint8_t *) sp;
175 uint8_t *dRowP = (uint8_t *) dp;
176 uint32_t yuv1, yuv2;
177
178 // +----+----+----+
179 // | | | |
180 // | w1 | w2 | w3 |
181 // +----+----+----+
182 // | | | |
183 // | w4 | w5 | w6 |
184 // +----+----+----+
185 // | | | |
186 // | w7 | w8 | w9 |
187 // +----+----+----+
188
189 for (j=0; j<Yres; j++)
190 {
191 if (j>0) prevline = -spL; else prevline = 0;
192 if (j<Yres-1) nextline = spL; else nextline = 0;
193
194 for (i=0; i<Xres; i++)
195 {
196 w[2] = *(sp + prevline);
197 w[5] = *sp;
198 w[8] = *(sp + nextline);
199
200 if (i>0)
201 {
202 w[1] = *(sp + prevline - 1);
203 w[4] = *(sp - 1);
204 w[7] = *(sp + nextline - 1);
205 }
206 else
207 {
208 w[1] = w[2];
209 w[4] = w[5];
210 w[7] = w[8];
211 }
212
213 if (i<Xres-1)
214 {
215 w[3] = *(sp + prevline + 1);
216 w[6] = *(sp + 1);
217 w[9] = *(sp + nextline + 1);
218 }
219 else
220 {
221 w[3] = w[2];
222 w[6] = w[5];
223 w[9] = w[8];
224 }
225
226 int pattern = 0;
227 int flag = 1;
228
229 yuv1 = rgb_to_yuv(w[5]);
230
231 for (k=1; k<=9; k++)
232 {
233 if (k==5) continue;
234
235 if ( w[k] != w[5] )
236 {
237 yuv2 = rgb_to_yuv(w[k]);
238 if (yuv_diff(yuv1, yuv2))
239 pattern |= flag;
240 }
241 flag <<= 1;
242 }
243
244 switch (pattern)
245 {
246 case 0:
247 case 1:
248 case 4:
249 case 32:
250 case 128:
251 case 5:
252 case 132:
253 case 160:
254 case 33:
255 case 129:
256 case 36:
257 case 133:
258 case 164:
259 case 161:
260 case 37:
261 case 165:
262 {
263 PIXEL00_20
264 PIXEL01_60
265 PIXEL02_60
266 PIXEL03_20
267 PIXEL10_60
268 PIXEL11_70
269 PIXEL12_70
270 PIXEL13_60
271 PIXEL20_60
272 PIXEL21_70
273 PIXEL22_70
274 PIXEL23_60
275 PIXEL30_20
276 PIXEL31_60
277 PIXEL32_60
278 PIXEL33_20
279 break;
280 }
281 case 2:
282 case 34:
283 case 130:
284 case 162:
285 {
286 PIXEL00_80
287 PIXEL01_10
288 PIXEL02_10
289 PIXEL03_80
290 PIXEL10_61
291 PIXEL11_30
292 PIXEL12_30
293 PIXEL13_61
294 PIXEL20_60
295 PIXEL21_70
296 PIXEL22_70
297 PIXEL23_60
298 PIXEL30_20
299 PIXEL31_60
300 PIXEL32_60
301 PIXEL33_20
302 break;
303 }
304 case 16:
305 case 17:
306 case 48:
307 case 49:
308 {
309 PIXEL00_20
310 PIXEL01_60
311 PIXEL02_61
312 PIXEL03_80
313 PIXEL10_60
314 PIXEL11_70
315 PIXEL12_30
316 PIXEL13_10
317 PIXEL20_60
318 PIXEL21_70
319 PIXEL22_30
320 PIXEL23_10
321 PIXEL30_20
322 PIXEL31_60
323 PIXEL32_61
324 PIXEL33_80
325 break;
326 }
327 case 64:
328 case 65:
329 case 68:
330 case 69:
331 {
332 PIXEL00_20
333 PIXEL01_60
334 PIXEL02_60
335 PIXEL03_20
336 PIXEL10_60
337 PIXEL11_70
338 PIXEL12_70
339 PIXEL13_60
340 PIXEL20_61
341 PIXEL21_30
342 PIXEL22_30
343 PIXEL23_61
344 PIXEL30_80
345 PIXEL31_10
346 PIXEL32_10
347 PIXEL33_80
348 break;
349 }
350 case 8:
351 case 12:
352 case 136:
353 case 140:
354 {
355 PIXEL00_80
356 PIXEL01_61
357 PIXEL02_60
358 PIXEL03_20
359 PIXEL10_10
360 PIXEL11_30
361 PIXEL12_70
362 PIXEL13_60
363 PIXEL20_10
364 PIXEL21_30
365 PIXEL22_70
366 PIXEL23_60
367 PIXEL30_80
368 PIXEL31_61
369 PIXEL32_60
370 PIXEL33_20
371 break;
372 }
373 case 3:
374 case 35:
375 case 131:
376 case 163:
377 {
378 PIXEL00_81
379 PIXEL01_31
380 PIXEL02_10
381 PIXEL03_80
382 PIXEL10_81
383 PIXEL11_31
384 PIXEL12_30
385 PIXEL13_61
386 PIXEL20_60
387 PIXEL21_70
388 PIXEL22_70
389 PIXEL23_60
390 PIXEL30_20
391 PIXEL31_60
392 PIXEL32_60
393 PIXEL33_20
394 break;
395 }
396 case 6:
397 case 38:
398 case 134:
399 case 166:
400 {
401 PIXEL00_80
402 PIXEL01_10
403 PIXEL02_32
404 PIXEL03_82
405 PIXEL10_61
406 PIXEL11_30
407 PIXEL12_32
408 PIXEL13_82
409 PIXEL20_60
410 PIXEL21_70
411 PIXEL22_70
412 PIXEL23_60
413 PIXEL30_20
414 PIXEL31_60
415 PIXEL32_60
416 PIXEL33_20
417 break;
418 }
419 case 20:
420 case 21:
421 case 52:
422 case 53:
423 {
424 PIXEL00_20
425 PIXEL01_60
426 PIXEL02_81
427 PIXEL03_81
428 PIXEL10_60
429 PIXEL11_70
430 PIXEL12_31
431 PIXEL13_31
432 PIXEL20_60
433 PIXEL21_70
434 PIXEL22_30
435 PIXEL23_10
436 PIXEL30_20
437 PIXEL31_60
438 PIXEL32_61
439 PIXEL33_80
440 break;
441 }
442 case 144:
443 case 145:
444 case 176:
445 case 177:
446 {
447 PIXEL00_20
448 PIXEL01_60
449 PIXEL02_61
450 PIXEL03_80
451 PIXEL10_60
452 PIXEL11_70
453 PIXEL12_30
454 PIXEL13_10
455 PIXEL20_60
456 PIXEL21_70
457 PIXEL22_32
458 PIXEL23_32
459 PIXEL30_20
460 PIXEL31_60
461 PIXEL32_82
462 PIXEL33_82
463 break;
464 }
465 case 192:
466 case 193:
467 case 196:
468 case 197:
469 {
470 PIXEL00_20
471 PIXEL01_60
472 PIXEL02_60
473 PIXEL03_20
474 PIXEL10_60
475 PIXEL11_70
476 PIXEL12_70
477 PIXEL13_60
478 PIXEL20_61
479 PIXEL21_30
480 PIXEL22_31
481 PIXEL23_81
482 PIXEL30_80
483 PIXEL31_10
484 PIXEL32_31
485 PIXEL33_81
486 break;
487 }
488 case 96:
489 case 97:
490 case 100:
491 case 101:
492 {
493 PIXEL00_20
494 PIXEL01_60
495 PIXEL02_60
496 PIXEL03_20
497 PIXEL10_60
498 PIXEL11_70
499 PIXEL12_70
500 PIXEL13_60
501 PIXEL20_82
502 PIXEL21_32
503 PIXEL22_30
504 PIXEL23_61
505 PIXEL30_82
506 PIXEL31_32
507 PIXEL32_10
508 PIXEL33_80
509 break;
510 }
511 case 40:
512 case 44:
513 case 168:
514 case 172:
515 {
516 PIXEL00_80
517 PIXEL01_61
518 PIXEL02_60
519 PIXEL03_20
520 PIXEL10_10
521 PIXEL11_30
522 PIXEL12_70
523 PIXEL13_60
524 PIXEL20_31
525 PIXEL21_31
526 PIXEL22_70
527 PIXEL23_60
528 PIXEL30_81
529 PIXEL31_81
530 PIXEL32_60
531 PIXEL33_20
532 break;
533 }
534 case 9:
535 case 13:
536 case 137:
537 case 141:
538 {
539 PIXEL00_82
540 PIXEL01_82
541 PIXEL02_60
542 PIXEL03_20
543 PIXEL10_32
544 PIXEL11_32
545 PIXEL12_70
546 PIXEL13_60
547 PIXEL20_10
548 PIXEL21_30
549 PIXEL22_70
550 PIXEL23_60
551 PIXEL30_80
552 PIXEL31_61
553 PIXEL32_60
554 PIXEL33_20
555 break;
556 }
557 case 18:
558 case 50:
559 {
560 PIXEL00_80
561 PIXEL01_10
562 if (Diff(w[2], w[6]))
563 {
564 PIXEL02_10
565 PIXEL03_80
566 PIXEL12_30
567 PIXEL13_10
568 }
569 else
570 {
571 PIXEL02_50
572 PIXEL03_50
573 PIXEL12_0
574 PIXEL13_50
575 }
576 PIXEL10_61
577 PIXEL11_30
578 PIXEL20_60
579 PIXEL21_70
580 PIXEL22_30
581 PIXEL23_10
582 PIXEL30_20
583 PIXEL31_60
584 PIXEL32_61
585 PIXEL33_80
586 break;
587 }
588 case 80:
589 case 81:
590 {
591 PIXEL00_20
592 PIXEL01_60
593 PIXEL02_61
594 PIXEL03_80
595 PIXEL10_60
596 PIXEL11_70
597 PIXEL12_30
598 PIXEL13_10
599 PIXEL20_61
600 PIXEL21_30
601 if (Diff(w[6], w[8]))
602 {
603 PIXEL22_30
604 PIXEL23_10
605 PIXEL32_10
606 PIXEL33_80
607 }
608 else
609 {
610 PIXEL22_0
611 PIXEL23_50
612 PIXEL32_50
613 PIXEL33_50
614 }
615 PIXEL30_80
616 PIXEL31_10
617 break;
618 }
619 case 72:
620 case 76:
621 {
622 PIXEL00_80
623 PIXEL01_61
624 PIXEL02_60
625 PIXEL03_20
626 PIXEL10_10
627 PIXEL11_30
628 PIXEL12_70
629 PIXEL13_60
630 if (Diff(w[8], w[4]))
631 {
632 PIXEL20_10
633 PIXEL21_30
634 PIXEL30_80
635 PIXEL31_10
636 }
637 else
638 {
639 PIXEL20_50
640 PIXEL21_0
641 PIXEL30_50
642 PIXEL31_50
643 }
644 PIXEL22_30
645 PIXEL23_61
646 PIXEL32_10
647 PIXEL33_80
648 break;
649 }
650 case 10:
651 case 138:
652 {
653 if (Diff(w[4], w[2]))
654 {
655 PIXEL00_80
656 PIXEL01_10
657 PIXEL10_10
658 PIXEL11_30
659 }
660 else
661 {
662 PIXEL00_50
663 PIXEL01_50
664 PIXEL10_50
665 PIXEL11_0
666 }
667 PIXEL02_10
668 PIXEL03_80
669 PIXEL12_30
670 PIXEL13_61
671 PIXEL20_10
672 PIXEL21_30
673 PIXEL22_70
674 PIXEL23_60
675 PIXEL30_80
676 PIXEL31_61
677 PIXEL32_60
678 PIXEL33_20
679 break;
680 }
681 case 66:
682 {
683 PIXEL00_80
684 PIXEL01_10
685 PIXEL02_10
686 PIXEL03_80
687 PIXEL10_61
688 PIXEL11_30
689 PIXEL12_30
690 PIXEL13_61
691 PIXEL20_61
692 PIXEL21_30
693 PIXEL22_30
694 PIXEL23_61
695 PIXEL30_80
696 PIXEL31_10
697 PIXEL32_10
698 PIXEL33_80
699 break;
700 }
701 case 24:
702 {
703 PIXEL00_80
704 PIXEL01_61
705 PIXEL02_61
706 PIXEL03_80
707 PIXEL10_10
708 PIXEL11_30
709 PIXEL12_30
710 PIXEL13_10
711 PIXEL20_10
712 PIXEL21_30
713 PIXEL22_30
714 PIXEL23_10
715 PIXEL30_80
716 PIXEL31_61
717 PIXEL32_61
718 PIXEL33_80
719 break;
720 }
721 case 7:
722 case 39:
723 case 135:
724 {
725 PIXEL00_81
726 PIXEL01_31
727 PIXEL02_32
728 PIXEL03_82
729 PIXEL10_81
730 PIXEL11_31
731 PIXEL12_32
732 PIXEL13_82
733 PIXEL20_60
734 PIXEL21_70
735 PIXEL22_70
736 PIXEL23_60
737 PIXEL30_20
738 PIXEL31_60
739 PIXEL32_60
740 PIXEL33_20
741 break;
742 }
743 case 148:
744 case 149:
745 case 180:
746 {
747 PIXEL00_20
748 PIXEL01_60
749 PIXEL02_81
750 PIXEL03_81
751 PIXEL10_60
752 PIXEL11_70
753 PIXEL12_31
754 PIXEL13_31
755 PIXEL20_60
756 PIXEL21_70
757 PIXEL22_32
758 PIXEL23_32
759 PIXEL30_20
760 PIXEL31_60
761 PIXEL32_82
762 PIXEL33_82
763 break;
764 }
765 case 224:
766 case 228:
767 case 225:
768 {
769 PIXEL00_20
770 PIXEL01_60
771 PIXEL02_60
772 PIXEL03_20
773 PIXEL10_60
774 PIXEL11_70
775 PIXEL12_70
776 PIXEL13_60
777 PIXEL20_82
778 PIXEL21_32
779 PIXEL22_31
780 PIXEL23_81
781 PIXEL30_82
782 PIXEL31_32
783 PIXEL32_31
784 PIXEL33_81
785 break;
786 }
787 case 41:
788 case 169:
789 case 45:
790 {
791 PIXEL00_82
792 PIXEL01_82
793 PIXEL02_60
794 PIXEL03_20
795 PIXEL10_32
796 PIXEL11_32
797 PIXEL12_70
798 PIXEL13_60
799 PIXEL20_31
800 PIXEL21_31
801 PIXEL22_70
802 PIXEL23_60
803 PIXEL30_81
804 PIXEL31_81
805 PIXEL32_60
806 PIXEL33_20
807 break;
808 }
809 case 22:
810 case 54:
811 {
812 PIXEL00_80
813 PIXEL01_10
814 if (Diff(w[2], w[6]))
815 {
816 PIXEL02_0
817 PIXEL03_0
818 PIXEL13_0
819 }
820 else
821 {
822 PIXEL02_50
823 PIXEL03_50
824 PIXEL13_50
825 }
826 PIXEL10_61
827 PIXEL11_30
828 PIXEL12_0
829 PIXEL20_60
830 PIXEL21_70
831 PIXEL22_30
832 PIXEL23_10
833 PIXEL30_20
834 PIXEL31_60
835 PIXEL32_61
836 PIXEL33_80
837 break;
838 }
839 case 208:
840 case 209:
841 {
842 PIXEL00_20
843 PIXEL01_60
844 PIXEL02_61
845 PIXEL03_80
846 PIXEL10_60
847 PIXEL11_70
848 PIXEL12_30
849 PIXEL13_10
850 PIXEL20_61
851 PIXEL21_30
852 PIXEL22_0
853 if (Diff(w[6], w[8]))
854 {
855 PIXEL23_0
856 PIXEL32_0
857 PIXEL33_0
858 }
859 else
860 {
861 PIXEL23_50
862 PIXEL32_50
863 PIXEL33_50
864 }
865 PIXEL30_80
866 PIXEL31_10
867 break;
868 }
869 case 104:
870 case 108:
871 {
872 PIXEL00_80
873 PIXEL01_61
874 PIXEL02_60
875 PIXEL03_20
876 PIXEL10_10
877 PIXEL11_30
878 PIXEL12_70
879 PIXEL13_60
880 if (Diff(w[8], w[4]))
881 {
882 PIXEL20_0
883 PIXEL30_0
884 PIXEL31_0
885 }
886 else
887 {
888 PIXEL20_50
889 PIXEL30_50
890 PIXEL31_50
891 }
892 PIXEL21_0
893 PIXEL22_30
894 PIXEL23_61
895 PIXEL32_10
896 PIXEL33_80
897 break;
898 }
899 case 11:
900 case 139:
901 {
902 if (Diff(w[4], w[2]))
903 {
904 PIXEL00_0
905 PIXEL01_0
906 PIXEL10_0
907 }
908 else
909 {
910 PIXEL00_50
911 PIXEL01_50
912 PIXEL10_50
913 }
914 PIXEL02_10
915 PIXEL03_80
916 PIXEL11_0
917 PIXEL12_30
918 PIXEL13_61
919 PIXEL20_10
920 PIXEL21_30
921 PIXEL22_70
922 PIXEL23_60
923 PIXEL30_80
924 PIXEL31_61
925 PIXEL32_60
926 PIXEL33_20
927 break;
928 }
929 case 19:
930 case 51:
931 {
932 if (Diff(w[2], w[6]))
933 {
934 PIXEL00_81
935 PIXEL01_31
936 PIXEL02_10
937 PIXEL03_80
938 PIXEL12_30
939 PIXEL13_10
940 }
941 else
942 {
943 PIXEL00_12
944 PIXEL01_14
945 PIXEL02_83
946 PIXEL03_50
947 PIXEL12_70
948 PIXEL13_21
949 }
950 PIXEL10_81
951 PIXEL11_31
952 PIXEL20_60
953 PIXEL21_70
954 PIXEL22_30
955 PIXEL23_10
956 PIXEL30_20
957 PIXEL31_60
958 PIXEL32_61
959 PIXEL33_80
960 break;
961 }
962 case 146:
963 case 178:
964 {
965 PIXEL00_80
966 PIXEL01_10
967 if (Diff(w[2], w[6]))
968 {
969 PIXEL02_10
970 PIXEL03_80
971 PIXEL12_30
972 PIXEL13_10
973 PIXEL23_32
974 PIXEL33_82
975 }
976 else
977 {
978 PIXEL02_21
979 PIXEL03_50
980 PIXEL12_70
981 PIXEL13_83
982 PIXEL23_13
983 PIXEL33_11
984 }
985 PIXEL10_61
986 PIXEL11_30
987 PIXEL20_60
988 PIXEL21_70
989 PIXEL22_32
990 PIXEL30_20
991 PIXEL31_60
992 PIXEL32_82
993 break;
994 }
995 case 84:
996 case 85:
997 {
998 PIXEL00_20
999 PIXEL01_60
1000 PIXEL02_81
1001 if (Diff(w[6], w[8]))
1002 {
1003 PIXEL03_81
1004 PIXEL13_31
1005 PIXEL22_30
1006 PIXEL23_10
1007 PIXEL32_10
1008 PIXEL33_80
1009 }
1010 else
1011 {
1012 PIXEL03_12
1013 PIXEL13_14
1014 PIXEL22_70
1015 PIXEL23_83
1016 PIXEL32_21
1017 PIXEL33_50
1018 }
1019 PIXEL10_60
1020 PIXEL11_70
1021 PIXEL12_31
1022 PIXEL20_61
1023 PIXEL21_30
1024 PIXEL30_80
1025 PIXEL31_10
1026 break;
1027 }
1028 case 112:
1029 case 113:
1030 {
1031 PIXEL00_20
1032 PIXEL01_60
1033 PIXEL02_61
1034 PIXEL03_80
1035 PIXEL10_60
1036 PIXEL11_70
1037 PIXEL12_30
1038 PIXEL13_10
1039 PIXEL20_82
1040 PIXEL21_32
1041 if (Diff(w[6], w[8]))
1042 {
1043 PIXEL22_30
1044 PIXEL23_10
1045 PIXEL30_82
1046 PIXEL31_32
1047 PIXEL32_10
1048 PIXEL33_80
1049 }
1050 else
1051 {
1052 PIXEL22_70
1053 PIXEL23_21
1054 PIXEL30_11
1055 PIXEL31_13
1056 PIXEL32_83
1057 PIXEL33_50
1058 }
1059 break;
1060 }
1061 case 200:
1062 case 204:
1063 {
1064 PIXEL00_80
1065 PIXEL01_61
1066 PIXEL02_60
1067 PIXEL03_20
1068 PIXEL10_10
1069 PIXEL11_30
1070 PIXEL12_70
1071 PIXEL13_60
1072 if (Diff(w[8], w[4]))
1073 {
1074 PIXEL20_10
1075 PIXEL21_30
1076 PIXEL30_80
1077 PIXEL31_10
1078 PIXEL32_31
1079 PIXEL33_81
1080 }
1081 else
1082 {
1083 PIXEL20_21
1084 PIXEL21_70
1085 PIXEL30_50
1086 PIXEL31_83
1087 PIXEL32_14
1088 PIXEL33_12
1089 }
1090 PIXEL22_31
1091 PIXEL23_81
1092 break;
1093 }
1094 case 73:
1095 case 77:
1096 {
1097 if (Diff(w[8], w[4]))
1098 {
1099 PIXEL00_82
1100 PIXEL10_32
1101 PIXEL20_10
1102 PIXEL21_30
1103 PIXEL30_80
1104 PIXEL31_10
1105 }
1106 else
1107 {
1108 PIXEL00_11
1109 PIXEL10_13
1110 PIXEL20_83
1111 PIXEL21_70
1112 PIXEL30_50
1113 PIXEL31_21
1114 }
1115 PIXEL01_82
1116 PIXEL02_60
1117 PIXEL03_20
1118 PIXEL11_32
1119 PIXEL12_70
1120 PIXEL13_60
1121 PIXEL22_30
1122 PIXEL23_61
1123 PIXEL32_10
1124 PIXEL33_80
1125 break;
1126 }
1127 case 42:
1128 case 170:
1129 {
1130 if (Diff(w[4], w[2]))
1131 {
1132 PIXEL00_80
1133 PIXEL01_10
1134 PIXEL10_10
1135 PIXEL11_30
1136 PIXEL20_31
1137 PIXEL30_81
1138 }
1139 else
1140 {
1141 PIXEL00_50
1142 PIXEL01_21
1143 PIXEL10_83
1144 PIXEL11_70
1145 PIXEL20_14
1146 PIXEL30_12
1147 }
1148 PIXEL02_10
1149 PIXEL03_80
1150 PIXEL12_30
1151 PIXEL13_61
1152 PIXEL21_31
1153 PIXEL22_70
1154 PIXEL23_60
1155 PIXEL31_81
1156 PIXEL32_60
1157 PIXEL33_20
1158 break;
1159 }
1160 case 14:
1161 case 142:
1162 {
1163 if (Diff(w[4], w[2]))
1164 {
1165 PIXEL00_80
1166 PIXEL01_10
1167 PIXEL02_32
1168 PIXEL03_82
1169 PIXEL10_10
1170 PIXEL11_30
1171 }
1172 else
1173 {
1174 PIXEL00_50
1175 PIXEL01_83
1176 PIXEL02_13
1177 PIXEL03_11
1178 PIXEL10_21
1179 PIXEL11_70
1180 }
1181 PIXEL12_32
1182 PIXEL13_82
1183 PIXEL20_10
1184 PIXEL21_30
1185 PIXEL22_70
1186 PIXEL23_60
1187 PIXEL30_80
1188 PIXEL31_61
1189 PIXEL32_60
1190 PIXEL33_20
1191 break;
1192 }
1193 case 67:
1194 {
1195 PIXEL00_81
1196 PIXEL01_31
1197 PIXEL02_10
1198 PIXEL03_80
1199 PIXEL10_81
1200 PIXEL11_31
1201 PIXEL12_30
1202 PIXEL13_61
1203 PIXEL20_61
1204 PIXEL21_30
1205 PIXEL22_30
1206 PIXEL23_61
1207 PIXEL30_80
1208 PIXEL31_10
1209 PIXEL32_10
1210 PIXEL33_80
1211 break;
1212 }
1213 case 70:
1214 {
1215 PIXEL00_80
1216 PIXEL01_10
1217 PIXEL02_32
1218 PIXEL03_82
1219 PIXEL10_61
1220 PIXEL11_30
1221 PIXEL12_32
1222 PIXEL13_82
1223 PIXEL20_61
1224 PIXEL21_30
1225 PIXEL22_30
1226 PIXEL23_61
1227 PIXEL30_80
1228 PIXEL31_10
1229 PIXEL32_10
1230 PIXEL33_80
1231 break;
1232 }
1233 case 28:
1234 {
1235 PIXEL00_80
1236 PIXEL01_61
1237 PIXEL02_81
1238 PIXEL03_81
1239 PIXEL10_10
1240 PIXEL11_30
1241 PIXEL12_31
1242 PIXEL13_31
1243 PIXEL20_10
1244 PIXEL21_30
1245 PIXEL22_30
1246 PIXEL23_10
1247 PIXEL30_80
1248 PIXEL31_61
1249 PIXEL32_61
1250 PIXEL33_80
1251 break;
1252 }
1253 case 152:
1254 {
1255 PIXEL00_80
1256 PIXEL01_61
1257 PIXEL02_61
1258 PIXEL03_80
1259 PIXEL10_10
1260 PIXEL11_30
1261 PIXEL12_30
1262 PIXEL13_10
1263 PIXEL20_10
1264 PIXEL21_30
1265 PIXEL22_32
1266 PIXEL23_32
1267 PIXEL30_80
1268 PIXEL31_61
1269 PIXEL32_82
1270 PIXEL33_82
1271 break;
1272 }
1273 case 194:
1274 {
1275 PIXEL00_80
1276 PIXEL01_10
1277 PIXEL02_10
1278 PIXEL03_80
1279 PIXEL10_61
1280 PIXEL11_30
1281 PIXEL12_30
1282 PIXEL13_61
1283 PIXEL20_61
1284 PIXEL21_30
1285 PIXEL22_31
1286 PIXEL23_81
1287 PIXEL30_80
1288 PIXEL31_10
1289 PIXEL32_31
1290 PIXEL33_81
1291 break;
1292 }
1293 case 98:
1294 {
1295 PIXEL00_80
1296 PIXEL01_10
1297 PIXEL02_10
1298 PIXEL03_80
1299 PIXEL10_61
1300 PIXEL11_30
1301 PIXEL12_30
1302 PIXEL13_61
1303 PIXEL20_82
1304 PIXEL21_32
1305 PIXEL22_30
1306 PIXEL23_61
1307 PIXEL30_82
1308 PIXEL31_32
1309 PIXEL32_10
1310 PIXEL33_80
1311 break;
1312 }
1313 case 56:
1314 {
1315 PIXEL00_80
1316 PIXEL01_61
1317 PIXEL02_61
1318 PIXEL03_80
1319 PIXEL10_10
1320 PIXEL11_30
1321 PIXEL12_30
1322 PIXEL13_10
1323 PIXEL20_31
1324 PIXEL21_31
1325 PIXEL22_30
1326 PIXEL23_10
1327 PIXEL30_81
1328 PIXEL31_81
1329 PIXEL32_61
1330 PIXEL33_80
1331 break;
1332 }
1333 case 25:
1334 {
1335 PIXEL00_82
1336 PIXEL01_82
1337 PIXEL02_61
1338 PIXEL03_80
1339 PIXEL10_32
1340 PIXEL11_32
1341 PIXEL12_30
1342 PIXEL13_10
1343 PIXEL20_10
1344 PIXEL21_30
1345 PIXEL22_30
1346 PIXEL23_10
1347 PIXEL30_80
1348 PIXEL31_61
1349 PIXEL32_61
1350 PIXEL33_80
1351 break;
1352 }
1353 case 26:
1354 case 31:
1355 {
1356 if (Diff(w[4], w[2]))
1357 {
1358 PIXEL00_0
1359 PIXEL01_0
1360 PIXEL10_0
1361 }
1362 else
1363 {
1364 PIXEL00_50
1365 PIXEL01_50
1366 PIXEL10_50
1367 }
1368 if (Diff(w[2], w[6]))
1369 {
1370 PIXEL02_0
1371 PIXEL03_0
1372 PIXEL13_0
1373 }
1374 else
1375 {
1376 PIXEL02_50
1377 PIXEL03_50
1378 PIXEL13_50
1379 }
1380 PIXEL11_0
1381 PIXEL12_0
1382 PIXEL20_10
1383 PIXEL21_30
1384 PIXEL22_30
1385 PIXEL23_10
1386 PIXEL30_80
1387 PIXEL31_61
1388 PIXEL32_61
1389 PIXEL33_80
1390 break;
1391 }
1392 case 82:
1393 case 214:
1394 {
1395 PIXEL00_80
1396 PIXEL01_10
1397 if (Diff(w[2], w[6]))
1398 {
1399 PIXEL02_0
1400 PIXEL03_0
1401 PIXEL13_0
1402 }
1403 else
1404 {
1405 PIXEL02_50
1406 PIXEL03_50
1407 PIXEL13_50
1408 }
1409 PIXEL10_61
1410 PIXEL11_30
1411 PIXEL12_0
1412 PIXEL20_61
1413 PIXEL21_30
1414 PIXEL22_0
1415 if (Diff(w[6], w[8]))
1416 {
1417 PIXEL23_0
1418 PIXEL32_0
1419 PIXEL33_0
1420 }
1421 else
1422 {
1423 PIXEL23_50
1424 PIXEL32_50
1425 PIXEL33_50
1426 }
1427 PIXEL30_80
1428 PIXEL31_10
1429 break;
1430 }
1431 case 88:
1432 case 248:
1433 {
1434 PIXEL00_80
1435 PIXEL01_61
1436 PIXEL02_61
1437 PIXEL03_80
1438 PIXEL10_10
1439 PIXEL11_30
1440 PIXEL12_30
1441 PIXEL13_10
1442 if (Diff(w[8], w[4]))
1443 {
1444 PIXEL20_0
1445 PIXEL30_0
1446 PIXEL31_0
1447 }
1448 else
1449 {
1450 PIXEL20_50
1451 PIXEL30_50
1452 PIXEL31_50
1453 }
1454 PIXEL21_0
1455 PIXEL22_0
1456 if (Diff(w[6], w[8]))
1457 {
1458 PIXEL23_0
1459 PIXEL32_0
1460 PIXEL33_0
1461 }
1462 else
1463 {
1464 PIXEL23_50
1465 PIXEL32_50
1466 PIXEL33_50
1467 }
1468 break;
1469 }
1470 case 74:
1471 case 107:
1472 {
1473 if (Diff(w[4], w[2]))
1474 {
1475 PIXEL00_0
1476 PIXEL01_0
1477 PIXEL10_0
1478 }
1479 else
1480 {
1481 PIXEL00_50
1482 PIXEL01_50
1483 PIXEL10_50
1484 }
1485 PIXEL02_10
1486 PIXEL03_80
1487 PIXEL11_0
1488 PIXEL12_30
1489 PIXEL13_61
1490 if (Diff(w[8], w[4]))
1491 {
1492 PIXEL20_0
1493 PIXEL30_0
1494 PIXEL31_0
1495 }
1496 else
1497 {
1498 PIXEL20_50
1499 PIXEL30_50
1500 PIXEL31_50
1501 }
1502 PIXEL21_0
1503 PIXEL22_30
1504 PIXEL23_61
1505 PIXEL32_10
1506 PIXEL33_80
1507 break;
1508 }
1509 case 27:
1510 {
1511 if (Diff(w[4], w[2]))
1512 {
1513 PIXEL00_0
1514 PIXEL01_0
1515 PIXEL10_0
1516 }
1517 else
1518 {
1519 PIXEL00_50
1520 PIXEL01_50
1521 PIXEL10_50
1522 }
1523 PIXEL02_10
1524 PIXEL03_80
1525 PIXEL11_0
1526 PIXEL12_30
1527 PIXEL13_10
1528 PIXEL20_10
1529 PIXEL21_30
1530 PIXEL22_30
1531 PIXEL23_10
1532 PIXEL30_80
1533 PIXEL31_61
1534 PIXEL32_61
1535 PIXEL33_80
1536 break;
1537 }
1538 case 86:
1539 {
1540 PIXEL00_80
1541 PIXEL01_10
1542 if (Diff(w[2], w[6]))
1543 {
1544 PIXEL02_0
1545 PIXEL03_0
1546 PIXEL13_0
1547 }
1548 else
1549 {
1550 PIXEL02_50
1551 PIXEL03_50
1552 PIXEL13_50
1553 }
1554 PIXEL10_61
1555 PIXEL11_30
1556 PIXEL12_0
1557 PIXEL20_61
1558 PIXEL21_30
1559 PIXEL22_30
1560 PIXEL23_10
1561 PIXEL30_80
1562 PIXEL31_10
1563 PIXEL32_10
1564 PIXEL33_80
1565 break;
1566 }
1567 case 216:
1568 {
1569 PIXEL00_80
1570 PIXEL01_61
1571 PIXEL02_61
1572 PIXEL03_80
1573 PIXEL10_10
1574 PIXEL11_30
1575 PIXEL12_30
1576 PIXEL13_10
1577 PIXEL20_10
1578 PIXEL21_30
1579 PIXEL22_0
1580 if (Diff(w[6], w[8]))
1581 {
1582 PIXEL23_0
1583 PIXEL32_0
1584 PIXEL33_0
1585 }
1586 else
1587 {
1588 PIXEL23_50
1589 PIXEL32_50
1590 PIXEL33_50
1591 }
1592 PIXEL30_80
1593 PIXEL31_10
1594 break;
1595 }
1596 case 106:
1597 {
1598 PIXEL00_80
1599 PIXEL01_10
1600 PIXEL02_10
1601 PIXEL03_80
1602 PIXEL10_10
1603 PIXEL11_30
1604 PIXEL12_30
1605 PIXEL13_61
1606 if (Diff(w[8], w[4]))
1607 {
1608 PIXEL20_0
1609 PIXEL30_0
1610 PIXEL31_0
1611 }
1612 else
1613 {
1614 PIXEL20_50
1615 PIXEL30_50
1616 PIXEL31_50
1617 }
1618 PIXEL21_0
1619 PIXEL22_30
1620 PIXEL23_61
1621 PIXEL32_10
1622 PIXEL33_80
1623 break;
1624 }
1625 case 30:
1626 {
1627 PIXEL00_80
1628 PIXEL01_10
1629 if (Diff(w[2], w[6]))
1630 {
1631 PIXEL02_0
1632 PIXEL03_0
1633 PIXEL13_0
1634 }
1635 else
1636 {
1637 PIXEL02_50
1638 PIXEL03_50
1639 PIXEL13_50
1640 }
1641 PIXEL10_10
1642 PIXEL11_30
1643 PIXEL12_0
1644 PIXEL20_10
1645 PIXEL21_30
1646 PIXEL22_30
1647 PIXEL23_10
1648 PIXEL30_80
1649 PIXEL31_61
1650 PIXEL32_61
1651 PIXEL33_80
1652 break;
1653 }
1654 case 210:
1655 {
1656 PIXEL00_80
1657 PIXEL01_10
1658 PIXEL02_10
1659 PIXEL03_80
1660 PIXEL10_61
1661 PIXEL11_30
1662 PIXEL12_30
1663 PIXEL13_10
1664 PIXEL20_61
1665 PIXEL21_30
1666 PIXEL22_0
1667 if (Diff(w[6], w[8]))
1668 {
1669 PIXEL23_0
1670 PIXEL32_0
1671 PIXEL33_0
1672 }
1673 else
1674 {
1675 PIXEL23_50
1676 PIXEL32_50
1677 PIXEL33_50
1678 }
1679 PIXEL30_80
1680 PIXEL31_10
1681 break;
1682 }
1683 case 120:
1684 {
1685 PIXEL00_80
1686 PIXEL01_61
1687 PIXEL02_61
1688 PIXEL03_80
1689 PIXEL10_10
1690 PIXEL11_30
1691 PIXEL12_30
1692 PIXEL13_10
1693 if (Diff(w[8], w[4]))
1694 {
1695 PIXEL20_0
1696 PIXEL30_0
1697 PIXEL31_0
1698 }
1699 else
1700 {
1701 PIXEL20_50
1702 PIXEL30_50
1703 PIXEL31_50
1704 }
1705 PIXEL21_0
1706 PIXEL22_30
1707 PIXEL23_10
1708 PIXEL32_10
1709 PIXEL33_80
1710 break;
1711 }
1712 case 75:
1713 {
1714 if (Diff(w[4], w[2]))
1715 {
1716 PIXEL00_0
1717 PIXEL01_0
1718 PIXEL10_0
1719 }
1720 else
1721 {
1722 PIXEL00_50
1723 PIXEL01_50
1724 PIXEL10_50
1725 }
1726 PIXEL02_10
1727 PIXEL03_80
1728 PIXEL11_0
1729 PIXEL12_30
1730 PIXEL13_61
1731 PIXEL20_10
1732 PIXEL21_30
1733 PIXEL22_30
1734 PIXEL23_61
1735 PIXEL30_80
1736 PIXEL31_10
1737 PIXEL32_10
1738 PIXEL33_80
1739 break;
1740 }
1741 case 29:
1742 {
1743 PIXEL00_82
1744 PIXEL01_82
1745 PIXEL02_81
1746 PIXEL03_81
1747 PIXEL10_32
1748 PIXEL11_32
1749 PIXEL12_31
1750 PIXEL13_31
1751 PIXEL20_10
1752 PIXEL21_30
1753 PIXEL22_30
1754 PIXEL23_10
1755 PIXEL30_80
1756 PIXEL31_61
1757 PIXEL32_61
1758 PIXEL33_80
1759 break;
1760 }
1761 case 198:
1762 {
1763 PIXEL00_80
1764 PIXEL01_10
1765 PIXEL02_32
1766 PIXEL03_82
1767 PIXEL10_61
1768 PIXEL11_30
1769 PIXEL12_32
1770 PIXEL13_82
1771 PIXEL20_61
1772 PIXEL21_30
1773 PIXEL22_31
1774 PIXEL23_81
1775 PIXEL30_80
1776 PIXEL31_10
1777 PIXEL32_31
1778 PIXEL33_81
1779 break;
1780 }
1781 case 184:
1782 {
1783 PIXEL00_80
1784 PIXEL01_61
1785 PIXEL02_61
1786 PIXEL03_80
1787 PIXEL10_10
1788 PIXEL11_30
1789 PIXEL12_30
1790 PIXEL13_10
1791 PIXEL20_31
1792 PIXEL21_31
1793 PIXEL22_32
1794 PIXEL23_32
1795 PIXEL30_81
1796 PIXEL31_81
1797 PIXEL32_82
1798 PIXEL33_82
1799 break;
1800 }
1801 case 99:
1802 {
1803 PIXEL00_81
1804 PIXEL01_31
1805 PIXEL02_10
1806 PIXEL03_80
1807 PIXEL10_81
1808 PIXEL11_31
1809 PIXEL12_30
1810 PIXEL13_61
1811 PIXEL20_82
1812 PIXEL21_32
1813 PIXEL22_30
1814 PIXEL23_61
1815 PIXEL30_82
1816 PIXEL31_32
1817 PIXEL32_10
1818 PIXEL33_80
1819 break;
1820 }
1821 case 57:
1822 {
1823 PIXEL00_82
1824 PIXEL01_82
1825 PIXEL02_61
1826 PIXEL03_80
1827 PIXEL10_32
1828 PIXEL11_32
1829 PIXEL12_30
1830 PIXEL13_10
1831 PIXEL20_31
1832 PIXEL21_31
1833 PIXEL22_30
1834 PIXEL23_10
1835 PIXEL30_81
1836 PIXEL31_81
1837 PIXEL32_61
1838 PIXEL33_80
1839 break;
1840 }
1841 case 71:
1842 {
1843 PIXEL00_81
1844 PIXEL01_31
1845 PIXEL02_32
1846 PIXEL03_82
1847 PIXEL10_81
1848 PIXEL11_31
1849 PIXEL12_32
1850 PIXEL13_82
1851 PIXEL20_61
1852 PIXEL21_30
1853 PIXEL22_30
1854 PIXEL23_61
1855 PIXEL30_80
1856 PIXEL31_10
1857 PIXEL32_10
1858 PIXEL33_80
1859 break;
1860 }
1861 case 156:
1862 {
1863 PIXEL00_80
1864 PIXEL01_61
1865 PIXEL02_81
1866 PIXEL03_81
1867 PIXEL10_10
1868 PIXEL11_30
1869 PIXEL12_31
1870 PIXEL13_31
1871 PIXEL20_10
1872 PIXEL21_30
1873 PIXEL22_32
1874 PIXEL23_32
1875 PIXEL30_80
1876 PIXEL31_61
1877 PIXEL32_82
1878 PIXEL33_82
1879 break;
1880 }
1881 case 226:
1882 {
1883 PIXEL00_80
1884 PIXEL01_10
1885 PIXEL02_10
1886 PIXEL03_80
1887 PIXEL10_61
1888 PIXEL11_30
1889 PIXEL12_30
1890 PIXEL13_61
1891 PIXEL20_82
1892 PIXEL21_32
1893 PIXEL22_31
1894 PIXEL23_81
1895 PIXEL30_82
1896 PIXEL31_32
1897 PIXEL32_31
1898 PIXEL33_81
1899 break;
1900 }
1901 case 60:
1902 {
1903 PIXEL00_80
1904 PIXEL01_61
1905 PIXEL02_81
1906 PIXEL03_81
1907 PIXEL10_10
1908 PIXEL11_30
1909 PIXEL12_31
1910 PIXEL13_31
1911 PIXEL20_31
1912 PIXEL21_31
1913 PIXEL22_30
1914 PIXEL23_10
1915 PIXEL30_81
1916 PIXEL31_81
1917 PIXEL32_61
1918 PIXEL33_80
1919 break;
1920 }
1921 case 195:
1922 {
1923 PIXEL00_81
1924 PIXEL01_31
1925 PIXEL02_10
1926 PIXEL03_80
1927 PIXEL10_81
1928 PIXEL11_31
1929 PIXEL12_30
1930 PIXEL13_61
1931 PIXEL20_61
1932 PIXEL21_30
1933 PIXEL22_31
1934 PIXEL23_81
1935 PIXEL30_80
1936 PIXEL31_10
1937 PIXEL32_31
1938 PIXEL33_81
1939 break;
1940 }
1941 case 102:
1942 {
1943 PIXEL00_80
1944 PIXEL01_10
1945 PIXEL02_32
1946 PIXEL03_82
1947 PIXEL10_61
1948 PIXEL11_30
1949 PIXEL12_32
1950 PIXEL13_82
1951 PIXEL20_82
1952 PIXEL21_32
1953 PIXEL22_30
1954 PIXEL23_61
1955 PIXEL30_82
1956 PIXEL31_32
1957 PIXEL32_10
1958 PIXEL33_80
1959 break;
1960 }
1961 case 153:
1962 {
1963 PIXEL00_82
1964 PIXEL01_82
1965 PIXEL02_61
1966 PIXEL03_80
1967 PIXEL10_32
1968 PIXEL11_32
1969 PIXEL12_30
1970 PIXEL13_10
1971 PIXEL20_10
1972 PIXEL21_30
1973 PIXEL22_32
1974 PIXEL23_32
1975 PIXEL30_80
1976 PIXEL31_61
1977 PIXEL32_82
1978 PIXEL33_82
1979 break;
1980 }
1981 case 58:
1982 {
1983 if (Diff(w[4], w[2]))
1984 {
1985 PIXEL00_80
1986 PIXEL01_10
1987 PIXEL10_10
1988 PIXEL11_30
1989 }
1990 else
1991 {
1992 PIXEL00_20
1993 PIXEL01_12
1994 PIXEL10_11
1995 PIXEL11_0
1996 }
1997 if (Diff(w[2], w[6]))
1998 {
1999 PIXEL02_10
2000 PIXEL03_80
2001 PIXEL12_30
2002 PIXEL13_10
2003 }
2004 else
2005 {
2006 PIXEL02_11
2007 PIXEL03_20
2008 PIXEL12_0
2009 PIXEL13_12
2010 }
2011 PIXEL20_31
2012 PIXEL21_31
2013 PIXEL22_30
2014 PIXEL23_10
2015 PIXEL30_81
2016 PIXEL31_81
2017 PIXEL32_61
2018 PIXEL33_80
2019 break;
2020 }
2021 case 83:
2022 {
2023 PIXEL00_81
2024 PIXEL01_31
2025 if (Diff(w[2], w[6]))
2026 {
2027 PIXEL02_10
2028 PIXEL03_80
2029 PIXEL12_30
2030 PIXEL13_10
2031 }
2032 else
2033 {
2034 PIXEL02_11
2035 PIXEL03_20
2036 PIXEL12_0
2037 PIXEL13_12
2038 }
2039 PIXEL10_81
2040 PIXEL11_31
2041 PIXEL20_61
2042 PIXEL21_30
2043 if (Diff(w[6], w[8]))
2044 {
2045 PIXEL22_30
2046 PIXEL23_10
2047 PIXEL32_10
2048 PIXEL33_80
2049 }
2050 else
2051 {
2052 PIXEL22_0
2053 PIXEL23_11
2054 PIXEL32_12
2055 PIXEL33_20
2056 }
2057 PIXEL30_80
2058 PIXEL31_10
2059 break;
2060 }
2061 case 92:
2062 {
2063 PIXEL00_80
2064 PIXEL01_61
2065 PIXEL02_81
2066 PIXEL03_81
2067 PIXEL10_10
2068 PIXEL11_30
2069 PIXEL12_31
2070 PIXEL13_31
2071 if (Diff(w[8], w[4]))
2072 {
2073 PIXEL20_10
2074 PIXEL21_30
2075 PIXEL30_80
2076 PIXEL31_10
2077 }
2078 else
2079 {
2080 PIXEL20_12
2081 PIXEL21_0
2082 PIXEL30_20
2083 PIXEL31_11
2084 }
2085 if (Diff(w[6], w[8]))
2086 {
2087 PIXEL22_30
2088 PIXEL23_10
2089 PIXEL32_10
2090 PIXEL33_80
2091 }
2092 else
2093 {
2094 PIXEL22_0
2095 PIXEL23_11
2096 PIXEL32_12
2097 PIXEL33_20
2098 }
2099 break;
2100 }
2101 case 202:
2102 {
2103 if (Diff(w[4], w[2]))
2104 {
2105 PIXEL00_80
2106 PIXEL01_10
2107 PIXEL10_10
2108 PIXEL11_30
2109 }
2110 else
2111 {
2112 PIXEL00_20
2113 PIXEL01_12
2114 PIXEL10_11
2115 PIXEL11_0
2116 }
2117 PIXEL02_10
2118 PIXEL03_80
2119 PIXEL12_30
2120 PIXEL13_61
2121 if (Diff(w[8], w[4]))
2122 {
2123 PIXEL20_10
2124 PIXEL21_30
2125 PIXEL30_80
2126 PIXEL31_10
2127 }
2128 else
2129 {
2130 PIXEL20_12
2131 PIXEL21_0
2132 PIXEL30_20
2133 PIXEL31_11
2134 }
2135 PIXEL22_31
2136 PIXEL23_81
2137 PIXEL32_31
2138 PIXEL33_81
2139 break;
2140 }
2141 case 78:
2142 {
2143 if (Diff(w[4], w[2]))
2144 {
2145 PIXEL00_80
2146 PIXEL01_10
2147 PIXEL10_10
2148 PIXEL11_30
2149 }
2150 else
2151 {
2152 PIXEL00_20
2153 PIXEL01_12
2154 PIXEL10_11
2155 PIXEL11_0
2156 }
2157 PIXEL02_32
2158 PIXEL03_82
2159 PIXEL12_32
2160 PIXEL13_82
2161 if (Diff(w[8], w[4]))
2162 {
2163 PIXEL20_10
2164 PIXEL21_30
2165 PIXEL30_80
2166 PIXEL31_10
2167 }
2168 else
2169 {
2170 PIXEL20_12
2171 PIXEL21_0
2172 PIXEL30_20
2173 PIXEL31_11
2174 }
2175 PIXEL22_30
2176 PIXEL23_61
2177 PIXEL32_10
2178 PIXEL33_80
2179 break;
2180 }
2181 case 154:
2182 {
2183 if (Diff(w[4], w[2]))
2184 {
2185 PIXEL00_80
2186 PIXEL01_10
2187 PIXEL10_10
2188 PIXEL11_30
2189 }
2190 else
2191 {
2192 PIXEL00_20
2193 PIXEL01_12
2194 PIXEL10_11
2195 PIXEL11_0
2196 }
2197 if (Diff(w[2], w[6]))
2198 {
2199 PIXEL02_10
2200 PIXEL03_80
2201 PIXEL12_30
2202 PIXEL13_10
2203 }
2204 else
2205 {
2206 PIXEL02_11
2207 PIXEL03_20
2208 PIXEL12_0
2209 PIXEL13_12
2210 }
2211 PIXEL20_10
2212 PIXEL21_30
2213 PIXEL22_32
2214 PIXEL23_32
2215 PIXEL30_80
2216 PIXEL31_61
2217 PIXEL32_82
2218 PIXEL33_82
2219 break;
2220 }
2221 case 114:
2222 {
2223 PIXEL00_80
2224 PIXEL01_10
2225 if (Diff(w[2], w[6]))
2226 {
2227 PIXEL02_10
2228 PIXEL03_80
2229 PIXEL12_30
2230 PIXEL13_10
2231 }
2232 else
2233 {
2234 PIXEL02_11
2235 PIXEL03_20
2236 PIXEL12_0
2237 PIXEL13_12
2238 }
2239 PIXEL10_61
2240 PIXEL11_30
2241 PIXEL20_82
2242 PIXEL21_32
2243 if (Diff(w[6], w[8]))
2244 {
2245 PIXEL22_30
2246 PIXEL23_10
2247 PIXEL32_10
2248 PIXEL33_80
2249 }
2250 else
2251 {
2252 PIXEL22_0
2253 PIXEL23_11
2254 PIXEL32_12
2255 PIXEL33_20
2256 }
2257 PIXEL30_82
2258 PIXEL31_32
2259 break;
2260 }
2261 case 89:
2262 {
2263 PIXEL00_82
2264 PIXEL01_82
2265 PIXEL02_61
2266 PIXEL03_80
2267 PIXEL10_32
2268 PIXEL11_32
2269 PIXEL12_30
2270 PIXEL13_10
2271 if (Diff(w[8], w[4]))
2272 {
2273 PIXEL20_10
2274 PIXEL21_30
2275 PIXEL30_80
2276 PIXEL31_10
2277 }
2278 else
2279 {
2280 PIXEL20_12
2281 PIXEL21_0
2282 PIXEL30_20
2283 PIXEL31_11
2284 }
2285 if (Diff(w[6], w[8]))
2286 {
2287 PIXEL22_30
2288 PIXEL23_10
2289 PIXEL32_10
2290 PIXEL33_80
2291 }
2292 else
2293 {
2294 PIXEL22_0
2295 PIXEL23_11
2296 PIXEL32_12
2297 PIXEL33_20
2298 }
2299 break;
2300 }
2301 case 90:
2302 {
2303 if (Diff(w[4], w[2]))
2304 {
2305 PIXEL00_80
2306 PIXEL01_10
2307 PIXEL10_10
2308 PIXEL11_30
2309 }
2310 else
2311 {
2312 PIXEL00_20
2313 PIXEL01_12
2314 PIXEL10_11
2315 PIXEL11_0
2316 }
2317 if (Diff(w[2], w[6]))
2318 {
2319 PIXEL02_10
2320 PIXEL03_80
2321 PIXEL12_30
2322 PIXEL13_10
2323 }
2324 else
2325 {
2326 PIXEL02_11
2327 PIXEL03_20
2328 PIXEL12_0
2329 PIXEL13_12
2330 }
2331 if (Diff(w[8], w[4]))
2332 {
2333 PIXEL20_10
2334 PIXEL21_30
2335 PIXEL30_80
2336 PIXEL31_10
2337 }
2338 else
2339 {
2340 PIXEL20_12
2341 PIXEL21_0
2342 PIXEL30_20
2343 PIXEL31_11
2344 }
2345 if (Diff(w[6], w[8]))
2346 {
2347 PIXEL22_30
2348 PIXEL23_10
2349 PIXEL32_10
2350 PIXEL33_80
2351 }
2352 else
2353 {
2354 PIXEL22_0
2355 PIXEL23_11
2356 PIXEL32_12
2357 PIXEL33_20
2358 }
2359 break;
2360 }
2361 case 55:
2362 case 23:
2363 {
2364 if (Diff(w[2], w[6]))
2365 {
2366 PIXEL00_81
2367 PIXEL01_31
2368 PIXEL02_0
2369 PIXEL03_0
2370 PIXEL12_0
2371 PIXEL13_0
2372 }
2373 else
2374 {
2375 PIXEL00_12
2376 PIXEL01_14
2377 PIXEL02_83
2378 PIXEL03_50
2379 PIXEL12_70
2380 PIXEL13_21
2381 }
2382 PIXEL10_81
2383 PIXEL11_31
2384 PIXEL20_60
2385 PIXEL21_70
2386 PIXEL22_30
2387 PIXEL23_10
2388 PIXEL30_20
2389 PIXEL31_60
2390 PIXEL32_61
2391 PIXEL33_80
2392 break;
2393 }
2394 case 182:
2395 case 150:
2396 {
2397 PIXEL00_80
2398 PIXEL01_10
2399 if (Diff(w[2], w[6]))
2400 {
2401 PIXEL02_0
2402 PIXEL03_0
2403 PIXEL12_0
2404 PIXEL13_0
2405 PIXEL23_32
2406 PIXEL33_82
2407 }
2408 else
2409 {
2410 PIXEL02_21
2411 PIXEL03_50
2412 PIXEL12_70
2413 PIXEL13_83
2414 PIXEL23_13
2415 PIXEL33_11
2416 }
2417 PIXEL10_61
2418 PIXEL11_30
2419 PIXEL20_60
2420 PIXEL21_70
2421 PIXEL22_32
2422 PIXEL30_20
2423 PIXEL31_60
2424 PIXEL32_82
2425 break;
2426 }
2427 case 213:
2428 case 212:
2429 {
2430 PIXEL00_20
2431 PIXEL01_60
2432 PIXEL02_81
2433 if (Diff(w[6], w[8]))
2434 {
2435 PIXEL03_81
2436 PIXEL13_31
2437 PIXEL22_0
2438 PIXEL23_0
2439 PIXEL32_0
2440 PIXEL33_0
2441 }
2442 else
2443 {
2444 PIXEL03_12
2445 PIXEL13_14
2446 PIXEL22_70
2447 PIXEL23_83
2448 PIXEL32_21
2449 PIXEL33_50
2450 }
2451 PIXEL10_60
2452 PIXEL11_70
2453 PIXEL12_31
2454 PIXEL20_61
2455 PIXEL21_30
2456 PIXEL30_80
2457 PIXEL31_10
2458 break;
2459 }
2460 case 241:
2461 case 240:
2462 {
2463 PIXEL00_20
2464 PIXEL01_60
2465 PIXEL02_61
2466 PIXEL03_80
2467 PIXEL10_60
2468 PIXEL11_70
2469 PIXEL12_30
2470 PIXEL13_10
2471 PIXEL20_82
2472 PIXEL21_32
2473 if (Diff(w[6], w[8]))
2474 {
2475 PIXEL22_0
2476 PIXEL23_0
2477 PIXEL30_82
2478 PIXEL31_32
2479 PIXEL32_0
2480 PIXEL33_0
2481 }
2482 else
2483 {
2484 PIXEL22_70
2485 PIXEL23_21
2486 PIXEL30_11
2487 PIXEL31_13
2488 PIXEL32_83
2489 PIXEL33_50
2490 }
2491 break;
2492 }
2493 case 236:
2494 case 232:
2495 {
2496 PIXEL00_80
2497 PIXEL01_61
2498 PIXEL02_60
2499 PIXEL03_20
2500 PIXEL10_10
2501 PIXEL11_30
2502 PIXEL12_70
2503 PIXEL13_60
2504 if (Diff(w[8], w[4]))
2505 {
2506 PIXEL20_0
2507 PIXEL21_0
2508 PIXEL30_0
2509 PIXEL31_0
2510 PIXEL32_31
2511 PIXEL33_81
2512 }
2513 else
2514 {
2515 PIXEL20_21
2516 PIXEL21_70
2517 PIXEL30_50
2518 PIXEL31_83
2519 PIXEL32_14
2520 PIXEL33_12
2521 }
2522 PIXEL22_31
2523 PIXEL23_81
2524 break;
2525 }
2526 case 109:
2527 case 105:
2528 {
2529 if (Diff(w[8], w[4]))
2530 {
2531 PIXEL00_82
2532 PIXEL10_32
2533 PIXEL20_0
2534 PIXEL21_0
2535 PIXEL30_0
2536 PIXEL31_0
2537 }
2538 else
2539 {
2540 PIXEL00_11
2541 PIXEL10_13
2542 PIXEL20_83
2543 PIXEL21_70
2544 PIXEL30_50
2545 PIXEL31_21
2546 }
2547 PIXEL01_82
2548 PIXEL02_60
2549 PIXEL03_20
2550 PIXEL11_32
2551 PIXEL12_70
2552 PIXEL13_60
2553 PIXEL22_30
2554 PIXEL23_61
2555 PIXEL32_10
2556 PIXEL33_80
2557 break;
2558 }
2559 case 171:
2560 case 43:
2561 {
2562 if (Diff(w[4], w[2]))
2563 {
2564 PIXEL00_0
2565 PIXEL01_0
2566 PIXEL10_0
2567 PIXEL11_0
2568 PIXEL20_31
2569 PIXEL30_81
2570 }
2571 else
2572 {
2573 PIXEL00_50
2574 PIXEL01_21
2575 PIXEL10_83
2576 PIXEL11_70
2577 PIXEL20_14
2578 PIXEL30_12
2579 }
2580 PIXEL02_10
2581 PIXEL03_80
2582 PIXEL12_30
2583 PIXEL13_61
2584 PIXEL21_31
2585 PIXEL22_70
2586 PIXEL23_60
2587 PIXEL31_81
2588 PIXEL32_60
2589 PIXEL33_20
2590 break;
2591 }
2592 case 143:
2593 case 15:
2594 {
2595 if (Diff(w[4], w[2]))
2596 {
2597 PIXEL00_0
2598 PIXEL01_0
2599 PIXEL02_32
2600 PIXEL03_82
2601 PIXEL10_0
2602 PIXEL11_0
2603 }
2604 else
2605 {
2606 PIXEL00_50
2607 PIXEL01_83
2608 PIXEL02_13
2609 PIXEL03_11
2610 PIXEL10_21
2611 PIXEL11_70
2612 }
2613 PIXEL12_32
2614 PIXEL13_82
2615 PIXEL20_10
2616 PIXEL21_30
2617 PIXEL22_70
2618 PIXEL23_60
2619 PIXEL30_80
2620 PIXEL31_61
2621 PIXEL32_60
2622 PIXEL33_20
2623 break;
2624 }
2625 case 124:
2626 {
2627 PIXEL00_80
2628 PIXEL01_61
2629 PIXEL02_81
2630 PIXEL03_81
2631 PIXEL10_10
2632 PIXEL11_30
2633 PIXEL12_31
2634 PIXEL13_31
2635 if (Diff(w[8], w[4]))
2636 {
2637 PIXEL20_0
2638 PIXEL30_0
2639 PIXEL31_0
2640 }
2641 else
2642 {
2643 PIXEL20_50
2644 PIXEL30_50
2645 PIXEL31_50
2646 }
2647 PIXEL21_0
2648 PIXEL22_30
2649 PIXEL23_10
2650 PIXEL32_10
2651 PIXEL33_80
2652 break;
2653 }
2654 case 203:
2655 {
2656 if (Diff(w[4], w[2]))
2657 {
2658 PIXEL00_0
2659 PIXEL01_0
2660 PIXEL10_0
2661 }
2662 else
2663 {
2664 PIXEL00_50
2665 PIXEL01_50
2666 PIXEL10_50
2667 }
2668 PIXEL02_10
2669 PIXEL03_80
2670 PIXEL11_0
2671 PIXEL12_30
2672 PIXEL13_61
2673 PIXEL20_10
2674 PIXEL21_30
2675 PIXEL22_31
2676 PIXEL23_81
2677 PIXEL30_80
2678 PIXEL31_10
2679 PIXEL32_31
2680 PIXEL33_81
2681 break;
2682 }
2683 case 62:
2684 {
2685 PIXEL00_80
2686 PIXEL01_10
2687 if (Diff(w[2], w[6]))
2688 {
2689 PIXEL02_0
2690 PIXEL03_0
2691 PIXEL13_0
2692 }
2693 else
2694 {
2695 PIXEL02_50
2696 PIXEL03_50
2697 PIXEL13_50
2698 }
2699 PIXEL10_10
2700 PIXEL11_30
2701 PIXEL12_0
2702 PIXEL20_31
2703 PIXEL21_31
2704 PIXEL22_30
2705 PIXEL23_10
2706 PIXEL30_81
2707 PIXEL31_81
2708 PIXEL32_61
2709 PIXEL33_80
2710 break;
2711 }
2712 case 211:
2713 {
2714 PIXEL00_81
2715 PIXEL01_31
2716 PIXEL02_10
2717 PIXEL03_80
2718 PIXEL10_81
2719 PIXEL11_31
2720 PIXEL12_30
2721 PIXEL13_10
2722 PIXEL20_61
2723 PIXEL21_30
2724 PIXEL22_0
2725 if (Diff(w[6], w[8]))
2726 {
2727 PIXEL23_0
2728 PIXEL32_0
2729 PIXEL33_0
2730 }
2731 else
2732 {
2733 PIXEL23_50
2734 PIXEL32_50
2735 PIXEL33_50
2736 }
2737 PIXEL30_80
2738 PIXEL31_10
2739 break;
2740 }
2741 case 118:
2742 {
2743 PIXEL00_80
2744 PIXEL01_10
2745 if (Diff(w[2], w[6]))
2746 {
2747 PIXEL02_0
2748 PIXEL03_0
2749 PIXEL13_0
2750 }
2751 else
2752 {
2753 PIXEL02_50
2754 PIXEL03_50
2755 PIXEL13_50
2756 }
2757 PIXEL10_61
2758 PIXEL11_30
2759 PIXEL12_0
2760 PIXEL20_82
2761 PIXEL21_32
2762 PIXEL22_30
2763 PIXEL23_10
2764 PIXEL30_82
2765 PIXEL31_32
2766 PIXEL32_10
2767 PIXEL33_80
2768 break;
2769 }
2770 case 217:
2771 {
2772 PIXEL00_82
2773 PIXEL01_82
2774 PIXEL02_61
2775 PIXEL03_80
2776 PIXEL10_32
2777 PIXEL11_32
2778 PIXEL12_30
2779 PIXEL13_10
2780 PIXEL20_10
2781 PIXEL21_30
2782 PIXEL22_0
2783 if (Diff(w[6], w[8]))
2784 {
2785 PIXEL23_0
2786 PIXEL32_0
2787 PIXEL33_0
2788 }
2789 else
2790 {
2791 PIXEL23_50
2792 PIXEL32_50
2793 PIXEL33_50
2794 }
2795 PIXEL30_80
2796 PIXEL31_10
2797 break;
2798 }
2799 case 110:
2800 {
2801 PIXEL00_80
2802 PIXEL01_10
2803 PIXEL02_32
2804 PIXEL03_82
2805 PIXEL10_10
2806 PIXEL11_30
2807 PIXEL12_32
2808 PIXEL13_82
2809 if (Diff(w[8], w[4]))
2810 {
2811 PIXEL20_0
2812 PIXEL30_0
2813 PIXEL31_0
2814 }
2815 else
2816 {
2817 PIXEL20_50
2818 PIXEL30_50
2819 PIXEL31_50
2820 }
2821 PIXEL21_0
2822 PIXEL22_30
2823 PIXEL23_61
2824 PIXEL32_10
2825 PIXEL33_80
2826 break;
2827 }
2828 case 155:
2829 {
2830 if (Diff(w[4], w[2]))
2831 {
2832 PIXEL00_0
2833 PIXEL01_0
2834 PIXEL10_0
2835 }
2836 else
2837 {
2838 PIXEL00_50
2839 PIXEL01_50
2840 PIXEL10_50
2841 }
2842 PIXEL02_10
2843 PIXEL03_80
2844 PIXEL11_0
2845 PIXEL12_30
2846 PIXEL13_10
2847 PIXEL20_10
2848 PIXEL21_30
2849 PIXEL22_32
2850 PIXEL23_32
2851 PIXEL30_80
2852 PIXEL31_61
2853 PIXEL32_82
2854 PIXEL33_82
2855 break;
2856 }
2857 case 188:
2858 {
2859 PIXEL00_80
2860 PIXEL01_61
2861 PIXEL02_81
2862 PIXEL03_81
2863 PIXEL10_10
2864 PIXEL11_30
2865 PIXEL12_31
2866 PIXEL13_31
2867 PIXEL20_31
2868 PIXEL21_31
2869 PIXEL22_32
2870 PIXEL23_32
2871 PIXEL30_81
2872 PIXEL31_81
2873 PIXEL32_82
2874 PIXEL33_82
2875 break;
2876 }
2877 case 185:
2878 {
2879 PIXEL00_82
2880 PIXEL01_82
2881 PIXEL02_61
2882 PIXEL03_80
2883 PIXEL10_32
2884 PIXEL11_32
2885 PIXEL12_30
2886 PIXEL13_10
2887 PIXEL20_31
2888 PIXEL21_31
2889 PIXEL22_32
2890 PIXEL23_32
2891 PIXEL30_81
2892 PIXEL31_81
2893 PIXEL32_82
2894 PIXEL33_82
2895 break;
2896 }
2897 case 61:
2898 {
2899 PIXEL00_82
2900 PIXEL01_82
2901 PIXEL02_81
2902 PIXEL03_81
2903 PIXEL10_32
2904 PIXEL11_32
2905 PIXEL12_31
2906 PIXEL13_31
2907 PIXEL20_31
2908 PIXEL21_31
2909 PIXEL22_30
2910 PIXEL23_10
2911 PIXEL30_81
2912 PIXEL31_81
2913 PIXEL32_61
2914 PIXEL33_80
2915 break;
2916 }
2917 case 157:
2918 {
2919 PIXEL00_82
2920 PIXEL01_82
2921 PIXEL02_81
2922 PIXEL03_81
2923 PIXEL10_32
2924 PIXEL11_32
2925 PIXEL12_31
2926 PIXEL13_31
2927 PIXEL20_10
2928 PIXEL21_30
2929 PIXEL22_32
2930 PIXEL23_32
2931 PIXEL30_80
2932 PIXEL31_61
2933 PIXEL32_82
2934 PIXEL33_82
2935 break;
2936 }
2937 case 103:
2938 {
2939 PIXEL00_81
2940 PIXEL01_31
2941 PIXEL02_32
2942 PIXEL03_82
2943 PIXEL10_81
2944 PIXEL11_31
2945 PIXEL12_32
2946 PIXEL13_82
2947 PIXEL20_82
2948 PIXEL21_32
2949 PIXEL22_30
2950 PIXEL23_61
2951 PIXEL30_82
2952 PIXEL31_32
2953 PIXEL32_10
2954 PIXEL33_80
2955 break;
2956 }
2957 case 227:
2958 {
2959 PIXEL00_81
2960 PIXEL01_31
2961 PIXEL02_10
2962 PIXEL03_80
2963 PIXEL10_81
2964 PIXEL11_31
2965 PIXEL12_30
2966 PIXEL13_61
2967 PIXEL20_82
2968 PIXEL21_32
2969 PIXEL22_31
2970 PIXEL23_81
2971 PIXEL30_82
2972 PIXEL31_32
2973 PIXEL32_31
2974 PIXEL33_81
2975 break;
2976 }
2977 case 230:
2978 {
2979 PIXEL00_80
2980 PIXEL01_10
2981 PIXEL02_32
2982 PIXEL03_82
2983 PIXEL10_61
2984 PIXEL11_30
2985 PIXEL12_32
2986 PIXEL13_82
2987 PIXEL20_82
2988 PIXEL21_32
2989 PIXEL22_31
2990 PIXEL23_81
2991 PIXEL30_82
2992 PIXEL31_32
2993 PIXEL32_31
2994 PIXEL33_81
2995 break;
2996 }
2997 case 199:
2998 {
2999 PIXEL00_81
3000 PIXEL01_31
3001 PIXEL02_32
3002 PIXEL03_82
3003 PIXEL10_81
3004 PIXEL11_31
3005 PIXEL12_32
3006 PIXEL13_82
3007 PIXEL20_61
3008 PIXEL21_30
3009 PIXEL22_31
3010 PIXEL23_81
3011 PIXEL30_80
3012 PIXEL31_10
3013 PIXEL32_31
3014 PIXEL33_81
3015 break;
3016 }
3017 case 220:
3018 {
3019 PIXEL00_80
3020 PIXEL01_61
3021 PIXEL02_81
3022 PIXEL03_81
3023 PIXEL10_10
3024 PIXEL11_30
3025 PIXEL12_31
3026 PIXEL13_31
3027 if (Diff(w[8], w[4]))
3028 {
3029 PIXEL20_10
3030 PIXEL21_30
3031 PIXEL30_80
3032 PIXEL31_10
3033 }
3034 else
3035 {
3036 PIXEL20_12
3037 PIXEL21_0
3038 PIXEL30_20
3039 PIXEL31_11
3040 }
3041 PIXEL22_0
3042 if (Diff(w[6], w[8]))
3043 {
3044 PIXEL23_0
3045 PIXEL32_0
3046 PIXEL33_0
3047 }
3048 else
3049 {
3050 PIXEL23_50
3051 PIXEL32_50
3052 PIXEL33_50
3053 }
3054 break;
3055 }
3056 case 158:
3057 {
3058 if (Diff(w[4], w[2]))
3059 {
3060 PIXEL00_80
3061 PIXEL01_10
3062 PIXEL10_10
3063 PIXEL11_30
3064 }
3065 else
3066 {
3067 PIXEL00_20
3068 PIXEL01_12
3069 PIXEL10_11
3070 PIXEL11_0
3071 }
3072 if (Diff(w[2], w[6]))
3073 {
3074 PIXEL02_0
3075 PIXEL03_0
3076 PIXEL13_0
3077 }
3078 else
3079 {
3080 PIXEL02_50
3081 PIXEL03_50
3082 PIXEL13_50
3083 }
3084 PIXEL12_0
3085 PIXEL20_10
3086 PIXEL21_30
3087 PIXEL22_32
3088 PIXEL23_32
3089 PIXEL30_80
3090 PIXEL31_61
3091 PIXEL32_82
3092 PIXEL33_82
3093 break;
3094 }
3095 case 234:
3096 {
3097 if (Diff(w[4], w[2]))
3098 {
3099 PIXEL00_80
3100 PIXEL01_10
3101 PIXEL10_10
3102 PIXEL11_30
3103 }
3104 else
3105 {
3106 PIXEL00_20
3107 PIXEL01_12
3108 PIXEL10_11
3109 PIXEL11_0
3110 }
3111 PIXEL02_10
3112 PIXEL03_80
3113 PIXEL12_30
3114 PIXEL13_61
3115 if (Diff(w[8], w[4]))
3116 {
3117 PIXEL20_0
3118 PIXEL30_0
3119 PIXEL31_0
3120 }
3121 else
3122 {
3123 PIXEL20_50
3124 PIXEL30_50
3125 PIXEL31_50
3126 }
3127 PIXEL21_0
3128 PIXEL22_31
3129 PIXEL23_81
3130 PIXEL32_31
3131 PIXEL33_81
3132 break;
3133 }
3134 case 242:
3135 {
3136 PIXEL00_80
3137 PIXEL01_10
3138 if (Diff(w[2], w[6]))
3139 {
3140 PIXEL02_10
3141 PIXEL03_80
3142 PIXEL12_30
3143 PIXEL13_10
3144 }
3145 else
3146 {
3147 PIXEL02_11
3148 PIXEL03_20
3149 PIXEL12_0
3150 PIXEL13_12
3151 }
3152 PIXEL10_61
3153 PIXEL11_30
3154 PIXEL20_82
3155 PIXEL21_32
3156 PIXEL22_0
3157 if (Diff(w[6], w[8]))
3158 {
3159 PIXEL23_0
3160 PIXEL32_0
3161 PIXEL33_0
3162 }
3163 else
3164 {
3165 PIXEL23_50
3166 PIXEL32_50
3167 PIXEL33_50
3168 }
3169 PIXEL30_82
3170 PIXEL31_32
3171 break;
3172 }
3173 case 59:
3174 {
3175 if (Diff(w[4], w[2]))
3176 {
3177 PIXEL00_0
3178 PIXEL01_0
3179 PIXEL10_0
3180 }
3181 else
3182 {
3183 PIXEL00_50
3184 PIXEL01_50
3185 PIXEL10_50
3186 }
3187 if (Diff(w[2], w[6]))
3188 {
3189 PIXEL02_10
3190 PIXEL03_80
3191 PIXEL12_30
3192 PIXEL13_10
3193 }
3194 else
3195 {
3196 PIXEL02_11
3197 PIXEL03_20
3198 PIXEL12_0
3199 PIXEL13_12
3200 }
3201 PIXEL11_0
3202 PIXEL20_31
3203 PIXEL21_31
3204 PIXEL22_30
3205 PIXEL23_10
3206 PIXEL30_81
3207 PIXEL31_81
3208 PIXEL32_61
3209 PIXEL33_80
3210 break;
3211 }
3212 case 121:
3213 {
3214 PIXEL00_82
3215 PIXEL01_82
3216 PIXEL02_61
3217 PIXEL03_80
3218 PIXEL10_32
3219 PIXEL11_32
3220 PIXEL12_30
3221 PIXEL13_10
3222 if (Diff(w[8], w[4]))
3223 {
3224 PIXEL20_0
3225 PIXEL30_0
3226 PIXEL31_0
3227 }
3228 else
3229 {
3230 PIXEL20_50
3231 PIXEL30_50
3232 PIXEL31_50
3233 }
3234 PIXEL21_0
3235 if (Diff(w[6], w[8]))
3236 {
3237 PIXEL22_30
3238 PIXEL23_10
3239 PIXEL32_10
3240 PIXEL33_80
3241 }
3242 else
3243 {
3244 PIXEL22_0
3245 PIXEL23_11
3246 PIXEL32_12
3247 PIXEL33_20
3248 }
3249 break;
3250 }
3251 case 87:
3252 {
3253 PIXEL00_81
3254 PIXEL01_31
3255 if (Diff(w[2], w[6]))
3256 {
3257 PIXEL02_0
3258 PIXEL03_0
3259 PIXEL13_0
3260 }
3261 else
3262 {
3263 PIXEL02_50
3264 PIXEL03_50
3265 PIXEL13_50
3266 }
3267 PIXEL10_81
3268 PIXEL11_31
3269 PIXEL12_0
3270 PIXEL20_61
3271 PIXEL21_30
3272 if (Diff(w[6], w[8]))
3273 {
3274 PIXEL22_30
3275 PIXEL23_10
3276 PIXEL32_10
3277 PIXEL33_80
3278 }
3279 else
3280 {
3281 PIXEL22_0
3282 PIXEL23_11
3283 PIXEL32_12
3284 PIXEL33_20
3285 }
3286 PIXEL30_80
3287 PIXEL31_10
3288 break;
3289 }
3290 case 79:
3291 {
3292 if (Diff(w[4], w[2]))
3293 {
3294 PIXEL00_0
3295 PIXEL01_0
3296 PIXEL10_0
3297 }
3298 else
3299 {
3300 PIXEL00_50
3301 PIXEL01_50
3302 PIXEL10_50
3303 }
3304 PIXEL02_32
3305 PIXEL03_82
3306 PIXEL11_0
3307 PIXEL12_32
3308 PIXEL13_82
3309 if (Diff(w[8], w[4]))
3310 {
3311 PIXEL20_10
3312 PIXEL21_30
3313 PIXEL30_80
3314 PIXEL31_10
3315 }
3316 else
3317 {
3318 PIXEL20_12
3319 PIXEL21_0
3320 PIXEL30_20
3321 PIXEL31_11
3322 }
3323 PIXEL22_30
3324 PIXEL23_61
3325 PIXEL32_10
3326 PIXEL33_80
3327 break;
3328 }
3329 case 122:
3330 {
3331 if (Diff(w[4], w[2]))
3332 {
3333 PIXEL00_80
3334 PIXEL01_10
3335 PIXEL10_10
3336 PIXEL11_30
3337 }
3338 else
3339 {
3340 PIXEL00_20
3341 PIXEL01_12
3342 PIXEL10_11
3343 PIXEL11_0
3344 }
3345 if (Diff(w[2], w[6]))
3346 {
3347 PIXEL02_10
3348 PIXEL03_80
3349 PIXEL12_30
3350 PIXEL13_10
3351 }
3352 else
3353 {
3354 PIXEL02_11
3355 PIXEL03_20
3356 PIXEL12_0
3357 PIXEL13_12
3358 }
3359 if (Diff(w[8], w[4]))
3360 {
3361 PIXEL20_0
3362 PIXEL30_0
3363 PIXEL31_0
3364 }
3365 else
3366 {
3367 PIXEL20_50
3368 PIXEL30_50
3369 PIXEL31_50
3370 }
3371 PIXEL21_0
3372 if (Diff(w[6], w[8]))
3373 {
3374 PIXEL22_30
3375 PIXEL23_10
3376 PIXEL32_10
3377 PIXEL33_80
3378 }
3379 else
3380 {
3381 PIXEL22_0
3382 PIXEL23_11
3383 PIXEL32_12
3384 PIXEL33_20
3385 }
3386 break;
3387 }
3388 case 94:
3389 {
3390 if (Diff(w[4], w[2]))
3391 {
3392 PIXEL00_80
3393 PIXEL01_10
3394 PIXEL10_10
3395 PIXEL11_30
3396 }
3397 else
3398 {
3399 PIXEL00_20
3400 PIXEL01_12
3401 PIXEL10_11
3402 PIXEL11_0
3403 }
3404 if (Diff(w[2], w[6]))
3405 {
3406 PIXEL02_0
3407 PIXEL03_0
3408 PIXEL13_0
3409 }
3410 else
3411 {
3412 PIXEL02_50
3413 PIXEL03_50
3414 PIXEL13_50
3415 }
3416 PIXEL12_0
3417 if (Diff(w[8], w[4]))
3418 {
3419 PIXEL20_10
3420 PIXEL21_30
3421 PIXEL30_80
3422 PIXEL31_10
3423 }
3424 else
3425 {
3426 PIXEL20_12
3427 PIXEL21_0
3428 PIXEL30_20
3429 PIXEL31_11
3430 }
3431 if (Diff(w[6], w[8]))
3432 {
3433 PIXEL22_30
3434 PIXEL23_10
3435 PIXEL32_10
3436 PIXEL33_80
3437 }
3438 else
3439 {
3440 PIXEL22_0
3441 PIXEL23_11
3442 PIXEL32_12
3443 PIXEL33_20
3444 }
3445 break;
3446 }
3447 case 218:
3448 {
3449 if (Diff(w[4], w[2]))
3450 {
3451 PIXEL00_80
3452 PIXEL01_10
3453 PIXEL10_10
3454 PIXEL11_30
3455 }
3456 else
3457 {
3458 PIXEL00_20
3459 PIXEL01_12
3460 PIXEL10_11
3461 PIXEL11_0
3462 }
3463 if (Diff(w[2], w[6]))
3464 {
3465 PIXEL02_10
3466 PIXEL03_80
3467 PIXEL12_30
3468 PIXEL13_10
3469 }
3470 else
3471 {
3472 PIXEL02_11
3473 PIXEL03_20
3474 PIXEL12_0
3475 PIXEL13_12
3476 }
3477 if (Diff(w[8], w[4]))
3478 {
3479 PIXEL20_10
3480 PIXEL21_30
3481 PIXEL30_80
3482 PIXEL31_10
3483 }
3484 else
3485 {
3486 PIXEL20_12
3487 PIXEL21_0
3488 PIXEL30_20
3489 PIXEL31_11
3490 }
3491 PIXEL22_0
3492 if (Diff(w[6], w[8]))
3493 {
3494 PIXEL23_0
3495 PIXEL32_0
3496 PIXEL33_0
3497 }
3498 else
3499 {
3500 PIXEL23_50
3501 PIXEL32_50
3502 PIXEL33_50
3503 }
3504 break;
3505 }
3506 case 91:
3507 {
3508 if (Diff(w[4], w[2]))
3509 {
3510 PIXEL00_0
3511 PIXEL01_0
3512 PIXEL10_0
3513 }
3514 else
3515 {
3516 PIXEL00_50
3517 PIXEL01_50
3518 PIXEL10_50
3519 }
3520 if (Diff(w[2], w[6]))
3521 {
3522 PIXEL02_10
3523 PIXEL03_80
3524 PIXEL12_30
3525 PIXEL13_10
3526 }
3527 else
3528 {
3529 PIXEL02_11
3530 PIXEL03_20
3531 PIXEL12_0
3532 PIXEL13_12
3533 }
3534 PIXEL11_0
3535 if (Diff(w[8], w[4]))
3536 {
3537 PIXEL20_10
3538 PIXEL21_30
3539 PIXEL30_80
3540 PIXEL31_10
3541 }
3542 else
3543 {
3544 PIXEL20_12
3545 PIXEL21_0
3546 PIXEL30_20
3547 PIXEL31_11
3548 }
3549 if (Diff(w[6], w[8]))
3550 {
3551 PIXEL22_30
3552 PIXEL23_10
3553 PIXEL32_10
3554 PIXEL33_80
3555 }
3556 else
3557 {
3558 PIXEL22_0
3559 PIXEL23_11
3560 PIXEL32_12
3561 PIXEL33_20
3562 }
3563 break;
3564 }
3565 case 229:
3566 {
3567 PIXEL00_20
3568 PIXEL01_60
3569 PIXEL02_60
3570 PIXEL03_20
3571 PIXEL10_60
3572 PIXEL11_70
3573 PIXEL12_70
3574 PIXEL13_60
3575 PIXEL20_82
3576 PIXEL21_32
3577 PIXEL22_31
3578 PIXEL23_81
3579 PIXEL30_82
3580 PIXEL31_32
3581 PIXEL32_31
3582 PIXEL33_81
3583 break;
3584 }
3585 case 167:
3586 {
3587 PIXEL00_81
3588 PIXEL01_31
3589 PIXEL02_32
3590 PIXEL03_82
3591 PIXEL10_81
3592 PIXEL11_31
3593 PIXEL12_32
3594 PIXEL13_82
3595 PIXEL20_60
3596 PIXEL21_70
3597 PIXEL22_70
3598 PIXEL23_60
3599 PIXEL30_20
3600 PIXEL31_60
3601 PIXEL32_60
3602 PIXEL33_20
3603 break;
3604 }
3605 case 173:
3606 {
3607 PIXEL00_82
3608 PIXEL01_82
3609 PIXEL02_60
3610 PIXEL03_20
3611 PIXEL10_32
3612 PIXEL11_32
3613 PIXEL12_70
3614 PIXEL13_60
3615 PIXEL20_31
3616 PIXEL21_31
3617 PIXEL22_70
3618 PIXEL23_60
3619 PIXEL30_81
3620 PIXEL31_81
3621 PIXEL32_60
3622 PIXEL33_20
3623 break;
3624 }
3625 case 181:
3626 {
3627 PIXEL00_20
3628 PIXEL01_60
3629 PIXEL02_81
3630 PIXEL03_81
3631 PIXEL10_60
3632 PIXEL11_70
3633 PIXEL12_31
3634 PIXEL13_31
3635 PIXEL20_60
3636 PIXEL21_70
3637 PIXEL22_32
3638 PIXEL23_32
3639 PIXEL30_20
3640 PIXEL31_60
3641 PIXEL32_82
3642 PIXEL33_82
3643 break;
3644 }
3645 case 186:
3646 {
3647 if (Diff(w[4], w[2]))
3648 {
3649 PIXEL00_80
3650 PIXEL01_10
3651 PIXEL10_10
3652 PIXEL11_30
3653 }
3654 else
3655 {
3656 PIXEL00_20
3657 PIXEL01_12
3658 PIXEL10_11
3659 PIXEL11_0
3660 }
3661 if (Diff(w[2], w[6]))
3662 {
3663 PIXEL02_10
3664 PIXEL03_80
3665 PIXEL12_30
3666 PIXEL13_10
3667 }
3668 else
3669 {
3670 PIXEL02_11
3671 PIXEL03_20
3672 PIXEL12_0
3673 PIXEL13_12
3674 }
3675 PIXEL20_31
3676 PIXEL21_31
3677 PIXEL22_32
3678 PIXEL23_32
3679 PIXEL30_81
3680 PIXEL31_81
3681 PIXEL32_82
3682 PIXEL33_82
3683 break;
3684 }
3685 case 115:
3686 {
3687 PIXEL00_81
3688 PIXEL01_31
3689 if (Diff(w[2], w[6]))
3690 {
3691 PIXEL02_10
3692 PIXEL03_80
3693 PIXEL12_30
3694 PIXEL13_10
3695 }
3696 else
3697 {
3698 PIXEL02_11
3699 PIXEL03_20
3700 PIXEL12_0
3701 PIXEL13_12
3702 }
3703 PIXEL10_81
3704 PIXEL11_31
3705 PIXEL20_82
3706 PIXEL21_32
3707 if (Diff(w[6], w[8]))
3708 {
3709 PIXEL22_30
3710 PIXEL23_10
3711 PIXEL32_10
3712 PIXEL33_80
3713 }
3714 else
3715 {
3716 PIXEL22_0
3717 PIXEL23_11
3718 PIXEL32_12
3719 PIXEL33_20
3720 }
3721 PIXEL30_82
3722 PIXEL31_32
3723 break;
3724 }
3725 case 93:
3726 {
3727 PIXEL00_82
3728 PIXEL01_82
3729 PIXEL02_81
3730 PIXEL03_81
3731 PIXEL10_32
3732 PIXEL11_32
3733 PIXEL12_31
3734 PIXEL13_31
3735 if (Diff(w[8], w[4]))
3736 {
3737 PIXEL20_10
3738 PIXEL21_30
3739 PIXEL30_80
3740 PIXEL31_10
3741 }
3742 else
3743 {
3744 PIXEL20_12
3745 PIXEL21_0
3746 PIXEL30_20
3747 PIXEL31_11
3748 }
3749 if (Diff(w[6], w[8]))
3750 {
3751 PIXEL22_30
3752 PIXEL23_10
3753 PIXEL32_10
3754 PIXEL33_80
3755 }
3756 else
3757 {
3758 PIXEL22_0
3759 PIXEL23_11
3760 PIXEL32_12
3761 PIXEL33_20
3762 }
3763 break;
3764 }
3765 case 206:
3766 {
3767 if (Diff(w[4], w[2]))
3768 {
3769 PIXEL00_80
3770 PIXEL01_10
3771 PIXEL10_10
3772 PIXEL11_30
3773 }
3774 else
3775 {
3776 PIXEL00_20
3777 PIXEL01_12
3778 PIXEL10_11
3779 PIXEL11_0
3780 }
3781 PIXEL02_32
3782 PIXEL03_82
3783 PIXEL12_32
3784 PIXEL13_82
3785 if (Diff(w[8], w[4]))
3786 {
3787 PIXEL20_10
3788 PIXEL21_30
3789 PIXEL30_80
3790 PIXEL31_10
3791 }
3792 else
3793 {
3794 PIXEL20_12
3795 PIXEL21_0
3796 PIXEL30_20
3797 PIXEL31_11
3798 }
3799 PIXEL22_31
3800 PIXEL23_81
3801 PIXEL32_31
3802 PIXEL33_81
3803 break;
3804 }
3805 case 205:
3806 case 201:
3807 {
3808 PIXEL00_82
3809 PIXEL01_82
3810 PIXEL02_60
3811 PIXEL03_20
3812 PIXEL10_32
3813 PIXEL11_32
3814 PIXEL12_70
3815 PIXEL13_60
3816 if (Diff(w[8], w[4]))
3817 {
3818 PIXEL20_10
3819 PIXEL21_30
3820 PIXEL30_80
3821 PIXEL31_10
3822 }
3823 else
3824 {
3825 PIXEL20_12
3826 PIXEL21_0
3827 PIXEL30_20
3828 PIXEL31_11
3829 }
3830 PIXEL22_31
3831 PIXEL23_81
3832 PIXEL32_31
3833 PIXEL33_81
3834 break;
3835 }
3836 case 174:
3837 case 46:
3838 {
3839 if (Diff(w[4], w[2]))
3840 {
3841 PIXEL00_80
3842 PIXEL01_10
3843 PIXEL10_10
3844 PIXEL11_30
3845 }
3846 else
3847 {
3848 PIXEL00_20
3849 PIXEL01_12
3850 PIXEL10_11
3851 PIXEL11_0
3852 }
3853 PIXEL02_32
3854 PIXEL03_82
3855 PIXEL12_32
3856 PIXEL13_82
3857 PIXEL20_31
3858 PIXEL21_31
3859 PIXEL22_70
3860 PIXEL23_60
3861 PIXEL30_81
3862 PIXEL31_81
3863 PIXEL32_60
3864 PIXEL33_20
3865 break;
3866 }
3867 case 179:
3868 case 147:
3869 {
3870 PIXEL00_81
3871 PIXEL01_31
3872 if (Diff(w[2], w[6]))
3873 {
3874 PIXEL02_10
3875 PIXEL03_80
3876 PIXEL12_30
3877 PIXEL13_10
3878 }
3879 else
3880 {
3881 PIXEL02_11
3882 PIXEL03_20
3883 PIXEL12_0
3884 PIXEL13_12
3885 }
3886 PIXEL10_81
3887 PIXEL11_31
3888 PIXEL20_60
3889 PIXEL21_70
3890 PIXEL22_32
3891 PIXEL23_32
3892 PIXEL30_20
3893 PIXEL31_60
3894 PIXEL32_82
3895 PIXEL33_82
3896 break;
3897 }
3898 case 117:
3899 case 116:
3900 {
3901 PIXEL00_20
3902 PIXEL01_60
3903 PIXEL02_81
3904 PIXEL03_81
3905 PIXEL10_60
3906 PIXEL11_70
3907 PIXEL12_31
3908 PIXEL13_31
3909 PIXEL20_82
3910 PIXEL21_32
3911 if (Diff(w[6], w[8]))
3912 {
3913 PIXEL22_30
3914 PIXEL23_10
3915 PIXEL32_10
3916 PIXEL33_80
3917 }
3918 else
3919 {
3920 PIXEL22_0
3921 PIXEL23_11
3922 PIXEL32_12
3923 PIXEL33_20
3924 }
3925 PIXEL30_82
3926 PIXEL31_32
3927 break;
3928 }
3929 case 189:
3930 {
3931 PIXEL00_82
3932 PIXEL01_82
3933 PIXEL02_81
3934 PIXEL03_81
3935 PIXEL10_32
3936 PIXEL11_32
3937 PIXEL12_31
3938 PIXEL13_31
3939 PIXEL20_31
3940 PIXEL21_31
3941 PIXEL22_32
3942 PIXEL23_32
3943 PIXEL30_81
3944 PIXEL31_81
3945 PIXEL32_82
3946 PIXEL33_82
3947 break;
3948 }
3949 case 231:
3950 {
3951 PIXEL00_81
3952 PIXEL01_31
3953 PIXEL02_32
3954 PIXEL03_82
3955 PIXEL10_81
3956 PIXEL11_31
3957 PIXEL12_32
3958 PIXEL13_82
3959 PIXEL20_82
3960 PIXEL21_32
3961 PIXEL22_31
3962 PIXEL23_81
3963 PIXEL30_82
3964 PIXEL31_32
3965 PIXEL32_31
3966 PIXEL33_81
3967 break;
3968 }
3969 case 126:
3970 {
3971 PIXEL00_80
3972 PIXEL01_10
3973 if (Diff(w[2], w[6]))
3974 {
3975 PIXEL02_0
3976 PIXEL03_0
3977 PIXEL13_0
3978 }
3979 else
3980 {
3981 PIXEL02_50
3982 PIXEL03_50
3983 PIXEL13_50
3984 }
3985 PIXEL10_10
3986 PIXEL11_30
3987 PIXEL12_0
3988 if (Diff(w[8], w[4]))
3989 {
3990 PIXEL20_0
3991 PIXEL30_0
3992 PIXEL31_0
3993 }
3994 else
3995 {
3996 PIXEL20_50
3997 PIXEL30_50
3998 PIXEL31_50
3999 }
4000 PIXEL21_0
4001 PIXEL22_30
4002 PIXEL23_10
4003 PIXEL32_10
4004 PIXEL33_80
4005 break;
4006 }
4007 case 219:
4008 {
4009 if (Diff(w[4], w[2]))
4010 {
4011 PIXEL00_0
4012 PIXEL01_0
4013 PIXEL10_0
4014 }
4015 else
4016 {
4017 PIXEL00_50
4018 PIXEL01_50
4019 PIXEL10_50
4020 }
4021 PIXEL02_10
4022 PIXEL03_80
4023 PIXEL11_0
4024 PIXEL12_30
4025 PIXEL13_10
4026 PIXEL20_10
4027 PIXEL21_30
4028 PIXEL22_0
4029 if (Diff(w[6], w[8]))
4030 {
4031 PIXEL23_0
4032 PIXEL32_0
4033 PIXEL33_0
4034 }
4035 else
4036 {
4037 PIXEL23_50
4038 PIXEL32_50
4039 PIXEL33_50
4040 }
4041 PIXEL30_80
4042 PIXEL31_10
4043 break;
4044 }
4045 case 125:
4046 {
4047 if (Diff(w[8], w[4]))
4048 {
4049 PIXEL00_82
4050 PIXEL10_32
4051 PIXEL20_0
4052 PIXEL21_0
4053 PIXEL30_0
4054 PIXEL31_0
4055 }
4056 else
4057 {
4058 PIXEL00_11
4059 PIXEL10_13
4060 PIXEL20_83
4061 PIXEL21_70
4062 PIXEL30_50
4063 PIXEL31_21
4064 }
4065 PIXEL01_82
4066 PIXEL02_81
4067 PIXEL03_81
4068 PIXEL11_32
4069 PIXEL12_31
4070 PIXEL13_31
4071 PIXEL22_30
4072 PIXEL23_10
4073 PIXEL32_10
4074 PIXEL33_80
4075 break;
4076 }
4077 case 221:
4078 {
4079 PIXEL00_82
4080 PIXEL01_82
4081 PIXEL02_81
4082 if (Diff(w[6], w[8]))
4083 {
4084 PIXEL03_81
4085 PIXEL13_31
4086 PIXEL22_0
4087 PIXEL23_0
4088 PIXEL32_0
4089 PIXEL33_0
4090 }
4091 else
4092 {
4093 PIXEL03_12
4094 PIXEL13_14
4095 PIXEL22_70
4096 PIXEL23_83
4097 PIXEL32_21
4098 PIXEL33_50
4099 }
4100 PIXEL10_32
4101 PIXEL11_32
4102 PIXEL12_31
4103 PIXEL20_10
4104 PIXEL21_30
4105 PIXEL30_80
4106 PIXEL31_10
4107 break;
4108 }
4109 case 207:
4110 {
4111 if (Diff(w[4], w[2]))
4112 {
4113 PIXEL00_0
4114 PIXEL01_0
4115 PIXEL02_32
4116 PIXEL03_82
4117 PIXEL10_0
4118 PIXEL11_0
4119 }
4120 else
4121 {
4122 PIXEL00_50
4123 PIXEL01_83
4124 PIXEL02_13
4125 PIXEL03_11
4126 PIXEL10_21
4127 PIXEL11_70
4128 }
4129 PIXEL12_32
4130 PIXEL13_82
4131 PIXEL20_10
4132 PIXEL21_30
4133 PIXEL22_31
4134 PIXEL23_81
4135 PIXEL30_80
4136 PIXEL31_10
4137 PIXEL32_31
4138 PIXEL33_81
4139 break;
4140 }
4141 case 238:
4142 {
4143 PIXEL00_80
4144 PIXEL01_10
4145 PIXEL02_32
4146 PIXEL03_82
4147 PIXEL10_10
4148 PIXEL11_30
4149 PIXEL12_32
4150 PIXEL13_82
4151 if (Diff(w[8], w[4]))
4152 {
4153 PIXEL20_0
4154 PIXEL21_0
4155 PIXEL30_0
4156 PIXEL31_0
4157 PIXEL32_31
4158 PIXEL33_81
4159 }
4160 else
4161 {
4162 PIXEL20_21
4163 PIXEL21_70
4164 PIXEL30_50
4165 PIXEL31_83
4166 PIXEL32_14
4167 PIXEL33_12
4168 }
4169 PIXEL22_31
4170 PIXEL23_81
4171 break;
4172 }
4173 case 190:
4174 {
4175 PIXEL00_80
4176 PIXEL01_10
4177 if (Diff(w[2], w[6]))
4178 {
4179 PIXEL02_0
4180 PIXEL03_0
4181 PIXEL12_0
4182 PIXEL13_0
4183 PIXEL23_32
4184 PIXEL33_82
4185 }
4186 else
4187 {
4188 PIXEL02_21
4189 PIXEL03_50
4190 PIXEL12_70
4191 PIXEL13_83
4192 PIXEL23_13
4193 PIXEL33_11
4194 }
4195 PIXEL10_10
4196 PIXEL11_30
4197 PIXEL20_31
4198 PIXEL21_31
4199 PIXEL22_32
4200 PIXEL30_81
4201 PIXEL31_81
4202 PIXEL32_82
4203 break;
4204 }
4205 case 187:
4206 {
4207 if (Diff(w[4], w[2]))
4208 {
4209 PIXEL00_0
4210 PIXEL01_0
4211 PIXEL10_0
4212 PIXEL11_0
4213 PIXEL20_31
4214 PIXEL30_81
4215 }
4216 else
4217 {
4218 PIXEL00_50
4219 PIXEL01_21
4220 PIXEL10_83
4221 PIXEL11_70
4222 PIXEL20_14
4223 PIXEL30_12
4224 }
4225 PIXEL02_10
4226 PIXEL03_80
4227 PIXEL12_30
4228 PIXEL13_10
4229 PIXEL21_31
4230 PIXEL22_32
4231 PIXEL23_32
4232 PIXEL31_81
4233 PIXEL32_82
4234 PIXEL33_82
4235 break;
4236 }
4237 case 243:
4238 {
4239 PIXEL00_81
4240 PIXEL01_31
4241 PIXEL02_10
4242 PIXEL03_80
4243 PIXEL10_81
4244 PIXEL11_31
4245 PIXEL12_30
4246 PIXEL13_10
4247 PIXEL20_82
4248 PIXEL21_32
4249 if (Diff(w[6], w[8]))
4250 {
4251 PIXEL22_0
4252 PIXEL23_0
4253 PIXEL30_82
4254 PIXEL31_32
4255 PIXEL32_0
4256 PIXEL33_0
4257 }
4258 else
4259 {
4260 PIXEL22_70
4261 PIXEL23_21
4262 PIXEL30_11
4263 PIXEL31_13
4264 PIXEL32_83
4265 PIXEL33_50
4266 }
4267 break;
4268 }
4269 case 119:
4270 {
4271 if (Diff(w[2], w[6]))
4272 {
4273 PIXEL00_81
4274 PIXEL01_31
4275 PIXEL02_0
4276 PIXEL03_0
4277 PIXEL12_0
4278 PIXEL13_0
4279 }
4280 else
4281 {
4282 PIXEL00_12
4283 PIXEL01_14
4284 PIXEL02_83
4285 PIXEL03_50
4286 PIXEL12_70
4287 PIXEL13_21
4288 }
4289 PIXEL10_81
4290 PIXEL11_31
4291 PIXEL20_82
4292 PIXEL21_32
4293 PIXEL22_30
4294 PIXEL23_10
4295 PIXEL30_82
4296 PIXEL31_32
4297 PIXEL32_10
4298 PIXEL33_80
4299 break;
4300 }
4301 case 237:
4302 case 233:
4303 {
4304 PIXEL00_82
4305 PIXEL01_82
4306 PIXEL02_60
4307 PIXEL03_20
4308 PIXEL10_32
4309 PIXEL11_32
4310 PIXEL12_70
4311 PIXEL13_60
4312 PIXEL20_0
4313 PIXEL21_0
4314 PIXEL22_31
4315 PIXEL23_81
4316 if (Diff(w[8], w[4]))
4317 {
4318 PIXEL30_0
4319 }
4320 else
4321 {
4322 PIXEL30_20
4323 }
4324 PIXEL31_0
4325 PIXEL32_31
4326 PIXEL33_81
4327 break;
4328 }
4329 case 175:
4330 case 47:
4331 {
4332 if (Diff(w[4], w[2]))
4333 {
4334 PIXEL00_0
4335 }
4336 else
4337 {
4338 PIXEL00_20
4339 }
4340 PIXEL01_0
4341 PIXEL02_32
4342 PIXEL03_82
4343 PIXEL10_0
4344 PIXEL11_0
4345 PIXEL12_32
4346 PIXEL13_82
4347 PIXEL20_31
4348 PIXEL21_31
4349 PIXEL22_70
4350 PIXEL23_60
4351 PIXEL30_81
4352 PIXEL31_81
4353 PIXEL32_60
4354 PIXEL33_20
4355 break;
4356 }
4357 case 183:
4358 case 151:
4359 {
4360 PIXEL00_81
4361 PIXEL01_31
4362 PIXEL02_0
4363 if (Diff(w[2], w[6]))
4364 {
4365 PIXEL03_0
4366 }
4367 else
4368 {
4369 PIXEL03_20
4370 }
4371 PIXEL10_81
4372 PIXEL11_31
4373 PIXEL12_0
4374 PIXEL13_0
4375 PIXEL20_60
4376 PIXEL21_70
4377 PIXEL22_32
4378 PIXEL23_32
4379 PIXEL30_20
4380 PIXEL31_60
4381 PIXEL32_82
4382 PIXEL33_82
4383 break;
4384 }
4385 case 245:
4386 case 244:
4387 {
4388 PIXEL00_20
4389 PIXEL01_60
4390 PIXEL02_81
4391 PIXEL03_81
4392 PIXEL10_60
4393 PIXEL11_70
4394 PIXEL12_31
4395 PIXEL13_31
4396 PIXEL20_82
4397 PIXEL21_32
4398 PIXEL22_0
4399 PIXEL23_0
4400 PIXEL30_82
4401 PIXEL31_32
4402 PIXEL32_0
4403 if (Diff(w[6], w[8]))
4404 {
4405 PIXEL33_0
4406 }
4407 else
4408 {
4409 PIXEL33_20
4410 }
4411 break;
4412 }
4413 case 250:
4414 {
4415 PIXEL00_80
4416 PIXEL01_10
4417 PIXEL02_10
4418 PIXEL03_80
4419 PIXEL10_10
4420 PIXEL11_30
4421 PIXEL12_30
4422 PIXEL13_10
4423 if (Diff(w[8], w[4]))
4424 {
4425 PIXEL20_0
4426 PIXEL30_0
4427 PIXEL31_0
4428 }
4429 else
4430 {
4431 PIXEL20_50
4432 PIXEL30_50
4433 PIXEL31_50
4434 }
4435 PIXEL21_0
4436 PIXEL22_0
4437 if (Diff(w[6], w[8]))
4438 {
4439 PIXEL23_0
4440 PIXEL32_0
4441 PIXEL33_0
4442 }
4443 else
4444 {
4445 PIXEL23_50
4446 PIXEL32_50
4447 PIXEL33_50
4448 }
4449 break;
4450 }
4451 case 123:
4452 {
4453 if (Diff(w[4], w[2]))
4454 {
4455 PIXEL00_0
4456 PIXEL01_0
4457 PIXEL10_0
4458 }
4459 else
4460 {
4461 PIXEL00_50
4462 PIXEL01_50
4463 PIXEL10_50
4464 }
4465 PIXEL02_10
4466 PIXEL03_80
4467 PIXEL11_0
4468 PIXEL12_30
4469 PIXEL13_10
4470 if (Diff(w[8], w[4]))
4471 {
4472 PIXEL20_0
4473 PIXEL30_0
4474 PIXEL31_0
4475 }
4476 else
4477 {
4478 PIXEL20_50
4479 PIXEL30_50
4480 PIXEL31_50
4481 }
4482 PIXEL21_0
4483 PIXEL22_30
4484 PIXEL23_10
4485 PIXEL32_10
4486 PIXEL33_80
4487 break;
4488 }
4489 case 95:
4490 {
4491 if (Diff(w[4], w[2]))
4492 {
4493 PIXEL00_0
4494 PIXEL01_0
4495 PIXEL10_0
4496 }
4497 else
4498 {
4499 PIXEL00_50
4500 PIXEL01_50
4501 PIXEL10_50
4502 }
4503 if (Diff(w[2], w[6]))
4504 {
4505 PIXEL02_0
4506 PIXEL03_0
4507 PIXEL13_0
4508 }
4509 else
4510 {
4511 PIXEL02_50
4512 PIXEL03_50
4513 PIXEL13_50
4514 }
4515 PIXEL11_0
4516 PIXEL12_0
4517 PIXEL20_10
4518 PIXEL21_30
4519 PIXEL22_30
4520 PIXEL23_10
4521 PIXEL30_80
4522 PIXEL31_10
4523 PIXEL32_10
4524 PIXEL33_80
4525 break;
4526 }
4527 case 222:
4528 {
4529 PIXEL00_80
4530 PIXEL01_10
4531 if (Diff(w[2], w[6]))
4532 {
4533 PIXEL02_0
4534 PIXEL03_0
4535 PIXEL13_0
4536 }
4537 else
4538 {
4539 PIXEL02_50
4540 PIXEL03_50
4541 PIXEL13_50
4542 }
4543 PIXEL10_10
4544 PIXEL11_30
4545 PIXEL12_0
4546 PIXEL20_10
4547 PIXEL21_30
4548 PIXEL22_0
4549 if (Diff(w[6], w[8]))
4550 {
4551 PIXEL23_0
4552 PIXEL32_0
4553 PIXEL33_0
4554 }
4555 else
4556 {
4557 PIXEL23_50
4558 PIXEL32_50
4559 PIXEL33_50
4560 }
4561 PIXEL30_80
4562 PIXEL31_10
4563 break;
4564 }
4565 case 252:
4566 {
4567 PIXEL00_80
4568 PIXEL01_61
4569 PIXEL02_81
4570 PIXEL03_81
4571 PIXEL10_10
4572 PIXEL11_30
4573 PIXEL12_31
4574 PIXEL13_31
4575 if (Diff(w[8], w[4]))
4576 {
4577 PIXEL20_0
4578 PIXEL30_0
4579 PIXEL31_0
4580 }
4581 else
4582 {
4583 PIXEL20_50
4584 PIXEL30_50
4585 PIXEL31_50
4586 }
4587 PIXEL21_0
4588 PIXEL22_0
4589 PIXEL23_0
4590 PIXEL32_0
4591 if (Diff(w[6], w[8]))
4592 {
4593 PIXEL33_0
4594 }
4595 else
4596 {
4597 PIXEL33_20
4598 }
4599 break;
4600 }
4601 case 249:
4602 {
4603 PIXEL00_82
4604 PIXEL01_82
4605 PIXEL02_61
4606 PIXEL03_80
4607 PIXEL10_32
4608 PIXEL11_32
4609 PIXEL12_30
4610 PIXEL13_10
4611 PIXEL20_0
4612 PIXEL21_0
4613 PIXEL22_0
4614 if (Diff(w[6], w[8]))
4615 {
4616 PIXEL23_0
4617 PIXEL32_0
4618 PIXEL33_0
4619 }
4620 else
4621 {
4622 PIXEL23_50
4623 PIXEL32_50
4624 PIXEL33_50
4625 }
4626 if (Diff(w[8], w[4]))
4627 {
4628 PIXEL30_0
4629 }
4630 else
4631 {
4632 PIXEL30_20
4633 }
4634 PIXEL31_0
4635 break;
4636 }
4637 case 235:
4638 {
4639 if (Diff(w[4], w[2]))
4640 {
4641 PIXEL00_0
4642 PIXEL01_0
4643 PIXEL10_0
4644 }
4645 else
4646 {
4647 PIXEL00_50
4648 PIXEL01_50
4649 PIXEL10_50
4650 }
4651 PIXEL02_10
4652 PIXEL03_80
4653 PIXEL11_0
4654 PIXEL12_30
4655 PIXEL13_61
4656 PIXEL20_0
4657 PIXEL21_0
4658 PIXEL22_31
4659 PIXEL23_81
4660 if (Diff(w[8], w[4]))
4661 {
4662 PIXEL30_0
4663 }
4664 else
4665 {
4666 PIXEL30_20
4667 }
4668 PIXEL31_0
4669 PIXEL32_31
4670 PIXEL33_81
4671 break;
4672 }
4673 case 111:
4674 {
4675 if (Diff(w[4], w[2]))
4676 {
4677 PIXEL00_0
4678 }
4679 else
4680 {
4681 PIXEL00_20
4682 }
4683 PIXEL01_0
4684 PIXEL02_32
4685 PIXEL03_82
4686 PIXEL10_0
4687 PIXEL11_0
4688 PIXEL12_32
4689 PIXEL13_82
4690 if (Diff(w[8], w[4]))
4691 {
4692 PIXEL20_0
4693 PIXEL30_0
4694 PIXEL31_0
4695 }
4696 else
4697 {
4698 PIXEL20_50
4699 PIXEL30_50
4700 PIXEL31_50
4701 }
4702 PIXEL21_0
4703 PIXEL22_30
4704 PIXEL23_61
4705 PIXEL32_10
4706 PIXEL33_80
4707 break;
4708 }
4709 case 63:
4710 {
4711 if (Diff(w[4], w[2]))
4712 {
4713 PIXEL00_0
4714 }
4715 else
4716 {
4717 PIXEL00_20
4718 }
4719 PIXEL01_0
4720 if (Diff(w[2], w[6]))
4721 {
4722 PIXEL02_0
4723 PIXEL03_0
4724 PIXEL13_0
4725 }
4726 else
4727 {
4728 PIXEL02_50
4729 PIXEL03_50
4730 PIXEL13_50
4731 }
4732 PIXEL10_0
4733 PIXEL11_0
4734 PIXEL12_0
4735 PIXEL20_31
4736 PIXEL21_31
4737 PIXEL22_30
4738 PIXEL23_10
4739 PIXEL30_81
4740 PIXEL31_81
4741 PIXEL32_61
4742 PIXEL33_80
4743 break;
4744 }
4745 case 159:
4746 {
4747 if (Diff(w[4], w[2]))
4748 {
4749 PIXEL00_0
4750 PIXEL01_0
4751 PIXEL10_0
4752 }
4753 else
4754 {
4755 PIXEL00_50
4756 PIXEL01_50
4757 PIXEL10_50
4758 }
4759 PIXEL02_0
4760 if (Diff(w[2], w[6]))
4761 {
4762 PIXEL03_0
4763 }
4764 else
4765 {
4766 PIXEL03_20
4767 }
4768 PIXEL11_0
4769 PIXEL12_0
4770 PIXEL13_0
4771 PIXEL20_10
4772 PIXEL21_30
4773 PIXEL22_32
4774 PIXEL23_32
4775 PIXEL30_80
4776 PIXEL31_61
4777 PIXEL32_82
4778 PIXEL33_82
4779 break;
4780 }
4781 case 215:
4782 {
4783 PIXEL00_81
4784 PIXEL01_31
4785 PIXEL02_0
4786 if (Diff(w[2], w[6]))
4787 {
4788 PIXEL03_0
4789 }
4790 else
4791 {
4792 PIXEL03_20
4793 }
4794 PIXEL10_81
4795 PIXEL11_31
4796 PIXEL12_0
4797 PIXEL13_0
4798 PIXEL20_61
4799 PIXEL21_30
4800 PIXEL22_0
4801 if (Diff(w[6], w[8]))
4802 {
4803 PIXEL23_0
4804 PIXEL32_0
4805 PIXEL33_0
4806 }
4807 else
4808 {
4809 PIXEL23_50
4810 PIXEL32_50
4811 PIXEL33_50
4812 }
4813 PIXEL30_80
4814 PIXEL31_10
4815 break;
4816 }
4817 case 246:
4818 {
4819 PIXEL00_80
4820 PIXEL01_10
4821 if (Diff(w[2], w[6]))
4822 {
4823 PIXEL02_0
4824 PIXEL03_0
4825 PIXEL13_0
4826 }
4827 else
4828 {
4829 PIXEL02_50
4830 PIXEL03_50
4831 PIXEL13_50
4832 }
4833 PIXEL10_61
4834 PIXEL11_30
4835 PIXEL12_0
4836 PIXEL20_82
4837 PIXEL21_32
4838 PIXEL22_0
4839 PIXEL23_0
4840 PIXEL30_82
4841 PIXEL31_32
4842 PIXEL32_0
4843 if (Diff(w[6], w[8]))
4844 {
4845 PIXEL33_0
4846 }
4847 else
4848 {
4849 PIXEL33_20
4850 }
4851 break;
4852 }
4853 case 254:
4854 {
4855 PIXEL00_80
4856 PIXEL01_10
4857 if (Diff(w[2], w[6]))
4858 {
4859 PIXEL02_0
4860 PIXEL03_0
4861 PIXEL13_0
4862 }
4863 else
4864 {
4865 PIXEL02_50
4866 PIXEL03_50
4867 PIXEL13_50
4868 }
4869 PIXEL10_10
4870 PIXEL11_30
4871 PIXEL12_0
4872 if (Diff(w[8], w[4]))
4873 {
4874 PIXEL20_0
4875 PIXEL30_0
4876 PIXEL31_0
4877 }
4878 else
4879 {
4880 PIXEL20_50
4881 PIXEL30_50
4882 PIXEL31_50
4883 }
4884 PIXEL21_0
4885 PIXEL22_0
4886 PIXEL23_0
4887 PIXEL32_0
4888 if (Diff(w[6], w[8]))
4889 {
4890 PIXEL33_0
4891 }
4892 else
4893 {
4894 PIXEL33_20
4895 }
4896 break;
4897 }
4898 case 253:
4899 {
4900 PIXEL00_82
4901 PIXEL01_82
4902 PIXEL02_81
4903 PIXEL03_81
4904 PIXEL10_32
4905 PIXEL11_32
4906 PIXEL12_31
4907 PIXEL13_31
4908 PIXEL20_0
4909 PIXEL21_0
4910 PIXEL22_0
4911 PIXEL23_0
4912 if (Diff(w[8], w[4]))
4913 {
4914 PIXEL30_0
4915 }
4916 else
4917 {
4918 PIXEL30_20
4919 }
4920 PIXEL31_0
4921 PIXEL32_0
4922 if (Diff(w[6], w[8]))
4923 {
4924 PIXEL33_0
4925 }
4926 else
4927 {
4928 PIXEL33_20
4929 }
4930 break;
4931 }
4932 case 251:
4933 {
4934 if (Diff(w[4], w[2]))
4935 {
4936 PIXEL00_0
4937 PIXEL01_0
4938 PIXEL10_0
4939 }
4940 else
4941 {
4942 PIXEL00_50
4943 PIXEL01_50
4944 PIXEL10_50
4945 }
4946 PIXEL02_10
4947 PIXEL03_80
4948 PIXEL11_0
4949 PIXEL12_30
4950 PIXEL13_10
4951 PIXEL20_0
4952 PIXEL21_0
4953 PIXEL22_0
4954 if (Diff(w[6], w[8]))
4955 {
4956 PIXEL23_0
4957 PIXEL32_0
4958 PIXEL33_0
4959 }
4960 else
4961 {
4962 PIXEL23_50
4963 PIXEL32_50
4964 PIXEL33_50
4965 }
4966 if (Diff(w[8], w[4]))
4967 {
4968 PIXEL30_0
4969 }
4970 else
4971 {
4972 PIXEL30_20
4973 }
4974 PIXEL31_0
4975 break;
4976 }
4977 case 239:
4978 {
4979 if (Diff(w[4], w[2]))
4980 {
4981 PIXEL00_0
4982 }
4983 else
4984 {
4985 PIXEL00_20
4986 }
4987 PIXEL01_0
4988 PIXEL02_32
4989 PIXEL03_82
4990 PIXEL10_0
4991 PIXEL11_0
4992 PIXEL12_32
4993 PIXEL13_82
4994 PIXEL20_0
4995 PIXEL21_0
4996 PIXEL22_31
4997 PIXEL23_81
4998 if (Diff(w[8], w[4]))
4999 {
5000 PIXEL30_0
5001 }
5002 else
5003 {
5004 PIXEL30_20
5005 }
5006 PIXEL31_0
5007 PIXEL32_31
5008 PIXEL33_81
5009 break;
5010 }
5011 case 127:
5012 {
5013 if (Diff(w[4], w[2]))
5014 {
5015 PIXEL00_0
5016 }
5017 else
5018 {
5019 PIXEL00_20
5020 }
5021 PIXEL01_0
5022 if (Diff(w[2], w[6]))
5023 {
5024 PIXEL02_0
5025 PIXEL03_0
5026 PIXEL13_0
5027 }
5028 else
5029 {
5030 PIXEL02_50
5031 PIXEL03_50
5032 PIXEL13_50
5033 }
5034 PIXEL10_0
5035 PIXEL11_0
5036 PIXEL12_0
5037 if (Diff(w[8], w[4]))
5038 {
5039 PIXEL20_0
5040 PIXEL30_0
5041 PIXEL31_0
5042 }
5043 else
5044 {
5045 PIXEL20_50
5046 PIXEL30_50
5047 PIXEL31_50
5048 }
5049 PIXEL21_0
5050 PIXEL22_30
5051 PIXEL23_10
5052 PIXEL32_10
5053 PIXEL33_80
5054 break;
5055 }
5056 case 191:
5057 {
5058 if (Diff(w[4], w[2]))
5059 {
5060 PIXEL00_0
5061 }
5062 else
5063 {
5064 PIXEL00_20
5065 }
5066 PIXEL01_0
5067 PIXEL02_0
5068 if (Diff(w[2], w[6]))
5069 {
5070 PIXEL03_0
5071 }
5072 else
5073 {
5074 PIXEL03_20
5075 }
5076 PIXEL10_0
5077 PIXEL11_0
5078 PIXEL12_0
5079 PIXEL13_0
5080 PIXEL20_31
5081 PIXEL21_31
5082 PIXEL22_32
5083 PIXEL23_32
5084 PIXEL30_81
5085 PIXEL31_81
5086 PIXEL32_82
5087 PIXEL33_82
5088 break;
5089 }
5090 case 223:
5091 {
5092 if (Diff(w[4], w[2]))
5093 {
5094 PIXEL00_0
5095 PIXEL01_0
5096 PIXEL10_0
5097 }
5098 else
5099 {
5100 PIXEL00_50
5101 PIXEL01_50
5102 PIXEL10_50
5103 }
5104 PIXEL02_0
5105 if (Diff(w[2], w[6]))
5106 {
5107 PIXEL03_0
5108 }
5109 else
5110 {
5111 PIXEL03_20
5112 }
5113 PIXEL11_0
5114 PIXEL12_0
5115 PIXEL13_0
5116 PIXEL20_10
5117 PIXEL21_30
5118 PIXEL22_0
5119 if (Diff(w[6], w[8]))
5120 {
5121 PIXEL23_0
5122 PIXEL32_0
5123 PIXEL33_0
5124 }
5125 else
5126 {
5127 PIXEL23_50
5128 PIXEL32_50
5129 PIXEL33_50
5130 }
5131 PIXEL30_80
5132 PIXEL31_10
5133 break;
5134 }
5135 case 247:
5136 {
5137 PIXEL00_81
5138 PIXEL01_31
5139 PIXEL02_0
5140 if (Diff(w[2], w[6]))
5141 {
5142 PIXEL03_0
5143 }
5144 else
5145 {
5146 PIXEL03_20
5147 }
5148 PIXEL10_81
5149 PIXEL11_31
5150 PIXEL12_0
5151 PIXEL13_0
5152 PIXEL20_82
5153 PIXEL21_32
5154 PIXEL22_0
5155 PIXEL23_0
5156 PIXEL30_82
5157 PIXEL31_32
5158 PIXEL32_0
5159 if (Diff(w[6], w[8]))
5160 {
5161 PIXEL33_0
5162 }
5163 else
5164 {
5165 PIXEL33_20
5166 }
5167 break;
5168 }
5169 case 255:
5170 {
5171 if (Diff(w[4], w[2]))
5172 {
5173 PIXEL00_0
5174 }
5175 else
5176 {
5177 PIXEL00_20
5178 }
5179 PIXEL01_0
5180 PIXEL02_0
5181 if (Diff(w[2], w[6]))
5182 {
5183 PIXEL03_0
5184 }
5185 else
5186 {
5187 PIXEL03_20
5188 }
5189 PIXEL10_0
5190 PIXEL11_0
5191 PIXEL12_0
5192 PIXEL13_0
5193 PIXEL20_0
5194 PIXEL21_0
5195 PIXEL22_0
5196 PIXEL23_0
5197 if (Diff(w[8], w[4]))
5198 {
5199 PIXEL30_0
5200 }
5201 else
5202 {
5203 PIXEL30_20
5204 }
5205 PIXEL31_0
5206 PIXEL32_0
5207 if (Diff(w[6], w[8]))
5208 {
5209 PIXEL33_0
5210 }
5211 else
5212 {
5213 PIXEL33_20
5214 }
5215 break;
5216 }
5217 }
5218 sp++;
5219 dp += 4;
5220 }
5221
5222 sRowP += srb;
5223 sp = (uint32_t *) sRowP;
5224
5225 dRowP += drb * 4;
5226 dp = (uint32_t *) dRowP;
5227 }
5228 }
5229
hq4x_32(uint32_t * sp,uint32_t * dp,int Xres,int Yres)5230 void HQX_CALLCONV hq4x_32( uint32_t * sp, uint32_t * dp, int Xres, int Yres )
5231 {
5232 uint32_t rowBytesL = Xres * 4;
5233 hq4x_32_rb(sp, rowBytesL, dp, rowBytesL * 4, Xres, Yres);
5234 }
5235