HQ2X_RB_FUNC(HQ2X_TYPE * sp,uint32_t srb,HQ2X_TYPE * dp,uint32_t drb,int Xres,int Yres)1 HQX_API void HQX_CALLCONV HQ2X_RB_FUNC( HQ2X_TYPE * sp, uint32_t srb, HQ2X_TYPE * dp, uint32_t drb, int Xres, int Yres )
2 {
3 int i, j, k;
4 int prevline, nextline;
5 HQ2X_TYPE w[10];
6 int dpL = (drb / HQ2X_BYTES);
7 int spL = (srb / HQ2X_BYTES);
8 uint8_t *sRowP = (uint8_t *) sp;
9 uint8_t *dRowP = (uint8_t *) dp;
10 uint32_t yuv1, yuv2;
11
12 // +----+----+----+
13 // | | | |
14 // | w1 | w2 | w3 |
15 // +----+----+----+
16 // | | | |
17 // | w4 | w5 | w6 |
18 // +----+----+----+
19 // | | | |
20 // | w7 | w8 | w9 |
21 // +----+----+----+
22
23 for (j=0; j<Yres; j++)
24 {
25 if (j>0) prevline = -spL; else prevline = 0;
26 if (j<Yres-1) nextline = spL; else nextline = 0;
27
28 for (i=0; i<Xres; i++)
29 {
30 HQ2X_CPY(w[2], *(sp + prevline));
31 HQ2X_CPY(w[5], *sp);
32 HQ2X_CPY(w[8], *(sp + nextline));
33
34 if (i>0)
35 {
36 HQ2X_CPY(w[1], *(sp + prevline - 1));
37 HQ2X_CPY(w[4], *(sp - 1));
38 HQ2X_CPY(w[7], *(sp + nextline - 1));
39 }
40 else
41 {
42 HQ2X_CPY(w[1], w[2]);
43 HQ2X_CPY(w[4], w[5]);
44 HQ2X_CPY(w[7], w[8]);
45 }
46
47 if (i<Xres-1)
48 {
49 HQ2X_CPY(w[3], *(sp + prevline + 1));
50 HQ2X_CPY(w[6], *(sp + 1));
51 HQ2X_CPY(w[9], *(sp + nextline + 1));
52 }
53 else
54 {
55 HQ2X_CPY(w[3], w[2]);
56 HQ2X_CPY(w[6], w[5]);
57 HQ2X_CPY(w[9], w[8]);
58 }
59
60 int pattern = 0;
61 int flag = 1;
62
63 yuv1 = RGB_TO_YUV_FUNC(w[5]);
64
65 for (k=1; k<=9; k++)
66 {
67 if (k==5) continue;
68
69 if ( w[k] != w[5] )
70 {
71 yuv2 = RGB_TO_YUV_FUNC(w[k]);
72 if (yuv_diff(yuv1, yuv2))
73 pattern |= flag;
74 }
75 flag <<= 1;
76 }
77
78 switch (pattern)
79 {
80 case 0:
81 case 1:
82 case 4:
83 case 32:
84 case 128:
85 case 5:
86 case 132:
87 case 160:
88 case 33:
89 case 129:
90 case 36:
91 case 133:
92 case 164:
93 case 161:
94 case 37:
95 case 165:
96 {
97 PIXEL00_20
98 PIXEL01_20
99 PIXEL10_20
100 PIXEL11_20
101 break;
102 }
103 case 2:
104 case 34:
105 case 130:
106 case 162:
107 {
108 PIXEL00_22
109 PIXEL01_21
110 PIXEL10_20
111 PIXEL11_20
112 break;
113 }
114 case 16:
115 case 17:
116 case 48:
117 case 49:
118 {
119 PIXEL00_20
120 PIXEL01_22
121 PIXEL10_20
122 PIXEL11_21
123 break;
124 }
125 case 64:
126 case 65:
127 case 68:
128 case 69:
129 {
130 PIXEL00_20
131 PIXEL01_20
132 PIXEL10_21
133 PIXEL11_22
134 break;
135 }
136 case 8:
137 case 12:
138 case 136:
139 case 140:
140 {
141 PIXEL00_21
142 PIXEL01_20
143 PIXEL10_22
144 PIXEL11_20
145 break;
146 }
147 case 3:
148 case 35:
149 case 131:
150 case 163:
151 {
152 PIXEL00_11
153 PIXEL01_21
154 PIXEL10_20
155 PIXEL11_20
156 break;
157 }
158 case 6:
159 case 38:
160 case 134:
161 case 166:
162 {
163 PIXEL00_22
164 PIXEL01_12
165 PIXEL10_20
166 PIXEL11_20
167 break;
168 }
169 case 20:
170 case 21:
171 case 52:
172 case 53:
173 {
174 PIXEL00_20
175 PIXEL01_11
176 PIXEL10_20
177 PIXEL11_21
178 break;
179 }
180 case 144:
181 case 145:
182 case 176:
183 case 177:
184 {
185 PIXEL00_20
186 PIXEL01_22
187 PIXEL10_20
188 PIXEL11_12
189 break;
190 }
191 case 192:
192 case 193:
193 case 196:
194 case 197:
195 {
196 PIXEL00_20
197 PIXEL01_20
198 PIXEL10_21
199 PIXEL11_11
200 break;
201 }
202 case 96:
203 case 97:
204 case 100:
205 case 101:
206 {
207 PIXEL00_20
208 PIXEL01_20
209 PIXEL10_12
210 PIXEL11_22
211 break;
212 }
213 case 40:
214 case 44:
215 case 168:
216 case 172:
217 {
218 PIXEL00_21
219 PIXEL01_20
220 PIXEL10_11
221 PIXEL11_20
222 break;
223 }
224 case 9:
225 case 13:
226 case 137:
227 case 141:
228 {
229 PIXEL00_12
230 PIXEL01_20
231 PIXEL10_22
232 PIXEL11_20
233 break;
234 }
235 case 18:
236 case 50:
237 {
238 PIXEL00_22
239 if (DIFF_FUNC(w[2], w[6]))
240 {
241 PIXEL01_10
242 }
243 else
244 {
245 PIXEL01_20
246 }
247 PIXEL10_20
248 PIXEL11_21
249 break;
250 }
251 case 80:
252 case 81:
253 {
254 PIXEL00_20
255 PIXEL01_22
256 PIXEL10_21
257 if (DIFF_FUNC(w[6], w[8]))
258 {
259 PIXEL11_10
260 }
261 else
262 {
263 PIXEL11_20
264 }
265 break;
266 }
267 case 72:
268 case 76:
269 {
270 PIXEL00_21
271 PIXEL01_20
272 if (DIFF_FUNC(w[8], w[4]))
273 {
274 PIXEL10_10
275 }
276 else
277 {
278 PIXEL10_20
279 }
280 PIXEL11_22
281 break;
282 }
283 case 10:
284 case 138:
285 {
286 if (DIFF_FUNC(w[4], w[2]))
287 {
288 PIXEL00_10
289 }
290 else
291 {
292 PIXEL00_20
293 }
294 PIXEL01_21
295 PIXEL10_22
296 PIXEL11_20
297 break;
298 }
299 case 66:
300 {
301 PIXEL00_22
302 PIXEL01_21
303 PIXEL10_21
304 PIXEL11_22
305 break;
306 }
307 case 24:
308 {
309 PIXEL00_21
310 PIXEL01_22
311 PIXEL10_22
312 PIXEL11_21
313 break;
314 }
315 case 7:
316 case 39:
317 case 135:
318 {
319 PIXEL00_11
320 PIXEL01_12
321 PIXEL10_20
322 PIXEL11_20
323 break;
324 }
325 case 148:
326 case 149:
327 case 180:
328 {
329 PIXEL00_20
330 PIXEL01_11
331 PIXEL10_20
332 PIXEL11_12
333 break;
334 }
335 case 224:
336 case 228:
337 case 225:
338 {
339 PIXEL00_20
340 PIXEL01_20
341 PIXEL10_12
342 PIXEL11_11
343 break;
344 }
345 case 41:
346 case 169:
347 case 45:
348 {
349 PIXEL00_12
350 PIXEL01_20
351 PIXEL10_11
352 PIXEL11_20
353 break;
354 }
355 case 22:
356 case 54:
357 {
358 PIXEL00_22
359 if (DIFF_FUNC(w[2], w[6]))
360 {
361 PIXEL01_0
362 }
363 else
364 {
365 PIXEL01_20
366 }
367 PIXEL10_20
368 PIXEL11_21
369 break;
370 }
371 case 208:
372 case 209:
373 {
374 PIXEL00_20
375 PIXEL01_22
376 PIXEL10_21
377 if (DIFF_FUNC(w[6], w[8]))
378 {
379 PIXEL11_0
380 }
381 else
382 {
383 PIXEL11_20
384 }
385 break;
386 }
387 case 104:
388 case 108:
389 {
390 PIXEL00_21
391 PIXEL01_20
392 if (DIFF_FUNC(w[8], w[4]))
393 {
394 PIXEL10_0
395 }
396 else
397 {
398 PIXEL10_20
399 }
400 PIXEL11_22
401 break;
402 }
403 case 11:
404 case 139:
405 {
406 if (DIFF_FUNC(w[4], w[2]))
407 {
408 PIXEL00_0
409 }
410 else
411 {
412 PIXEL00_20
413 }
414 PIXEL01_21
415 PIXEL10_22
416 PIXEL11_20
417 break;
418 }
419 case 19:
420 case 51:
421 {
422 if (DIFF_FUNC(w[2], w[6]))
423 {
424 PIXEL00_11
425 PIXEL01_10
426 }
427 else
428 {
429 PIXEL00_60
430 PIXEL01_90
431 }
432 PIXEL10_20
433 PIXEL11_21
434 break;
435 }
436 case 146:
437 case 178:
438 {
439 PIXEL00_22
440 if (DIFF_FUNC(w[2], w[6]))
441 {
442 PIXEL01_10
443 PIXEL11_12
444 }
445 else
446 {
447 PIXEL01_90
448 PIXEL11_61
449 }
450 PIXEL10_20
451 break;
452 }
453 case 84:
454 case 85:
455 {
456 PIXEL00_20
457 if (DIFF_FUNC(w[6], w[8]))
458 {
459 PIXEL01_11
460 PIXEL11_10
461 }
462 else
463 {
464 PIXEL01_60
465 PIXEL11_90
466 }
467 PIXEL10_21
468 break;
469 }
470 case 112:
471 case 113:
472 {
473 PIXEL00_20
474 PIXEL01_22
475 if (DIFF_FUNC(w[6], w[8]))
476 {
477 PIXEL10_12
478 PIXEL11_10
479 }
480 else
481 {
482 PIXEL10_61
483 PIXEL11_90
484 }
485 break;
486 }
487 case 200:
488 case 204:
489 {
490 PIXEL00_21
491 PIXEL01_20
492 if (DIFF_FUNC(w[8], w[4]))
493 {
494 PIXEL10_10
495 PIXEL11_11
496 }
497 else
498 {
499 PIXEL10_90
500 PIXEL11_60
501 }
502 break;
503 }
504 case 73:
505 case 77:
506 {
507 if (DIFF_FUNC(w[8], w[4]))
508 {
509 PIXEL00_12
510 PIXEL10_10
511 }
512 else
513 {
514 PIXEL00_61
515 PIXEL10_90
516 }
517 PIXEL01_20
518 PIXEL11_22
519 break;
520 }
521 case 42:
522 case 170:
523 {
524 if (DIFF_FUNC(w[4], w[2]))
525 {
526 PIXEL00_10
527 PIXEL10_11
528 }
529 else
530 {
531 PIXEL00_90
532 PIXEL10_60
533 }
534 PIXEL01_21
535 PIXEL11_20
536 break;
537 }
538 case 14:
539 case 142:
540 {
541 if (DIFF_FUNC(w[4], w[2]))
542 {
543 PIXEL00_10
544 PIXEL01_12
545 }
546 else
547 {
548 PIXEL00_90
549 PIXEL01_61
550 }
551 PIXEL10_22
552 PIXEL11_20
553 break;
554 }
555 case 67:
556 {
557 PIXEL00_11
558 PIXEL01_21
559 PIXEL10_21
560 PIXEL11_22
561 break;
562 }
563 case 70:
564 {
565 PIXEL00_22
566 PIXEL01_12
567 PIXEL10_21
568 PIXEL11_22
569 break;
570 }
571 case 28:
572 {
573 PIXEL00_21
574 PIXEL01_11
575 PIXEL10_22
576 PIXEL11_21
577 break;
578 }
579 case 152:
580 {
581 PIXEL00_21
582 PIXEL01_22
583 PIXEL10_22
584 PIXEL11_12
585 break;
586 }
587 case 194:
588 {
589 PIXEL00_22
590 PIXEL01_21
591 PIXEL10_21
592 PIXEL11_11
593 break;
594 }
595 case 98:
596 {
597 PIXEL00_22
598 PIXEL01_21
599 PIXEL10_12
600 PIXEL11_22
601 break;
602 }
603 case 56:
604 {
605 PIXEL00_21
606 PIXEL01_22
607 PIXEL10_11
608 PIXEL11_21
609 break;
610 }
611 case 25:
612 {
613 PIXEL00_12
614 PIXEL01_22
615 PIXEL10_22
616 PIXEL11_21
617 break;
618 }
619 case 26:
620 case 31:
621 {
622 if (DIFF_FUNC(w[4], w[2]))
623 {
624 PIXEL00_0
625 }
626 else
627 {
628 PIXEL00_20
629 }
630 if (DIFF_FUNC(w[2], w[6]))
631 {
632 PIXEL01_0
633 }
634 else
635 {
636 PIXEL01_20
637 }
638 PIXEL10_22
639 PIXEL11_21
640 break;
641 }
642 case 82:
643 case 214:
644 {
645 PIXEL00_22
646 if (DIFF_FUNC(w[2], w[6]))
647 {
648 PIXEL01_0
649 }
650 else
651 {
652 PIXEL01_20
653 }
654 PIXEL10_21
655 if (DIFF_FUNC(w[6], w[8]))
656 {
657 PIXEL11_0
658 }
659 else
660 {
661 PIXEL11_20
662 }
663 break;
664 }
665 case 88:
666 case 248:
667 {
668 PIXEL00_21
669 PIXEL01_22
670 if (DIFF_FUNC(w[8], w[4]))
671 {
672 PIXEL10_0
673 }
674 else
675 {
676 PIXEL10_20
677 }
678 if (DIFF_FUNC(w[6], w[8]))
679 {
680 PIXEL11_0
681 }
682 else
683 {
684 PIXEL11_20
685 }
686 break;
687 }
688 case 74:
689 case 107:
690 {
691 if (DIFF_FUNC(w[4], w[2]))
692 {
693 PIXEL00_0
694 }
695 else
696 {
697 PIXEL00_20
698 }
699 PIXEL01_21
700 if (DIFF_FUNC(w[8], w[4]))
701 {
702 PIXEL10_0
703 }
704 else
705 {
706 PIXEL10_20
707 }
708 PIXEL11_22
709 break;
710 }
711 case 27:
712 {
713 if (DIFF_FUNC(w[4], w[2]))
714 {
715 PIXEL00_0
716 }
717 else
718 {
719 PIXEL00_20
720 }
721 PIXEL01_10
722 PIXEL10_22
723 PIXEL11_21
724 break;
725 }
726 case 86:
727 {
728 PIXEL00_22
729 if (DIFF_FUNC(w[2], w[6]))
730 {
731 PIXEL01_0
732 }
733 else
734 {
735 PIXEL01_20
736 }
737 PIXEL10_21
738 PIXEL11_10
739 break;
740 }
741 case 216:
742 {
743 PIXEL00_21
744 PIXEL01_22
745 PIXEL10_10
746 if (DIFF_FUNC(w[6], w[8]))
747 {
748 PIXEL11_0
749 }
750 else
751 {
752 PIXEL11_20
753 }
754 break;
755 }
756 case 106:
757 {
758 PIXEL00_10
759 PIXEL01_21
760 if (DIFF_FUNC(w[8], w[4]))
761 {
762 PIXEL10_0
763 }
764 else
765 {
766 PIXEL10_20
767 }
768 PIXEL11_22
769 break;
770 }
771 case 30:
772 {
773 PIXEL00_10
774 if (DIFF_FUNC(w[2], w[6]))
775 {
776 PIXEL01_0
777 }
778 else
779 {
780 PIXEL01_20
781 }
782 PIXEL10_22
783 PIXEL11_21
784 break;
785 }
786 case 210:
787 {
788 PIXEL00_22
789 PIXEL01_10
790 PIXEL10_21
791 if (DIFF_FUNC(w[6], w[8]))
792 {
793 PIXEL11_0
794 }
795 else
796 {
797 PIXEL11_20
798 }
799 break;
800 }
801 case 120:
802 {
803 PIXEL00_21
804 PIXEL01_22
805 if (DIFF_FUNC(w[8], w[4]))
806 {
807 PIXEL10_0
808 }
809 else
810 {
811 PIXEL10_20
812 }
813 PIXEL11_10
814 break;
815 }
816 case 75:
817 {
818 if (DIFF_FUNC(w[4], w[2]))
819 {
820 PIXEL00_0
821 }
822 else
823 {
824 PIXEL00_20
825 }
826 PIXEL01_21
827 PIXEL10_10
828 PIXEL11_22
829 break;
830 }
831 case 29:
832 {
833 PIXEL00_12
834 PIXEL01_11
835 PIXEL10_22
836 PIXEL11_21
837 break;
838 }
839 case 198:
840 {
841 PIXEL00_22
842 PIXEL01_12
843 PIXEL10_21
844 PIXEL11_11
845 break;
846 }
847 case 184:
848 {
849 PIXEL00_21
850 PIXEL01_22
851 PIXEL10_11
852 PIXEL11_12
853 break;
854 }
855 case 99:
856 {
857 PIXEL00_11
858 PIXEL01_21
859 PIXEL10_12
860 PIXEL11_22
861 break;
862 }
863 case 57:
864 {
865 PIXEL00_12
866 PIXEL01_22
867 PIXEL10_11
868 PIXEL11_21
869 break;
870 }
871 case 71:
872 {
873 PIXEL00_11
874 PIXEL01_12
875 PIXEL10_21
876 PIXEL11_22
877 break;
878 }
879 case 156:
880 {
881 PIXEL00_21
882 PIXEL01_11
883 PIXEL10_22
884 PIXEL11_12
885 break;
886 }
887 case 226:
888 {
889 PIXEL00_22
890 PIXEL01_21
891 PIXEL10_12
892 PIXEL11_11
893 break;
894 }
895 case 60:
896 {
897 PIXEL00_21
898 PIXEL01_11
899 PIXEL10_11
900 PIXEL11_21
901 break;
902 }
903 case 195:
904 {
905 PIXEL00_11
906 PIXEL01_21
907 PIXEL10_21
908 PIXEL11_11
909 break;
910 }
911 case 102:
912 {
913 PIXEL00_22
914 PIXEL01_12
915 PIXEL10_12
916 PIXEL11_22
917 break;
918 }
919 case 153:
920 {
921 PIXEL00_12
922 PIXEL01_22
923 PIXEL10_22
924 PIXEL11_12
925 break;
926 }
927 case 58:
928 {
929 if (DIFF_FUNC(w[4], w[2]))
930 {
931 PIXEL00_10
932 }
933 else
934 {
935 PIXEL00_70
936 }
937 if (DIFF_FUNC(w[2], w[6]))
938 {
939 PIXEL01_10
940 }
941 else
942 {
943 PIXEL01_70
944 }
945 PIXEL10_11
946 PIXEL11_21
947 break;
948 }
949 case 83:
950 {
951 PIXEL00_11
952 if (DIFF_FUNC(w[2], w[6]))
953 {
954 PIXEL01_10
955 }
956 else
957 {
958 PIXEL01_70
959 }
960 PIXEL10_21
961 if (DIFF_FUNC(w[6], w[8]))
962 {
963 PIXEL11_10
964 }
965 else
966 {
967 PIXEL11_70
968 }
969 break;
970 }
971 case 92:
972 {
973 PIXEL00_21
974 PIXEL01_11
975 if (DIFF_FUNC(w[8], w[4]))
976 {
977 PIXEL10_10
978 }
979 else
980 {
981 PIXEL10_70
982 }
983 if (DIFF_FUNC(w[6], w[8]))
984 {
985 PIXEL11_10
986 }
987 else
988 {
989 PIXEL11_70
990 }
991 break;
992 }
993 case 202:
994 {
995 if (DIFF_FUNC(w[4], w[2]))
996 {
997 PIXEL00_10
998 }
999 else
1000 {
1001 PIXEL00_70
1002 }
1003 PIXEL01_21
1004 if (DIFF_FUNC(w[8], w[4]))
1005 {
1006 PIXEL10_10
1007 }
1008 else
1009 {
1010 PIXEL10_70
1011 }
1012 PIXEL11_11
1013 break;
1014 }
1015 case 78:
1016 {
1017 if (DIFF_FUNC(w[4], w[2]))
1018 {
1019 PIXEL00_10
1020 }
1021 else
1022 {
1023 PIXEL00_70
1024 }
1025 PIXEL01_12
1026 if (DIFF_FUNC(w[8], w[4]))
1027 {
1028 PIXEL10_10
1029 }
1030 else
1031 {
1032 PIXEL10_70
1033 }
1034 PIXEL11_22
1035 break;
1036 }
1037 case 154:
1038 {
1039 if (DIFF_FUNC(w[4], w[2]))
1040 {
1041 PIXEL00_10
1042 }
1043 else
1044 {
1045 PIXEL00_70
1046 }
1047 if (DIFF_FUNC(w[2], w[6]))
1048 {
1049 PIXEL01_10
1050 }
1051 else
1052 {
1053 PIXEL01_70
1054 }
1055 PIXEL10_22
1056 PIXEL11_12
1057 break;
1058 }
1059 case 114:
1060 {
1061 PIXEL00_22
1062 if (DIFF_FUNC(w[2], w[6]))
1063 {
1064 PIXEL01_10
1065 }
1066 else
1067 {
1068 PIXEL01_70
1069 }
1070 PIXEL10_12
1071 if (DIFF_FUNC(w[6], w[8]))
1072 {
1073 PIXEL11_10
1074 }
1075 else
1076 {
1077 PIXEL11_70
1078 }
1079 break;
1080 }
1081 case 89:
1082 {
1083 PIXEL00_12
1084 PIXEL01_22
1085 if (DIFF_FUNC(w[8], w[4]))
1086 {
1087 PIXEL10_10
1088 }
1089 else
1090 {
1091 PIXEL10_70
1092 }
1093 if (DIFF_FUNC(w[6], w[8]))
1094 {
1095 PIXEL11_10
1096 }
1097 else
1098 {
1099 PIXEL11_70
1100 }
1101 break;
1102 }
1103 case 90:
1104 {
1105 if (DIFF_FUNC(w[4], w[2]))
1106 {
1107 PIXEL00_10
1108 }
1109 else
1110 {
1111 PIXEL00_70
1112 }
1113 if (DIFF_FUNC(w[2], w[6]))
1114 {
1115 PIXEL01_10
1116 }
1117 else
1118 {
1119 PIXEL01_70
1120 }
1121 if (DIFF_FUNC(w[8], w[4]))
1122 {
1123 PIXEL10_10
1124 }
1125 else
1126 {
1127 PIXEL10_70
1128 }
1129 if (DIFF_FUNC(w[6], w[8]))
1130 {
1131 PIXEL11_10
1132 }
1133 else
1134 {
1135 PIXEL11_70
1136 }
1137 break;
1138 }
1139 case 55:
1140 case 23:
1141 {
1142 if (DIFF_FUNC(w[2], w[6]))
1143 {
1144 PIXEL00_11
1145 PIXEL01_0
1146 }
1147 else
1148 {
1149 PIXEL00_60
1150 PIXEL01_90
1151 }
1152 PIXEL10_20
1153 PIXEL11_21
1154 break;
1155 }
1156 case 182:
1157 case 150:
1158 {
1159 PIXEL00_22
1160 if (DIFF_FUNC(w[2], w[6]))
1161 {
1162 PIXEL01_0
1163 PIXEL11_12
1164 }
1165 else
1166 {
1167 PIXEL01_90
1168 PIXEL11_61
1169 }
1170 PIXEL10_20
1171 break;
1172 }
1173 case 213:
1174 case 212:
1175 {
1176 PIXEL00_20
1177 if (DIFF_FUNC(w[6], w[8]))
1178 {
1179 PIXEL01_11
1180 PIXEL11_0
1181 }
1182 else
1183 {
1184 PIXEL01_60
1185 PIXEL11_90
1186 }
1187 PIXEL10_21
1188 break;
1189 }
1190 case 241:
1191 case 240:
1192 {
1193 PIXEL00_20
1194 PIXEL01_22
1195 if (DIFF_FUNC(w[6], w[8]))
1196 {
1197 PIXEL10_12
1198 PIXEL11_0
1199 }
1200 else
1201 {
1202 PIXEL10_61
1203 PIXEL11_90
1204 }
1205 break;
1206 }
1207 case 236:
1208 case 232:
1209 {
1210 PIXEL00_21
1211 PIXEL01_20
1212 if (DIFF_FUNC(w[8], w[4]))
1213 {
1214 PIXEL10_0
1215 PIXEL11_11
1216 }
1217 else
1218 {
1219 PIXEL10_90
1220 PIXEL11_60
1221 }
1222 break;
1223 }
1224 case 109:
1225 case 105:
1226 {
1227 if (DIFF_FUNC(w[8], w[4]))
1228 {
1229 PIXEL00_12
1230 PIXEL10_0
1231 }
1232 else
1233 {
1234 PIXEL00_61
1235 PIXEL10_90
1236 }
1237 PIXEL01_20
1238 PIXEL11_22
1239 break;
1240 }
1241 case 171:
1242 case 43:
1243 {
1244 if (DIFF_FUNC(w[4], w[2]))
1245 {
1246 PIXEL00_0
1247 PIXEL10_11
1248 }
1249 else
1250 {
1251 PIXEL00_90
1252 PIXEL10_60
1253 }
1254 PIXEL01_21
1255 PIXEL11_20
1256 break;
1257 }
1258 case 143:
1259 case 15:
1260 {
1261 if (DIFF_FUNC(w[4], w[2]))
1262 {
1263 PIXEL00_0
1264 PIXEL01_12
1265 }
1266 else
1267 {
1268 PIXEL00_90
1269 PIXEL01_61
1270 }
1271 PIXEL10_22
1272 PIXEL11_20
1273 break;
1274 }
1275 case 124:
1276 {
1277 PIXEL00_21
1278 PIXEL01_11
1279 if (DIFF_FUNC(w[8], w[4]))
1280 {
1281 PIXEL10_0
1282 }
1283 else
1284 {
1285 PIXEL10_20
1286 }
1287 PIXEL11_10
1288 break;
1289 }
1290 case 203:
1291 {
1292 if (DIFF_FUNC(w[4], w[2]))
1293 {
1294 PIXEL00_0
1295 }
1296 else
1297 {
1298 PIXEL00_20
1299 }
1300 PIXEL01_21
1301 PIXEL10_10
1302 PIXEL11_11
1303 break;
1304 }
1305 case 62:
1306 {
1307 PIXEL00_10
1308 if (DIFF_FUNC(w[2], w[6]))
1309 {
1310 PIXEL01_0
1311 }
1312 else
1313 {
1314 PIXEL01_20
1315 }
1316 PIXEL10_11
1317 PIXEL11_21
1318 break;
1319 }
1320 case 211:
1321 {
1322 PIXEL00_11
1323 PIXEL01_10
1324 PIXEL10_21
1325 if (DIFF_FUNC(w[6], w[8]))
1326 {
1327 PIXEL11_0
1328 }
1329 else
1330 {
1331 PIXEL11_20
1332 }
1333 break;
1334 }
1335 case 118:
1336 {
1337 PIXEL00_22
1338 if (DIFF_FUNC(w[2], w[6]))
1339 {
1340 PIXEL01_0
1341 }
1342 else
1343 {
1344 PIXEL01_20
1345 }
1346 PIXEL10_12
1347 PIXEL11_10
1348 break;
1349 }
1350 case 217:
1351 {
1352 PIXEL00_12
1353 PIXEL01_22
1354 PIXEL10_10
1355 if (DIFF_FUNC(w[6], w[8]))
1356 {
1357 PIXEL11_0
1358 }
1359 else
1360 {
1361 PIXEL11_20
1362 }
1363 break;
1364 }
1365 case 110:
1366 {
1367 PIXEL00_10
1368 PIXEL01_12
1369 if (DIFF_FUNC(w[8], w[4]))
1370 {
1371 PIXEL10_0
1372 }
1373 else
1374 {
1375 PIXEL10_20
1376 }
1377 PIXEL11_22
1378 break;
1379 }
1380 case 155:
1381 {
1382 if (DIFF_FUNC(w[4], w[2]))
1383 {
1384 PIXEL00_0
1385 }
1386 else
1387 {
1388 PIXEL00_20
1389 }
1390 PIXEL01_10
1391 PIXEL10_22
1392 PIXEL11_12
1393 break;
1394 }
1395 case 188:
1396 {
1397 PIXEL00_21
1398 PIXEL01_11
1399 PIXEL10_11
1400 PIXEL11_12
1401 break;
1402 }
1403 case 185:
1404 {
1405 PIXEL00_12
1406 PIXEL01_22
1407 PIXEL10_11
1408 PIXEL11_12
1409 break;
1410 }
1411 case 61:
1412 {
1413 PIXEL00_12
1414 PIXEL01_11
1415 PIXEL10_11
1416 PIXEL11_21
1417 break;
1418 }
1419 case 157:
1420 {
1421 PIXEL00_12
1422 PIXEL01_11
1423 PIXEL10_22
1424 PIXEL11_12
1425 break;
1426 }
1427 case 103:
1428 {
1429 PIXEL00_11
1430 PIXEL01_12
1431 PIXEL10_12
1432 PIXEL11_22
1433 break;
1434 }
1435 case 227:
1436 {
1437 PIXEL00_11
1438 PIXEL01_21
1439 PIXEL10_12
1440 PIXEL11_11
1441 break;
1442 }
1443 case 230:
1444 {
1445 PIXEL00_22
1446 PIXEL01_12
1447 PIXEL10_12
1448 PIXEL11_11
1449 break;
1450 }
1451 case 199:
1452 {
1453 PIXEL00_11
1454 PIXEL01_12
1455 PIXEL10_21
1456 PIXEL11_11
1457 break;
1458 }
1459 case 220:
1460 {
1461 PIXEL00_21
1462 PIXEL01_11
1463 if (DIFF_FUNC(w[8], w[4]))
1464 {
1465 PIXEL10_10
1466 }
1467 else
1468 {
1469 PIXEL10_70
1470 }
1471 if (DIFF_FUNC(w[6], w[8]))
1472 {
1473 PIXEL11_0
1474 }
1475 else
1476 {
1477 PIXEL11_20
1478 }
1479 break;
1480 }
1481 case 158:
1482 {
1483 if (DIFF_FUNC(w[4], w[2]))
1484 {
1485 PIXEL00_10
1486 }
1487 else
1488 {
1489 PIXEL00_70
1490 }
1491 if (DIFF_FUNC(w[2], w[6]))
1492 {
1493 PIXEL01_0
1494 }
1495 else
1496 {
1497 PIXEL01_20
1498 }
1499 PIXEL10_22
1500 PIXEL11_12
1501 break;
1502 }
1503 case 234:
1504 {
1505 if (DIFF_FUNC(w[4], w[2]))
1506 {
1507 PIXEL00_10
1508 }
1509 else
1510 {
1511 PIXEL00_70
1512 }
1513 PIXEL01_21
1514 if (DIFF_FUNC(w[8], w[4]))
1515 {
1516 PIXEL10_0
1517 }
1518 else
1519 {
1520 PIXEL10_20
1521 }
1522 PIXEL11_11
1523 break;
1524 }
1525 case 242:
1526 {
1527 PIXEL00_22
1528 if (DIFF_FUNC(w[2], w[6]))
1529 {
1530 PIXEL01_10
1531 }
1532 else
1533 {
1534 PIXEL01_70
1535 }
1536 PIXEL10_12
1537 if (DIFF_FUNC(w[6], w[8]))
1538 {
1539 PIXEL11_0
1540 }
1541 else
1542 {
1543 PIXEL11_20
1544 }
1545 break;
1546 }
1547 case 59:
1548 {
1549 if (DIFF_FUNC(w[4], w[2]))
1550 {
1551 PIXEL00_0
1552 }
1553 else
1554 {
1555 PIXEL00_20
1556 }
1557 if (DIFF_FUNC(w[2], w[6]))
1558 {
1559 PIXEL01_10
1560 }
1561 else
1562 {
1563 PIXEL01_70
1564 }
1565 PIXEL10_11
1566 PIXEL11_21
1567 break;
1568 }
1569 case 121:
1570 {
1571 PIXEL00_12
1572 PIXEL01_22
1573 if (DIFF_FUNC(w[8], w[4]))
1574 {
1575 PIXEL10_0
1576 }
1577 else
1578 {
1579 PIXEL10_20
1580 }
1581 if (DIFF_FUNC(w[6], w[8]))
1582 {
1583 PIXEL11_10
1584 }
1585 else
1586 {
1587 PIXEL11_70
1588 }
1589 break;
1590 }
1591 case 87:
1592 {
1593 PIXEL00_11
1594 if (DIFF_FUNC(w[2], w[6]))
1595 {
1596 PIXEL01_0
1597 }
1598 else
1599 {
1600 PIXEL01_20
1601 }
1602 PIXEL10_21
1603 if (DIFF_FUNC(w[6], w[8]))
1604 {
1605 PIXEL11_10
1606 }
1607 else
1608 {
1609 PIXEL11_70
1610 }
1611 break;
1612 }
1613 case 79:
1614 {
1615 if (DIFF_FUNC(w[4], w[2]))
1616 {
1617 PIXEL00_0
1618 }
1619 else
1620 {
1621 PIXEL00_20
1622 }
1623 PIXEL01_12
1624 if (DIFF_FUNC(w[8], w[4]))
1625 {
1626 PIXEL10_10
1627 }
1628 else
1629 {
1630 PIXEL10_70
1631 }
1632 PIXEL11_22
1633 break;
1634 }
1635 case 122:
1636 {
1637 if (DIFF_FUNC(w[4], w[2]))
1638 {
1639 PIXEL00_10
1640 }
1641 else
1642 {
1643 PIXEL00_70
1644 }
1645 if (DIFF_FUNC(w[2], w[6]))
1646 {
1647 PIXEL01_10
1648 }
1649 else
1650 {
1651 PIXEL01_70
1652 }
1653 if (DIFF_FUNC(w[8], w[4]))
1654 {
1655 PIXEL10_0
1656 }
1657 else
1658 {
1659 PIXEL10_20
1660 }
1661 if (DIFF_FUNC(w[6], w[8]))
1662 {
1663 PIXEL11_10
1664 }
1665 else
1666 {
1667 PIXEL11_70
1668 }
1669 break;
1670 }
1671 case 94:
1672 {
1673 if (DIFF_FUNC(w[4], w[2]))
1674 {
1675 PIXEL00_10
1676 }
1677 else
1678 {
1679 PIXEL00_70
1680 }
1681 if (DIFF_FUNC(w[2], w[6]))
1682 {
1683 PIXEL01_0
1684 }
1685 else
1686 {
1687 PIXEL01_20
1688 }
1689 if (DIFF_FUNC(w[8], w[4]))
1690 {
1691 PIXEL10_10
1692 }
1693 else
1694 {
1695 PIXEL10_70
1696 }
1697 if (DIFF_FUNC(w[6], w[8]))
1698 {
1699 PIXEL11_10
1700 }
1701 else
1702 {
1703 PIXEL11_70
1704 }
1705 break;
1706 }
1707 case 218:
1708 {
1709 if (DIFF_FUNC(w[4], w[2]))
1710 {
1711 PIXEL00_10
1712 }
1713 else
1714 {
1715 PIXEL00_70
1716 }
1717 if (DIFF_FUNC(w[2], w[6]))
1718 {
1719 PIXEL01_10
1720 }
1721 else
1722 {
1723 PIXEL01_70
1724 }
1725 if (DIFF_FUNC(w[8], w[4]))
1726 {
1727 PIXEL10_10
1728 }
1729 else
1730 {
1731 PIXEL10_70
1732 }
1733 if (DIFF_FUNC(w[6], w[8]))
1734 {
1735 PIXEL11_0
1736 }
1737 else
1738 {
1739 PIXEL11_20
1740 }
1741 break;
1742 }
1743 case 91:
1744 {
1745 if (DIFF_FUNC(w[4], w[2]))
1746 {
1747 PIXEL00_0
1748 }
1749 else
1750 {
1751 PIXEL00_20
1752 }
1753 if (DIFF_FUNC(w[2], w[6]))
1754 {
1755 PIXEL01_10
1756 }
1757 else
1758 {
1759 PIXEL01_70
1760 }
1761 if (DIFF_FUNC(w[8], w[4]))
1762 {
1763 PIXEL10_10
1764 }
1765 else
1766 {
1767 PIXEL10_70
1768 }
1769 if (DIFF_FUNC(w[6], w[8]))
1770 {
1771 PIXEL11_10
1772 }
1773 else
1774 {
1775 PIXEL11_70
1776 }
1777 break;
1778 }
1779 case 229:
1780 {
1781 PIXEL00_20
1782 PIXEL01_20
1783 PIXEL10_12
1784 PIXEL11_11
1785 break;
1786 }
1787 case 167:
1788 {
1789 PIXEL00_11
1790 PIXEL01_12
1791 PIXEL10_20
1792 PIXEL11_20
1793 break;
1794 }
1795 case 173:
1796 {
1797 PIXEL00_12
1798 PIXEL01_20
1799 PIXEL10_11
1800 PIXEL11_20
1801 break;
1802 }
1803 case 181:
1804 {
1805 PIXEL00_20
1806 PIXEL01_11
1807 PIXEL10_20
1808 PIXEL11_12
1809 break;
1810 }
1811 case 186:
1812 {
1813 if (DIFF_FUNC(w[4], w[2]))
1814 {
1815 PIXEL00_10
1816 }
1817 else
1818 {
1819 PIXEL00_70
1820 }
1821 if (DIFF_FUNC(w[2], w[6]))
1822 {
1823 PIXEL01_10
1824 }
1825 else
1826 {
1827 PIXEL01_70
1828 }
1829 PIXEL10_11
1830 PIXEL11_12
1831 break;
1832 }
1833 case 115:
1834 {
1835 PIXEL00_11
1836 if (DIFF_FUNC(w[2], w[6]))
1837 {
1838 PIXEL01_10
1839 }
1840 else
1841 {
1842 PIXEL01_70
1843 }
1844 PIXEL10_12
1845 if (DIFF_FUNC(w[6], w[8]))
1846 {
1847 PIXEL11_10
1848 }
1849 else
1850 {
1851 PIXEL11_70
1852 }
1853 break;
1854 }
1855 case 93:
1856 {
1857 PIXEL00_12
1858 PIXEL01_11
1859 if (DIFF_FUNC(w[8], w[4]))
1860 {
1861 PIXEL10_10
1862 }
1863 else
1864 {
1865 PIXEL10_70
1866 }
1867 if (DIFF_FUNC(w[6], w[8]))
1868 {
1869 PIXEL11_10
1870 }
1871 else
1872 {
1873 PIXEL11_70
1874 }
1875 break;
1876 }
1877 case 206:
1878 {
1879 if (DIFF_FUNC(w[4], w[2]))
1880 {
1881 PIXEL00_10
1882 }
1883 else
1884 {
1885 PIXEL00_70
1886 }
1887 PIXEL01_12
1888 if (DIFF_FUNC(w[8], w[4]))
1889 {
1890 PIXEL10_10
1891 }
1892 else
1893 {
1894 PIXEL10_70
1895 }
1896 PIXEL11_11
1897 break;
1898 }
1899 case 205:
1900 case 201:
1901 {
1902 PIXEL00_12
1903 PIXEL01_20
1904 if (DIFF_FUNC(w[8], w[4]))
1905 {
1906 PIXEL10_10
1907 }
1908 else
1909 {
1910 PIXEL10_70
1911 }
1912 PIXEL11_11
1913 break;
1914 }
1915 case 174:
1916 case 46:
1917 {
1918 if (DIFF_FUNC(w[4], w[2]))
1919 {
1920 PIXEL00_10
1921 }
1922 else
1923 {
1924 PIXEL00_70
1925 }
1926 PIXEL01_12
1927 PIXEL10_11
1928 PIXEL11_20
1929 break;
1930 }
1931 case 179:
1932 case 147:
1933 {
1934 PIXEL00_11
1935 if (DIFF_FUNC(w[2], w[6]))
1936 {
1937 PIXEL01_10
1938 }
1939 else
1940 {
1941 PIXEL01_70
1942 }
1943 PIXEL10_20
1944 PIXEL11_12
1945 break;
1946 }
1947 case 117:
1948 case 116:
1949 {
1950 PIXEL00_20
1951 PIXEL01_11
1952 PIXEL10_12
1953 if (DIFF_FUNC(w[6], w[8]))
1954 {
1955 PIXEL11_10
1956 }
1957 else
1958 {
1959 PIXEL11_70
1960 }
1961 break;
1962 }
1963 case 189:
1964 {
1965 PIXEL00_12
1966 PIXEL01_11
1967 PIXEL10_11
1968 PIXEL11_12
1969 break;
1970 }
1971 case 231:
1972 {
1973 PIXEL00_11
1974 PIXEL01_12
1975 PIXEL10_12
1976 PIXEL11_11
1977 break;
1978 }
1979 case 126:
1980 {
1981 PIXEL00_10
1982 if (DIFF_FUNC(w[2], w[6]))
1983 {
1984 PIXEL01_0
1985 }
1986 else
1987 {
1988 PIXEL01_20
1989 }
1990 if (DIFF_FUNC(w[8], w[4]))
1991 {
1992 PIXEL10_0
1993 }
1994 else
1995 {
1996 PIXEL10_20
1997 }
1998 PIXEL11_10
1999 break;
2000 }
2001 case 219:
2002 {
2003 if (DIFF_FUNC(w[4], w[2]))
2004 {
2005 PIXEL00_0
2006 }
2007 else
2008 {
2009 PIXEL00_20
2010 }
2011 PIXEL01_10
2012 PIXEL10_10
2013 if (DIFF_FUNC(w[6], w[8]))
2014 {
2015 PIXEL11_0
2016 }
2017 else
2018 {
2019 PIXEL11_20
2020 }
2021 break;
2022 }
2023 case 125:
2024 {
2025 if (DIFF_FUNC(w[8], w[4]))
2026 {
2027 PIXEL00_12
2028 PIXEL10_0
2029 }
2030 else
2031 {
2032 PIXEL00_61
2033 PIXEL10_90
2034 }
2035 PIXEL01_11
2036 PIXEL11_10
2037 break;
2038 }
2039 case 221:
2040 {
2041 PIXEL00_12
2042 if (DIFF_FUNC(w[6], w[8]))
2043 {
2044 PIXEL01_11
2045 PIXEL11_0
2046 }
2047 else
2048 {
2049 PIXEL01_60
2050 PIXEL11_90
2051 }
2052 PIXEL10_10
2053 break;
2054 }
2055 case 207:
2056 {
2057 if (DIFF_FUNC(w[4], w[2]))
2058 {
2059 PIXEL00_0
2060 PIXEL01_12
2061 }
2062 else
2063 {
2064 PIXEL00_90
2065 PIXEL01_61
2066 }
2067 PIXEL10_10
2068 PIXEL11_11
2069 break;
2070 }
2071 case 238:
2072 {
2073 PIXEL00_10
2074 PIXEL01_12
2075 if (DIFF_FUNC(w[8], w[4]))
2076 {
2077 PIXEL10_0
2078 PIXEL11_11
2079 }
2080 else
2081 {
2082 PIXEL10_90
2083 PIXEL11_60
2084 }
2085 break;
2086 }
2087 case 190:
2088 {
2089 PIXEL00_10
2090 if (DIFF_FUNC(w[2], w[6]))
2091 {
2092 PIXEL01_0
2093 PIXEL11_12
2094 }
2095 else
2096 {
2097 PIXEL01_90
2098 PIXEL11_61
2099 }
2100 PIXEL10_11
2101 break;
2102 }
2103 case 187:
2104 {
2105 if (DIFF_FUNC(w[4], w[2]))
2106 {
2107 PIXEL00_0
2108 PIXEL10_11
2109 }
2110 else
2111 {
2112 PIXEL00_90
2113 PIXEL10_60
2114 }
2115 PIXEL01_10
2116 PIXEL11_12
2117 break;
2118 }
2119 case 243:
2120 {
2121 PIXEL00_11
2122 PIXEL01_10
2123 if (DIFF_FUNC(w[6], w[8]))
2124 {
2125 PIXEL10_12
2126 PIXEL11_0
2127 }
2128 else
2129 {
2130 PIXEL10_61
2131 PIXEL11_90
2132 }
2133 break;
2134 }
2135 case 119:
2136 {
2137 if (DIFF_FUNC(w[2], w[6]))
2138 {
2139 PIXEL00_11
2140 PIXEL01_0
2141 }
2142 else
2143 {
2144 PIXEL00_60
2145 PIXEL01_90
2146 }
2147 PIXEL10_12
2148 PIXEL11_10
2149 break;
2150 }
2151 case 237:
2152 case 233:
2153 {
2154 PIXEL00_12
2155 PIXEL01_20
2156 if (DIFF_FUNC(w[8], w[4]))
2157 {
2158 PIXEL10_0
2159 }
2160 else
2161 {
2162 PIXEL10_100
2163 }
2164 PIXEL11_11
2165 break;
2166 }
2167 case 175:
2168 case 47:
2169 {
2170 if (DIFF_FUNC(w[4], w[2]))
2171 {
2172 PIXEL00_0
2173 }
2174 else
2175 {
2176 PIXEL00_100
2177 }
2178 PIXEL01_12
2179 PIXEL10_11
2180 PIXEL11_20
2181 break;
2182 }
2183 case 183:
2184 case 151:
2185 {
2186 PIXEL00_11
2187 if (DIFF_FUNC(w[2], w[6]))
2188 {
2189 PIXEL01_0
2190 }
2191 else
2192 {
2193 PIXEL01_100
2194 }
2195 PIXEL10_20
2196 PIXEL11_12
2197 break;
2198 }
2199 case 245:
2200 case 244:
2201 {
2202 PIXEL00_20
2203 PIXEL01_11
2204 PIXEL10_12
2205 if (DIFF_FUNC(w[6], w[8]))
2206 {
2207 PIXEL11_0
2208 }
2209 else
2210 {
2211 PIXEL11_100
2212 }
2213 break;
2214 }
2215 case 250:
2216 {
2217 PIXEL00_10
2218 PIXEL01_10
2219 if (DIFF_FUNC(w[8], w[4]))
2220 {
2221 PIXEL10_0
2222 }
2223 else
2224 {
2225 PIXEL10_20
2226 }
2227 if (DIFF_FUNC(w[6], w[8]))
2228 {
2229 PIXEL11_0
2230 }
2231 else
2232 {
2233 PIXEL11_20
2234 }
2235 break;
2236 }
2237 case 123:
2238 {
2239 if (DIFF_FUNC(w[4], w[2]))
2240 {
2241 PIXEL00_0
2242 }
2243 else
2244 {
2245 PIXEL00_20
2246 }
2247 PIXEL01_10
2248 if (DIFF_FUNC(w[8], w[4]))
2249 {
2250 PIXEL10_0
2251 }
2252 else
2253 {
2254 PIXEL10_20
2255 }
2256 PIXEL11_10
2257 break;
2258 }
2259 case 95:
2260 {
2261 if (DIFF_FUNC(w[4], w[2]))
2262 {
2263 PIXEL00_0
2264 }
2265 else
2266 {
2267 PIXEL00_20
2268 }
2269 if (DIFF_FUNC(w[2], w[6]))
2270 {
2271 PIXEL01_0
2272 }
2273 else
2274 {
2275 PIXEL01_20
2276 }
2277 PIXEL10_10
2278 PIXEL11_10
2279 break;
2280 }
2281 case 222:
2282 {
2283 PIXEL00_10
2284 if (DIFF_FUNC(w[2], w[6]))
2285 {
2286 PIXEL01_0
2287 }
2288 else
2289 {
2290 PIXEL01_20
2291 }
2292 PIXEL10_10
2293 if (DIFF_FUNC(w[6], w[8]))
2294 {
2295 PIXEL11_0
2296 }
2297 else
2298 {
2299 PIXEL11_20
2300 }
2301 break;
2302 }
2303 case 252:
2304 {
2305 PIXEL00_21
2306 PIXEL01_11
2307 if (DIFF_FUNC(w[8], w[4]))
2308 {
2309 PIXEL10_0
2310 }
2311 else
2312 {
2313 PIXEL10_20
2314 }
2315 if (DIFF_FUNC(w[6], w[8]))
2316 {
2317 PIXEL11_0
2318 }
2319 else
2320 {
2321 PIXEL11_100
2322 }
2323 break;
2324 }
2325 case 249:
2326 {
2327 PIXEL00_12
2328 PIXEL01_22
2329 if (DIFF_FUNC(w[8], w[4]))
2330 {
2331 PIXEL10_0
2332 }
2333 else
2334 {
2335 PIXEL10_100
2336 }
2337 if (DIFF_FUNC(w[6], w[8]))
2338 {
2339 PIXEL11_0
2340 }
2341 else
2342 {
2343 PIXEL11_20
2344 }
2345 break;
2346 }
2347 case 235:
2348 {
2349 if (DIFF_FUNC(w[4], w[2]))
2350 {
2351 PIXEL00_0
2352 }
2353 else
2354 {
2355 PIXEL00_20
2356 }
2357 PIXEL01_21
2358 if (DIFF_FUNC(w[8], w[4]))
2359 {
2360 PIXEL10_0
2361 }
2362 else
2363 {
2364 PIXEL10_100
2365 }
2366 PIXEL11_11
2367 break;
2368 }
2369 case 111:
2370 {
2371 if (DIFF_FUNC(w[4], w[2]))
2372 {
2373 PIXEL00_0
2374 }
2375 else
2376 {
2377 PIXEL00_100
2378 }
2379 PIXEL01_12
2380 if (DIFF_FUNC(w[8], w[4]))
2381 {
2382 PIXEL10_0
2383 }
2384 else
2385 {
2386 PIXEL10_20
2387 }
2388 PIXEL11_22
2389 break;
2390 }
2391 case 63:
2392 {
2393 if (DIFF_FUNC(w[4], w[2]))
2394 {
2395 PIXEL00_0
2396 }
2397 else
2398 {
2399 PIXEL00_100
2400 }
2401 if (DIFF_FUNC(w[2], w[6]))
2402 {
2403 PIXEL01_0
2404 }
2405 else
2406 {
2407 PIXEL01_20
2408 }
2409 PIXEL10_11
2410 PIXEL11_21
2411 break;
2412 }
2413 case 159:
2414 {
2415 if (DIFF_FUNC(w[4], w[2]))
2416 {
2417 PIXEL00_0
2418 }
2419 else
2420 {
2421 PIXEL00_20
2422 }
2423 if (DIFF_FUNC(w[2], w[6]))
2424 {
2425 PIXEL01_0
2426 }
2427 else
2428 {
2429 PIXEL01_100
2430 }
2431 PIXEL10_22
2432 PIXEL11_12
2433 break;
2434 }
2435 case 215:
2436 {
2437 PIXEL00_11
2438 if (DIFF_FUNC(w[2], w[6]))
2439 {
2440 PIXEL01_0
2441 }
2442 else
2443 {
2444 PIXEL01_100
2445 }
2446 PIXEL10_21
2447 if (DIFF_FUNC(w[6], w[8]))
2448 {
2449 PIXEL11_0
2450 }
2451 else
2452 {
2453 PIXEL11_20
2454 }
2455 break;
2456 }
2457 case 246:
2458 {
2459 PIXEL00_22
2460 if (DIFF_FUNC(w[2], w[6]))
2461 {
2462 PIXEL01_0
2463 }
2464 else
2465 {
2466 PIXEL01_20
2467 }
2468 PIXEL10_12
2469 if (DIFF_FUNC(w[6], w[8]))
2470 {
2471 PIXEL11_0
2472 }
2473 else
2474 {
2475 PIXEL11_100
2476 }
2477 break;
2478 }
2479 case 254:
2480 {
2481 PIXEL00_10
2482 if (DIFF_FUNC(w[2], w[6]))
2483 {
2484 PIXEL01_0
2485 }
2486 else
2487 {
2488 PIXEL01_20
2489 }
2490 if (DIFF_FUNC(w[8], w[4]))
2491 {
2492 PIXEL10_0
2493 }
2494 else
2495 {
2496 PIXEL10_20
2497 }
2498 if (DIFF_FUNC(w[6], w[8]))
2499 {
2500 PIXEL11_0
2501 }
2502 else
2503 {
2504 PIXEL11_100
2505 }
2506 break;
2507 }
2508 case 253:
2509 {
2510 PIXEL00_12
2511 PIXEL01_11
2512 if (DIFF_FUNC(w[8], w[4]))
2513 {
2514 PIXEL10_0
2515 }
2516 else
2517 {
2518 PIXEL10_100
2519 }
2520 if (DIFF_FUNC(w[6], w[8]))
2521 {
2522 PIXEL11_0
2523 }
2524 else
2525 {
2526 PIXEL11_100
2527 }
2528 break;
2529 }
2530 case 251:
2531 {
2532 if (DIFF_FUNC(w[4], w[2]))
2533 {
2534 PIXEL00_0
2535 }
2536 else
2537 {
2538 PIXEL00_20
2539 }
2540 PIXEL01_10
2541 if (DIFF_FUNC(w[8], w[4]))
2542 {
2543 PIXEL10_0
2544 }
2545 else
2546 {
2547 PIXEL10_100
2548 }
2549 if (DIFF_FUNC(w[6], w[8]))
2550 {
2551 PIXEL11_0
2552 }
2553 else
2554 {
2555 PIXEL11_20
2556 }
2557 break;
2558 }
2559 case 239:
2560 {
2561 if (DIFF_FUNC(w[4], w[2]))
2562 {
2563 PIXEL00_0
2564 }
2565 else
2566 {
2567 PIXEL00_100
2568 }
2569 PIXEL01_12
2570 if (DIFF_FUNC(w[8], w[4]))
2571 {
2572 PIXEL10_0
2573 }
2574 else
2575 {
2576 PIXEL10_100
2577 }
2578 PIXEL11_11
2579 break;
2580 }
2581 case 127:
2582 {
2583 if (DIFF_FUNC(w[4], w[2]))
2584 {
2585 PIXEL00_0
2586 }
2587 else
2588 {
2589 PIXEL00_100
2590 }
2591 if (DIFF_FUNC(w[2], w[6]))
2592 {
2593 PIXEL01_0
2594 }
2595 else
2596 {
2597 PIXEL01_20
2598 }
2599 if (DIFF_FUNC(w[8], w[4]))
2600 {
2601 PIXEL10_0
2602 }
2603 else
2604 {
2605 PIXEL10_20
2606 }
2607 PIXEL11_10
2608 break;
2609 }
2610 case 191:
2611 {
2612 if (DIFF_FUNC(w[4], w[2]))
2613 {
2614 PIXEL00_0
2615 }
2616 else
2617 {
2618 PIXEL00_100
2619 }
2620 if (DIFF_FUNC(w[2], w[6]))
2621 {
2622 PIXEL01_0
2623 }
2624 else
2625 {
2626 PIXEL01_100
2627 }
2628 PIXEL10_11
2629 PIXEL11_12
2630 break;
2631 }
2632 case 223:
2633 {
2634 if (DIFF_FUNC(w[4], w[2]))
2635 {
2636 PIXEL00_0
2637 }
2638 else
2639 {
2640 PIXEL00_20
2641 }
2642 if (DIFF_FUNC(w[2], w[6]))
2643 {
2644 PIXEL01_0
2645 }
2646 else
2647 {
2648 PIXEL01_100
2649 }
2650 PIXEL10_10
2651 if (DIFF_FUNC(w[6], w[8]))
2652 {
2653 PIXEL11_0
2654 }
2655 else
2656 {
2657 PIXEL11_20
2658 }
2659 break;
2660 }
2661 case 247:
2662 {
2663 PIXEL00_11
2664 if (DIFF_FUNC(w[2], w[6]))
2665 {
2666 PIXEL01_0
2667 }
2668 else
2669 {
2670 PIXEL01_100
2671 }
2672 PIXEL10_12
2673 if (DIFF_FUNC(w[6], w[8]))
2674 {
2675 PIXEL11_0
2676 }
2677 else
2678 {
2679 PIXEL11_100
2680 }
2681 break;
2682 }
2683 case 255:
2684 {
2685 if (DIFF_FUNC(w[4], w[2]))
2686 {
2687 PIXEL00_0
2688 }
2689 else
2690 {
2691 PIXEL00_100
2692 }
2693 if (DIFF_FUNC(w[2], w[6]))
2694 {
2695 PIXEL01_0
2696 }
2697 else
2698 {
2699 PIXEL01_100
2700 }
2701 if (DIFF_FUNC(w[8], w[4]))
2702 {
2703 PIXEL10_0
2704 }
2705 else
2706 {
2707 PIXEL10_100
2708 }
2709 if (DIFF_FUNC(w[6], w[8]))
2710 {
2711 PIXEL11_0
2712 }
2713 else
2714 {
2715 PIXEL11_100
2716 }
2717 break;
2718 }
2719 }
2720 sp++;
2721 dp += 2;
2722 }
2723
2724 sRowP += srb;
2725 sp = (HQ2X_TYPE *) sRowP;
2726
2727 dRowP += drb * 2;
2728 dp = (HQ2X_TYPE *) dRowP;
2729 }
2730 }
2731
HQ2X_FUNC(HQ2X_TYPE * sp,HQ2X_TYPE * dp,int Xres,int Yres)2732 HQX_API void HQX_CALLCONV HQ2X_FUNC( HQ2X_TYPE * sp, HQ2X_TYPE * dp, int Xres, int Yres )
2733 {
2734 uint32_t rowBytesL = Xres * HQ2X_BYTES;
2735 HQ2X_RB_FUNC(sp, rowBytesL, dp, rowBytesL * 2, Xres, Yres);
2736 }
2737