1 //hq3x filter demo program
2 //----------------------------------------------------------
3 //Copyright (C) 2003 MaxSt ( maxst@hiend3d.com )
4
5 //This program is free software; you can redistribute it and/or
6 //modify it under the terms of the GNU Lesser General Public
7 //License as published by the Free Software Foundation; either
8 //version 2.1 of the License, or (at your option) any later version.
9 //
10 //This program is distributed in the hope that it will be useful,
11 //but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 //Lesser General Public License for more details.
14 //
15 //You should have received a copy of the GNU Lesser General Public
16 //License along with this program; if not, write to the Free Software
17 //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 /* Modified for usage in Mednafen */
20
21 #include "main.h"
22
23 #define HQXX_INTERNAL
24 #include "hqxx-common.h"
25
Interp1(unsigned char * pc,int c1,int c2)26 static inline void Interp1(unsigned char * pc, int c1, int c2)
27 {
28 *((int*)pc) = (c1*3+c2) >> 2;
29 }
30
Interp2(unsigned char * pc,int c1,int c2,int c3)31 static inline void Interp2(unsigned char * pc, int c1, int c2, int c3)
32 {
33 *((int*)pc) = (c1*2+c2+c3) >> 2;
34 }
35
Interp3(unsigned char * pc,int c1,int c2)36 static inline void Interp3(unsigned char * pc, int c1, int c2)
37 {
38 //*((int*)pc) = (c1*7+c2)/8;
39
40 *((int*)pc) = ((((c1 & 0x00FF00)*7 + (c2 & 0x00FF00) ) & 0x0007F800) +
41 (((c1 & 0xFF00FF)*7 + (c2 & 0xFF00FF) ) & 0x07F807F8)) >> 3;
42 }
43
Interp4(unsigned char * pc,int c1,int c2,int c3)44 static inline void Interp4(unsigned char * pc, int c1, int c2, int c3)
45 {
46 //*((int*)pc) = (c1*2+(c2+c3)*7)/16;
47
48 *((int*)pc) = ((((c1 & 0x00FF00)*2 + ((c2 & 0x00FF00) + (c3 & 0x00FF00))*7 ) & 0x000FF000) +
49 (((c1 & 0xFF00FF)*2 + ((c2 & 0xFF00FF) + (c3 & 0xFF00FF))*7 ) & 0x0FF00FF0)) >> 4;
50 }
51
Interp5(unsigned char * pc,int c1,int c2)52 static inline void Interp5(unsigned char * pc, int c1, int c2)
53 {
54 *((int*)pc) = (c1+c2) >> 1;
55 }
56
57 #define PIXEL00_1M Interp1(pOut, w[5], w[1]);
58 #define PIXEL00_1U Interp1(pOut, w[5], w[2]);
59 #define PIXEL00_1L Interp1(pOut, w[5], w[4]);
60 #define PIXEL00_2 Interp2(pOut, w[5], w[4], w[2]);
61 #define PIXEL00_4 Interp4(pOut, w[5], w[4], w[2]);
62 #define PIXEL00_5 Interp5(pOut, w[4], w[2]);
63 #define PIXEL00_C *((int*)(pOut)) = w[5];
64
65 #define PIXEL01_1 Interp1(pOut+4, w[5], w[2]);
66 #define PIXEL01_3 Interp3(pOut+4, w[5], w[2]);
67 #define PIXEL01_6 Interp1(pOut+4, w[2], w[5]);
68 #define PIXEL01_C *((int*)(pOut+4)) = w[5];
69
70 #define PIXEL02_1M Interp1(pOut+8, w[5], w[3]);
71 #define PIXEL02_1U Interp1(pOut+8, w[5], w[2]);
72 #define PIXEL02_1R Interp1(pOut+8, w[5], w[6]);
73 #define PIXEL02_2 Interp2(pOut+8, w[5], w[2], w[6]);
74 #define PIXEL02_4 Interp4(pOut+8, w[5], w[2], w[6]);
75 #define PIXEL02_5 Interp5(pOut+8, w[2], w[6]);
76 #define PIXEL02_C *((int*)(pOut+8)) = w[5];
77
78 #define PIXEL10_1 Interp1(pOut+BpL, w[5], w[4]);
79 #define PIXEL10_3 Interp3(pOut+BpL, w[5], w[4]);
80 #define PIXEL10_6 Interp1(pOut+BpL, w[4], w[5]);
81 #define PIXEL10_C *((int*)(pOut+BpL)) = w[5];
82
83 #define PIXEL11 *((int*)(pOut+BpL+4)) = w[5];
84
85 #define PIXEL12_1 Interp1(pOut+BpL+8, w[5], w[6]);
86 #define PIXEL12_3 Interp3(pOut+BpL+8, w[5], w[6]);
87 #define PIXEL12_6 Interp1(pOut+BpL+8, w[6], w[5]);
88 #define PIXEL12_C *((int*)(pOut+BpL+8)) = w[5];
89
90 #define PIXEL20_1M Interp1(pOut+BpL+BpL, w[5], w[7]);
91 #define PIXEL20_1D Interp1(pOut+BpL+BpL, w[5], w[8]);
92 #define PIXEL20_1L Interp1(pOut+BpL+BpL, w[5], w[4]);
93 #define PIXEL20_2 Interp2(pOut+BpL+BpL, w[5], w[8], w[4]);
94 #define PIXEL20_4 Interp4(pOut+BpL+BpL, w[5], w[8], w[4]);
95 #define PIXEL20_5 Interp5(pOut+BpL+BpL, w[8], w[4]);
96 #define PIXEL20_C *((int*)(pOut+BpL+BpL)) = w[5];
97
98 #define PIXEL21_1 Interp1(pOut+BpL+BpL+4, w[5], w[8]);
99 #define PIXEL21_3 Interp3(pOut+BpL+BpL+4, w[5], w[8]);
100 #define PIXEL21_6 Interp1(pOut+BpL+BpL+4, w[8], w[5]);
101 #define PIXEL21_C *((int*)(pOut+BpL+BpL+4)) = w[5];
102
103 #define PIXEL22_1M Interp1(pOut+BpL+BpL+8, w[5], w[9]);
104 #define PIXEL22_1D Interp1(pOut+BpL+BpL+8, w[5], w[8]);
105 #define PIXEL22_1R Interp1(pOut+BpL+BpL+8, w[5], w[6]);
106 #define PIXEL22_2 Interp2(pOut+BpL+BpL+8, w[5], w[6], w[8]);
107 #define PIXEL22_4 Interp4(pOut+BpL+BpL+8, w[5], w[6], w[8]);
108 #define PIXEL22_5 Interp5(pOut+BpL+BpL+8, w[6], w[8]);
109 #define PIXEL22_C *((int*)(pOut+BpL+BpL+8)) = w[5];
110
Diff(unsigned int w1,unsigned int w2)111 static int MDFN_FASTCALL Diff(unsigned int w1, unsigned int w2)
112 {
113 int YUV1;
114 int YUV2;
115
116 YUV1 = hqxx_RGB_to_YUV(w1);
117 YUV2 = hqxx_RGB_to_YUV(w2);
118 return ( ( abs((YUV1 & Ymask) - (YUV2 & Ymask)) > trY ) ||
119 ( abs((YUV1 & Umask) - (YUV2 & Umask)) > trU ) ||
120 ( abs((YUV1 & Vmask) - (YUV2 & Vmask)) > trV ) );
121 }
122
hq3x_32(unsigned char * pIn,unsigned char * pOut,int Xres,int Yres,int srcBpL,int BpL)123 void hq3x_32( unsigned char * pIn, unsigned char * pOut, int Xres, int Yres, int srcBpL, int BpL )
124 {
125 int i, j, k;
126 int prevline, nextline;
127 int w[10];
128
129 // +----+----+----+
130 // | | | |
131 // | w1 | w2 | w3 |
132 // +----+----+----+
133 // | | | |
134 // | w4 | w5 | w6 |
135 // +----+----+----+
136 // | | | |
137 // | w7 | w8 | w9 |
138 // +----+----+----+
139
140 for (j=0; j<Yres; j++)
141 {
142 if (j>0) prevline = -srcBpL; else prevline = 0;
143 if (j<Yres-1) nextline = srcBpL; else nextline = 0;
144
145 for (i=0; i<Xres; i++)
146 {
147 int pattern;
148 int flag;
149 int YUV1Y,YUV1U,YUV1V;
150
151 w[2] = *((unsigned int*)(pIn + prevline)) & 0xFCFCFC;
152 w[5] = *((unsigned int*)pIn) & 0xFCFCFC;
153 w[8] = *((unsigned int*)(pIn + nextline)) & 0xFCFCFC;
154
155 if (i>0)
156 {
157 w[1] = *((unsigned int*)(pIn + prevline - sizeof(uint32))) & 0xFCFCFC;
158 w[4] = *((unsigned int*)(pIn - sizeof(uint32))) & 0xFCFCFC;
159 w[7] = *((unsigned int*)(pIn + nextline - sizeof(uint32))) & 0xFCFCFC;
160 }
161 else
162 {
163 w[1] = w[2];
164 w[4] = w[5];
165 w[7] = w[8];
166 }
167
168 if (i<Xres-1)
169 {
170 w[3] = *((unsigned int*)(pIn + prevline + sizeof(uint32))) & 0xFCFCFC;
171 w[6] = *((unsigned int*)(pIn + sizeof(uint32))) & 0xFCFCFC;
172 w[9] = *((unsigned int*)(pIn + nextline + sizeof(uint32))) & 0xFCFCFC;
173 }
174 else
175 {
176 w[3] = w[2];
177 w[6] = w[5];
178 w[9] = w[8];
179 }
180
181
182 pattern = 0;
183 flag = 1;
184
185 YUV1Y = YUV1U = YUV1V = hqxx_RGB_to_YUV(w[5]);
186
187 YUV1Y &= Ymask;
188 YUV1U &= Umask;
189 YUV1V &= Vmask;
190
191 for (k=1; k<=9; k++)
192 {
193 if (k==5) continue;
194
195 if ( w[k] != w[5] )
196 {
197 int YUV2 = hqxx_RGB_to_YUV(w[k]);
198
199 if ( ( abs(YUV1Y - (YUV2 & Ymask)) > trY ) ||
200 ( abs(YUV1U - (YUV2 & Umask)) > trU ) ||
201 ( abs(YUV1V - (YUV2 & Vmask)) > trV ) )
202 pattern |= flag;
203 }
204 flag <<= 1;
205 }
206
207 switch (pattern)
208 {
209 case 0:
210 case 1:
211 case 4:
212 case 32:
213 case 128:
214 case 5:
215 case 132:
216 case 160:
217 case 33:
218 case 129:
219 case 36:
220 case 133:
221 case 164:
222 case 161:
223 case 37:
224 case 165:
225 {
226 PIXEL00_2
227 PIXEL01_1
228 PIXEL02_2
229 PIXEL10_1
230 PIXEL11
231 PIXEL12_1
232 PIXEL20_2
233 PIXEL21_1
234 PIXEL22_2
235 break;
236 }
237 case 2:
238 case 34:
239 case 130:
240 case 162:
241 {
242 PIXEL00_1M
243 PIXEL01_C
244 PIXEL02_1M
245 PIXEL10_1
246 PIXEL11
247 PIXEL12_1
248 PIXEL20_2
249 PIXEL21_1
250 PIXEL22_2
251 break;
252 }
253 case 16:
254 case 17:
255 case 48:
256 case 49:
257 {
258 PIXEL00_2
259 PIXEL01_1
260 PIXEL02_1M
261 PIXEL10_1
262 PIXEL11
263 PIXEL12_C
264 PIXEL20_2
265 PIXEL21_1
266 PIXEL22_1M
267 break;
268 }
269 case 64:
270 case 65:
271 case 68:
272 case 69:
273 {
274 PIXEL00_2
275 PIXEL01_1
276 PIXEL02_2
277 PIXEL10_1
278 PIXEL11
279 PIXEL12_1
280 PIXEL20_1M
281 PIXEL21_C
282 PIXEL22_1M
283 break;
284 }
285 case 8:
286 case 12:
287 case 136:
288 case 140:
289 {
290 PIXEL00_1M
291 PIXEL01_1
292 PIXEL02_2
293 PIXEL10_C
294 PIXEL11
295 PIXEL12_1
296 PIXEL20_1M
297 PIXEL21_1
298 PIXEL22_2
299 break;
300 }
301 case 3:
302 case 35:
303 case 131:
304 case 163:
305 {
306 PIXEL00_1L
307 PIXEL01_C
308 PIXEL02_1M
309 PIXEL10_1
310 PIXEL11
311 PIXEL12_1
312 PIXEL20_2
313 PIXEL21_1
314 PIXEL22_2
315 break;
316 }
317 case 6:
318 case 38:
319 case 134:
320 case 166:
321 {
322 PIXEL00_1M
323 PIXEL01_C
324 PIXEL02_1R
325 PIXEL10_1
326 PIXEL11
327 PIXEL12_1
328 PIXEL20_2
329 PIXEL21_1
330 PIXEL22_2
331 break;
332 }
333 case 20:
334 case 21:
335 case 52:
336 case 53:
337 {
338 PIXEL00_2
339 PIXEL01_1
340 PIXEL02_1U
341 PIXEL10_1
342 PIXEL11
343 PIXEL12_C
344 PIXEL20_2
345 PIXEL21_1
346 PIXEL22_1M
347 break;
348 }
349 case 144:
350 case 145:
351 case 176:
352 case 177:
353 {
354 PIXEL00_2
355 PIXEL01_1
356 PIXEL02_1M
357 PIXEL10_1
358 PIXEL11
359 PIXEL12_C
360 PIXEL20_2
361 PIXEL21_1
362 PIXEL22_1D
363 break;
364 }
365 case 192:
366 case 193:
367 case 196:
368 case 197:
369 {
370 PIXEL00_2
371 PIXEL01_1
372 PIXEL02_2
373 PIXEL10_1
374 PIXEL11
375 PIXEL12_1
376 PIXEL20_1M
377 PIXEL21_C
378 PIXEL22_1R
379 break;
380 }
381 case 96:
382 case 97:
383 case 100:
384 case 101:
385 {
386 PIXEL00_2
387 PIXEL01_1
388 PIXEL02_2
389 PIXEL10_1
390 PIXEL11
391 PIXEL12_1
392 PIXEL20_1L
393 PIXEL21_C
394 PIXEL22_1M
395 break;
396 }
397 case 40:
398 case 44:
399 case 168:
400 case 172:
401 {
402 PIXEL00_1M
403 PIXEL01_1
404 PIXEL02_2
405 PIXEL10_C
406 PIXEL11
407 PIXEL12_1
408 PIXEL20_1D
409 PIXEL21_1
410 PIXEL22_2
411 break;
412 }
413 case 9:
414 case 13:
415 case 137:
416 case 141:
417 {
418 PIXEL00_1U
419 PIXEL01_1
420 PIXEL02_2
421 PIXEL10_C
422 PIXEL11
423 PIXEL12_1
424 PIXEL20_1M
425 PIXEL21_1
426 PIXEL22_2
427 break;
428 }
429 case 18:
430 case 50:
431 {
432 PIXEL00_1M
433 if (Diff(w[2], w[6]))
434 {
435 PIXEL01_C
436 PIXEL02_1M
437 PIXEL12_C
438 }
439 else
440 {
441 PIXEL01_3
442 PIXEL02_4
443 PIXEL12_3
444 }
445 PIXEL10_1
446 PIXEL11
447 PIXEL20_2
448 PIXEL21_1
449 PIXEL22_1M
450 break;
451 }
452 case 80:
453 case 81:
454 {
455 PIXEL00_2
456 PIXEL01_1
457 PIXEL02_1M
458 PIXEL10_1
459 PIXEL11
460 PIXEL20_1M
461 if (Diff(w[6], w[8]))
462 {
463 PIXEL12_C
464 PIXEL21_C
465 PIXEL22_1M
466 }
467 else
468 {
469 PIXEL12_3
470 PIXEL21_3
471 PIXEL22_4
472 }
473 break;
474 }
475 case 72:
476 case 76:
477 {
478 PIXEL00_1M
479 PIXEL01_1
480 PIXEL02_2
481 PIXEL11
482 PIXEL12_1
483 if (Diff(w[8], w[4]))
484 {
485 PIXEL10_C
486 PIXEL20_1M
487 PIXEL21_C
488 }
489 else
490 {
491 PIXEL10_3
492 PIXEL20_4
493 PIXEL21_3
494 }
495 PIXEL22_1M
496 break;
497 }
498 case 10:
499 case 138:
500 {
501 if (Diff(w[4], w[2]))
502 {
503 PIXEL00_1M
504 PIXEL01_C
505 PIXEL10_C
506 }
507 else
508 {
509 PIXEL00_4
510 PIXEL01_3
511 PIXEL10_3
512 }
513 PIXEL02_1M
514 PIXEL11
515 PIXEL12_1
516 PIXEL20_1M
517 PIXEL21_1
518 PIXEL22_2
519 break;
520 }
521 case 66:
522 {
523 PIXEL00_1M
524 PIXEL01_C
525 PIXEL02_1M
526 PIXEL10_1
527 PIXEL11
528 PIXEL12_1
529 PIXEL20_1M
530 PIXEL21_C
531 PIXEL22_1M
532 break;
533 }
534 case 24:
535 {
536 PIXEL00_1M
537 PIXEL01_1
538 PIXEL02_1M
539 PIXEL10_C
540 PIXEL11
541 PIXEL12_C
542 PIXEL20_1M
543 PIXEL21_1
544 PIXEL22_1M
545 break;
546 }
547 case 7:
548 case 39:
549 case 135:
550 {
551 PIXEL00_1L
552 PIXEL01_C
553 PIXEL02_1R
554 PIXEL10_1
555 PIXEL11
556 PIXEL12_1
557 PIXEL20_2
558 PIXEL21_1
559 PIXEL22_2
560 break;
561 }
562 case 148:
563 case 149:
564 case 180:
565 {
566 PIXEL00_2
567 PIXEL01_1
568 PIXEL02_1U
569 PIXEL10_1
570 PIXEL11
571 PIXEL12_C
572 PIXEL20_2
573 PIXEL21_1
574 PIXEL22_1D
575 break;
576 }
577 case 224:
578 case 228:
579 case 225:
580 {
581 PIXEL00_2
582 PIXEL01_1
583 PIXEL02_2
584 PIXEL10_1
585 PIXEL11
586 PIXEL12_1
587 PIXEL20_1L
588 PIXEL21_C
589 PIXEL22_1R
590 break;
591 }
592 case 41:
593 case 169:
594 case 45:
595 {
596 PIXEL00_1U
597 PIXEL01_1
598 PIXEL02_2
599 PIXEL10_C
600 PIXEL11
601 PIXEL12_1
602 PIXEL20_1D
603 PIXEL21_1
604 PIXEL22_2
605 break;
606 }
607 case 22:
608 case 54:
609 {
610 PIXEL00_1M
611 if (Diff(w[2], w[6]))
612 {
613 PIXEL01_C
614 PIXEL02_C
615 PIXEL12_C
616 }
617 else
618 {
619 PIXEL01_3
620 PIXEL02_4
621 PIXEL12_3
622 }
623 PIXEL10_1
624 PIXEL11
625 PIXEL20_2
626 PIXEL21_1
627 PIXEL22_1M
628 break;
629 }
630 case 208:
631 case 209:
632 {
633 PIXEL00_2
634 PIXEL01_1
635 PIXEL02_1M
636 PIXEL10_1
637 PIXEL11
638 PIXEL20_1M
639 if (Diff(w[6], w[8]))
640 {
641 PIXEL12_C
642 PIXEL21_C
643 PIXEL22_C
644 }
645 else
646 {
647 PIXEL12_3
648 PIXEL21_3
649 PIXEL22_4
650 }
651 break;
652 }
653 case 104:
654 case 108:
655 {
656 PIXEL00_1M
657 PIXEL01_1
658 PIXEL02_2
659 PIXEL11
660 PIXEL12_1
661 if (Diff(w[8], w[4]))
662 {
663 PIXEL10_C
664 PIXEL20_C
665 PIXEL21_C
666 }
667 else
668 {
669 PIXEL10_3
670 PIXEL20_4
671 PIXEL21_3
672 }
673 PIXEL22_1M
674 break;
675 }
676 case 11:
677 case 139:
678 {
679 if (Diff(w[4], w[2]))
680 {
681 PIXEL00_C
682 PIXEL01_C
683 PIXEL10_C
684 }
685 else
686 {
687 PIXEL00_4
688 PIXEL01_3
689 PIXEL10_3
690 }
691 PIXEL02_1M
692 PIXEL11
693 PIXEL12_1
694 PIXEL20_1M
695 PIXEL21_1
696 PIXEL22_2
697 break;
698 }
699 case 19:
700 case 51:
701 {
702 if (Diff(w[2], w[6]))
703 {
704 PIXEL00_1L
705 PIXEL01_C
706 PIXEL02_1M
707 PIXEL12_C
708 }
709 else
710 {
711 PIXEL00_2
712 PIXEL01_6
713 PIXEL02_5
714 PIXEL12_1
715 }
716 PIXEL10_1
717 PIXEL11
718 PIXEL20_2
719 PIXEL21_1
720 PIXEL22_1M
721 break;
722 }
723 case 146:
724 case 178:
725 {
726 if (Diff(w[2], w[6]))
727 {
728 PIXEL01_C
729 PIXEL02_1M
730 PIXEL12_C
731 PIXEL22_1D
732 }
733 else
734 {
735 PIXEL01_1
736 PIXEL02_5
737 PIXEL12_6
738 PIXEL22_2
739 }
740 PIXEL00_1M
741 PIXEL10_1
742 PIXEL11
743 PIXEL20_2
744 PIXEL21_1
745 break;
746 }
747 case 84:
748 case 85:
749 {
750 if (Diff(w[6], w[8]))
751 {
752 PIXEL02_1U
753 PIXEL12_C
754 PIXEL21_C
755 PIXEL22_1M
756 }
757 else
758 {
759 PIXEL02_2
760 PIXEL12_6
761 PIXEL21_1
762 PIXEL22_5
763 }
764 PIXEL00_2
765 PIXEL01_1
766 PIXEL10_1
767 PIXEL11
768 PIXEL20_1M
769 break;
770 }
771 case 112:
772 case 113:
773 {
774 if (Diff(w[6], w[8]))
775 {
776 PIXEL12_C
777 PIXEL20_1L
778 PIXEL21_C
779 PIXEL22_1M
780 }
781 else
782 {
783 PIXEL12_1
784 PIXEL20_2
785 PIXEL21_6
786 PIXEL22_5
787 }
788 PIXEL00_2
789 PIXEL01_1
790 PIXEL02_1M
791 PIXEL10_1
792 PIXEL11
793 break;
794 }
795 case 200:
796 case 204:
797 {
798 if (Diff(w[8], w[4]))
799 {
800 PIXEL10_C
801 PIXEL20_1M
802 PIXEL21_C
803 PIXEL22_1R
804 }
805 else
806 {
807 PIXEL10_1
808 PIXEL20_5
809 PIXEL21_6
810 PIXEL22_2
811 }
812 PIXEL00_1M
813 PIXEL01_1
814 PIXEL02_2
815 PIXEL11
816 PIXEL12_1
817 break;
818 }
819 case 73:
820 case 77:
821 {
822 if (Diff(w[8], w[4]))
823 {
824 PIXEL00_1U
825 PIXEL10_C
826 PIXEL20_1M
827 PIXEL21_C
828 }
829 else
830 {
831 PIXEL00_2
832 PIXEL10_6
833 PIXEL20_5
834 PIXEL21_1
835 }
836 PIXEL01_1
837 PIXEL02_2
838 PIXEL11
839 PIXEL12_1
840 PIXEL22_1M
841 break;
842 }
843 case 42:
844 case 170:
845 {
846 if (Diff(w[4], w[2]))
847 {
848 PIXEL00_1M
849 PIXEL01_C
850 PIXEL10_C
851 PIXEL20_1D
852 }
853 else
854 {
855 PIXEL00_5
856 PIXEL01_1
857 PIXEL10_6
858 PIXEL20_2
859 }
860 PIXEL02_1M
861 PIXEL11
862 PIXEL12_1
863 PIXEL21_1
864 PIXEL22_2
865 break;
866 }
867 case 14:
868 case 142:
869 {
870 if (Diff(w[4], w[2]))
871 {
872 PIXEL00_1M
873 PIXEL01_C
874 PIXEL02_1R
875 PIXEL10_C
876 }
877 else
878 {
879 PIXEL00_5
880 PIXEL01_6
881 PIXEL02_2
882 PIXEL10_1
883 }
884 PIXEL11
885 PIXEL12_1
886 PIXEL20_1M
887 PIXEL21_1
888 PIXEL22_2
889 break;
890 }
891 case 67:
892 {
893 PIXEL00_1L
894 PIXEL01_C
895 PIXEL02_1M
896 PIXEL10_1
897 PIXEL11
898 PIXEL12_1
899 PIXEL20_1M
900 PIXEL21_C
901 PIXEL22_1M
902 break;
903 }
904 case 70:
905 {
906 PIXEL00_1M
907 PIXEL01_C
908 PIXEL02_1R
909 PIXEL10_1
910 PIXEL11
911 PIXEL12_1
912 PIXEL20_1M
913 PIXEL21_C
914 PIXEL22_1M
915 break;
916 }
917 case 28:
918 {
919 PIXEL00_1M
920 PIXEL01_1
921 PIXEL02_1U
922 PIXEL10_C
923 PIXEL11
924 PIXEL12_C
925 PIXEL20_1M
926 PIXEL21_1
927 PIXEL22_1M
928 break;
929 }
930 case 152:
931 {
932 PIXEL00_1M
933 PIXEL01_1
934 PIXEL02_1M
935 PIXEL10_C
936 PIXEL11
937 PIXEL12_C
938 PIXEL20_1M
939 PIXEL21_1
940 PIXEL22_1D
941 break;
942 }
943 case 194:
944 {
945 PIXEL00_1M
946 PIXEL01_C
947 PIXEL02_1M
948 PIXEL10_1
949 PIXEL11
950 PIXEL12_1
951 PIXEL20_1M
952 PIXEL21_C
953 PIXEL22_1R
954 break;
955 }
956 case 98:
957 {
958 PIXEL00_1M
959 PIXEL01_C
960 PIXEL02_1M
961 PIXEL10_1
962 PIXEL11
963 PIXEL12_1
964 PIXEL20_1L
965 PIXEL21_C
966 PIXEL22_1M
967 break;
968 }
969 case 56:
970 {
971 PIXEL00_1M
972 PIXEL01_1
973 PIXEL02_1M
974 PIXEL10_C
975 PIXEL11
976 PIXEL12_C
977 PIXEL20_1D
978 PIXEL21_1
979 PIXEL22_1M
980 break;
981 }
982 case 25:
983 {
984 PIXEL00_1U
985 PIXEL01_1
986 PIXEL02_1M
987 PIXEL10_C
988 PIXEL11
989 PIXEL12_C
990 PIXEL20_1M
991 PIXEL21_1
992 PIXEL22_1M
993 break;
994 }
995 case 26:
996 case 31:
997 {
998 if (Diff(w[4], w[2]))
999 {
1000 PIXEL00_C
1001 PIXEL10_C
1002 }
1003 else
1004 {
1005 PIXEL00_4
1006 PIXEL10_3
1007 }
1008 PIXEL01_C
1009 if (Diff(w[2], w[6]))
1010 {
1011 PIXEL02_C
1012 PIXEL12_C
1013 }
1014 else
1015 {
1016 PIXEL02_4
1017 PIXEL12_3
1018 }
1019 PIXEL11
1020 PIXEL20_1M
1021 PIXEL21_1
1022 PIXEL22_1M
1023 break;
1024 }
1025 case 82:
1026 case 214:
1027 {
1028 PIXEL00_1M
1029 if (Diff(w[2], w[6]))
1030 {
1031 PIXEL01_C
1032 PIXEL02_C
1033 }
1034 else
1035 {
1036 PIXEL01_3
1037 PIXEL02_4
1038 }
1039 PIXEL10_1
1040 PIXEL11
1041 PIXEL12_C
1042 PIXEL20_1M
1043 if (Diff(w[6], w[8]))
1044 {
1045 PIXEL21_C
1046 PIXEL22_C
1047 }
1048 else
1049 {
1050 PIXEL21_3
1051 PIXEL22_4
1052 }
1053 break;
1054 }
1055 case 88:
1056 case 248:
1057 {
1058 PIXEL00_1M
1059 PIXEL01_1
1060 PIXEL02_1M
1061 PIXEL11
1062 if (Diff(w[8], w[4]))
1063 {
1064 PIXEL10_C
1065 PIXEL20_C
1066 }
1067 else
1068 {
1069 PIXEL10_3
1070 PIXEL20_4
1071 }
1072 PIXEL21_C
1073 if (Diff(w[6], w[8]))
1074 {
1075 PIXEL12_C
1076 PIXEL22_C
1077 }
1078 else
1079 {
1080 PIXEL12_3
1081 PIXEL22_4
1082 }
1083 break;
1084 }
1085 case 74:
1086 case 107:
1087 {
1088 if (Diff(w[4], w[2]))
1089 {
1090 PIXEL00_C
1091 PIXEL01_C
1092 }
1093 else
1094 {
1095 PIXEL00_4
1096 PIXEL01_3
1097 }
1098 PIXEL02_1M
1099 PIXEL10_C
1100 PIXEL11
1101 PIXEL12_1
1102 if (Diff(w[8], w[4]))
1103 {
1104 PIXEL20_C
1105 PIXEL21_C
1106 }
1107 else
1108 {
1109 PIXEL20_4
1110 PIXEL21_3
1111 }
1112 PIXEL22_1M
1113 break;
1114 }
1115 case 27:
1116 {
1117 if (Diff(w[4], w[2]))
1118 {
1119 PIXEL00_C
1120 PIXEL01_C
1121 PIXEL10_C
1122 }
1123 else
1124 {
1125 PIXEL00_4
1126 PIXEL01_3
1127 PIXEL10_3
1128 }
1129 PIXEL02_1M
1130 PIXEL11
1131 PIXEL12_C
1132 PIXEL20_1M
1133 PIXEL21_1
1134 PIXEL22_1M
1135 break;
1136 }
1137 case 86:
1138 {
1139 PIXEL00_1M
1140 if (Diff(w[2], w[6]))
1141 {
1142 PIXEL01_C
1143 PIXEL02_C
1144 PIXEL12_C
1145 }
1146 else
1147 {
1148 PIXEL01_3
1149 PIXEL02_4
1150 PIXEL12_3
1151 }
1152 PIXEL10_1
1153 PIXEL11
1154 PIXEL20_1M
1155 PIXEL21_C
1156 PIXEL22_1M
1157 break;
1158 }
1159 case 216:
1160 {
1161 PIXEL00_1M
1162 PIXEL01_1
1163 PIXEL02_1M
1164 PIXEL10_C
1165 PIXEL11
1166 PIXEL20_1M
1167 if (Diff(w[6], w[8]))
1168 {
1169 PIXEL12_C
1170 PIXEL21_C
1171 PIXEL22_C
1172 }
1173 else
1174 {
1175 PIXEL12_3
1176 PIXEL21_3
1177 PIXEL22_4
1178 }
1179 break;
1180 }
1181 case 106:
1182 {
1183 PIXEL00_1M
1184 PIXEL01_C
1185 PIXEL02_1M
1186 PIXEL11
1187 PIXEL12_1
1188 if (Diff(w[8], w[4]))
1189 {
1190 PIXEL10_C
1191 PIXEL20_C
1192 PIXEL21_C
1193 }
1194 else
1195 {
1196 PIXEL10_3
1197 PIXEL20_4
1198 PIXEL21_3
1199 }
1200 PIXEL22_1M
1201 break;
1202 }
1203 case 30:
1204 {
1205 PIXEL00_1M
1206 if (Diff(w[2], w[6]))
1207 {
1208 PIXEL01_C
1209 PIXEL02_C
1210 PIXEL12_C
1211 }
1212 else
1213 {
1214 PIXEL01_3
1215 PIXEL02_4
1216 PIXEL12_3
1217 }
1218 PIXEL10_C
1219 PIXEL11
1220 PIXEL20_1M
1221 PIXEL21_1
1222 PIXEL22_1M
1223 break;
1224 }
1225 case 210:
1226 {
1227 PIXEL00_1M
1228 PIXEL01_C
1229 PIXEL02_1M
1230 PIXEL10_1
1231 PIXEL11
1232 PIXEL20_1M
1233 if (Diff(w[6], w[8]))
1234 {
1235 PIXEL12_C
1236 PIXEL21_C
1237 PIXEL22_C
1238 }
1239 else
1240 {
1241 PIXEL12_3
1242 PIXEL21_3
1243 PIXEL22_4
1244 }
1245 break;
1246 }
1247 case 120:
1248 {
1249 PIXEL00_1M
1250 PIXEL01_1
1251 PIXEL02_1M
1252 PIXEL11
1253 PIXEL12_C
1254 if (Diff(w[8], w[4]))
1255 {
1256 PIXEL10_C
1257 PIXEL20_C
1258 PIXEL21_C
1259 }
1260 else
1261 {
1262 PIXEL10_3
1263 PIXEL20_4
1264 PIXEL21_3
1265 }
1266 PIXEL22_1M
1267 break;
1268 }
1269 case 75:
1270 {
1271 if (Diff(w[4], w[2]))
1272 {
1273 PIXEL00_C
1274 PIXEL01_C
1275 PIXEL10_C
1276 }
1277 else
1278 {
1279 PIXEL00_4
1280 PIXEL01_3
1281 PIXEL10_3
1282 }
1283 PIXEL02_1M
1284 PIXEL11
1285 PIXEL12_1
1286 PIXEL20_1M
1287 PIXEL21_C
1288 PIXEL22_1M
1289 break;
1290 }
1291 case 29:
1292 {
1293 PIXEL00_1U
1294 PIXEL01_1
1295 PIXEL02_1U
1296 PIXEL10_C
1297 PIXEL11
1298 PIXEL12_C
1299 PIXEL20_1M
1300 PIXEL21_1
1301 PIXEL22_1M
1302 break;
1303 }
1304 case 198:
1305 {
1306 PIXEL00_1M
1307 PIXEL01_C
1308 PIXEL02_1R
1309 PIXEL10_1
1310 PIXEL11
1311 PIXEL12_1
1312 PIXEL20_1M
1313 PIXEL21_C
1314 PIXEL22_1R
1315 break;
1316 }
1317 case 184:
1318 {
1319 PIXEL00_1M
1320 PIXEL01_1
1321 PIXEL02_1M
1322 PIXEL10_C
1323 PIXEL11
1324 PIXEL12_C
1325 PIXEL20_1D
1326 PIXEL21_1
1327 PIXEL22_1D
1328 break;
1329 }
1330 case 99:
1331 {
1332 PIXEL00_1L
1333 PIXEL01_C
1334 PIXEL02_1M
1335 PIXEL10_1
1336 PIXEL11
1337 PIXEL12_1
1338 PIXEL20_1L
1339 PIXEL21_C
1340 PIXEL22_1M
1341 break;
1342 }
1343 case 57:
1344 {
1345 PIXEL00_1U
1346 PIXEL01_1
1347 PIXEL02_1M
1348 PIXEL10_C
1349 PIXEL11
1350 PIXEL12_C
1351 PIXEL20_1D
1352 PIXEL21_1
1353 PIXEL22_1M
1354 break;
1355 }
1356 case 71:
1357 {
1358 PIXEL00_1L
1359 PIXEL01_C
1360 PIXEL02_1R
1361 PIXEL10_1
1362 PIXEL11
1363 PIXEL12_1
1364 PIXEL20_1M
1365 PIXEL21_C
1366 PIXEL22_1M
1367 break;
1368 }
1369 case 156:
1370 {
1371 PIXEL00_1M
1372 PIXEL01_1
1373 PIXEL02_1U
1374 PIXEL10_C
1375 PIXEL11
1376 PIXEL12_C
1377 PIXEL20_1M
1378 PIXEL21_1
1379 PIXEL22_1D
1380 break;
1381 }
1382 case 226:
1383 {
1384 PIXEL00_1M
1385 PIXEL01_C
1386 PIXEL02_1M
1387 PIXEL10_1
1388 PIXEL11
1389 PIXEL12_1
1390 PIXEL20_1L
1391 PIXEL21_C
1392 PIXEL22_1R
1393 break;
1394 }
1395 case 60:
1396 {
1397 PIXEL00_1M
1398 PIXEL01_1
1399 PIXEL02_1U
1400 PIXEL10_C
1401 PIXEL11
1402 PIXEL12_C
1403 PIXEL20_1D
1404 PIXEL21_1
1405 PIXEL22_1M
1406 break;
1407 }
1408 case 195:
1409 {
1410 PIXEL00_1L
1411 PIXEL01_C
1412 PIXEL02_1M
1413 PIXEL10_1
1414 PIXEL11
1415 PIXEL12_1
1416 PIXEL20_1M
1417 PIXEL21_C
1418 PIXEL22_1R
1419 break;
1420 }
1421 case 102:
1422 {
1423 PIXEL00_1M
1424 PIXEL01_C
1425 PIXEL02_1R
1426 PIXEL10_1
1427 PIXEL11
1428 PIXEL12_1
1429 PIXEL20_1L
1430 PIXEL21_C
1431 PIXEL22_1M
1432 break;
1433 }
1434 case 153:
1435 {
1436 PIXEL00_1U
1437 PIXEL01_1
1438 PIXEL02_1M
1439 PIXEL10_C
1440 PIXEL11
1441 PIXEL12_C
1442 PIXEL20_1M
1443 PIXEL21_1
1444 PIXEL22_1D
1445 break;
1446 }
1447 case 58:
1448 {
1449 if (Diff(w[4], w[2]))
1450 {
1451 PIXEL00_1M
1452 }
1453 else
1454 {
1455 PIXEL00_2
1456 }
1457 PIXEL01_C
1458 if (Diff(w[2], w[6]))
1459 {
1460 PIXEL02_1M
1461 }
1462 else
1463 {
1464 PIXEL02_2
1465 }
1466 PIXEL10_C
1467 PIXEL11
1468 PIXEL12_C
1469 PIXEL20_1D
1470 PIXEL21_1
1471 PIXEL22_1M
1472 break;
1473 }
1474 case 83:
1475 {
1476 PIXEL00_1L
1477 PIXEL01_C
1478 if (Diff(w[2], w[6]))
1479 {
1480 PIXEL02_1M
1481 }
1482 else
1483 {
1484 PIXEL02_2
1485 }
1486 PIXEL10_1
1487 PIXEL11
1488 PIXEL12_C
1489 PIXEL20_1M
1490 PIXEL21_C
1491 if (Diff(w[6], w[8]))
1492 {
1493 PIXEL22_1M
1494 }
1495 else
1496 {
1497 PIXEL22_2
1498 }
1499 break;
1500 }
1501 case 92:
1502 {
1503 PIXEL00_1M
1504 PIXEL01_1
1505 PIXEL02_1U
1506 PIXEL10_C
1507 PIXEL11
1508 PIXEL12_C
1509 if (Diff(w[8], w[4]))
1510 {
1511 PIXEL20_1M
1512 }
1513 else
1514 {
1515 PIXEL20_2
1516 }
1517 PIXEL21_C
1518 if (Diff(w[6], w[8]))
1519 {
1520 PIXEL22_1M
1521 }
1522 else
1523 {
1524 PIXEL22_2
1525 }
1526 break;
1527 }
1528 case 202:
1529 {
1530 if (Diff(w[4], w[2]))
1531 {
1532 PIXEL00_1M
1533 }
1534 else
1535 {
1536 PIXEL00_2
1537 }
1538 PIXEL01_C
1539 PIXEL02_1M
1540 PIXEL10_C
1541 PIXEL11
1542 PIXEL12_1
1543 if (Diff(w[8], w[4]))
1544 {
1545 PIXEL20_1M
1546 }
1547 else
1548 {
1549 PIXEL20_2
1550 }
1551 PIXEL21_C
1552 PIXEL22_1R
1553 break;
1554 }
1555 case 78:
1556 {
1557 if (Diff(w[4], w[2]))
1558 {
1559 PIXEL00_1M
1560 }
1561 else
1562 {
1563 PIXEL00_2
1564 }
1565 PIXEL01_C
1566 PIXEL02_1R
1567 PIXEL10_C
1568 PIXEL11
1569 PIXEL12_1
1570 if (Diff(w[8], w[4]))
1571 {
1572 PIXEL20_1M
1573 }
1574 else
1575 {
1576 PIXEL20_2
1577 }
1578 PIXEL21_C
1579 PIXEL22_1M
1580 break;
1581 }
1582 case 154:
1583 {
1584 if (Diff(w[4], w[2]))
1585 {
1586 PIXEL00_1M
1587 }
1588 else
1589 {
1590 PIXEL00_2
1591 }
1592 PIXEL01_C
1593 if (Diff(w[2], w[6]))
1594 {
1595 PIXEL02_1M
1596 }
1597 else
1598 {
1599 PIXEL02_2
1600 }
1601 PIXEL10_C
1602 PIXEL11
1603 PIXEL12_C
1604 PIXEL20_1M
1605 PIXEL21_1
1606 PIXEL22_1D
1607 break;
1608 }
1609 case 114:
1610 {
1611 PIXEL00_1M
1612 PIXEL01_C
1613 if (Diff(w[2], w[6]))
1614 {
1615 PIXEL02_1M
1616 }
1617 else
1618 {
1619 PIXEL02_2
1620 }
1621 PIXEL10_1
1622 PIXEL11
1623 PIXEL12_C
1624 PIXEL20_1L
1625 PIXEL21_C
1626 if (Diff(w[6], w[8]))
1627 {
1628 PIXEL22_1M
1629 }
1630 else
1631 {
1632 PIXEL22_2
1633 }
1634 break;
1635 }
1636 case 89:
1637 {
1638 PIXEL00_1U
1639 PIXEL01_1
1640 PIXEL02_1M
1641 PIXEL10_C
1642 PIXEL11
1643 PIXEL12_C
1644 if (Diff(w[8], w[4]))
1645 {
1646 PIXEL20_1M
1647 }
1648 else
1649 {
1650 PIXEL20_2
1651 }
1652 PIXEL21_C
1653 if (Diff(w[6], w[8]))
1654 {
1655 PIXEL22_1M
1656 }
1657 else
1658 {
1659 PIXEL22_2
1660 }
1661 break;
1662 }
1663 case 90:
1664 {
1665 if (Diff(w[4], w[2]))
1666 {
1667 PIXEL00_1M
1668 }
1669 else
1670 {
1671 PIXEL00_2
1672 }
1673 PIXEL01_C
1674 if (Diff(w[2], w[6]))
1675 {
1676 PIXEL02_1M
1677 }
1678 else
1679 {
1680 PIXEL02_2
1681 }
1682 PIXEL10_C
1683 PIXEL11
1684 PIXEL12_C
1685 if (Diff(w[8], w[4]))
1686 {
1687 PIXEL20_1M
1688 }
1689 else
1690 {
1691 PIXEL20_2
1692 }
1693 PIXEL21_C
1694 if (Diff(w[6], w[8]))
1695 {
1696 PIXEL22_1M
1697 }
1698 else
1699 {
1700 PIXEL22_2
1701 }
1702 break;
1703 }
1704 case 55:
1705 case 23:
1706 {
1707 if (Diff(w[2], w[6]))
1708 {
1709 PIXEL00_1L
1710 PIXEL01_C
1711 PIXEL02_C
1712 PIXEL12_C
1713 }
1714 else
1715 {
1716 PIXEL00_2
1717 PIXEL01_6
1718 PIXEL02_5
1719 PIXEL12_1
1720 }
1721 PIXEL10_1
1722 PIXEL11
1723 PIXEL20_2
1724 PIXEL21_1
1725 PIXEL22_1M
1726 break;
1727 }
1728 case 182:
1729 case 150:
1730 {
1731 if (Diff(w[2], w[6]))
1732 {
1733 PIXEL01_C
1734 PIXEL02_C
1735 PIXEL12_C
1736 PIXEL22_1D
1737 }
1738 else
1739 {
1740 PIXEL01_1
1741 PIXEL02_5
1742 PIXEL12_6
1743 PIXEL22_2
1744 }
1745 PIXEL00_1M
1746 PIXEL10_1
1747 PIXEL11
1748 PIXEL20_2
1749 PIXEL21_1
1750 break;
1751 }
1752 case 213:
1753 case 212:
1754 {
1755 if (Diff(w[6], w[8]))
1756 {
1757 PIXEL02_1U
1758 PIXEL12_C
1759 PIXEL21_C
1760 PIXEL22_C
1761 }
1762 else
1763 {
1764 PIXEL02_2
1765 PIXEL12_6
1766 PIXEL21_1
1767 PIXEL22_5
1768 }
1769 PIXEL00_2
1770 PIXEL01_1
1771 PIXEL10_1
1772 PIXEL11
1773 PIXEL20_1M
1774 break;
1775 }
1776 case 241:
1777 case 240:
1778 {
1779 if (Diff(w[6], w[8]))
1780 {
1781 PIXEL12_C
1782 PIXEL20_1L
1783 PIXEL21_C
1784 PIXEL22_C
1785 }
1786 else
1787 {
1788 PIXEL12_1
1789 PIXEL20_2
1790 PIXEL21_6
1791 PIXEL22_5
1792 }
1793 PIXEL00_2
1794 PIXEL01_1
1795 PIXEL02_1M
1796 PIXEL10_1
1797 PIXEL11
1798 break;
1799 }
1800 case 236:
1801 case 232:
1802 {
1803 if (Diff(w[8], w[4]))
1804 {
1805 PIXEL10_C
1806 PIXEL20_C
1807 PIXEL21_C
1808 PIXEL22_1R
1809 }
1810 else
1811 {
1812 PIXEL10_1
1813 PIXEL20_5
1814 PIXEL21_6
1815 PIXEL22_2
1816 }
1817 PIXEL00_1M
1818 PIXEL01_1
1819 PIXEL02_2
1820 PIXEL11
1821 PIXEL12_1
1822 break;
1823 }
1824 case 109:
1825 case 105:
1826 {
1827 if (Diff(w[8], w[4]))
1828 {
1829 PIXEL00_1U
1830 PIXEL10_C
1831 PIXEL20_C
1832 PIXEL21_C
1833 }
1834 else
1835 {
1836 PIXEL00_2
1837 PIXEL10_6
1838 PIXEL20_5
1839 PIXEL21_1
1840 }
1841 PIXEL01_1
1842 PIXEL02_2
1843 PIXEL11
1844 PIXEL12_1
1845 PIXEL22_1M
1846 break;
1847 }
1848 case 171:
1849 case 43:
1850 {
1851 if (Diff(w[4], w[2]))
1852 {
1853 PIXEL00_C
1854 PIXEL01_C
1855 PIXEL10_C
1856 PIXEL20_1D
1857 }
1858 else
1859 {
1860 PIXEL00_5
1861 PIXEL01_1
1862 PIXEL10_6
1863 PIXEL20_2
1864 }
1865 PIXEL02_1M
1866 PIXEL11
1867 PIXEL12_1
1868 PIXEL21_1
1869 PIXEL22_2
1870 break;
1871 }
1872 case 143:
1873 case 15:
1874 {
1875 if (Diff(w[4], w[2]))
1876 {
1877 PIXEL00_C
1878 PIXEL01_C
1879 PIXEL02_1R
1880 PIXEL10_C
1881 }
1882 else
1883 {
1884 PIXEL00_5
1885 PIXEL01_6
1886 PIXEL02_2
1887 PIXEL10_1
1888 }
1889 PIXEL11
1890 PIXEL12_1
1891 PIXEL20_1M
1892 PIXEL21_1
1893 PIXEL22_2
1894 break;
1895 }
1896 case 124:
1897 {
1898 PIXEL00_1M
1899 PIXEL01_1
1900 PIXEL02_1U
1901 PIXEL11
1902 PIXEL12_C
1903 if (Diff(w[8], w[4]))
1904 {
1905 PIXEL10_C
1906 PIXEL20_C
1907 PIXEL21_C
1908 }
1909 else
1910 {
1911 PIXEL10_3
1912 PIXEL20_4
1913 PIXEL21_3
1914 }
1915 PIXEL22_1M
1916 break;
1917 }
1918 case 203:
1919 {
1920 if (Diff(w[4], w[2]))
1921 {
1922 PIXEL00_C
1923 PIXEL01_C
1924 PIXEL10_C
1925 }
1926 else
1927 {
1928 PIXEL00_4
1929 PIXEL01_3
1930 PIXEL10_3
1931 }
1932 PIXEL02_1M
1933 PIXEL11
1934 PIXEL12_1
1935 PIXEL20_1M
1936 PIXEL21_C
1937 PIXEL22_1R
1938 break;
1939 }
1940 case 62:
1941 {
1942 PIXEL00_1M
1943 if (Diff(w[2], w[6]))
1944 {
1945 PIXEL01_C
1946 PIXEL02_C
1947 PIXEL12_C
1948 }
1949 else
1950 {
1951 PIXEL01_3
1952 PIXEL02_4
1953 PIXEL12_3
1954 }
1955 PIXEL10_C
1956 PIXEL11
1957 PIXEL20_1D
1958 PIXEL21_1
1959 PIXEL22_1M
1960 break;
1961 }
1962 case 211:
1963 {
1964 PIXEL00_1L
1965 PIXEL01_C
1966 PIXEL02_1M
1967 PIXEL10_1
1968 PIXEL11
1969 PIXEL20_1M
1970 if (Diff(w[6], w[8]))
1971 {
1972 PIXEL12_C
1973 PIXEL21_C
1974 PIXEL22_C
1975 }
1976 else
1977 {
1978 PIXEL12_3
1979 PIXEL21_3
1980 PIXEL22_4
1981 }
1982 break;
1983 }
1984 case 118:
1985 {
1986 PIXEL00_1M
1987 if (Diff(w[2], w[6]))
1988 {
1989 PIXEL01_C
1990 PIXEL02_C
1991 PIXEL12_C
1992 }
1993 else
1994 {
1995 PIXEL01_3
1996 PIXEL02_4
1997 PIXEL12_3
1998 }
1999 PIXEL10_1
2000 PIXEL11
2001 PIXEL20_1L
2002 PIXEL21_C
2003 PIXEL22_1M
2004 break;
2005 }
2006 case 217:
2007 {
2008 PIXEL00_1U
2009 PIXEL01_1
2010 PIXEL02_1M
2011 PIXEL10_C
2012 PIXEL11
2013 PIXEL20_1M
2014 if (Diff(w[6], w[8]))
2015 {
2016 PIXEL12_C
2017 PIXEL21_C
2018 PIXEL22_C
2019 }
2020 else
2021 {
2022 PIXEL12_3
2023 PIXEL21_3
2024 PIXEL22_4
2025 }
2026 break;
2027 }
2028 case 110:
2029 {
2030 PIXEL00_1M
2031 PIXEL01_C
2032 PIXEL02_1R
2033 PIXEL11
2034 PIXEL12_1
2035 if (Diff(w[8], w[4]))
2036 {
2037 PIXEL10_C
2038 PIXEL20_C
2039 PIXEL21_C
2040 }
2041 else
2042 {
2043 PIXEL10_3
2044 PIXEL20_4
2045 PIXEL21_3
2046 }
2047 PIXEL22_1M
2048 break;
2049 }
2050 case 155:
2051 {
2052 if (Diff(w[4], w[2]))
2053 {
2054 PIXEL00_C
2055 PIXEL01_C
2056 PIXEL10_C
2057 }
2058 else
2059 {
2060 PIXEL00_4
2061 PIXEL01_3
2062 PIXEL10_3
2063 }
2064 PIXEL02_1M
2065 PIXEL11
2066 PIXEL12_C
2067 PIXEL20_1M
2068 PIXEL21_1
2069 PIXEL22_1D
2070 break;
2071 }
2072 case 188:
2073 {
2074 PIXEL00_1M
2075 PIXEL01_1
2076 PIXEL02_1U
2077 PIXEL10_C
2078 PIXEL11
2079 PIXEL12_C
2080 PIXEL20_1D
2081 PIXEL21_1
2082 PIXEL22_1D
2083 break;
2084 }
2085 case 185:
2086 {
2087 PIXEL00_1U
2088 PIXEL01_1
2089 PIXEL02_1M
2090 PIXEL10_C
2091 PIXEL11
2092 PIXEL12_C
2093 PIXEL20_1D
2094 PIXEL21_1
2095 PIXEL22_1D
2096 break;
2097 }
2098 case 61:
2099 {
2100 PIXEL00_1U
2101 PIXEL01_1
2102 PIXEL02_1U
2103 PIXEL10_C
2104 PIXEL11
2105 PIXEL12_C
2106 PIXEL20_1D
2107 PIXEL21_1
2108 PIXEL22_1M
2109 break;
2110 }
2111 case 157:
2112 {
2113 PIXEL00_1U
2114 PIXEL01_1
2115 PIXEL02_1U
2116 PIXEL10_C
2117 PIXEL11
2118 PIXEL12_C
2119 PIXEL20_1M
2120 PIXEL21_1
2121 PIXEL22_1D
2122 break;
2123 }
2124 case 103:
2125 {
2126 PIXEL00_1L
2127 PIXEL01_C
2128 PIXEL02_1R
2129 PIXEL10_1
2130 PIXEL11
2131 PIXEL12_1
2132 PIXEL20_1L
2133 PIXEL21_C
2134 PIXEL22_1M
2135 break;
2136 }
2137 case 227:
2138 {
2139 PIXEL00_1L
2140 PIXEL01_C
2141 PIXEL02_1M
2142 PIXEL10_1
2143 PIXEL11
2144 PIXEL12_1
2145 PIXEL20_1L
2146 PIXEL21_C
2147 PIXEL22_1R
2148 break;
2149 }
2150 case 230:
2151 {
2152 PIXEL00_1M
2153 PIXEL01_C
2154 PIXEL02_1R
2155 PIXEL10_1
2156 PIXEL11
2157 PIXEL12_1
2158 PIXEL20_1L
2159 PIXEL21_C
2160 PIXEL22_1R
2161 break;
2162 }
2163 case 199:
2164 {
2165 PIXEL00_1L
2166 PIXEL01_C
2167 PIXEL02_1R
2168 PIXEL10_1
2169 PIXEL11
2170 PIXEL12_1
2171 PIXEL20_1M
2172 PIXEL21_C
2173 PIXEL22_1R
2174 break;
2175 }
2176 case 220:
2177 {
2178 PIXEL00_1M
2179 PIXEL01_1
2180 PIXEL02_1U
2181 PIXEL10_C
2182 PIXEL11
2183 if (Diff(w[8], w[4]))
2184 {
2185 PIXEL20_1M
2186 }
2187 else
2188 {
2189 PIXEL20_2
2190 }
2191 if (Diff(w[6], w[8]))
2192 {
2193 PIXEL12_C
2194 PIXEL21_C
2195 PIXEL22_C
2196 }
2197 else
2198 {
2199 PIXEL12_3
2200 PIXEL21_3
2201 PIXEL22_4
2202 }
2203 break;
2204 }
2205 case 158:
2206 {
2207 if (Diff(w[4], w[2]))
2208 {
2209 PIXEL00_1M
2210 }
2211 else
2212 {
2213 PIXEL00_2
2214 }
2215 if (Diff(w[2], w[6]))
2216 {
2217 PIXEL01_C
2218 PIXEL02_C
2219 PIXEL12_C
2220 }
2221 else
2222 {
2223 PIXEL01_3
2224 PIXEL02_4
2225 PIXEL12_3
2226 }
2227 PIXEL10_C
2228 PIXEL11
2229 PIXEL20_1M
2230 PIXEL21_1
2231 PIXEL22_1D
2232 break;
2233 }
2234 case 234:
2235 {
2236 if (Diff(w[4], w[2]))
2237 {
2238 PIXEL00_1M
2239 }
2240 else
2241 {
2242 PIXEL00_2
2243 }
2244 PIXEL01_C
2245 PIXEL02_1M
2246 PIXEL11
2247 PIXEL12_1
2248 if (Diff(w[8], w[4]))
2249 {
2250 PIXEL10_C
2251 PIXEL20_C
2252 PIXEL21_C
2253 }
2254 else
2255 {
2256 PIXEL10_3
2257 PIXEL20_4
2258 PIXEL21_3
2259 }
2260 PIXEL22_1R
2261 break;
2262 }
2263 case 242:
2264 {
2265 PIXEL00_1M
2266 PIXEL01_C
2267 if (Diff(w[2], w[6]))
2268 {
2269 PIXEL02_1M
2270 }
2271 else
2272 {
2273 PIXEL02_2
2274 }
2275 PIXEL10_1
2276 PIXEL11
2277 PIXEL20_1L
2278 if (Diff(w[6], w[8]))
2279 {
2280 PIXEL12_C
2281 PIXEL21_C
2282 PIXEL22_C
2283 }
2284 else
2285 {
2286 PIXEL12_3
2287 PIXEL21_3
2288 PIXEL22_4
2289 }
2290 break;
2291 }
2292 case 59:
2293 {
2294 if (Diff(w[4], w[2]))
2295 {
2296 PIXEL00_C
2297 PIXEL01_C
2298 PIXEL10_C
2299 }
2300 else
2301 {
2302 PIXEL00_4
2303 PIXEL01_3
2304 PIXEL10_3
2305 }
2306 if (Diff(w[2], w[6]))
2307 {
2308 PIXEL02_1M
2309 }
2310 else
2311 {
2312 PIXEL02_2
2313 }
2314 PIXEL11
2315 PIXEL12_C
2316 PIXEL20_1D
2317 PIXEL21_1
2318 PIXEL22_1M
2319 break;
2320 }
2321 case 121:
2322 {
2323 PIXEL00_1U
2324 PIXEL01_1
2325 PIXEL02_1M
2326 PIXEL11
2327 PIXEL12_C
2328 if (Diff(w[8], w[4]))
2329 {
2330 PIXEL10_C
2331 PIXEL20_C
2332 PIXEL21_C
2333 }
2334 else
2335 {
2336 PIXEL10_3
2337 PIXEL20_4
2338 PIXEL21_3
2339 }
2340 if (Diff(w[6], w[8]))
2341 {
2342 PIXEL22_1M
2343 }
2344 else
2345 {
2346 PIXEL22_2
2347 }
2348 break;
2349 }
2350 case 87:
2351 {
2352 PIXEL00_1L
2353 if (Diff(w[2], w[6]))
2354 {
2355 PIXEL01_C
2356 PIXEL02_C
2357 PIXEL12_C
2358 }
2359 else
2360 {
2361 PIXEL01_3
2362 PIXEL02_4
2363 PIXEL12_3
2364 }
2365 PIXEL10_1
2366 PIXEL11
2367 PIXEL20_1M
2368 PIXEL21_C
2369 if (Diff(w[6], w[8]))
2370 {
2371 PIXEL22_1M
2372 }
2373 else
2374 {
2375 PIXEL22_2
2376 }
2377 break;
2378 }
2379 case 79:
2380 {
2381 if (Diff(w[4], w[2]))
2382 {
2383 PIXEL00_C
2384 PIXEL01_C
2385 PIXEL10_C
2386 }
2387 else
2388 {
2389 PIXEL00_4
2390 PIXEL01_3
2391 PIXEL10_3
2392 }
2393 PIXEL02_1R
2394 PIXEL11
2395 PIXEL12_1
2396 if (Diff(w[8], w[4]))
2397 {
2398 PIXEL20_1M
2399 }
2400 else
2401 {
2402 PIXEL20_2
2403 }
2404 PIXEL21_C
2405 PIXEL22_1M
2406 break;
2407 }
2408 case 122:
2409 {
2410 if (Diff(w[4], w[2]))
2411 {
2412 PIXEL00_1M
2413 }
2414 else
2415 {
2416 PIXEL00_2
2417 }
2418 PIXEL01_C
2419 if (Diff(w[2], w[6]))
2420 {
2421 PIXEL02_1M
2422 }
2423 else
2424 {
2425 PIXEL02_2
2426 }
2427 PIXEL11
2428 PIXEL12_C
2429 if (Diff(w[8], w[4]))
2430 {
2431 PIXEL10_C
2432 PIXEL20_C
2433 PIXEL21_C
2434 }
2435 else
2436 {
2437 PIXEL10_3
2438 PIXEL20_4
2439 PIXEL21_3
2440 }
2441 if (Diff(w[6], w[8]))
2442 {
2443 PIXEL22_1M
2444 }
2445 else
2446 {
2447 PIXEL22_2
2448 }
2449 break;
2450 }
2451 case 94:
2452 {
2453 if (Diff(w[4], w[2]))
2454 {
2455 PIXEL00_1M
2456 }
2457 else
2458 {
2459 PIXEL00_2
2460 }
2461 if (Diff(w[2], w[6]))
2462 {
2463 PIXEL01_C
2464 PIXEL02_C
2465 PIXEL12_C
2466 }
2467 else
2468 {
2469 PIXEL01_3
2470 PIXEL02_4
2471 PIXEL12_3
2472 }
2473 PIXEL10_C
2474 PIXEL11
2475 if (Diff(w[8], w[4]))
2476 {
2477 PIXEL20_1M
2478 }
2479 else
2480 {
2481 PIXEL20_2
2482 }
2483 PIXEL21_C
2484 if (Diff(w[6], w[8]))
2485 {
2486 PIXEL22_1M
2487 }
2488 else
2489 {
2490 PIXEL22_2
2491 }
2492 break;
2493 }
2494 case 218:
2495 {
2496 if (Diff(w[4], w[2]))
2497 {
2498 PIXEL00_1M
2499 }
2500 else
2501 {
2502 PIXEL00_2
2503 }
2504 PIXEL01_C
2505 if (Diff(w[2], w[6]))
2506 {
2507 PIXEL02_1M
2508 }
2509 else
2510 {
2511 PIXEL02_2
2512 }
2513 PIXEL10_C
2514 PIXEL11
2515 if (Diff(w[8], w[4]))
2516 {
2517 PIXEL20_1M
2518 }
2519 else
2520 {
2521 PIXEL20_2
2522 }
2523 if (Diff(w[6], w[8]))
2524 {
2525 PIXEL12_C
2526 PIXEL21_C
2527 PIXEL22_C
2528 }
2529 else
2530 {
2531 PIXEL12_3
2532 PIXEL21_3
2533 PIXEL22_4
2534 }
2535 break;
2536 }
2537 case 91:
2538 {
2539 if (Diff(w[4], w[2]))
2540 {
2541 PIXEL00_C
2542 PIXEL01_C
2543 PIXEL10_C
2544 }
2545 else
2546 {
2547 PIXEL00_4
2548 PIXEL01_3
2549 PIXEL10_3
2550 }
2551 if (Diff(w[2], w[6]))
2552 {
2553 PIXEL02_1M
2554 }
2555 else
2556 {
2557 PIXEL02_2
2558 }
2559 PIXEL11
2560 PIXEL12_C
2561 if (Diff(w[8], w[4]))
2562 {
2563 PIXEL20_1M
2564 }
2565 else
2566 {
2567 PIXEL20_2
2568 }
2569 PIXEL21_C
2570 if (Diff(w[6], w[8]))
2571 {
2572 PIXEL22_1M
2573 }
2574 else
2575 {
2576 PIXEL22_2
2577 }
2578 break;
2579 }
2580 case 229:
2581 {
2582 PIXEL00_2
2583 PIXEL01_1
2584 PIXEL02_2
2585 PIXEL10_1
2586 PIXEL11
2587 PIXEL12_1
2588 PIXEL20_1L
2589 PIXEL21_C
2590 PIXEL22_1R
2591 break;
2592 }
2593 case 167:
2594 {
2595 PIXEL00_1L
2596 PIXEL01_C
2597 PIXEL02_1R
2598 PIXEL10_1
2599 PIXEL11
2600 PIXEL12_1
2601 PIXEL20_2
2602 PIXEL21_1
2603 PIXEL22_2
2604 break;
2605 }
2606 case 173:
2607 {
2608 PIXEL00_1U
2609 PIXEL01_1
2610 PIXEL02_2
2611 PIXEL10_C
2612 PIXEL11
2613 PIXEL12_1
2614 PIXEL20_1D
2615 PIXEL21_1
2616 PIXEL22_2
2617 break;
2618 }
2619 case 181:
2620 {
2621 PIXEL00_2
2622 PIXEL01_1
2623 PIXEL02_1U
2624 PIXEL10_1
2625 PIXEL11
2626 PIXEL12_C
2627 PIXEL20_2
2628 PIXEL21_1
2629 PIXEL22_1D
2630 break;
2631 }
2632 case 186:
2633 {
2634 if (Diff(w[4], w[2]))
2635 {
2636 PIXEL00_1M
2637 }
2638 else
2639 {
2640 PIXEL00_2
2641 }
2642 PIXEL01_C
2643 if (Diff(w[2], w[6]))
2644 {
2645 PIXEL02_1M
2646 }
2647 else
2648 {
2649 PIXEL02_2
2650 }
2651 PIXEL10_C
2652 PIXEL11
2653 PIXEL12_C
2654 PIXEL20_1D
2655 PIXEL21_1
2656 PIXEL22_1D
2657 break;
2658 }
2659 case 115:
2660 {
2661 PIXEL00_1L
2662 PIXEL01_C
2663 if (Diff(w[2], w[6]))
2664 {
2665 PIXEL02_1M
2666 }
2667 else
2668 {
2669 PIXEL02_2
2670 }
2671 PIXEL10_1
2672 PIXEL11
2673 PIXEL12_C
2674 PIXEL20_1L
2675 PIXEL21_C
2676 if (Diff(w[6], w[8]))
2677 {
2678 PIXEL22_1M
2679 }
2680 else
2681 {
2682 PIXEL22_2
2683 }
2684 break;
2685 }
2686 case 93:
2687 {
2688 PIXEL00_1U
2689 PIXEL01_1
2690 PIXEL02_1U
2691 PIXEL10_C
2692 PIXEL11
2693 PIXEL12_C
2694 if (Diff(w[8], w[4]))
2695 {
2696 PIXEL20_1M
2697 }
2698 else
2699 {
2700 PIXEL20_2
2701 }
2702 PIXEL21_C
2703 if (Diff(w[6], w[8]))
2704 {
2705 PIXEL22_1M
2706 }
2707 else
2708 {
2709 PIXEL22_2
2710 }
2711 break;
2712 }
2713 case 206:
2714 {
2715 if (Diff(w[4], w[2]))
2716 {
2717 PIXEL00_1M
2718 }
2719 else
2720 {
2721 PIXEL00_2
2722 }
2723 PIXEL01_C
2724 PIXEL02_1R
2725 PIXEL10_C
2726 PIXEL11
2727 PIXEL12_1
2728 if (Diff(w[8], w[4]))
2729 {
2730 PIXEL20_1M
2731 }
2732 else
2733 {
2734 PIXEL20_2
2735 }
2736 PIXEL21_C
2737 PIXEL22_1R
2738 break;
2739 }
2740 case 205:
2741 case 201:
2742 {
2743 PIXEL00_1U
2744 PIXEL01_1
2745 PIXEL02_2
2746 PIXEL10_C
2747 PIXEL11
2748 PIXEL12_1
2749 if (Diff(w[8], w[4]))
2750 {
2751 PIXEL20_1M
2752 }
2753 else
2754 {
2755 PIXEL20_2
2756 }
2757 PIXEL21_C
2758 PIXEL22_1R
2759 break;
2760 }
2761 case 174:
2762 case 46:
2763 {
2764 if (Diff(w[4], w[2]))
2765 {
2766 PIXEL00_1M
2767 }
2768 else
2769 {
2770 PIXEL00_2
2771 }
2772 PIXEL01_C
2773 PIXEL02_1R
2774 PIXEL10_C
2775 PIXEL11
2776 PIXEL12_1
2777 PIXEL20_1D
2778 PIXEL21_1
2779 PIXEL22_2
2780 break;
2781 }
2782 case 179:
2783 case 147:
2784 {
2785 PIXEL00_1L
2786 PIXEL01_C
2787 if (Diff(w[2], w[6]))
2788 {
2789 PIXEL02_1M
2790 }
2791 else
2792 {
2793 PIXEL02_2
2794 }
2795 PIXEL10_1
2796 PIXEL11
2797 PIXEL12_C
2798 PIXEL20_2
2799 PIXEL21_1
2800 PIXEL22_1D
2801 break;
2802 }
2803 case 117:
2804 case 116:
2805 {
2806 PIXEL00_2
2807 PIXEL01_1
2808 PIXEL02_1U
2809 PIXEL10_1
2810 PIXEL11
2811 PIXEL12_C
2812 PIXEL20_1L
2813 PIXEL21_C
2814 if (Diff(w[6], w[8]))
2815 {
2816 PIXEL22_1M
2817 }
2818 else
2819 {
2820 PIXEL22_2
2821 }
2822 break;
2823 }
2824 case 189:
2825 {
2826 PIXEL00_1U
2827 PIXEL01_1
2828 PIXEL02_1U
2829 PIXEL10_C
2830 PIXEL11
2831 PIXEL12_C
2832 PIXEL20_1D
2833 PIXEL21_1
2834 PIXEL22_1D
2835 break;
2836 }
2837 case 231:
2838 {
2839 PIXEL00_1L
2840 PIXEL01_C
2841 PIXEL02_1R
2842 PIXEL10_1
2843 PIXEL11
2844 PIXEL12_1
2845 PIXEL20_1L
2846 PIXEL21_C
2847 PIXEL22_1R
2848 break;
2849 }
2850 case 126:
2851 {
2852 PIXEL00_1M
2853 if (Diff(w[2], w[6]))
2854 {
2855 PIXEL01_C
2856 PIXEL02_C
2857 PIXEL12_C
2858 }
2859 else
2860 {
2861 PIXEL01_3
2862 PIXEL02_4
2863 PIXEL12_3
2864 }
2865 PIXEL11
2866 if (Diff(w[8], w[4]))
2867 {
2868 PIXEL10_C
2869 PIXEL20_C
2870 PIXEL21_C
2871 }
2872 else
2873 {
2874 PIXEL10_3
2875 PIXEL20_4
2876 PIXEL21_3
2877 }
2878 PIXEL22_1M
2879 break;
2880 }
2881 case 219:
2882 {
2883 if (Diff(w[4], w[2]))
2884 {
2885 PIXEL00_C
2886 PIXEL01_C
2887 PIXEL10_C
2888 }
2889 else
2890 {
2891 PIXEL00_4
2892 PIXEL01_3
2893 PIXEL10_3
2894 }
2895 PIXEL02_1M
2896 PIXEL11
2897 PIXEL20_1M
2898 if (Diff(w[6], w[8]))
2899 {
2900 PIXEL12_C
2901 PIXEL21_C
2902 PIXEL22_C
2903 }
2904 else
2905 {
2906 PIXEL12_3
2907 PIXEL21_3
2908 PIXEL22_4
2909 }
2910 break;
2911 }
2912 case 125:
2913 {
2914 if (Diff(w[8], w[4]))
2915 {
2916 PIXEL00_1U
2917 PIXEL10_C
2918 PIXEL20_C
2919 PIXEL21_C
2920 }
2921 else
2922 {
2923 PIXEL00_2
2924 PIXEL10_6
2925 PIXEL20_5
2926 PIXEL21_1
2927 }
2928 PIXEL01_1
2929 PIXEL02_1U
2930 PIXEL11
2931 PIXEL12_C
2932 PIXEL22_1M
2933 break;
2934 }
2935 case 221:
2936 {
2937 if (Diff(w[6], w[8]))
2938 {
2939 PIXEL02_1U
2940 PIXEL12_C
2941 PIXEL21_C
2942 PIXEL22_C
2943 }
2944 else
2945 {
2946 PIXEL02_2
2947 PIXEL12_6
2948 PIXEL21_1
2949 PIXEL22_5
2950 }
2951 PIXEL00_1U
2952 PIXEL01_1
2953 PIXEL10_C
2954 PIXEL11
2955 PIXEL20_1M
2956 break;
2957 }
2958 case 207:
2959 {
2960 if (Diff(w[4], w[2]))
2961 {
2962 PIXEL00_C
2963 PIXEL01_C
2964 PIXEL02_1R
2965 PIXEL10_C
2966 }
2967 else
2968 {
2969 PIXEL00_5
2970 PIXEL01_6
2971 PIXEL02_2
2972 PIXEL10_1
2973 }
2974 PIXEL11
2975 PIXEL12_1
2976 PIXEL20_1M
2977 PIXEL21_C
2978 PIXEL22_1R
2979 break;
2980 }
2981 case 238:
2982 {
2983 if (Diff(w[8], w[4]))
2984 {
2985 PIXEL10_C
2986 PIXEL20_C
2987 PIXEL21_C
2988 PIXEL22_1R
2989 }
2990 else
2991 {
2992 PIXEL10_1
2993 PIXEL20_5
2994 PIXEL21_6
2995 PIXEL22_2
2996 }
2997 PIXEL00_1M
2998 PIXEL01_C
2999 PIXEL02_1R
3000 PIXEL11
3001 PIXEL12_1
3002 break;
3003 }
3004 case 190:
3005 {
3006 if (Diff(w[2], w[6]))
3007 {
3008 PIXEL01_C
3009 PIXEL02_C
3010 PIXEL12_C
3011 PIXEL22_1D
3012 }
3013 else
3014 {
3015 PIXEL01_1
3016 PIXEL02_5
3017 PIXEL12_6
3018 PIXEL22_2
3019 }
3020 PIXEL00_1M
3021 PIXEL10_C
3022 PIXEL11
3023 PIXEL20_1D
3024 PIXEL21_1
3025 break;
3026 }
3027 case 187:
3028 {
3029 if (Diff(w[4], w[2]))
3030 {
3031 PIXEL00_C
3032 PIXEL01_C
3033 PIXEL10_C
3034 PIXEL20_1D
3035 }
3036 else
3037 {
3038 PIXEL00_5
3039 PIXEL01_1
3040 PIXEL10_6
3041 PIXEL20_2
3042 }
3043 PIXEL02_1M
3044 PIXEL11
3045 PIXEL12_C
3046 PIXEL21_1
3047 PIXEL22_1D
3048 break;
3049 }
3050 case 243:
3051 {
3052 if (Diff(w[6], w[8]))
3053 {
3054 PIXEL12_C
3055 PIXEL20_1L
3056 PIXEL21_C
3057 PIXEL22_C
3058 }
3059 else
3060 {
3061 PIXEL12_1
3062 PIXEL20_2
3063 PIXEL21_6
3064 PIXEL22_5
3065 }
3066 PIXEL00_1L
3067 PIXEL01_C
3068 PIXEL02_1M
3069 PIXEL10_1
3070 PIXEL11
3071 break;
3072 }
3073 case 119:
3074 {
3075 if (Diff(w[2], w[6]))
3076 {
3077 PIXEL00_1L
3078 PIXEL01_C
3079 PIXEL02_C
3080 PIXEL12_C
3081 }
3082 else
3083 {
3084 PIXEL00_2
3085 PIXEL01_6
3086 PIXEL02_5
3087 PIXEL12_1
3088 }
3089 PIXEL10_1
3090 PIXEL11
3091 PIXEL20_1L
3092 PIXEL21_C
3093 PIXEL22_1M
3094 break;
3095 }
3096 case 237:
3097 case 233:
3098 {
3099 PIXEL00_1U
3100 PIXEL01_1
3101 PIXEL02_2
3102 PIXEL10_C
3103 PIXEL11
3104 PIXEL12_1
3105 if (Diff(w[8], w[4]))
3106 {
3107 PIXEL20_C
3108 }
3109 else
3110 {
3111 PIXEL20_2
3112 }
3113 PIXEL21_C
3114 PIXEL22_1R
3115 break;
3116 }
3117 case 175:
3118 case 47:
3119 {
3120 if (Diff(w[4], w[2]))
3121 {
3122 PIXEL00_C
3123 }
3124 else
3125 {
3126 PIXEL00_2
3127 }
3128 PIXEL01_C
3129 PIXEL02_1R
3130 PIXEL10_C
3131 PIXEL11
3132 PIXEL12_1
3133 PIXEL20_1D
3134 PIXEL21_1
3135 PIXEL22_2
3136 break;
3137 }
3138 case 183:
3139 case 151:
3140 {
3141 PIXEL00_1L
3142 PIXEL01_C
3143 if (Diff(w[2], w[6]))
3144 {
3145 PIXEL02_C
3146 }
3147 else
3148 {
3149 PIXEL02_2
3150 }
3151 PIXEL10_1
3152 PIXEL11
3153 PIXEL12_C
3154 PIXEL20_2
3155 PIXEL21_1
3156 PIXEL22_1D
3157 break;
3158 }
3159 case 245:
3160 case 244:
3161 {
3162 PIXEL00_2
3163 PIXEL01_1
3164 PIXEL02_1U
3165 PIXEL10_1
3166 PIXEL11
3167 PIXEL12_C
3168 PIXEL20_1L
3169 PIXEL21_C
3170 if (Diff(w[6], w[8]))
3171 {
3172 PIXEL22_C
3173 }
3174 else
3175 {
3176 PIXEL22_2
3177 }
3178 break;
3179 }
3180 case 250:
3181 {
3182 PIXEL00_1M
3183 PIXEL01_C
3184 PIXEL02_1M
3185 PIXEL11
3186 if (Diff(w[8], w[4]))
3187 {
3188 PIXEL10_C
3189 PIXEL20_C
3190 }
3191 else
3192 {
3193 PIXEL10_3
3194 PIXEL20_4
3195 }
3196 PIXEL21_C
3197 if (Diff(w[6], w[8]))
3198 {
3199 PIXEL12_C
3200 PIXEL22_C
3201 }
3202 else
3203 {
3204 PIXEL12_3
3205 PIXEL22_4
3206 }
3207 break;
3208 }
3209 case 123:
3210 {
3211 if (Diff(w[4], w[2]))
3212 {
3213 PIXEL00_C
3214 PIXEL01_C
3215 }
3216 else
3217 {
3218 PIXEL00_4
3219 PIXEL01_3
3220 }
3221 PIXEL02_1M
3222 PIXEL10_C
3223 PIXEL11
3224 PIXEL12_C
3225 if (Diff(w[8], w[4]))
3226 {
3227 PIXEL20_C
3228 PIXEL21_C
3229 }
3230 else
3231 {
3232 PIXEL20_4
3233 PIXEL21_3
3234 }
3235 PIXEL22_1M
3236 break;
3237 }
3238 case 95:
3239 {
3240 if (Diff(w[4], w[2]))
3241 {
3242 PIXEL00_C
3243 PIXEL10_C
3244 }
3245 else
3246 {
3247 PIXEL00_4
3248 PIXEL10_3
3249 }
3250 PIXEL01_C
3251 if (Diff(w[2], w[6]))
3252 {
3253 PIXEL02_C
3254 PIXEL12_C
3255 }
3256 else
3257 {
3258 PIXEL02_4
3259 PIXEL12_3
3260 }
3261 PIXEL11
3262 PIXEL20_1M
3263 PIXEL21_C
3264 PIXEL22_1M
3265 break;
3266 }
3267 case 222:
3268 {
3269 PIXEL00_1M
3270 if (Diff(w[2], w[6]))
3271 {
3272 PIXEL01_C
3273 PIXEL02_C
3274 }
3275 else
3276 {
3277 PIXEL01_3
3278 PIXEL02_4
3279 }
3280 PIXEL10_C
3281 PIXEL11
3282 PIXEL12_C
3283 PIXEL20_1M
3284 if (Diff(w[6], w[8]))
3285 {
3286 PIXEL21_C
3287 PIXEL22_C
3288 }
3289 else
3290 {
3291 PIXEL21_3
3292 PIXEL22_4
3293 }
3294 break;
3295 }
3296 case 252:
3297 {
3298 PIXEL00_1M
3299 PIXEL01_1
3300 PIXEL02_1U
3301 PIXEL11
3302 PIXEL12_C
3303 if (Diff(w[8], w[4]))
3304 {
3305 PIXEL10_C
3306 PIXEL20_C
3307 }
3308 else
3309 {
3310 PIXEL10_3
3311 PIXEL20_4
3312 }
3313 PIXEL21_C
3314 if (Diff(w[6], w[8]))
3315 {
3316 PIXEL22_C
3317 }
3318 else
3319 {
3320 PIXEL22_2
3321 }
3322 break;
3323 }
3324 case 249:
3325 {
3326 PIXEL00_1U
3327 PIXEL01_1
3328 PIXEL02_1M
3329 PIXEL10_C
3330 PIXEL11
3331 if (Diff(w[8], w[4]))
3332 {
3333 PIXEL20_C
3334 }
3335 else
3336 {
3337 PIXEL20_2
3338 }
3339 PIXEL21_C
3340 if (Diff(w[6], w[8]))
3341 {
3342 PIXEL12_C
3343 PIXEL22_C
3344 }
3345 else
3346 {
3347 PIXEL12_3
3348 PIXEL22_4
3349 }
3350 break;
3351 }
3352 case 235:
3353 {
3354 if (Diff(w[4], w[2]))
3355 {
3356 PIXEL00_C
3357 PIXEL01_C
3358 }
3359 else
3360 {
3361 PIXEL00_4
3362 PIXEL01_3
3363 }
3364 PIXEL02_1M
3365 PIXEL10_C
3366 PIXEL11
3367 PIXEL12_1
3368 if (Diff(w[8], w[4]))
3369 {
3370 PIXEL20_C
3371 }
3372 else
3373 {
3374 PIXEL20_2
3375 }
3376 PIXEL21_C
3377 PIXEL22_1R
3378 break;
3379 }
3380 case 111:
3381 {
3382 if (Diff(w[4], w[2]))
3383 {
3384 PIXEL00_C
3385 }
3386 else
3387 {
3388 PIXEL00_2
3389 }
3390 PIXEL01_C
3391 PIXEL02_1R
3392 PIXEL10_C
3393 PIXEL11
3394 PIXEL12_1
3395 if (Diff(w[8], w[4]))
3396 {
3397 PIXEL20_C
3398 PIXEL21_C
3399 }
3400 else
3401 {
3402 PIXEL20_4
3403 PIXEL21_3
3404 }
3405 PIXEL22_1M
3406 break;
3407 }
3408 case 63:
3409 {
3410 if (Diff(w[4], w[2]))
3411 {
3412 PIXEL00_C
3413 }
3414 else
3415 {
3416 PIXEL00_2
3417 }
3418 PIXEL01_C
3419 if (Diff(w[2], w[6]))
3420 {
3421 PIXEL02_C
3422 PIXEL12_C
3423 }
3424 else
3425 {
3426 PIXEL02_4
3427 PIXEL12_3
3428 }
3429 PIXEL10_C
3430 PIXEL11
3431 PIXEL20_1D
3432 PIXEL21_1
3433 PIXEL22_1M
3434 break;
3435 }
3436 case 159:
3437 {
3438 if (Diff(w[4], w[2]))
3439 {
3440 PIXEL00_C
3441 PIXEL10_C
3442 }
3443 else
3444 {
3445 PIXEL00_4
3446 PIXEL10_3
3447 }
3448 PIXEL01_C
3449 if (Diff(w[2], w[6]))
3450 {
3451 PIXEL02_C
3452 }
3453 else
3454 {
3455 PIXEL02_2
3456 }
3457 PIXEL11
3458 PIXEL12_C
3459 PIXEL20_1M
3460 PIXEL21_1
3461 PIXEL22_1D
3462 break;
3463 }
3464 case 215:
3465 {
3466 PIXEL00_1L
3467 PIXEL01_C
3468 if (Diff(w[2], w[6]))
3469 {
3470 PIXEL02_C
3471 }
3472 else
3473 {
3474 PIXEL02_2
3475 }
3476 PIXEL10_1
3477 PIXEL11
3478 PIXEL12_C
3479 PIXEL20_1M
3480 if (Diff(w[6], w[8]))
3481 {
3482 PIXEL21_C
3483 PIXEL22_C
3484 }
3485 else
3486 {
3487 PIXEL21_3
3488 PIXEL22_4
3489 }
3490 break;
3491 }
3492 case 246:
3493 {
3494 PIXEL00_1M
3495 if (Diff(w[2], w[6]))
3496 {
3497 PIXEL01_C
3498 PIXEL02_C
3499 }
3500 else
3501 {
3502 PIXEL01_3
3503 PIXEL02_4
3504 }
3505 PIXEL10_1
3506 PIXEL11
3507 PIXEL12_C
3508 PIXEL20_1L
3509 PIXEL21_C
3510 if (Diff(w[6], w[8]))
3511 {
3512 PIXEL22_C
3513 }
3514 else
3515 {
3516 PIXEL22_2
3517 }
3518 break;
3519 }
3520 case 254:
3521 {
3522 PIXEL00_1M
3523 if (Diff(w[2], w[6]))
3524 {
3525 PIXEL01_C
3526 PIXEL02_C
3527 }
3528 else
3529 {
3530 PIXEL01_3
3531 PIXEL02_4
3532 }
3533 PIXEL11
3534 if (Diff(w[8], w[4]))
3535 {
3536 PIXEL10_C
3537 PIXEL20_C
3538 }
3539 else
3540 {
3541 PIXEL10_3
3542 PIXEL20_4
3543 }
3544 if (Diff(w[6], w[8]))
3545 {
3546 PIXEL12_C
3547 PIXEL21_C
3548 PIXEL22_C
3549 }
3550 else
3551 {
3552 PIXEL12_3
3553 PIXEL21_3
3554 PIXEL22_2
3555 }
3556 break;
3557 }
3558 case 253:
3559 {
3560 PIXEL00_1U
3561 PIXEL01_1
3562 PIXEL02_1U
3563 PIXEL10_C
3564 PIXEL11
3565 PIXEL12_C
3566 if (Diff(w[8], w[4]))
3567 {
3568 PIXEL20_C
3569 }
3570 else
3571 {
3572 PIXEL20_2
3573 }
3574 PIXEL21_C
3575 if (Diff(w[6], w[8]))
3576 {
3577 PIXEL22_C
3578 }
3579 else
3580 {
3581 PIXEL22_2
3582 }
3583 break;
3584 }
3585 case 251:
3586 {
3587 if (Diff(w[4], w[2]))
3588 {
3589 PIXEL00_C
3590 PIXEL01_C
3591 }
3592 else
3593 {
3594 PIXEL00_4
3595 PIXEL01_3
3596 }
3597 PIXEL02_1M
3598 PIXEL11
3599 if (Diff(w[8], w[4]))
3600 {
3601 PIXEL10_C
3602 PIXEL20_C
3603 PIXEL21_C
3604 }
3605 else
3606 {
3607 PIXEL10_3
3608 PIXEL20_2
3609 PIXEL21_3
3610 }
3611 if (Diff(w[6], w[8]))
3612 {
3613 PIXEL12_C
3614 PIXEL22_C
3615 }
3616 else
3617 {
3618 PIXEL12_3
3619 PIXEL22_4
3620 }
3621 break;
3622 }
3623 case 239:
3624 {
3625 if (Diff(w[4], w[2]))
3626 {
3627 PIXEL00_C
3628 }
3629 else
3630 {
3631 PIXEL00_2
3632 }
3633 PIXEL01_C
3634 PIXEL02_1R
3635 PIXEL10_C
3636 PIXEL11
3637 PIXEL12_1
3638 if (Diff(w[8], w[4]))
3639 {
3640 PIXEL20_C
3641 }
3642 else
3643 {
3644 PIXEL20_2
3645 }
3646 PIXEL21_C
3647 PIXEL22_1R
3648 break;
3649 }
3650 case 127:
3651 {
3652 if (Diff(w[4], w[2]))
3653 {
3654 PIXEL00_C
3655 PIXEL01_C
3656 PIXEL10_C
3657 }
3658 else
3659 {
3660 PIXEL00_2
3661 PIXEL01_3
3662 PIXEL10_3
3663 }
3664 if (Diff(w[2], w[6]))
3665 {
3666 PIXEL02_C
3667 PIXEL12_C
3668 }
3669 else
3670 {
3671 PIXEL02_4
3672 PIXEL12_3
3673 }
3674 PIXEL11
3675 if (Diff(w[8], w[4]))
3676 {
3677 PIXEL20_C
3678 PIXEL21_C
3679 }
3680 else
3681 {
3682 PIXEL20_4
3683 PIXEL21_3
3684 }
3685 PIXEL22_1M
3686 break;
3687 }
3688 case 191:
3689 {
3690 if (Diff(w[4], w[2]))
3691 {
3692 PIXEL00_C
3693 }
3694 else
3695 {
3696 PIXEL00_2
3697 }
3698 PIXEL01_C
3699 if (Diff(w[2], w[6]))
3700 {
3701 PIXEL02_C
3702 }
3703 else
3704 {
3705 PIXEL02_2
3706 }
3707 PIXEL10_C
3708 PIXEL11
3709 PIXEL12_C
3710 PIXEL20_1D
3711 PIXEL21_1
3712 PIXEL22_1D
3713 break;
3714 }
3715 case 223:
3716 {
3717 if (Diff(w[4], w[2]))
3718 {
3719 PIXEL00_C
3720 PIXEL10_C
3721 }
3722 else
3723 {
3724 PIXEL00_4
3725 PIXEL10_3
3726 }
3727 if (Diff(w[2], w[6]))
3728 {
3729 PIXEL01_C
3730 PIXEL02_C
3731 PIXEL12_C
3732 }
3733 else
3734 {
3735 PIXEL01_3
3736 PIXEL02_2
3737 PIXEL12_3
3738 }
3739 PIXEL11
3740 PIXEL20_1M
3741 if (Diff(w[6], w[8]))
3742 {
3743 PIXEL21_C
3744 PIXEL22_C
3745 }
3746 else
3747 {
3748 PIXEL21_3
3749 PIXEL22_4
3750 }
3751 break;
3752 }
3753 case 247:
3754 {
3755 PIXEL00_1L
3756 PIXEL01_C
3757 if (Diff(w[2], w[6]))
3758 {
3759 PIXEL02_C
3760 }
3761 else
3762 {
3763 PIXEL02_2
3764 }
3765 PIXEL10_1
3766 PIXEL11
3767 PIXEL12_C
3768 PIXEL20_1L
3769 PIXEL21_C
3770 if (Diff(w[6], w[8]))
3771 {
3772 PIXEL22_C
3773 }
3774 else
3775 {
3776 PIXEL22_2
3777 }
3778 break;
3779 }
3780 case 255:
3781 {
3782 if (Diff(w[4], w[2]))
3783 {
3784 PIXEL00_C
3785 }
3786 else
3787 {
3788 PIXEL00_2
3789 }
3790 PIXEL01_C
3791 if (Diff(w[2], w[6]))
3792 {
3793 PIXEL02_C
3794 }
3795 else
3796 {
3797 PIXEL02_2
3798 }
3799 PIXEL10_C
3800 PIXEL11
3801 PIXEL12_C
3802 if (Diff(w[8], w[4]))
3803 {
3804 PIXEL20_C
3805 }
3806 else
3807 {
3808 PIXEL20_2
3809 }
3810 PIXEL21_C
3811 if (Diff(w[6], w[8]))
3812 {
3813 PIXEL22_C
3814 }
3815 else
3816 {
3817 PIXEL22_2
3818 }
3819 break;
3820 }
3821 }
3822 pIn += sizeof(uint32);
3823 pOut+=12;
3824 }
3825 pOut += BpL * 3 - Xres * 3 * sizeof(uint32);
3826 pIn += srcBpL - Xres * sizeof(uint32);
3827 }
3828 }
3829