Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 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 <stdint.h> |
||
22 | #include <stdlib.h> |
||
23 | |||
24 | // algorithms selection |
||
25 | #define WANT_HQ2X |
||
26 | #define WANT_HQ3X |
||
27 | #define WANT_HQ4X |
||
28 | |||
29 | |||
30 | #ifdef __GNUC__ |
||
31 | #ifdef __MINGW32__ |
||
32 | #define HQX_CALLCONV __stdcall |
||
33 | #else // !__MINGW32__ |
||
34 | #define HQX_CALLCONV |
||
35 | #endif // __MINGW32__ |
||
36 | #else // !__GNUC__ |
||
37 | #define HQX_CALLCONV |
||
38 | #endif // __GNUC__ |
||
39 | |||
40 | #ifdef _WIN32 |
||
41 | #ifdef DLL_EXPORT |
||
42 | #define HQX_API __declspec(dllexport) |
||
43 | #else // !DLL_EXPORT |
||
44 | #define HQX_API __declspec(dllimport) |
||
45 | #endif // DLL_EXPORT |
||
46 | #else // !_WIN32 |
||
47 | #define HQX_API |
||
48 | #endif // _WIN32 |
||
49 | |||
50 | |||
51 | // these are the only prototypes you need |
||
52 | #ifdef WANT_HQ2X |
||
53 | HQX_API void HQX_CALLCONV hq2x_32 (uint32_t *src_pixels, uint32_t *dest_pixels, int src_width, int src_height); |
||
54 | #endif // WANT_HQ2X |
||
55 | #ifdef WANT_HQ3X |
||
56 | HQX_API void HQX_CALLCONV hq3x_32 (uint32_t *src_pixels, uint32_t *dest_pixels, int src_width, int src_height); |
||
57 | #endif // WANT_HQ3X |
||
58 | #ifdef WANT_HQ4X |
||
59 | HQX_API void HQX_CALLCONV hq4x_32 (uint32_t *src_pixels, uint32_t *dest_pixels, int src_width, int src_height); |
||
60 | #endif // WANT_HQ4X |
||
61 | HQX_API void HQX_CALLCONV hqx_32 (int level, uint32_t *src_pixels, uint32_t *dest_pixels, int src_width, int src_height); |
||
62 | |||
63 | |||
64 | #define MASK_2 0x0000FF00 |
||
65 | #define MASK_13 0x00FF00FF |
||
66 | #define MASK_RGB 0x00FFFFFF |
||
67 | #define MASK_ALPHA 0xFF000000 |
||
68 | |||
69 | #define Ymask 0x00FF0000 |
||
70 | #define Umask 0x0000FF00 |
||
71 | #define Vmask 0x000000FF |
||
72 | #define trY 0x00300000 |
||
73 | #define trU 0x00000700 |
||
74 | #define trV 0x00000006 |
||
75 | |||
76 | // RGB to YUV lookup table |
||
77 | static uint32_t is_hqx_initialized = 0; |
||
78 | static uint32_t RGBtoYUV[16777216]; |
||
79 | static HQX_API void HQX_CALLCONV hqxInit (void) |
||
80 | { |
||
81 | /* Initalize RGB to YUV lookup table */ |
||
82 | uint32_t c, r, g, b, y, u, v; |
||
83 | for (c = 0; c < 16777215; c++) |
||
84 | { |
||
85 | r = (c & 0xFF0000) >> 16; |
||
86 | g = (c & 0x00FF00) >> 8; |
||
87 | b = c & 0x0000FF; |
||
88 | y = (uint32_t)(0.299*r + 0.587*g + 0.114*b); |
||
89 | u = (uint32_t)(-0.169*r - 0.331*g + 0.5*b) + 128; |
||
90 | v = (uint32_t)(0.5*r - 0.419*g - 0.081*b) + 128; |
||
91 | RGBtoYUV[c] = (y << 16) + (u << 8) + v; |
||
92 | } |
||
93 | is_hqx_initialized = 1; |
||
94 | } |
||
95 | |||
96 | static inline uint32_t rgb_to_yuv(uint32_t c) { return RGBtoYUV[MASK_RGB & c]; } // Mask against MASK_RGB to discard the alpha channel |
||
97 | static inline int yuv_diff(uint32_t yuv1, uint32_t yuv2) { return (( (yuv1 & Ymask) - (yuv2 & Ymask) > trY ) || ( (yuv1 & Umask) - (yuv2 & Umask) > trU ) || ( (yuv1 & Vmask) - (yuv2 & Vmask) > trV ) ); } // test if there is difference in color |
||
98 | static inline int Diff(uint32_t c1, uint32_t c2) { return yuv_diff(rgb_to_yuv(c1), rgb_to_yuv(c2)); } |
||
99 | |||
100 | // interpolation functions |
||
101 | static inline uint32_t Interpolate_2(uint32_t c1, int w1, uint32_t c2, int w2, int s) |
||
102 | { |
||
103 | if (c1 == c2) return c1; |
||
104 | return |
||
105 | (((((c1 & MASK_ALPHA) >> 24) * w1 + ((c2 & MASK_ALPHA) >> 24) * w2) << (24-s)) & MASK_ALPHA) + |
||
106 | ((((c1 & MASK_2) * w1 + (c2 & MASK_2) * w2) >> s) & MASK_2) + |
||
107 | ((((c1 & MASK_13) * w1 + (c2 & MASK_13) * w2) >> s) & MASK_13); |
||
108 | } |
||
109 | |||
110 | static inline uint32_t Interpolate_3(uint32_t c1, int w1, uint32_t c2, int w2, uint32_t c3, int w3, int s) |
||
111 | { |
||
112 | return |
||
113 | (((((c1 & MASK_ALPHA) >> 24) * w1 + ((c2 & MASK_ALPHA) >> 24) * w2 + ((c3 & MASK_ALPHA) >> 24) * w3) << (24-s)) & MASK_ALPHA) + |
||
114 | ((((c1 & MASK_2) * w1 + (c2 & MASK_2) * w2 + (c3 & MASK_2) * w3) >> s) & MASK_2) + |
||
115 | ((((c1 & MASK_13) * w1 + (c2 & MASK_13) * w2 + (c3 & MASK_13) * w3) >> s) & MASK_13); |
||
116 | } |
||
117 | |||
118 | static inline void Interp1(uint32_t * pc, uint32_t c1, uint32_t c2) { *pc = Interpolate_2(c1, 3, c2, 1, 2); } //*pc = (c1*3+c2) >> 2; |
||
119 | static inline void Interp2(uint32_t * pc, uint32_t c1, uint32_t c2, uint32_t c3) { *pc = Interpolate_3(c1, 2, c2, 1, c3, 1, 2); } //*pc = (c1*2+c2+c3) >> 2; |
||
120 | static inline void Interp3(uint32_t * pc, uint32_t c1, uint32_t c2) { *pc = Interpolate_2(c1, 7, c2, 1, 3); } //*pc = (c1*7+c2)/8; |
||
121 | static inline void Interp4(uint32_t * pc, uint32_t c1, uint32_t c2, uint32_t c3) { *pc = Interpolate_3(c1, 2, c2, 7, c3, 7, 4); } //*pc = (c1*2+(c2+c3)*7)/16; |
||
122 | static inline void Interp5(uint32_t * pc, uint32_t c1, uint32_t c2) { *pc = Interpolate_2(c1, 1, c2, 1, 1); } //*pc = (c1+c2) >> 1; |
||
123 | static inline void Interp6(uint32_t * pc, uint32_t c1, uint32_t c2, uint32_t c3) { *pc = Interpolate_3(c1, 5, c2, 2, c3, 1, 3); } //*pc = (c1*5+c2*2+c3)/8; |
||
124 | static inline void Interp7(uint32_t * pc, uint32_t c1, uint32_t c2, uint32_t c3) { *pc = Interpolate_3(c1, 6, c2, 1, c3, 1, 3); } //*pc = (c1*6+c2+c3)/8; |
||
125 | static inline void Interp8(uint32_t * pc, uint32_t c1, uint32_t c2) { *pc = Interpolate_2(c1, 5, c2, 3, 3); } //*pc = (c1*5+c2*3)/8; |
||
126 | static inline void Interp9(uint32_t * pc, uint32_t c1, uint32_t c2, uint32_t c3) { *pc = Interpolate_3(c1, 2, c2, 3, c3, 3, 3); } //*pc = (c1*2+(c2+c3)*3)/8; |
||
127 | static inline void Interp10(uint32_t * pc, uint32_t c1, uint32_t c2, uint32_t c3) { *pc = Interpolate_3(c1, 14, c2, 1, c3, 1, 4); } //*pc = (c1*14+c2+c3)/16; |
||
128 | |||
129 | |||
130 | ////////// |
||
131 | // HQ2X // |
||
132 | ////////// |
||
133 | |||
134 | #ifdef WANT_HQ2X |
||
135 | #define PIXEL00_0 *dp = w[5]; |
||
136 | #define PIXEL00_10 Interp1(dp, w[5], w[1]); |
||
137 | #define PIXEL00_11 Interp1(dp, w[5], w[4]); |
||
138 | #define PIXEL00_12 Interp1(dp, w[5], w[2]); |
||
139 | #define PIXEL00_20 Interp2(dp, w[5], w[4], w[2]); |
||
140 | #define PIXEL00_21 Interp2(dp, w[5], w[1], w[2]); |
||
141 | #define PIXEL00_22 Interp2(dp, w[5], w[1], w[4]); |
||
142 | #define PIXEL00_60 Interp6(dp, w[5], w[2], w[4]); |
||
143 | #define PIXEL00_61 Interp6(dp, w[5], w[4], w[2]); |
||
144 | #define PIXEL00_70 Interp7(dp, w[5], w[4], w[2]); |
||
145 | #define PIXEL00_90 Interp9(dp, w[5], w[4], w[2]); |
||
146 | #define PIXEL00_100 Interp10(dp, w[5], w[4], w[2]); |
||
147 | #define PIXEL01_0 *(dp+1) = w[5]; |
||
148 | #define PIXEL01_10 Interp1(dp+1, w[5], w[3]); |
||
149 | #define PIXEL01_11 Interp1(dp+1, w[5], w[2]); |
||
150 | #define PIXEL01_12 Interp1(dp+1, w[5], w[6]); |
||
151 | #define PIXEL01_20 Interp2(dp+1, w[5], w[2], w[6]); |
||
152 | #define PIXEL01_21 Interp2(dp+1, w[5], w[3], w[6]); |
||
153 | #define PIXEL01_22 Interp2(dp+1, w[5], w[3], w[2]); |
||
154 | #define PIXEL01_60 Interp6(dp+1, w[5], w[6], w[2]); |
||
155 | #define PIXEL01_61 Interp6(dp+1, w[5], w[2], w[6]); |
||
156 | #define PIXEL01_70 Interp7(dp+1, w[5], w[2], w[6]); |
||
157 | #define PIXEL01_90 Interp9(dp+1, w[5], w[2], w[6]); |
||
158 | #define PIXEL01_100 Interp10(dp+1, w[5], w[2], w[6]); |
||
159 | #define PIXEL10_0 *(dp+dpL) = w[5]; |
||
160 | #define PIXEL10_10 Interp1(dp+dpL, w[5], w[7]); |
||
161 | #define PIXEL10_11 Interp1(dp+dpL, w[5], w[8]); |
||
162 | #define PIXEL10_12 Interp1(dp+dpL, w[5], w[4]); |
||
163 | #define PIXEL10_20 Interp2(dp+dpL, w[5], w[8], w[4]); |
||
164 | #define PIXEL10_21 Interp2(dp+dpL, w[5], w[7], w[4]); |
||
165 | #define PIXEL10_22 Interp2(dp+dpL, w[5], w[7], w[8]); |
||
166 | #define PIXEL10_60 Interp6(dp+dpL, w[5], w[4], w[8]); |
||
167 | #define PIXEL10_61 Interp6(dp+dpL, w[5], w[8], w[4]); |
||
168 | #define PIXEL10_70 Interp7(dp+dpL, w[5], w[8], w[4]); |
||
169 | #define PIXEL10_90 Interp9(dp+dpL, w[5], w[8], w[4]); |
||
170 | #define PIXEL10_100 Interp10(dp+dpL, w[5], w[8], w[4]); |
||
171 | #define PIXEL11_0 *(dp+dpL+1) = w[5]; |
||
172 | #define PIXEL11_10 Interp1(dp+dpL+1, w[5], w[9]); |
||
173 | #define PIXEL11_11 Interp1(dp+dpL+1, w[5], w[6]); |
||
174 | #define PIXEL11_12 Interp1(dp+dpL+1, w[5], w[8]); |
||
175 | #define PIXEL11_20 Interp2(dp+dpL+1, w[5], w[6], w[8]); |
||
176 | #define PIXEL11_21 Interp2(dp+dpL+1, w[5], w[9], w[8]); |
||
177 | #define PIXEL11_22 Interp2(dp+dpL+1, w[5], w[9], w[6]); |
||
178 | #define PIXEL11_60 Interp6(dp+dpL+1, w[5], w[8], w[6]); |
||
179 | #define PIXEL11_61 Interp6(dp+dpL+1, w[5], w[6], w[8]); |
||
180 | #define PIXEL11_70 Interp7(dp+dpL+1, w[5], w[6], w[8]); |
||
181 | #define PIXEL11_90 Interp9(dp+dpL+1, w[5], w[6], w[8]); |
||
182 | #define PIXEL11_100 Interp10(dp+dpL+1, w[5], w[6], w[8]); |
||
183 | |||
184 | static HQX_API void HQX_CALLCONV hq2x_32_rb( uint32_t * sp, uint32_t srb, uint32_t * dp, uint32_t drb, int Xres, int Yres ) |
||
185 | { |
||
186 | int i, j, k; |
||
187 | int prevline, nextline; |
||
188 | uint32_t w[10]; |
||
189 | int dpL = (drb >> 2); |
||
190 | int spL = (srb >> 2); |
||
191 | uint8_t *sRowP = (uint8_t *) sp; |
||
192 | uint8_t *dRowP = (uint8_t *) dp; |
||
193 | uint32_t yuv1, yuv2; |
||
194 | |||
195 | // +----+----+----+ |
||
196 | // | | | | |
||
197 | // | w1 | w2 | w3 | |
||
198 | // +----+----+----+ |
||
199 | // | | | | |
||
200 | // | w4 | w5 | w6 | |
||
201 | // +----+----+----+ |
||
202 | // | | | | |
||
203 | // | w7 | w8 | w9 | |
||
204 | // +----+----+----+ |
||
205 | |||
206 | for (j=0; j<Yres; j++) |
||
207 | { |
||
208 | if (j>0) prevline = -spL; else prevline = 0; |
||
209 | if (j<Yres-1) nextline = spL; else nextline = 0; |
||
210 | |||
211 | for (i=0; i<Xres; i++) |
||
212 | { |
||
213 | w[2] = *(sp + prevline); |
||
214 | w[5] = *sp; |
||
215 | w[8] = *(sp + nextline); |
||
216 | |||
217 | if (i>0) |
||
218 | { |
||
219 | w[1] = *(sp + prevline - 1); |
||
220 | w[4] = *(sp - 1); |
||
221 | w[7] = *(sp + nextline - 1); |
||
222 | } |
||
223 | else |
||
224 | { |
||
225 | w[1] = w[2]; |
||
226 | w[4] = w[5]; |
||
227 | w[7] = w[8]; |
||
228 | } |
||
229 | |||
230 | if (i<Xres-1) |
||
231 | { |
||
232 | w[3] = *(sp + prevline + 1); |
||
233 | w[6] = *(sp + 1); |
||
234 | w[9] = *(sp + nextline + 1); |
||
235 | } |
||
236 | else |
||
237 | { |
||
238 | w[3] = w[2]; |
||
239 | w[6] = w[5]; |
||
240 | w[9] = w[8]; |
||
241 | } |
||
242 | |||
243 | int pattern = 0; |
||
244 | int flag = 1; |
||
245 | |||
246 | yuv1 = rgb_to_yuv(w[5]); |
||
247 | |||
248 | for (k=1; k<=9; k++) |
||
249 | { |
||
250 | if (k==5) continue; |
||
251 | |||
252 | if ( w[k] != w[5] ) |
||
253 | { |
||
254 | yuv2 = rgb_to_yuv(w[k]); |
||
255 | if (yuv_diff(yuv1, yuv2)) |
||
256 | pattern |= flag; |
||
257 | } |
||
258 | flag <<= 1; |
||
259 | } |
||
260 | |||
261 | switch (pattern) |
||
262 | { |
||
263 | case 0: |
||
264 | case 1: |
||
265 | case 4: |
||
266 | case 32: |
||
267 | case 128: |
||
268 | case 5: |
||
269 | case 132: |
||
270 | case 160: |
||
271 | case 33: |
||
272 | case 129: |
||
273 | case 36: |
||
274 | case 133: |
||
275 | case 164: |
||
276 | case 161: |
||
277 | case 37: |
||
278 | case 165: |
||
279 | { |
||
280 | PIXEL00_20 |
||
281 | PIXEL01_20 |
||
282 | PIXEL10_20 |
||
283 | PIXEL11_20 |
||
284 | break; |
||
285 | } |
||
286 | case 2: |
||
287 | case 34: |
||
288 | case 130: |
||
289 | case 162: |
||
290 | { |
||
291 | PIXEL00_22 |
||
292 | PIXEL01_21 |
||
293 | PIXEL10_20 |
||
294 | PIXEL11_20 |
||
295 | break; |
||
296 | } |
||
297 | case 16: |
||
298 | case 17: |
||
299 | case 48: |
||
300 | case 49: |
||
301 | { |
||
302 | PIXEL00_20 |
||
303 | PIXEL01_22 |
||
304 | PIXEL10_20 |
||
305 | PIXEL11_21 |
||
306 | break; |
||
307 | } |
||
308 | case 64: |
||
309 | case 65: |
||
310 | case 68: |
||
311 | case 69: |
||
312 | { |
||
313 | PIXEL00_20 |
||
314 | PIXEL01_20 |
||
315 | PIXEL10_21 |
||
316 | PIXEL11_22 |
||
317 | break; |
||
318 | } |
||
319 | case 8: |
||
320 | case 12: |
||
321 | case 136: |
||
322 | case 140: |
||
323 | { |
||
324 | PIXEL00_21 |
||
325 | PIXEL01_20 |
||
326 | PIXEL10_22 |
||
327 | PIXEL11_20 |
||
328 | break; |
||
329 | } |
||
330 | case 3: |
||
331 | case 35: |
||
332 | case 131: |
||
333 | case 163: |
||
334 | { |
||
335 | PIXEL00_11 |
||
336 | PIXEL01_21 |
||
337 | PIXEL10_20 |
||
338 | PIXEL11_20 |
||
339 | break; |
||
340 | } |
||
341 | case 6: |
||
342 | case 38: |
||
343 | case 134: |
||
344 | case 166: |
||
345 | { |
||
346 | PIXEL00_22 |
||
347 | PIXEL01_12 |
||
348 | PIXEL10_20 |
||
349 | PIXEL11_20 |
||
350 | break; |
||
351 | } |
||
352 | case 20: |
||
353 | case 21: |
||
354 | case 52: |
||
355 | case 53: |
||
356 | { |
||
357 | PIXEL00_20 |
||
358 | PIXEL01_11 |
||
359 | PIXEL10_20 |
||
360 | PIXEL11_21 |
||
361 | break; |
||
362 | } |
||
363 | case 144: |
||
364 | case 145: |
||
365 | case 176: |
||
366 | case 177: |
||
367 | { |
||
368 | PIXEL00_20 |
||
369 | PIXEL01_22 |
||
370 | PIXEL10_20 |
||
371 | PIXEL11_12 |
||
372 | break; |
||
373 | } |
||
374 | case 192: |
||
375 | case 193: |
||
376 | case 196: |
||
377 | case 197: |
||
378 | { |
||
379 | PIXEL00_20 |
||
380 | PIXEL01_20 |
||
381 | PIXEL10_21 |
||
382 | PIXEL11_11 |
||
383 | break; |
||
384 | } |
||
385 | case 96: |
||
386 | case 97: |
||
387 | case 100: |
||
388 | case 101: |
||
389 | { |
||
390 | PIXEL00_20 |
||
391 | PIXEL01_20 |
||
392 | PIXEL10_12 |
||
393 | PIXEL11_22 |
||
394 | break; |
||
395 | } |
||
396 | case 40: |
||
397 | case 44: |
||
398 | case 168: |
||
399 | case 172: |
||
400 | { |
||
401 | PIXEL00_21 |
||
402 | PIXEL01_20 |
||
403 | PIXEL10_11 |
||
404 | PIXEL11_20 |
||
405 | break; |
||
406 | } |
||
407 | case 9: |
||
408 | case 13: |
||
409 | case 137: |
||
410 | case 141: |
||
411 | { |
||
412 | PIXEL00_12 |
||
413 | PIXEL01_20 |
||
414 | PIXEL10_22 |
||
415 | PIXEL11_20 |
||
416 | break; |
||
417 | } |
||
418 | case 18: |
||
419 | case 50: |
||
420 | { |
||
421 | PIXEL00_22 |
||
422 | if (Diff(w[2], w[6])) |
||
423 | { |
||
424 | PIXEL01_10 |
||
425 | } |
||
426 | else |
||
427 | { |
||
428 | PIXEL01_20 |
||
429 | } |
||
430 | PIXEL10_20 |
||
431 | PIXEL11_21 |
||
432 | break; |
||
433 | } |
||
434 | case 80: |
||
435 | case 81: |
||
436 | { |
||
437 | PIXEL00_20 |
||
438 | PIXEL01_22 |
||
439 | PIXEL10_21 |
||
440 | if (Diff(w[6], w[8])) |
||
441 | { |
||
442 | PIXEL11_10 |
||
443 | } |
||
444 | else |
||
445 | { |
||
446 | PIXEL11_20 |
||
447 | } |
||
448 | break; |
||
449 | } |
||
450 | case 72: |
||
451 | case 76: |
||
452 | { |
||
453 | PIXEL00_21 |
||
454 | PIXEL01_20 |
||
455 | if (Diff(w[8], w[4])) |
||
456 | { |
||
457 | PIXEL10_10 |
||
458 | } |
||
459 | else |
||
460 | { |
||
461 | PIXEL10_20 |
||
462 | } |
||
463 | PIXEL11_22 |
||
464 | break; |
||
465 | } |
||
466 | case 10: |
||
467 | case 138: |
||
468 | { |
||
469 | if (Diff(w[4], w[2])) |
||
470 | { |
||
471 | PIXEL00_10 |
||
472 | } |
||
473 | else |
||
474 | { |
||
475 | PIXEL00_20 |
||
476 | } |
||
477 | PIXEL01_21 |
||
478 | PIXEL10_22 |
||
479 | PIXEL11_20 |
||
480 | break; |
||
481 | } |
||
482 | case 66: |
||
483 | { |
||
484 | PIXEL00_22 |
||
485 | PIXEL01_21 |
||
486 | PIXEL10_21 |
||
487 | PIXEL11_22 |
||
488 | break; |
||
489 | } |
||
490 | case 24: |
||
491 | { |
||
492 | PIXEL00_21 |
||
493 | PIXEL01_22 |
||
494 | PIXEL10_22 |
||
495 | PIXEL11_21 |
||
496 | break; |
||
497 | } |
||
498 | case 7: |
||
499 | case 39: |
||
500 | case 135: |
||
501 | { |
||
502 | PIXEL00_11 |
||
503 | PIXEL01_12 |
||
504 | PIXEL10_20 |
||
505 | PIXEL11_20 |
||
506 | break; |
||
507 | } |
||
508 | case 148: |
||
509 | case 149: |
||
510 | case 180: |
||
511 | { |
||
512 | PIXEL00_20 |
||
513 | PIXEL01_11 |
||
514 | PIXEL10_20 |
||
515 | PIXEL11_12 |
||
516 | break; |
||
517 | } |
||
518 | case 224: |
||
519 | case 228: |
||
520 | case 225: |
||
521 | { |
||
522 | PIXEL00_20 |
||
523 | PIXEL01_20 |
||
524 | PIXEL10_12 |
||
525 | PIXEL11_11 |
||
526 | break; |
||
527 | } |
||
528 | case 41: |
||
529 | case 169: |
||
530 | case 45: |
||
531 | { |
||
532 | PIXEL00_12 |
||
533 | PIXEL01_20 |
||
534 | PIXEL10_11 |
||
535 | PIXEL11_20 |
||
536 | break; |
||
537 | } |
||
538 | case 22: |
||
539 | case 54: |
||
540 | { |
||
541 | PIXEL00_22 |
||
542 | if (Diff(w[2], w[6])) |
||
543 | { |
||
544 | PIXEL01_0 |
||
545 | } |
||
546 | else |
||
547 | { |
||
548 | PIXEL01_20 |
||
549 | } |
||
550 | PIXEL10_20 |
||
551 | PIXEL11_21 |
||
552 | break; |
||
553 | } |
||
554 | case 208: |
||
555 | case 209: |
||
556 | { |
||
557 | PIXEL00_20 |
||
558 | PIXEL01_22 |
||
559 | PIXEL10_21 |
||
560 | if (Diff(w[6], w[8])) |
||
561 | { |
||
562 | PIXEL11_0 |
||
563 | } |
||
564 | else |
||
565 | { |
||
566 | PIXEL11_20 |
||
567 | } |
||
568 | break; |
||
569 | } |
||
570 | case 104: |
||
571 | case 108: |
||
572 | { |
||
573 | PIXEL00_21 |
||
574 | PIXEL01_20 |
||
575 | if (Diff(w[8], w[4])) |
||
576 | { |
||
577 | PIXEL10_0 |
||
578 | } |
||
579 | else |
||
580 | { |
||
581 | PIXEL10_20 |
||
582 | } |
||
583 | PIXEL11_22 |
||
584 | break; |
||
585 | } |
||
586 | case 11: |
||
587 | case 139: |
||
588 | { |
||
589 | if (Diff(w[4], w[2])) |
||
590 | { |
||
591 | PIXEL00_0 |
||
592 | } |
||
593 | else |
||
594 | { |
||
595 | PIXEL00_20 |
||
596 | } |
||
597 | PIXEL01_21 |
||
598 | PIXEL10_22 |
||
599 | PIXEL11_20 |
||
600 | break; |
||
601 | } |
||
602 | case 19: |
||
603 | case 51: |
||
604 | { |
||
605 | if (Diff(w[2], w[6])) |
||
606 | { |
||
607 | PIXEL00_11 |
||
608 | PIXEL01_10 |
||
609 | } |
||
610 | else |
||
611 | { |
||
612 | PIXEL00_60 |
||
613 | PIXEL01_90 |
||
614 | } |
||
615 | PIXEL10_20 |
||
616 | PIXEL11_21 |
||
617 | break; |
||
618 | } |
||
619 | case 146: |
||
620 | case 178: |
||
621 | { |
||
622 | PIXEL00_22 |
||
623 | if (Diff(w[2], w[6])) |
||
624 | { |
||
625 | PIXEL01_10 |
||
626 | PIXEL11_12 |
||
627 | } |
||
628 | else |
||
629 | { |
||
630 | PIXEL01_90 |
||
631 | PIXEL11_61 |
||
632 | } |
||
633 | PIXEL10_20 |
||
634 | break; |
||
635 | } |
||
636 | case 84: |
||
637 | case 85: |
||
638 | { |
||
639 | PIXEL00_20 |
||
640 | if (Diff(w[6], w[8])) |
||
641 | { |
||
642 | PIXEL01_11 |
||
643 | PIXEL11_10 |
||
644 | } |
||
645 | else |
||
646 | { |
||
647 | PIXEL01_60 |
||
648 | PIXEL11_90 |
||
649 | } |
||
650 | PIXEL10_21 |
||
651 | break; |
||
652 | } |
||
653 | case 112: |
||
654 | case 113: |
||
655 | { |
||
656 | PIXEL00_20 |
||
657 | PIXEL01_22 |
||
658 | if (Diff(w[6], w[8])) |
||
659 | { |
||
660 | PIXEL10_12 |
||
661 | PIXEL11_10 |
||
662 | } |
||
663 | else |
||
664 | { |
||
665 | PIXEL10_61 |
||
666 | PIXEL11_90 |
||
667 | } |
||
668 | break; |
||
669 | } |
||
670 | case 200: |
||
671 | case 204: |
||
672 | { |
||
673 | PIXEL00_21 |
||
674 | PIXEL01_20 |
||
675 | if (Diff(w[8], w[4])) |
||
676 | { |
||
677 | PIXEL10_10 |
||
678 | PIXEL11_11 |
||
679 | } |
||
680 | else |
||
681 | { |
||
682 | PIXEL10_90 |
||
683 | PIXEL11_60 |
||
684 | } |
||
685 | break; |
||
686 | } |
||
687 | case 73: |
||
688 | case 77: |
||
689 | { |
||
690 | if (Diff(w[8], w[4])) |
||
691 | { |
||
692 | PIXEL00_12 |
||
693 | PIXEL10_10 |
||
694 | } |
||
695 | else |
||
696 | { |
||
697 | PIXEL00_61 |
||
698 | PIXEL10_90 |
||
699 | } |
||
700 | PIXEL01_20 |
||
701 | PIXEL11_22 |
||
702 | break; |
||
703 | } |
||
704 | case 42: |
||
705 | case 170: |
||
706 | { |
||
707 | if (Diff(w[4], w[2])) |
||
708 | { |
||
709 | PIXEL00_10 |
||
710 | PIXEL10_11 |
||
711 | } |
||
712 | else |
||
713 | { |
||
714 | PIXEL00_90 |
||
715 | PIXEL10_60 |
||
716 | } |
||
717 | PIXEL01_21 |
||
718 | PIXEL11_20 |
||
719 | break; |
||
720 | } |
||
721 | case 14: |
||
722 | case 142: |
||
723 | { |
||
724 | if (Diff(w[4], w[2])) |
||
725 | { |
||
726 | PIXEL00_10 |
||
727 | PIXEL01_12 |
||
728 | } |
||
729 | else |
||
730 | { |
||
731 | PIXEL00_90 |
||
732 | PIXEL01_61 |
||
733 | } |
||
734 | PIXEL10_22 |
||
735 | PIXEL11_20 |
||
736 | break; |
||
737 | } |
||
738 | case 67: |
||
739 | { |
||
740 | PIXEL00_11 |
||
741 | PIXEL01_21 |
||
742 | PIXEL10_21 |
||
743 | PIXEL11_22 |
||
744 | break; |
||
745 | } |
||
746 | case 70: |
||
747 | { |
||
748 | PIXEL00_22 |
||
749 | PIXEL01_12 |
||
750 | PIXEL10_21 |
||
751 | PIXEL11_22 |
||
752 | break; |
||
753 | } |
||
754 | case 28: |
||
755 | { |
||
756 | PIXEL00_21 |
||
757 | PIXEL01_11 |
||
758 | PIXEL10_22 |
||
759 | PIXEL11_21 |
||
760 | break; |
||
761 | } |
||
762 | case 152: |
||
763 | { |
||
764 | PIXEL00_21 |
||
765 | PIXEL01_22 |
||
766 | PIXEL10_22 |
||
767 | PIXEL11_12 |
||
768 | break; |
||
769 | } |
||
770 | case 194: |
||
771 | { |
||
772 | PIXEL00_22 |
||
773 | PIXEL01_21 |
||
774 | PIXEL10_21 |
||
775 | PIXEL11_11 |
||
776 | break; |
||
777 | } |
||
778 | case 98: |
||
779 | { |
||
780 | PIXEL00_22 |
||
781 | PIXEL01_21 |
||
782 | PIXEL10_12 |
||
783 | PIXEL11_22 |
||
784 | break; |
||
785 | } |
||
786 | case 56: |
||
787 | { |
||
788 | PIXEL00_21 |
||
789 | PIXEL01_22 |
||
790 | PIXEL10_11 |
||
791 | PIXEL11_21 |
||
792 | break; |
||
793 | } |
||
794 | case 25: |
||
795 | { |
||
796 | PIXEL00_12 |
||
797 | PIXEL01_22 |
||
798 | PIXEL10_22 |
||
799 | PIXEL11_21 |
||
800 | break; |
||
801 | } |
||
802 | case 26: |
||
803 | case 31: |
||
804 | { |
||
805 | if (Diff(w[4], w[2])) |
||
806 | { |
||
807 | PIXEL00_0 |
||
808 | } |
||
809 | else |
||
810 | { |
||
811 | PIXEL00_20 |
||
812 | } |
||
813 | if (Diff(w[2], w[6])) |
||
814 | { |
||
815 | PIXEL01_0 |
||
816 | } |
||
817 | else |
||
818 | { |
||
819 | PIXEL01_20 |
||
820 | } |
||
821 | PIXEL10_22 |
||
822 | PIXEL11_21 |
||
823 | break; |
||
824 | } |
||
825 | case 82: |
||
826 | case 214: |
||
827 | { |
||
828 | PIXEL00_22 |
||
829 | if (Diff(w[2], w[6])) |
||
830 | { |
||
831 | PIXEL01_0 |
||
832 | } |
||
833 | else |
||
834 | { |
||
835 | PIXEL01_20 |
||
836 | } |
||
837 | PIXEL10_21 |
||
838 | if (Diff(w[6], w[8])) |
||
839 | { |
||
840 | PIXEL11_0 |
||
841 | } |
||
842 | else |
||
843 | { |
||
844 | PIXEL11_20 |
||
845 | } |
||
846 | break; |
||
847 | } |
||
848 | case 88: |
||
849 | case 248: |
||
850 | { |
||
851 | PIXEL00_21 |
||
852 | PIXEL01_22 |
||
853 | if (Diff(w[8], w[4])) |
||
854 | { |
||
855 | PIXEL10_0 |
||
856 | } |
||
857 | else |
||
858 | { |
||
859 | PIXEL10_20 |
||
860 | } |
||
861 | if (Diff(w[6], w[8])) |
||
862 | { |
||
863 | PIXEL11_0 |
||
864 | } |
||
865 | else |
||
866 | { |
||
867 | PIXEL11_20 |
||
868 | } |
||
869 | break; |
||
870 | } |
||
871 | case 74: |
||
872 | case 107: |
||
873 | { |
||
874 | if (Diff(w[4], w[2])) |
||
875 | { |
||
876 | PIXEL00_0 |
||
877 | } |
||
878 | else |
||
879 | { |
||
880 | PIXEL00_20 |
||
881 | } |
||
882 | PIXEL01_21 |
||
883 | if (Diff(w[8], w[4])) |
||
884 | { |
||
885 | PIXEL10_0 |
||
886 | } |
||
887 | else |
||
888 | { |
||
889 | PIXEL10_20 |
||
890 | } |
||
891 | PIXEL11_22 |
||
892 | break; |
||
893 | } |
||
894 | case 27: |
||
895 | { |
||
896 | if (Diff(w[4], w[2])) |
||
897 | { |
||
898 | PIXEL00_0 |
||
899 | } |
||
900 | else |
||
901 | { |
||
902 | PIXEL00_20 |
||
903 | } |
||
904 | PIXEL01_10 |
||
905 | PIXEL10_22 |
||
906 | PIXEL11_21 |
||
907 | break; |
||
908 | } |
||
909 | case 86: |
||
910 | { |
||
911 | PIXEL00_22 |
||
912 | if (Diff(w[2], w[6])) |
||
913 | { |
||
914 | PIXEL01_0 |
||
915 | } |
||
916 | else |
||
917 | { |
||
918 | PIXEL01_20 |
||
919 | } |
||
920 | PIXEL10_21 |
||
921 | PIXEL11_10 |
||
922 | break; |
||
923 | } |
||
924 | case 216: |
||
925 | { |
||
926 | PIXEL00_21 |
||
927 | PIXEL01_22 |
||
928 | PIXEL10_10 |
||
929 | if (Diff(w[6], w[8])) |
||
930 | { |
||
931 | PIXEL11_0 |
||
932 | } |
||
933 | else |
||
934 | { |
||
935 | PIXEL11_20 |
||
936 | } |
||
937 | break; |
||
938 | } |
||
939 | case 106: |
||
940 | { |
||
941 | PIXEL00_10 |
||
942 | PIXEL01_21 |
||
943 | if (Diff(w[8], w[4])) |
||
944 | { |
||
945 | PIXEL10_0 |
||
946 | } |
||
947 | else |
||
948 | { |
||
949 | PIXEL10_20 |
||
950 | } |
||
951 | PIXEL11_22 |
||
952 | break; |
||
953 | } |
||
954 | case 30: |
||
955 | { |
||
956 | PIXEL00_10 |
||
957 | if (Diff(w[2], w[6])) |
||
958 | { |
||
959 | PIXEL01_0 |
||
960 | } |
||
961 | else |
||
962 | { |
||
963 | PIXEL01_20 |
||
964 | } |
||
965 | PIXEL10_22 |
||
966 | PIXEL11_21 |
||
967 | break; |
||
968 | } |
||
969 | case 210: |
||
970 | { |
||
971 | PIXEL00_22 |
||
972 | PIXEL01_10 |
||
973 | PIXEL10_21 |
||
974 | if (Diff(w[6], w[8])) |
||
975 | { |
||
976 | PIXEL11_0 |
||
977 | } |
||
978 | else |
||
979 | { |
||
980 | PIXEL11_20 |
||
981 | } |
||
982 | break; |
||
983 | } |
||
984 | case 120: |
||
985 | { |
||
986 | PIXEL00_21 |
||
987 | PIXEL01_22 |
||
988 | if (Diff(w[8], w[4])) |
||
989 | { |
||
990 | PIXEL10_0 |
||
991 | } |
||
992 | else |
||
993 | { |
||
994 | PIXEL10_20 |
||
995 | } |
||
996 | PIXEL11_10 |
||
997 | break; |
||
998 | } |
||
999 | case 75: |
||
1000 | { |
||
1001 | if (Diff(w[4], w[2])) |
||
1002 | { |
||
1003 | PIXEL00_0 |
||
1004 | } |
||
1005 | else |
||
1006 | { |
||
1007 | PIXEL00_20 |
||
1008 | } |
||
1009 | PIXEL01_21 |
||
1010 | PIXEL10_10 |
||
1011 | PIXEL11_22 |
||
1012 | break; |
||
1013 | } |
||
1014 | case 29: |
||
1015 | { |
||
1016 | PIXEL00_12 |
||
1017 | PIXEL01_11 |
||
1018 | PIXEL10_22 |
||
1019 | PIXEL11_21 |
||
1020 | break; |
||
1021 | } |
||
1022 | case 198: |
||
1023 | { |
||
1024 | PIXEL00_22 |
||
1025 | PIXEL01_12 |
||
1026 | PIXEL10_21 |
||
1027 | PIXEL11_11 |
||
1028 | break; |
||
1029 | } |
||
1030 | case 184: |
||
1031 | { |
||
1032 | PIXEL00_21 |
||
1033 | PIXEL01_22 |
||
1034 | PIXEL10_11 |
||
1035 | PIXEL11_12 |
||
1036 | break; |
||
1037 | } |
||
1038 | case 99: |
||
1039 | { |
||
1040 | PIXEL00_11 |
||
1041 | PIXEL01_21 |
||
1042 | PIXEL10_12 |
||
1043 | PIXEL11_22 |
||
1044 | break; |
||
1045 | } |
||
1046 | case 57: |
||
1047 | { |
||
1048 | PIXEL00_12 |
||
1049 | PIXEL01_22 |
||
1050 | PIXEL10_11 |
||
1051 | PIXEL11_21 |
||
1052 | break; |
||
1053 | } |
||
1054 | case 71: |
||
1055 | { |
||
1056 | PIXEL00_11 |
||
1057 | PIXEL01_12 |
||
1058 | PIXEL10_21 |
||
1059 | PIXEL11_22 |
||
1060 | break; |
||
1061 | } |
||
1062 | case 156: |
||
1063 | { |
||
1064 | PIXEL00_21 |
||
1065 | PIXEL01_11 |
||
1066 | PIXEL10_22 |
||
1067 | PIXEL11_12 |
||
1068 | break; |
||
1069 | } |
||
1070 | case 226: |
||
1071 | { |
||
1072 | PIXEL00_22 |
||
1073 | PIXEL01_21 |
||
1074 | PIXEL10_12 |
||
1075 | PIXEL11_11 |
||
1076 | break; |
||
1077 | } |
||
1078 | case 60: |
||
1079 | { |
||
1080 | PIXEL00_21 |
||
1081 | PIXEL01_11 |
||
1082 | PIXEL10_11 |
||
1083 | PIXEL11_21 |
||
1084 | break; |
||
1085 | } |
||
1086 | case 195: |
||
1087 | { |
||
1088 | PIXEL00_11 |
||
1089 | PIXEL01_21 |
||
1090 | PIXEL10_21 |
||
1091 | PIXEL11_11 |
||
1092 | break; |
||
1093 | } |
||
1094 | case 102: |
||
1095 | { |
||
1096 | PIXEL00_22 |
||
1097 | PIXEL01_12 |
||
1098 | PIXEL10_12 |
||
1099 | PIXEL11_22 |
||
1100 | break; |
||
1101 | } |
||
1102 | case 153: |
||
1103 | { |
||
1104 | PIXEL00_12 |
||
1105 | PIXEL01_22 |
||
1106 | PIXEL10_22 |
||
1107 | PIXEL11_12 |
||
1108 | break; |
||
1109 | } |
||
1110 | case 58: |
||
1111 | { |
||
1112 | if (Diff(w[4], w[2])) |
||
1113 | { |
||
1114 | PIXEL00_10 |
||
1115 | } |
||
1116 | else |
||
1117 | { |
||
1118 | PIXEL00_70 |
||
1119 | } |
||
1120 | if (Diff(w[2], w[6])) |
||
1121 | { |
||
1122 | PIXEL01_10 |
||
1123 | } |
||
1124 | else |
||
1125 | { |
||
1126 | PIXEL01_70 |
||
1127 | } |
||
1128 | PIXEL10_11 |
||
1129 | PIXEL11_21 |
||
1130 | break; |
||
1131 | } |
||
1132 | case 83: |
||
1133 | { |
||
1134 | PIXEL00_11 |
||
1135 | if (Diff(w[2], w[6])) |
||
1136 | { |
||
1137 | PIXEL01_10 |
||
1138 | } |
||
1139 | else |
||
1140 | { |
||
1141 | PIXEL01_70 |
||
1142 | } |
||
1143 | PIXEL10_21 |
||
1144 | if (Diff(w[6], w[8])) |
||
1145 | { |
||
1146 | PIXEL11_10 |
||
1147 | } |
||
1148 | else |
||
1149 | { |
||
1150 | PIXEL11_70 |
||
1151 | } |
||
1152 | break; |
||
1153 | } |
||
1154 | case 92: |
||
1155 | { |
||
1156 | PIXEL00_21 |
||
1157 | PIXEL01_11 |
||
1158 | if (Diff(w[8], w[4])) |
||
1159 | { |
||
1160 | PIXEL10_10 |
||
1161 | } |
||
1162 | else |
||
1163 | { |
||
1164 | PIXEL10_70 |
||
1165 | } |
||
1166 | if (Diff(w[6], w[8])) |
||
1167 | { |
||
1168 | PIXEL11_10 |
||
1169 | } |
||
1170 | else |
||
1171 | { |
||
1172 | PIXEL11_70 |
||
1173 | } |
||
1174 | break; |
||
1175 | } |
||
1176 | case 202: |
||
1177 | { |
||
1178 | if (Diff(w[4], w[2])) |
||
1179 | { |
||
1180 | PIXEL00_10 |
||
1181 | } |
||
1182 | else |
||
1183 | { |
||
1184 | PIXEL00_70 |
||
1185 | } |
||
1186 | PIXEL01_21 |
||
1187 | if (Diff(w[8], w[4])) |
||
1188 | { |
||
1189 | PIXEL10_10 |
||
1190 | } |
||
1191 | else |
||
1192 | { |
||
1193 | PIXEL10_70 |
||
1194 | } |
||
1195 | PIXEL11_11 |
||
1196 | break; |
||
1197 | } |
||
1198 | case 78: |
||
1199 | { |
||
1200 | if (Diff(w[4], w[2])) |
||
1201 | { |
||
1202 | PIXEL00_10 |
||
1203 | } |
||
1204 | else |
||
1205 | { |
||
1206 | PIXEL00_70 |
||
1207 | } |
||
1208 | PIXEL01_12 |
||
1209 | if (Diff(w[8], w[4])) |
||
1210 | { |
||
1211 | PIXEL10_10 |
||
1212 | } |
||
1213 | else |
||
1214 | { |
||
1215 | PIXEL10_70 |
||
1216 | } |
||
1217 | PIXEL11_22 |
||
1218 | break; |
||
1219 | } |
||
1220 | case 154: |
||
1221 | { |
||
1222 | if (Diff(w[4], w[2])) |
||
1223 | { |
||
1224 | PIXEL00_10 |
||
1225 | } |
||
1226 | else |
||
1227 | { |
||
1228 | PIXEL00_70 |
||
1229 | } |
||
1230 | if (Diff(w[2], w[6])) |
||
1231 | { |
||
1232 | PIXEL01_10 |
||
1233 | } |
||
1234 | else |
||
1235 | { |
||
1236 | PIXEL01_70 |
||
1237 | } |
||
1238 | PIXEL10_22 |
||
1239 | PIXEL11_12 |
||
1240 | break; |
||
1241 | } |
||
1242 | case 114: |
||
1243 | { |
||
1244 | PIXEL00_22 |
||
1245 | if (Diff(w[2], w[6])) |
||
1246 | { |
||
1247 | PIXEL01_10 |
||
1248 | } |
||
1249 | else |
||
1250 | { |
||
1251 | PIXEL01_70 |
||
1252 | } |
||
1253 | PIXEL10_12 |
||
1254 | if (Diff(w[6], w[8])) |
||
1255 | { |
||
1256 | PIXEL11_10 |
||
1257 | } |
||
1258 | else |
||
1259 | { |
||
1260 | PIXEL11_70 |
||
1261 | } |
||
1262 | break; |
||
1263 | } |
||
1264 | case 89: |
||
1265 | { |
||
1266 | PIXEL00_12 |
||
1267 | PIXEL01_22 |
||
1268 | if (Diff(w[8], w[4])) |
||
1269 | { |
||
1270 | PIXEL10_10 |
||
1271 | } |
||
1272 | else |
||
1273 | { |
||
1274 | PIXEL10_70 |
||
1275 | } |
||
1276 | if (Diff(w[6], w[8])) |
||
1277 | { |
||
1278 | PIXEL11_10 |
||
1279 | } |
||
1280 | else |
||
1281 | { |
||
1282 | PIXEL11_70 |
||
1283 | } |
||
1284 | break; |
||
1285 | } |
||
1286 | case 90: |
||
1287 | { |
||
1288 | if (Diff(w[4], w[2])) |
||
1289 | { |
||
1290 | PIXEL00_10 |
||
1291 | } |
||
1292 | else |
||
1293 | { |
||
1294 | PIXEL00_70 |
||
1295 | } |
||
1296 | if (Diff(w[2], w[6])) |
||
1297 | { |
||
1298 | PIXEL01_10 |
||
1299 | } |
||
1300 | else |
||
1301 | { |
||
1302 | PIXEL01_70 |
||
1303 | } |
||
1304 | if (Diff(w[8], w[4])) |
||
1305 | { |
||
1306 | PIXEL10_10 |
||
1307 | } |
||
1308 | else |
||
1309 | { |
||
1310 | PIXEL10_70 |
||
1311 | } |
||
1312 | if (Diff(w[6], w[8])) |
||
1313 | { |
||
1314 | PIXEL11_10 |
||
1315 | } |
||
1316 | else |
||
1317 | { |
||
1318 | PIXEL11_70 |
||
1319 | } |
||
1320 | break; |
||
1321 | } |
||
1322 | case 55: |
||
1323 | case 23: |
||
1324 | { |
||
1325 | if (Diff(w[2], w[6])) |
||
1326 | { |
||
1327 | PIXEL00_11 |
||
1328 | PIXEL01_0 |
||
1329 | } |
||
1330 | else |
||
1331 | { |
||
1332 | PIXEL00_60 |
||
1333 | PIXEL01_90 |
||
1334 | } |
||
1335 | PIXEL10_20 |
||
1336 | PIXEL11_21 |
||
1337 | break; |
||
1338 | } |
||
1339 | case 182: |
||
1340 | case 150: |
||
1341 | { |
||
1342 | PIXEL00_22 |
||
1343 | if (Diff(w[2], w[6])) |
||
1344 | { |
||
1345 | PIXEL01_0 |
||
1346 | PIXEL11_12 |
||
1347 | } |
||
1348 | else |
||
1349 | { |
||
1350 | PIXEL01_90 |
||
1351 | PIXEL11_61 |
||
1352 | } |
||
1353 | PIXEL10_20 |
||
1354 | break; |
||
1355 | } |
||
1356 | case 213: |
||
1357 | case 212: |
||
1358 | { |
||
1359 | PIXEL00_20 |
||
1360 | if (Diff(w[6], w[8])) |
||
1361 | { |
||
1362 | PIXEL01_11 |
||
1363 | PIXEL11_0 |
||
1364 | } |
||
1365 | else |
||
1366 | { |
||
1367 | PIXEL01_60 |
||
1368 | PIXEL11_90 |
||
1369 | } |
||
1370 | PIXEL10_21 |
||
1371 | break; |
||
1372 | } |
||
1373 | case 241: |
||
1374 | case 240: |
||
1375 | { |
||
1376 | PIXEL00_20 |
||
1377 | PIXEL01_22 |
||
1378 | if (Diff(w[6], w[8])) |
||
1379 | { |
||
1380 | PIXEL10_12 |
||
1381 | PIXEL11_0 |
||
1382 | } |
||
1383 | else |
||
1384 | { |
||
1385 | PIXEL10_61 |
||
1386 | PIXEL11_90 |
||
1387 | } |
||
1388 | break; |
||
1389 | } |
||
1390 | case 236: |
||
1391 | case 232: |
||
1392 | { |
||
1393 | PIXEL00_21 |
||
1394 | PIXEL01_20 |
||
1395 | if (Diff(w[8], w[4])) |
||
1396 | { |
||
1397 | PIXEL10_0 |
||
1398 | PIXEL11_11 |
||
1399 | } |
||
1400 | else |
||
1401 | { |
||
1402 | PIXEL10_90 |
||
1403 | PIXEL11_60 |
||
1404 | } |
||
1405 | break; |
||
1406 | } |
||
1407 | case 109: |
||
1408 | case 105: |
||
1409 | { |
||
1410 | if (Diff(w[8], w[4])) |
||
1411 | { |
||
1412 | PIXEL00_12 |
||
1413 | PIXEL10_0 |
||
1414 | } |
||
1415 | else |
||
1416 | { |
||
1417 | PIXEL00_61 |
||
1418 | PIXEL10_90 |
||
1419 | } |
||
1420 | PIXEL01_20 |
||
1421 | PIXEL11_22 |
||
1422 | break; |
||
1423 | } |
||
1424 | case 171: |
||
1425 | case 43: |
||
1426 | { |
||
1427 | if (Diff(w[4], w[2])) |
||
1428 | { |
||
1429 | PIXEL00_0 |
||
1430 | PIXEL10_11 |
||
1431 | } |
||
1432 | else |
||
1433 | { |
||
1434 | PIXEL00_90 |
||
1435 | PIXEL10_60 |
||
1436 | } |
||
1437 | PIXEL01_21 |
||
1438 | PIXEL11_20 |
||
1439 | break; |
||
1440 | } |
||
1441 | case 143: |
||
1442 | case 15: |
||
1443 | { |
||
1444 | if (Diff(w[4], w[2])) |
||
1445 | { |
||
1446 | PIXEL00_0 |
||
1447 | PIXEL01_12 |
||
1448 | } |
||
1449 | else |
||
1450 | { |
||
1451 | PIXEL00_90 |
||
1452 | PIXEL01_61 |
||
1453 | } |
||
1454 | PIXEL10_22 |
||
1455 | PIXEL11_20 |
||
1456 | break; |
||
1457 | } |
||
1458 | case 124: |
||
1459 | { |
||
1460 | PIXEL00_21 |
||
1461 | PIXEL01_11 |
||
1462 | if (Diff(w[8], w[4])) |
||
1463 | { |
||
1464 | PIXEL10_0 |
||
1465 | } |
||
1466 | else |
||
1467 | { |
||
1468 | PIXEL10_20 |
||
1469 | } |
||
1470 | PIXEL11_10 |
||
1471 | break; |
||
1472 | } |
||
1473 | case 203: |
||
1474 | { |
||
1475 | if (Diff(w[4], w[2])) |
||
1476 | { |
||
1477 | PIXEL00_0 |
||
1478 | } |
||
1479 | else |
||
1480 | { |
||
1481 | PIXEL00_20 |
||
1482 | } |
||
1483 | PIXEL01_21 |
||
1484 | PIXEL10_10 |
||
1485 | PIXEL11_11 |
||
1486 | break; |
||
1487 | } |
||
1488 | case 62: |
||
1489 | { |
||
1490 | PIXEL00_10 |
||
1491 | if (Diff(w[2], w[6])) |
||
1492 | { |
||
1493 | PIXEL01_0 |
||
1494 | } |
||
1495 | else |
||
1496 | { |
||
1497 | PIXEL01_20 |
||
1498 | } |
||
1499 | PIXEL10_11 |
||
1500 | PIXEL11_21 |
||
1501 | break; |
||
1502 | } |
||
1503 | case 211: |
||
1504 | { |
||
1505 | PIXEL00_11 |
||
1506 | PIXEL01_10 |
||
1507 | PIXEL10_21 |
||
1508 | if (Diff(w[6], w[8])) |
||
1509 | { |
||
1510 | PIXEL11_0 |
||
1511 | } |
||
1512 | else |
||
1513 | { |
||
1514 | PIXEL11_20 |
||
1515 | } |
||
1516 | break; |
||
1517 | } |
||
1518 | case 118: |
||
1519 | { |
||
1520 | PIXEL00_22 |
||
1521 | if (Diff(w[2], w[6])) |
||
1522 | { |
||
1523 | PIXEL01_0 |
||
1524 | } |
||
1525 | else |
||
1526 | { |
||
1527 | PIXEL01_20 |
||
1528 | } |
||
1529 | PIXEL10_12 |
||
1530 | PIXEL11_10 |
||
1531 | break; |
||
1532 | } |
||
1533 | case 217: |
||
1534 | { |
||
1535 | PIXEL00_12 |
||
1536 | PIXEL01_22 |
||
1537 | PIXEL10_10 |
||
1538 | if (Diff(w[6], w[8])) |
||
1539 | { |
||
1540 | PIXEL11_0 |
||
1541 | } |
||
1542 | else |
||
1543 | { |
||
1544 | PIXEL11_20 |
||
1545 | } |
||
1546 | break; |
||
1547 | } |
||
1548 | case 110: |
||
1549 | { |
||
1550 | PIXEL00_10 |
||
1551 | PIXEL01_12 |
||
1552 | if (Diff(w[8], w[4])) |
||
1553 | { |
||
1554 | PIXEL10_0 |
||
1555 | } |
||
1556 | else |
||
1557 | { |
||
1558 | PIXEL10_20 |
||
1559 | } |
||
1560 | PIXEL11_22 |
||
1561 | break; |
||
1562 | } |
||
1563 | case 155: |
||
1564 | { |
||
1565 | if (Diff(w[4], w[2])) |
||
1566 | { |
||
1567 | PIXEL00_0 |
||
1568 | } |
||
1569 | else |
||
1570 | { |
||
1571 | PIXEL00_20 |
||
1572 | } |
||
1573 | PIXEL01_10 |
||
1574 | PIXEL10_22 |
||
1575 | PIXEL11_12 |
||
1576 | break; |
||
1577 | } |
||
1578 | case 188: |
||
1579 | { |
||
1580 | PIXEL00_21 |
||
1581 | PIXEL01_11 |
||
1582 | PIXEL10_11 |
||
1583 | PIXEL11_12 |
||
1584 | break; |
||
1585 | } |
||
1586 | case 185: |
||
1587 | { |
||
1588 | PIXEL00_12 |
||
1589 | PIXEL01_22 |
||
1590 | PIXEL10_11 |
||
1591 | PIXEL11_12 |
||
1592 | break; |
||
1593 | } |
||
1594 | case 61: |
||
1595 | { |
||
1596 | PIXEL00_12 |
||
1597 | PIXEL01_11 |
||
1598 | PIXEL10_11 |
||
1599 | PIXEL11_21 |
||
1600 | break; |
||
1601 | } |
||
1602 | case 157: |
||
1603 | { |
||
1604 | PIXEL00_12 |
||
1605 | PIXEL01_11 |
||
1606 | PIXEL10_22 |
||
1607 | PIXEL11_12 |
||
1608 | break; |
||
1609 | } |
||
1610 | case 103: |
||
1611 | { |
||
1612 | PIXEL00_11 |
||
1613 | PIXEL01_12 |
||
1614 | PIXEL10_12 |
||
1615 | PIXEL11_22 |
||
1616 | break; |
||
1617 | } |
||
1618 | case 227: |
||
1619 | { |
||
1620 | PIXEL00_11 |
||
1621 | PIXEL01_21 |
||
1622 | PIXEL10_12 |
||
1623 | PIXEL11_11 |
||
1624 | break; |
||
1625 | } |
||
1626 | case 230: |
||
1627 | { |
||
1628 | PIXEL00_22 |
||
1629 | PIXEL01_12 |
||
1630 | PIXEL10_12 |
||
1631 | PIXEL11_11 |
||
1632 | break; |
||
1633 | } |
||
1634 | case 199: |
||
1635 | { |
||
1636 | PIXEL00_11 |
||
1637 | PIXEL01_12 |
||
1638 | PIXEL10_21 |
||
1639 | PIXEL11_11 |
||
1640 | break; |
||
1641 | } |
||
1642 | case 220: |
||
1643 | { |
||
1644 | PIXEL00_21 |
||
1645 | PIXEL01_11 |
||
1646 | if (Diff(w[8], w[4])) |
||
1647 | { |
||
1648 | PIXEL10_10 |
||
1649 | } |
||
1650 | else |
||
1651 | { |
||
1652 | PIXEL10_70 |
||
1653 | } |
||
1654 | if (Diff(w[6], w[8])) |
||
1655 | { |
||
1656 | PIXEL11_0 |
||
1657 | } |
||
1658 | else |
||
1659 | { |
||
1660 | PIXEL11_20 |
||
1661 | } |
||
1662 | break; |
||
1663 | } |
||
1664 | case 158: |
||
1665 | { |
||
1666 | if (Diff(w[4], w[2])) |
||
1667 | { |
||
1668 | PIXEL00_10 |
||
1669 | } |
||
1670 | else |
||
1671 | { |
||
1672 | PIXEL00_70 |
||
1673 | } |
||
1674 | if (Diff(w[2], w[6])) |
||
1675 | { |
||
1676 | PIXEL01_0 |
||
1677 | } |
||
1678 | else |
||
1679 | { |
||
1680 | PIXEL01_20 |
||
1681 | } |
||
1682 | PIXEL10_22 |
||
1683 | PIXEL11_12 |
||
1684 | break; |
||
1685 | } |
||
1686 | case 234: |
||
1687 | { |
||
1688 | if (Diff(w[4], w[2])) |
||
1689 | { |
||
1690 | PIXEL00_10 |
||
1691 | } |
||
1692 | else |
||
1693 | { |
||
1694 | PIXEL00_70 |
||
1695 | } |
||
1696 | PIXEL01_21 |
||
1697 | if (Diff(w[8], w[4])) |
||
1698 | { |
||
1699 | PIXEL10_0 |
||
1700 | } |
||
1701 | else |
||
1702 | { |
||
1703 | PIXEL10_20 |
||
1704 | } |
||
1705 | PIXEL11_11 |
||
1706 | break; |
||
1707 | } |
||
1708 | case 242: |
||
1709 | { |
||
1710 | PIXEL00_22 |
||
1711 | if (Diff(w[2], w[6])) |
||
1712 | { |
||
1713 | PIXEL01_10 |
||
1714 | } |
||
1715 | else |
||
1716 | { |
||
1717 | PIXEL01_70 |
||
1718 | } |
||
1719 | PIXEL10_12 |
||
1720 | if (Diff(w[6], w[8])) |
||
1721 | { |
||
1722 | PIXEL11_0 |
||
1723 | } |
||
1724 | else |
||
1725 | { |
||
1726 | PIXEL11_20 |
||
1727 | } |
||
1728 | break; |
||
1729 | } |
||
1730 | case 59: |
||
1731 | { |
||
1732 | if (Diff(w[4], w[2])) |
||
1733 | { |
||
1734 | PIXEL00_0 |
||
1735 | } |
||
1736 | else |
||
1737 | { |
||
1738 | PIXEL00_20 |
||
1739 | } |
||
1740 | if (Diff(w[2], w[6])) |
||
1741 | { |
||
1742 | PIXEL01_10 |
||
1743 | } |
||
1744 | else |
||
1745 | { |
||
1746 | PIXEL01_70 |
||
1747 | } |
||
1748 | PIXEL10_11 |
||
1749 | PIXEL11_21 |
||
1750 | break; |
||
1751 | } |
||
1752 | case 121: |
||
1753 | { |
||
1754 | PIXEL00_12 |
||
1755 | PIXEL01_22 |
||
1756 | if (Diff(w[8], w[4])) |
||
1757 | { |
||
1758 | PIXEL10_0 |
||
1759 | } |
||
1760 | else |
||
1761 | { |
||
1762 | PIXEL10_20 |
||
1763 | } |
||
1764 | if (Diff(w[6], w[8])) |
||
1765 | { |
||
1766 | PIXEL11_10 |
||
1767 | } |
||
1768 | else |
||
1769 | { |
||
1770 | PIXEL11_70 |
||
1771 | } |
||
1772 | break; |
||
1773 | } |
||
1774 | case 87: |
||
1775 | { |
||
1776 | PIXEL00_11 |
||
1777 | if (Diff(w[2], w[6])) |
||
1778 | { |
||
1779 | PIXEL01_0 |
||
1780 | } |
||
1781 | else |
||
1782 | { |
||
1783 | PIXEL01_20 |
||
1784 | } |
||
1785 | PIXEL10_21 |
||
1786 | if (Diff(w[6], w[8])) |
||
1787 | { |
||
1788 | PIXEL11_10 |
||
1789 | } |
||
1790 | else |
||
1791 | { |
||
1792 | PIXEL11_70 |
||
1793 | } |
||
1794 | break; |
||
1795 | } |
||
1796 | case 79: |
||
1797 | { |
||
1798 | if (Diff(w[4], w[2])) |
||
1799 | { |
||
1800 | PIXEL00_0 |
||
1801 | } |
||
1802 | else |
||
1803 | { |
||
1804 | PIXEL00_20 |
||
1805 | } |
||
1806 | PIXEL01_12 |
||
1807 | if (Diff(w[8], w[4])) |
||
1808 | { |
||
1809 | PIXEL10_10 |
||
1810 | } |
||
1811 | else |
||
1812 | { |
||
1813 | PIXEL10_70 |
||
1814 | } |
||
1815 | PIXEL11_22 |
||
1816 | break; |
||
1817 | } |
||
1818 | case 122: |
||
1819 | { |
||
1820 | if (Diff(w[4], w[2])) |
||
1821 | { |
||
1822 | PIXEL00_10 |
||
1823 | } |
||
1824 | else |
||
1825 | { |
||
1826 | PIXEL00_70 |
||
1827 | } |
||
1828 | if (Diff(w[2], w[6])) |
||
1829 | { |
||
1830 | PIXEL01_10 |
||
1831 | } |
||
1832 | else |
||
1833 | { |
||
1834 | PIXEL01_70 |
||
1835 | } |
||
1836 | if (Diff(w[8], w[4])) |
||
1837 | { |
||
1838 | PIXEL10_0 |
||
1839 | } |
||
1840 | else |
||
1841 | { |
||
1842 | PIXEL10_20 |
||
1843 | } |
||
1844 | if (Diff(w[6], w[8])) |
||
1845 | { |
||
1846 | PIXEL11_10 |
||
1847 | } |
||
1848 | else |
||
1849 | { |
||
1850 | PIXEL11_70 |
||
1851 | } |
||
1852 | break; |
||
1853 | } |
||
1854 | case 94: |
||
1855 | { |
||
1856 | if (Diff(w[4], w[2])) |
||
1857 | { |
||
1858 | PIXEL00_10 |
||
1859 | } |
||
1860 | else |
||
1861 | { |
||
1862 | PIXEL00_70 |
||
1863 | } |
||
1864 | if (Diff(w[2], w[6])) |
||
1865 | { |
||
1866 | PIXEL01_0 |
||
1867 | } |
||
1868 | else |
||
1869 | { |
||
1870 | PIXEL01_20 |
||
1871 | } |
||
1872 | if (Diff(w[8], w[4])) |
||
1873 | { |
||
1874 | PIXEL10_10 |
||
1875 | } |
||
1876 | else |
||
1877 | { |
||
1878 | PIXEL10_70 |
||
1879 | } |
||
1880 | if (Diff(w[6], w[8])) |
||
1881 | { |
||
1882 | PIXEL11_10 |
||
1883 | } |
||
1884 | else |
||
1885 | { |
||
1886 | PIXEL11_70 |
||
1887 | } |
||
1888 | break; |
||
1889 | } |
||
1890 | case 218: |
||
1891 | { |
||
1892 | if (Diff(w[4], w[2])) |
||
1893 | { |
||
1894 | PIXEL00_10 |
||
1895 | } |
||
1896 | else |
||
1897 | { |
||
1898 | PIXEL00_70 |
||
1899 | } |
||
1900 | if (Diff(w[2], w[6])) |
||
1901 | { |
||
1902 | PIXEL01_10 |
||
1903 | } |
||
1904 | else |
||
1905 | { |
||
1906 | PIXEL01_70 |
||
1907 | } |
||
1908 | if (Diff(w[8], w[4])) |
||
1909 | { |
||
1910 | PIXEL10_10 |
||
1911 | } |
||
1912 | else |
||
1913 | { |
||
1914 | PIXEL10_70 |
||
1915 | } |
||
1916 | if (Diff(w[6], w[8])) |
||
1917 | { |
||
1918 | PIXEL11_0 |
||
1919 | } |
||
1920 | else |
||
1921 | { |
||
1922 | PIXEL11_20 |
||
1923 | } |
||
1924 | break; |
||
1925 | } |
||
1926 | case 91: |
||
1927 | { |
||
1928 | if (Diff(w[4], w[2])) |
||
1929 | { |
||
1930 | PIXEL00_0 |
||
1931 | } |
||
1932 | else |
||
1933 | { |
||
1934 | PIXEL00_20 |
||
1935 | } |
||
1936 | if (Diff(w[2], w[6])) |
||
1937 | { |
||
1938 | PIXEL01_10 |
||
1939 | } |
||
1940 | else |
||
1941 | { |
||
1942 | PIXEL01_70 |
||
1943 | } |
||
1944 | if (Diff(w[8], w[4])) |
||
1945 | { |
||
1946 | PIXEL10_10 |
||
1947 | } |
||
1948 | else |
||
1949 | { |
||
1950 | PIXEL10_70 |
||
1951 | } |
||
1952 | if (Diff(w[6], w[8])) |
||
1953 | { |
||
1954 | PIXEL11_10 |
||
1955 | } |
||
1956 | else |
||
1957 | { |
||
1958 | PIXEL11_70 |
||
1959 | } |
||
1960 | break; |
||
1961 | } |
||
1962 | case 229: |
||
1963 | { |
||
1964 | PIXEL00_20 |
||
1965 | PIXEL01_20 |
||
1966 | PIXEL10_12 |
||
1967 | PIXEL11_11 |
||
1968 | break; |
||
1969 | } |
||
1970 | case 167: |
||
1971 | { |
||
1972 | PIXEL00_11 |
||
1973 | PIXEL01_12 |
||
1974 | PIXEL10_20 |
||
1975 | PIXEL11_20 |
||
1976 | break; |
||
1977 | } |
||
1978 | case 173: |
||
1979 | { |
||
1980 | PIXEL00_12 |
||
1981 | PIXEL01_20 |
||
1982 | PIXEL10_11 |
||
1983 | PIXEL11_20 |
||
1984 | break; |
||
1985 | } |
||
1986 | case 181: |
||
1987 | { |
||
1988 | PIXEL00_20 |
||
1989 | PIXEL01_11 |
||
1990 | PIXEL10_20 |
||
1991 | PIXEL11_12 |
||
1992 | break; |
||
1993 | } |
||
1994 | case 186: |
||
1995 | { |
||
1996 | if (Diff(w[4], w[2])) |
||
1997 | { |
||
1998 | PIXEL00_10 |
||
1999 | } |
||
2000 | else |
||
2001 | { |
||
2002 | PIXEL00_70 |
||
2003 | } |
||
2004 | if (Diff(w[2], w[6])) |
||
2005 | { |
||
2006 | PIXEL01_10 |
||
2007 | } |
||
2008 | else |
||
2009 | { |
||
2010 | PIXEL01_70 |
||
2011 | } |
||
2012 | PIXEL10_11 |
||
2013 | PIXEL11_12 |
||
2014 | break; |
||
2015 | } |
||
2016 | case 115: |
||
2017 | { |
||
2018 | PIXEL00_11 |
||
2019 | if (Diff(w[2], w[6])) |
||
2020 | { |
||
2021 | PIXEL01_10 |
||
2022 | } |
||
2023 | else |
||
2024 | { |
||
2025 | PIXEL01_70 |
||
2026 | } |
||
2027 | PIXEL10_12 |
||
2028 | if (Diff(w[6], w[8])) |
||
2029 | { |
||
2030 | PIXEL11_10 |
||
2031 | } |
||
2032 | else |
||
2033 | { |
||
2034 | PIXEL11_70 |
||
2035 | } |
||
2036 | break; |
||
2037 | } |
||
2038 | case 93: |
||
2039 | { |
||
2040 | PIXEL00_12 |
||
2041 | PIXEL01_11 |
||
2042 | if (Diff(w[8], w[4])) |
||
2043 | { |
||
2044 | PIXEL10_10 |
||
2045 | } |
||
2046 | else |
||
2047 | { |
||
2048 | PIXEL10_70 |
||
2049 | } |
||
2050 | if (Diff(w[6], w[8])) |
||
2051 | { |
||
2052 | PIXEL11_10 |
||
2053 | } |
||
2054 | else |
||
2055 | { |
||
2056 | PIXEL11_70 |
||
2057 | } |
||
2058 | break; |
||
2059 | } |
||
2060 | case 206: |
||
2061 | { |
||
2062 | if (Diff(w[4], w[2])) |
||
2063 | { |
||
2064 | PIXEL00_10 |
||
2065 | } |
||
2066 | else |
||
2067 | { |
||
2068 | PIXEL00_70 |
||
2069 | } |
||
2070 | PIXEL01_12 |
||
2071 | if (Diff(w[8], w[4])) |
||
2072 | { |
||
2073 | PIXEL10_10 |
||
2074 | } |
||
2075 | else |
||
2076 | { |
||
2077 | PIXEL10_70 |
||
2078 | } |
||
2079 | PIXEL11_11 |
||
2080 | break; |
||
2081 | } |
||
2082 | case 205: |
||
2083 | case 201: |
||
2084 | { |
||
2085 | PIXEL00_12 |
||
2086 | PIXEL01_20 |
||
2087 | if (Diff(w[8], w[4])) |
||
2088 | { |
||
2089 | PIXEL10_10 |
||
2090 | } |
||
2091 | else |
||
2092 | { |
||
2093 | PIXEL10_70 |
||
2094 | } |
||
2095 | PIXEL11_11 |
||
2096 | break; |
||
2097 | } |
||
2098 | case 174: |
||
2099 | case 46: |
||
2100 | { |
||
2101 | if (Diff(w[4], w[2])) |
||
2102 | { |
||
2103 | PIXEL00_10 |
||
2104 | } |
||
2105 | else |
||
2106 | { |
||
2107 | PIXEL00_70 |
||
2108 | } |
||
2109 | PIXEL01_12 |
||
2110 | PIXEL10_11 |
||
2111 | PIXEL11_20 |
||
2112 | break; |
||
2113 | } |
||
2114 | case 179: |
||
2115 | case 147: |
||
2116 | { |
||
2117 | PIXEL00_11 |
||
2118 | if (Diff(w[2], w[6])) |
||
2119 | { |
||
2120 | PIXEL01_10 |
||
2121 | } |
||
2122 | else |
||
2123 | { |
||
2124 | PIXEL01_70 |
||
2125 | } |
||
2126 | PIXEL10_20 |
||
2127 | PIXEL11_12 |
||
2128 | break; |
||
2129 | } |
||
2130 | case 117: |
||
2131 | case 116: |
||
2132 | { |
||
2133 | PIXEL00_20 |
||
2134 | PIXEL01_11 |
||
2135 | PIXEL10_12 |
||
2136 | if (Diff(w[6], w[8])) |
||
2137 | { |
||
2138 | PIXEL11_10 |
||
2139 | } |
||
2140 | else |
||
2141 | { |
||
2142 | PIXEL11_70 |
||
2143 | } |
||
2144 | break; |
||
2145 | } |
||
2146 | case 189: |
||
2147 | { |
||
2148 | PIXEL00_12 |
||
2149 | PIXEL01_11 |
||
2150 | PIXEL10_11 |
||
2151 | PIXEL11_12 |
||
2152 | break; |
||
2153 | } |
||
2154 | case 231: |
||
2155 | { |
||
2156 | PIXEL00_11 |
||
2157 | PIXEL01_12 |
||
2158 | PIXEL10_12 |
||
2159 | PIXEL11_11 |
||
2160 | break; |
||
2161 | } |
||
2162 | case 126: |
||
2163 | { |
||
2164 | PIXEL00_10 |
||
2165 | if (Diff(w[2], w[6])) |
||
2166 | { |
||
2167 | PIXEL01_0 |
||
2168 | } |
||
2169 | else |
||
2170 | { |
||
2171 | PIXEL01_20 |
||
2172 | } |
||
2173 | if (Diff(w[8], w[4])) |
||
2174 | { |
||
2175 | PIXEL10_0 |
||
2176 | } |
||
2177 | else |
||
2178 | { |
||
2179 | PIXEL10_20 |
||
2180 | } |
||
2181 | PIXEL11_10 |
||
2182 | break; |
||
2183 | } |
||
2184 | case 219: |
||
2185 | { |
||
2186 | if (Diff(w[4], w[2])) |
||
2187 | { |
||
2188 | PIXEL00_0 |
||
2189 | } |
||
2190 | else |
||
2191 | { |
||
2192 | PIXEL00_20 |
||
2193 | } |
||
2194 | PIXEL01_10 |
||
2195 | PIXEL10_10 |
||
2196 | if (Diff(w[6], w[8])) |
||
2197 | { |
||
2198 | PIXEL11_0 |
||
2199 | } |
||
2200 | else |
||
2201 | { |
||
2202 | PIXEL11_20 |
||
2203 | } |
||
2204 | break; |
||
2205 | } |
||
2206 | case 125: |
||
2207 | { |
||
2208 | if (Diff(w[8], w[4])) |
||
2209 | { |
||
2210 | PIXEL00_12 |
||
2211 | PIXEL10_0 |
||
2212 | } |
||
2213 | else |
||
2214 | { |
||
2215 | PIXEL00_61 |
||
2216 | PIXEL10_90 |
||
2217 | } |
||
2218 | PIXEL01_11 |
||
2219 | PIXEL11_10 |
||
2220 | break; |
||
2221 | } |
||
2222 | case 221: |
||
2223 | { |
||
2224 | PIXEL00_12 |
||
2225 | if (Diff(w[6], w[8])) |
||
2226 | { |
||
2227 | PIXEL01_11 |
||
2228 | PIXEL11_0 |
||
2229 | } |
||
2230 | else |
||
2231 | { |
||
2232 | PIXEL01_60 |
||
2233 | PIXEL11_90 |
||
2234 | } |
||
2235 | PIXEL10_10 |
||
2236 | break; |
||
2237 | } |
||
2238 | case 207: |
||
2239 | { |
||
2240 | if (Diff(w[4], w[2])) |
||
2241 | { |
||
2242 | PIXEL00_0 |
||
2243 | PIXEL01_12 |
||
2244 | } |
||
2245 | else |
||
2246 | { |
||
2247 | PIXEL00_90 |
||
2248 | PIXEL01_61 |
||
2249 | } |
||
2250 | PIXEL10_10 |
||
2251 | PIXEL11_11 |
||
2252 | break; |
||
2253 | } |
||
2254 | case 238: |
||
2255 | { |
||
2256 | PIXEL00_10 |
||
2257 | PIXEL01_12 |
||
2258 | if (Diff(w[8], w[4])) |
||
2259 | { |
||
2260 | PIXEL10_0 |
||
2261 | PIXEL11_11 |
||
2262 | } |
||
2263 | else |
||
2264 | { |
||
2265 | PIXEL10_90 |
||
2266 | PIXEL11_60 |
||
2267 | } |
||
2268 | break; |
||
2269 | } |
||
2270 | case 190: |
||
2271 | { |
||
2272 | PIXEL00_10 |
||
2273 | if (Diff(w[2], w[6])) |
||
2274 | { |
||
2275 | PIXEL01_0 |
||
2276 | PIXEL11_12 |
||
2277 | } |
||
2278 | else |
||
2279 | { |
||
2280 | PIXEL01_90 |
||
2281 | PIXEL11_61 |
||
2282 | } |
||
2283 | PIXEL10_11 |
||
2284 | break; |
||
2285 | } |
||
2286 | case 187: |
||
2287 | { |
||
2288 | if (Diff(w[4], w[2])) |
||
2289 | { |
||
2290 | PIXEL00_0 |
||
2291 | PIXEL10_11 |
||
2292 | } |
||
2293 | else |
||
2294 | { |
||
2295 | PIXEL00_90 |
||
2296 | PIXEL10_60 |
||
2297 | } |
||
2298 | PIXEL01_10 |
||
2299 | PIXEL11_12 |
||
2300 | break; |
||
2301 | } |
||
2302 | case 243: |
||
2303 | { |
||
2304 | PIXEL00_11 |
||
2305 | PIXEL01_10 |
||
2306 | if (Diff(w[6], w[8])) |
||
2307 | { |
||
2308 | PIXEL10_12 |
||
2309 | PIXEL11_0 |
||
2310 | } |
||
2311 | else |
||
2312 | { |
||
2313 | PIXEL10_61 |
||
2314 | PIXEL11_90 |
||
2315 | } |
||
2316 | break; |
||
2317 | } |
||
2318 | case 119: |
||
2319 | { |
||
2320 | if (Diff(w[2], w[6])) |
||
2321 | { |
||
2322 | PIXEL00_11 |
||
2323 | PIXEL01_0 |
||
2324 | } |
||
2325 | else |
||
2326 | { |
||
2327 | PIXEL00_60 |
||
2328 | PIXEL01_90 |
||
2329 | } |
||
2330 | PIXEL10_12 |
||
2331 | PIXEL11_10 |
||
2332 | break; |
||
2333 | } |
||
2334 | case 237: |
||
2335 | case 233: |
||
2336 | { |
||
2337 | PIXEL00_12 |
||
2338 | PIXEL01_20 |
||
2339 | if (Diff(w[8], w[4])) |
||
2340 | { |
||
2341 | PIXEL10_0 |
||
2342 | } |
||
2343 | else |
||
2344 | { |
||
2345 | PIXEL10_100 |
||
2346 | } |
||
2347 | PIXEL11_11 |
||
2348 | break; |
||
2349 | } |
||
2350 | case 175: |
||
2351 | case 47: |
||
2352 | { |
||
2353 | if (Diff(w[4], w[2])) |
||
2354 | { |
||
2355 | PIXEL00_0 |
||
2356 | } |
||
2357 | else |
||
2358 | { |
||
2359 | PIXEL00_100 |
||
2360 | } |
||
2361 | PIXEL01_12 |
||
2362 | PIXEL10_11 |
||
2363 | PIXEL11_20 |
||
2364 | break; |
||
2365 | } |
||
2366 | case 183: |
||
2367 | case 151: |
||
2368 | { |
||
2369 | PIXEL00_11 |
||
2370 | if (Diff(w[2], w[6])) |
||
2371 | { |
||
2372 | PIXEL01_0 |
||
2373 | } |
||
2374 | else |
||
2375 | { |
||
2376 | PIXEL01_100 |
||
2377 | } |
||
2378 | PIXEL10_20 |
||
2379 | PIXEL11_12 |
||
2380 | break; |
||
2381 | } |
||
2382 | case 245: |
||
2383 | case 244: |
||
2384 | { |
||
2385 | PIXEL00_20 |
||
2386 | PIXEL01_11 |
||
2387 | PIXEL10_12 |
||
2388 | if (Diff(w[6], w[8])) |
||
2389 | { |
||
2390 | PIXEL11_0 |
||
2391 | } |
||
2392 | else |
||
2393 | { |
||
2394 | PIXEL11_100 |
||
2395 | } |
||
2396 | break; |
||
2397 | } |
||
2398 | case 250: |
||
2399 | { |
||
2400 | PIXEL00_10 |
||
2401 | PIXEL01_10 |
||
2402 | if (Diff(w[8], w[4])) |
||
2403 | { |
||
2404 | PIXEL10_0 |
||
2405 | } |
||
2406 | else |
||
2407 | { |
||
2408 | PIXEL10_20 |
||
2409 | } |
||
2410 | if (Diff(w[6], w[8])) |
||
2411 | { |
||
2412 | PIXEL11_0 |
||
2413 | } |
||
2414 | else |
||
2415 | { |
||
2416 | PIXEL11_20 |
||
2417 | } |
||
2418 | break; |
||
2419 | } |
||
2420 | case 123: |
||
2421 | { |
||
2422 | if (Diff(w[4], w[2])) |
||
2423 | { |
||
2424 | PIXEL00_0 |
||
2425 | } |
||
2426 | else |
||
2427 | { |
||
2428 | PIXEL00_20 |
||
2429 | } |
||
2430 | PIXEL01_10 |
||
2431 | if (Diff(w[8], w[4])) |
||
2432 | { |
||
2433 | PIXEL10_0 |
||
2434 | } |
||
2435 | else |
||
2436 | { |
||
2437 | PIXEL10_20 |
||
2438 | } |
||
2439 | PIXEL11_10 |
||
2440 | break; |
||
2441 | } |
||
2442 | case 95: |
||
2443 | { |
||
2444 | if (Diff(w[4], w[2])) |
||
2445 | { |
||
2446 | PIXEL00_0 |
||
2447 | } |
||
2448 | else |
||
2449 | { |
||
2450 | PIXEL00_20 |
||
2451 | } |
||
2452 | if (Diff(w[2], w[6])) |
||
2453 | { |
||
2454 | PIXEL01_0 |
||
2455 | } |
||
2456 | else |
||
2457 | { |
||
2458 | PIXEL01_20 |
||
2459 | } |
||
2460 | PIXEL10_10 |
||
2461 | PIXEL11_10 |
||
2462 | break; |
||
2463 | } |
||
2464 | case 222: |
||
2465 | { |
||
2466 | PIXEL00_10 |
||
2467 | if (Diff(w[2], w[6])) |
||
2468 | { |
||
2469 | PIXEL01_0 |
||
2470 | } |
||
2471 | else |
||
2472 | { |
||
2473 | PIXEL01_20 |
||
2474 | } |
||
2475 | PIXEL10_10 |
||
2476 | if (Diff(w[6], w[8])) |
||
2477 | { |
||
2478 | PIXEL11_0 |
||
2479 | } |
||
2480 | else |
||
2481 | { |
||
2482 | PIXEL11_20 |
||
2483 | } |
||
2484 | break; |
||
2485 | } |
||
2486 | case 252: |
||
2487 | { |
||
2488 | PIXEL00_21 |
||
2489 | PIXEL01_11 |
||
2490 | if (Diff(w[8], w[4])) |
||
2491 | { |
||
2492 | PIXEL10_0 |
||
2493 | } |
||
2494 | else |
||
2495 | { |
||
2496 | PIXEL10_20 |
||
2497 | } |
||
2498 | if (Diff(w[6], w[8])) |
||
2499 | { |
||
2500 | PIXEL11_0 |
||
2501 | } |
||
2502 | else |
||
2503 | { |
||
2504 | PIXEL11_100 |
||
2505 | } |
||
2506 | break; |
||
2507 | } |
||
2508 | case 249: |
||
2509 | { |
||
2510 | PIXEL00_12 |
||
2511 | PIXEL01_22 |
||
2512 | if (Diff(w[8], w[4])) |
||
2513 | { |
||
2514 | PIXEL10_0 |
||
2515 | } |
||
2516 | else |
||
2517 | { |
||
2518 | PIXEL10_100 |
||
2519 | } |
||
2520 | if (Diff(w[6], w[8])) |
||
2521 | { |
||
2522 | PIXEL11_0 |
||
2523 | } |
||
2524 | else |
||
2525 | { |
||
2526 | PIXEL11_20 |
||
2527 | } |
||
2528 | break; |
||
2529 | } |
||
2530 | case 235: |
||
2531 | { |
||
2532 | if (Diff(w[4], w[2])) |
||
2533 | { |
||
2534 | PIXEL00_0 |
||
2535 | } |
||
2536 | else |
||
2537 | { |
||
2538 | PIXEL00_20 |
||
2539 | } |
||
2540 | PIXEL01_21 |
||
2541 | if (Diff(w[8], w[4])) |
||
2542 | { |
||
2543 | PIXEL10_0 |
||
2544 | } |
||
2545 | else |
||
2546 | { |
||
2547 | PIXEL10_100 |
||
2548 | } |
||
2549 | PIXEL11_11 |
||
2550 | break; |
||
2551 | } |
||
2552 | case 111: |
||
2553 | { |
||
2554 | if (Diff(w[4], w[2])) |
||
2555 | { |
||
2556 | PIXEL00_0 |
||
2557 | } |
||
2558 | else |
||
2559 | { |
||
2560 | PIXEL00_100 |
||
2561 | } |
||
2562 | PIXEL01_12 |
||
2563 | if (Diff(w[8], w[4])) |
||
2564 | { |
||
2565 | PIXEL10_0 |
||
2566 | } |
||
2567 | else |
||
2568 | { |
||
2569 | PIXEL10_20 |
||
2570 | } |
||
2571 | PIXEL11_22 |
||
2572 | break; |
||
2573 | } |
||
2574 | case 63: |
||
2575 | { |
||
2576 | if (Diff(w[4], w[2])) |
||
2577 | { |
||
2578 | PIXEL00_0 |
||
2579 | } |
||
2580 | else |
||
2581 | { |
||
2582 | PIXEL00_100 |
||
2583 | } |
||
2584 | if (Diff(w[2], w[6])) |
||
2585 | { |
||
2586 | PIXEL01_0 |
||
2587 | } |
||
2588 | else |
||
2589 | { |
||
2590 | PIXEL01_20 |
||
2591 | } |
||
2592 | PIXEL10_11 |
||
2593 | PIXEL11_21 |
||
2594 | break; |
||
2595 | } |
||
2596 | case 159: |
||
2597 | { |
||
2598 | if (Diff(w[4], w[2])) |
||
2599 | { |
||
2600 | PIXEL00_0 |
||
2601 | } |
||
2602 | else |
||
2603 | { |
||
2604 | PIXEL00_20 |
||
2605 | } |
||
2606 | if (Diff(w[2], w[6])) |
||
2607 | { |
||
2608 | PIXEL01_0 |
||
2609 | } |
||
2610 | else |
||
2611 | { |
||
2612 | PIXEL01_100 |
||
2613 | } |
||
2614 | PIXEL10_22 |
||
2615 | PIXEL11_12 |
||
2616 | break; |
||
2617 | } |
||
2618 | case 215: |
||
2619 | { |
||
2620 | PIXEL00_11 |
||
2621 | if (Diff(w[2], w[6])) |
||
2622 | { |
||
2623 | PIXEL01_0 |
||
2624 | } |
||
2625 | else |
||
2626 | { |
||
2627 | PIXEL01_100 |
||
2628 | } |
||
2629 | PIXEL10_21 |
||
2630 | if (Diff(w[6], w[8])) |
||
2631 | { |
||
2632 | PIXEL11_0 |
||
2633 | } |
||
2634 | else |
||
2635 | { |
||
2636 | PIXEL11_20 |
||
2637 | } |
||
2638 | break; |
||
2639 | } |
||
2640 | case 246: |
||
2641 | { |
||
2642 | PIXEL00_22 |
||
2643 | if (Diff(w[2], w[6])) |
||
2644 | { |
||
2645 | PIXEL01_0 |
||
2646 | } |
||
2647 | else |
||
2648 | { |
||
2649 | PIXEL01_20 |
||
2650 | } |
||
2651 | PIXEL10_12 |
||
2652 | if (Diff(w[6], w[8])) |
||
2653 | { |
||
2654 | PIXEL11_0 |
||
2655 | } |
||
2656 | else |
||
2657 | { |
||
2658 | PIXEL11_100 |
||
2659 | } |
||
2660 | break; |
||
2661 | } |
||
2662 | case 254: |
||
2663 | { |
||
2664 | PIXEL00_10 |
||
2665 | if (Diff(w[2], w[6])) |
||
2666 | { |
||
2667 | PIXEL01_0 |
||
2668 | } |
||
2669 | else |
||
2670 | { |
||
2671 | PIXEL01_20 |
||
2672 | } |
||
2673 | if (Diff(w[8], w[4])) |
||
2674 | { |
||
2675 | PIXEL10_0 |
||
2676 | } |
||
2677 | else |
||
2678 | { |
||
2679 | PIXEL10_20 |
||
2680 | } |
||
2681 | if (Diff(w[6], w[8])) |
||
2682 | { |
||
2683 | PIXEL11_0 |
||
2684 | } |
||
2685 | else |
||
2686 | { |
||
2687 | PIXEL11_100 |
||
2688 | } |
||
2689 | break; |
||
2690 | } |
||
2691 | case 253: |
||
2692 | { |
||
2693 | PIXEL00_12 |
||
2694 | PIXEL01_11 |
||
2695 | if (Diff(w[8], w[4])) |
||
2696 | { |
||
2697 | PIXEL10_0 |
||
2698 | } |
||
2699 | else |
||
2700 | { |
||
2701 | PIXEL10_100 |
||
2702 | } |
||
2703 | if (Diff(w[6], w[8])) |
||
2704 | { |
||
2705 | PIXEL11_0 |
||
2706 | } |
||
2707 | else |
||
2708 | { |
||
2709 | PIXEL11_100 |
||
2710 | } |
||
2711 | break; |
||
2712 | } |
||
2713 | case 251: |
||
2714 | { |
||
2715 | if (Diff(w[4], w[2])) |
||
2716 | { |
||
2717 | PIXEL00_0 |
||
2718 | } |
||
2719 | else |
||
2720 | { |
||
2721 | PIXEL00_20 |
||
2722 | } |
||
2723 | PIXEL01_10 |
||
2724 | if (Diff(w[8], w[4])) |
||
2725 | { |
||
2726 | PIXEL10_0 |
||
2727 | } |
||
2728 | else |
||
2729 | { |
||
2730 | PIXEL10_100 |
||
2731 | } |
||
2732 | if (Diff(w[6], w[8])) |
||
2733 | { |
||
2734 | PIXEL11_0 |
||
2735 | } |
||
2736 | else |
||
2737 | { |
||
2738 | PIXEL11_20 |
||
2739 | } |
||
2740 | break; |
||
2741 | } |
||
2742 | case 239: |
||
2743 | { |
||
2744 | if (Diff(w[4], w[2])) |
||
2745 | { |
||
2746 | PIXEL00_0 |
||
2747 | } |
||
2748 | else |
||
2749 | { |
||
2750 | PIXEL00_100 |
||
2751 | } |
||
2752 | PIXEL01_12 |
||
2753 | if (Diff(w[8], w[4])) |
||
2754 | { |
||
2755 | PIXEL10_0 |
||
2756 | } |
||
2757 | else |
||
2758 | { |
||
2759 | PIXEL10_100 |
||
2760 | } |
||
2761 | PIXEL11_11 |
||
2762 | break; |
||
2763 | } |
||
2764 | case 127: |
||
2765 | { |
||
2766 | if (Diff(w[4], w[2])) |
||
2767 | { |
||
2768 | PIXEL00_0 |
||
2769 | } |
||
2770 | else |
||
2771 | { |
||
2772 | PIXEL00_100 |
||
2773 | } |
||
2774 | if (Diff(w[2], w[6])) |
||
2775 | { |
||
2776 | PIXEL01_0 |
||
2777 | } |
||
2778 | else |
||
2779 | { |
||
2780 | PIXEL01_20 |
||
2781 | } |
||
2782 | if (Diff(w[8], w[4])) |
||
2783 | { |
||
2784 | PIXEL10_0 |
||
2785 | } |
||
2786 | else |
||
2787 | { |
||
2788 | PIXEL10_20 |
||
2789 | } |
||
2790 | PIXEL11_10 |
||
2791 | break; |
||
2792 | } |
||
2793 | case 191: |
||
2794 | { |
||
2795 | if (Diff(w[4], w[2])) |
||
2796 | { |
||
2797 | PIXEL00_0 |
||
2798 | } |
||
2799 | else |
||
2800 | { |
||
2801 | PIXEL00_100 |
||
2802 | } |
||
2803 | if (Diff(w[2], w[6])) |
||
2804 | { |
||
2805 | PIXEL01_0 |
||
2806 | } |
||
2807 | else |
||
2808 | { |
||
2809 | PIXEL01_100 |
||
2810 | } |
||
2811 | PIXEL10_11 |
||
2812 | PIXEL11_12 |
||
2813 | break; |
||
2814 | } |
||
2815 | case 223: |
||
2816 | { |
||
2817 | if (Diff(w[4], w[2])) |
||
2818 | { |
||
2819 | PIXEL00_0 |
||
2820 | } |
||
2821 | else |
||
2822 | { |
||
2823 | PIXEL00_20 |
||
2824 | } |
||
2825 | if (Diff(w[2], w[6])) |
||
2826 | { |
||
2827 | PIXEL01_0 |
||
2828 | } |
||
2829 | else |
||
2830 | { |
||
2831 | PIXEL01_100 |
||
2832 | } |
||
2833 | PIXEL10_10 |
||
2834 | if (Diff(w[6], w[8])) |
||
2835 | { |
||
2836 | PIXEL11_0 |
||
2837 | } |
||
2838 | else |
||
2839 | { |
||
2840 | PIXEL11_20 |
||
2841 | } |
||
2842 | break; |
||
2843 | } |
||
2844 | case 247: |
||
2845 | { |
||
2846 | PIXEL00_11 |
||
2847 | if (Diff(w[2], w[6])) |
||
2848 | { |
||
2849 | PIXEL01_0 |
||
2850 | } |
||
2851 | else |
||
2852 | { |
||
2853 | PIXEL01_100 |
||
2854 | } |
||
2855 | PIXEL10_12 |
||
2856 | if (Diff(w[6], w[8])) |
||
2857 | { |
||
2858 | PIXEL11_0 |
||
2859 | } |
||
2860 | else |
||
2861 | { |
||
2862 | PIXEL11_100 |
||
2863 | } |
||
2864 | break; |
||
2865 | } |
||
2866 | case 255: |
||
2867 | { |
||
2868 | if (Diff(w[4], w[2])) |
||
2869 | { |
||
2870 | PIXEL00_0 |
||
2871 | } |
||
2872 | else |
||
2873 | { |
||
2874 | PIXEL00_100 |
||
2875 | } |
||
2876 | if (Diff(w[2], w[6])) |
||
2877 | { |
||
2878 | PIXEL01_0 |
||
2879 | } |
||
2880 | else |
||
2881 | { |
||
2882 | PIXEL01_100 |
||
2883 | } |
||
2884 | if (Diff(w[8], w[4])) |
||
2885 | { |
||
2886 | PIXEL10_0 |
||
2887 | } |
||
2888 | else |
||
2889 | { |
||
2890 | PIXEL10_100 |
||
2891 | } |
||
2892 | if (Diff(w[6], w[8])) |
||
2893 | { |
||
2894 | PIXEL11_0 |
||
2895 | } |
||
2896 | else |
||
2897 | { |
||
2898 | PIXEL11_100 |
||
2899 | } |
||
2900 | break; |
||
2901 | } |
||
2902 | } |
||
2903 | sp++; |
||
2904 | dp += 2; |
||
2905 | } |
||
2906 | |||
2907 | sRowP += srb; |
||
2908 | sp = (uint32_t *) sRowP; |
||
2909 | |||
2910 | dRowP += drb * 2; |
||
2911 | dp = (uint32_t *) dRowP; |
||
2912 | } |
||
2913 | } |
||
2914 | |||
2915 | HQX_API void HQX_CALLCONV hq2x_32 (uint32_t *src_pixels, uint32_t *dest_pixels, int src_width, int src_height) |
||
2916 | { |
||
2917 | if (!is_hqx_initialized) |
||
2918 | hqxInit(); |
||
2919 | |||
2920 | hq2x_32_rb(src_pixels, src_width * 4, dest_pixels, src_width * 4 * 2, src_width, src_height); |
||
2921 | } |
||
2922 | |||
2923 | #undef PIXEL00_0 |
||
2924 | #undef PIXEL00_10 |
||
2925 | #undef PIXEL00_11 |
||
2926 | #undef PIXEL00_12 |
||
2927 | #undef PIXEL00_20 |
||
2928 | #undef PIXEL00_21 |
||
2929 | #undef PIXEL00_22 |
||
2930 | #undef PIXEL00_60 |
||
2931 | #undef PIXEL00_61 |
||
2932 | #undef PIXEL00_70 |
||
2933 | #undef PIXEL00_90 |
||
2934 | #undef PIXEL00_100 |
||
2935 | #undef PIXEL01_0 |
||
2936 | #undef PIXEL01_10 |
||
2937 | #undef PIXEL01_11 |
||
2938 | #undef PIXEL01_12 |
||
2939 | #undef PIXEL01_20 |
||
2940 | #undef PIXEL01_21 |
||
2941 | #undef PIXEL01_22 |
||
2942 | #undef PIXEL01_60 |
||
2943 | #undef PIXEL01_61 |
||
2944 | #undef PIXEL01_70 |
||
2945 | #undef PIXEL01_90 |
||
2946 | #undef PIXEL01_100 |
||
2947 | #undef PIXEL10_0 |
||
2948 | #undef PIXEL10_10 |
||
2949 | #undef PIXEL10_11 |
||
2950 | #undef PIXEL10_12 |
||
2951 | #undef PIXEL10_20 |
||
2952 | #undef PIXEL10_21 |
||
2953 | #undef PIXEL10_22 |
||
2954 | #undef PIXEL10_60 |
||
2955 | #undef PIXEL10_61 |
||
2956 | #undef PIXEL10_70 |
||
2957 | #undef PIXEL10_90 |
||
2958 | #undef PIXEL10_100 |
||
2959 | #undef PIXEL11_0 |
||
2960 | #undef PIXEL11_10 |
||
2961 | #undef PIXEL11_11 |
||
2962 | #undef PIXEL11_12 |
||
2963 | #undef PIXEL11_20 |
||
2964 | #undef PIXEL11_21 |
||
2965 | #undef PIXEL11_22 |
||
2966 | #undef PIXEL11_60 |
||
2967 | #undef PIXEL11_61 |
||
2968 | #undef PIXEL11_70 |
||
2969 | #undef PIXEL11_90 |
||
2970 | #undef PIXEL11_100 |
||
2971 | #endif // WANT_HQ2X |
||
2972 | |||
2973 | |||
2974 | ////////// |
||
2975 | // HQ3X // |
||
2976 | ////////// |
||
2977 | |||
2978 | #ifdef WANT_HQ3X |
||
2979 | #define PIXEL00_1M Interp1(dp, w[5], w[1]); |
||
2980 | #define PIXEL00_1U Interp1(dp, w[5], w[2]); |
||
2981 | #define PIXEL00_1L Interp1(dp, w[5], w[4]); |
||
2982 | #define PIXEL00_2 Interp2(dp, w[5], w[4], w[2]); |
||
2983 | #define PIXEL00_4 Interp4(dp, w[5], w[4], w[2]); |
||
2984 | #define PIXEL00_5 Interp5(dp, w[4], w[2]); |
||
2985 | #define PIXEL00_C *dp = w[5]; |
||
2986 | #define PIXEL01_1 Interp1(dp+1, w[5], w[2]); |
||
2987 | #define PIXEL01_3 Interp3(dp+1, w[5], w[2]); |
||
2988 | #define PIXEL01_6 Interp1(dp+1, w[2], w[5]); |
||
2989 | #define PIXEL01_C *(dp+1) = w[5]; |
||
2990 | #define PIXEL02_1M Interp1(dp+2, w[5], w[3]); |
||
2991 | #define PIXEL02_1U Interp1(dp+2, w[5], w[2]); |
||
2992 | #define PIXEL02_1R Interp1(dp+2, w[5], w[6]); |
||
2993 | #define PIXEL02_2 Interp2(dp+2, w[5], w[2], w[6]); |
||
2994 | #define PIXEL02_4 Interp4(dp+2, w[5], w[2], w[6]); |
||
2995 | #define PIXEL02_5 Interp5(dp+2, w[2], w[6]); |
||
2996 | #define PIXEL02_C *(dp+2) = w[5]; |
||
2997 | #define PIXEL10_1 Interp1(dp+dpL, w[5], w[4]); |
||
2998 | #define PIXEL10_3 Interp3(dp+dpL, w[5], w[4]); |
||
2999 | #define PIXEL10_6 Interp1(dp+dpL, w[4], w[5]); |
||
3000 | #define PIXEL10_C *(dp+dpL) = w[5]; |
||
3001 | #define PIXEL11 *(dp+dpL+1) = w[5]; |
||
3002 | #define PIXEL12_1 Interp1(dp+dpL+2, w[5], w[6]); |
||
3003 | #define PIXEL12_3 Interp3(dp+dpL+2, w[5], w[6]); |
||
3004 | #define PIXEL12_6 Interp1(dp+dpL+2, w[6], w[5]); |
||
3005 | #define PIXEL12_C *(dp+dpL+2) = w[5]; |
||
3006 | #define PIXEL20_1M Interp1(dp+dpL+dpL, w[5], w[7]); |
||
3007 | #define PIXEL20_1D Interp1(dp+dpL+dpL, w[5], w[8]); |
||
3008 | #define PIXEL20_1L Interp1(dp+dpL+dpL, w[5], w[4]); |
||
3009 | #define PIXEL20_2 Interp2(dp+dpL+dpL, w[5], w[8], w[4]); |
||
3010 | #define PIXEL20_4 Interp4(dp+dpL+dpL, w[5], w[8], w[4]); |
||
3011 | #define PIXEL20_5 Interp5(dp+dpL+dpL, w[8], w[4]); |
||
3012 | #define PIXEL20_C *(dp+dpL+dpL) = w[5]; |
||
3013 | #define PIXEL21_1 Interp1(dp+dpL+dpL+1, w[5], w[8]); |
||
3014 | #define PIXEL21_3 Interp3(dp+dpL+dpL+1, w[5], w[8]); |
||
3015 | #define PIXEL21_6 Interp1(dp+dpL+dpL+1, w[8], w[5]); |
||
3016 | #define PIXEL21_C *(dp+dpL+dpL+1) = w[5]; |
||
3017 | #define PIXEL22_1M Interp1(dp+dpL+dpL+2, w[5], w[9]); |
||
3018 | #define PIXEL22_1D Interp1(dp+dpL+dpL+2, w[5], w[8]); |
||
3019 | #define PIXEL22_1R Interp1(dp+dpL+dpL+2, w[5], w[6]); |
||
3020 | #define PIXEL22_2 Interp2(dp+dpL+dpL+2, w[5], w[6], w[8]); |
||
3021 | #define PIXEL22_4 Interp4(dp+dpL+dpL+2, w[5], w[6], w[8]); |
||
3022 | #define PIXEL22_5 Interp5(dp+dpL+dpL+2, w[6], w[8]); |
||
3023 | #define PIXEL22_C *(dp+dpL+dpL+2) = w[5]; |
||
3024 | |||
3025 | HQX_API void HQX_CALLCONV hq3x_32_rb( uint32_t * sp, uint32_t srb, uint32_t * dp, uint32_t drb, int Xres, int Yres ) |
||
3026 | { |
||
3027 | int i, j, k; |
||
3028 | int prevline, nextline; |
||
3029 | uint32_t w[10]; |
||
3030 | int dpL = (drb >> 2); |
||
3031 | int spL = (srb >> 2); |
||
3032 | uint8_t *sRowP = (uint8_t *) sp; |
||
3033 | uint8_t *dRowP = (uint8_t *) dp; |
||
3034 | uint32_t yuv1, yuv2; |
||
3035 | |||
3036 | // +----+----+----+ |
||
3037 | // | | | | |
||
3038 | // | w1 | w2 | w3 | |
||
3039 | // +----+----+----+ |
||
3040 | // | | | | |
||
3041 | // | w4 | w5 | w6 | |
||
3042 | // +----+----+----+ |
||
3043 | // | | | | |
||
3044 | // | w7 | w8 | w9 | |
||
3045 | // +----+----+----+ |
||
3046 | |||
3047 | for (j=0; j<Yres; j++) |
||
3048 | { |
||
3049 | if (j>0) prevline = -spL; else prevline = 0; |
||
3050 | if (j<Yres-1) nextline = spL; else nextline = 0; |
||
3051 | |||
3052 | for (i=0; i<Xres; i++) |
||
3053 | { |
||
3054 | w[2] = *(sp + prevline); |
||
3055 | w[5] = *sp; |
||
3056 | w[8] = *(sp + nextline); |
||
3057 | |||
3058 | if (i>0) |
||
3059 | { |
||
3060 | w[1] = *(sp + prevline - 1); |
||
3061 | w[4] = *(sp - 1); |
||
3062 | w[7] = *(sp + nextline - 1); |
||
3063 | } |
||
3064 | else |
||
3065 | { |
||
3066 | w[1] = w[2]; |
||
3067 | w[4] = w[5]; |
||
3068 | w[7] = w[8]; |
||
3069 | } |
||
3070 | |||
3071 | if (i<Xres-1) |
||
3072 | { |
||
3073 | w[3] = *(sp + prevline + 1); |
||
3074 | w[6] = *(sp + 1); |
||
3075 | w[9] = *(sp + nextline + 1); |
||
3076 | } |
||
3077 | else |
||
3078 | { |
||
3079 | w[3] = w[2]; |
||
3080 | w[6] = w[5]; |
||
3081 | w[9] = w[8]; |
||
3082 | } |
||
3083 | |||
3084 | int pattern = 0; |
||
3085 | int flag = 1; |
||
3086 | |||
3087 | yuv1 = rgb_to_yuv(w[5]); |
||
3088 | |||
3089 | for (k=1; k<=9; k++) |
||
3090 | { |
||
3091 | if (k==5) continue; |
||
3092 | |||
3093 | if ( w[k] != w[5] ) |
||
3094 | { |
||
3095 | yuv2 = rgb_to_yuv(w[k]); |
||
3096 | if (yuv_diff(yuv1, yuv2)) |
||
3097 | pattern |= flag; |
||
3098 | } |
||
3099 | flag <<= 1; |
||
3100 | } |
||
3101 | |||
3102 | switch (pattern) |
||
3103 | { |
||
3104 | case 0: |
||
3105 | case 1: |
||
3106 | case 4: |
||
3107 | case 32: |
||
3108 | case 128: |
||
3109 | case 5: |
||
3110 | case 132: |
||
3111 | case 160: |
||
3112 | case 33: |
||
3113 | case 129: |
||
3114 | case 36: |
||
3115 | case 133: |
||
3116 | case 164: |
||
3117 | case 161: |
||
3118 | case 37: |
||
3119 | case 165: |
||
3120 | { |
||
3121 | PIXEL00_2 |
||
3122 | PIXEL01_1 |
||
3123 | PIXEL02_2 |
||
3124 | PIXEL10_1 |
||
3125 | PIXEL11 |
||
3126 | PIXEL12_1 |
||
3127 | PIXEL20_2 |
||
3128 | PIXEL21_1 |
||
3129 | PIXEL22_2 |
||
3130 | break; |
||
3131 | } |
||
3132 | case 2: |
||
3133 | case 34: |
||
3134 | case 130: |
||
3135 | case 162: |
||
3136 | { |
||
3137 | PIXEL00_1M |
||
3138 | PIXEL01_C |
||
3139 | PIXEL02_1M |
||
3140 | PIXEL10_1 |
||
3141 | PIXEL11 |
||
3142 | PIXEL12_1 |
||
3143 | PIXEL20_2 |
||
3144 | PIXEL21_1 |
||
3145 | PIXEL22_2 |
||
3146 | break; |
||
3147 | } |
||
3148 | case 16: |
||
3149 | case 17: |
||
3150 | case 48: |
||
3151 | case 49: |
||
3152 | { |
||
3153 | PIXEL00_2 |
||
3154 | PIXEL01_1 |
||
3155 | PIXEL02_1M |
||
3156 | PIXEL10_1 |
||
3157 | PIXEL11 |
||
3158 | PIXEL12_C |
||
3159 | PIXEL20_2 |
||
3160 | PIXEL21_1 |
||
3161 | PIXEL22_1M |
||
3162 | break; |
||
3163 | } |
||
3164 | case 64: |
||
3165 | case 65: |
||
3166 | case 68: |
||
3167 | case 69: |
||
3168 | { |
||
3169 | PIXEL00_2 |
||
3170 | PIXEL01_1 |
||
3171 | PIXEL02_2 |
||
3172 | PIXEL10_1 |
||
3173 | PIXEL11 |
||
3174 | PIXEL12_1 |
||
3175 | PIXEL20_1M |
||
3176 | PIXEL21_C |
||
3177 | PIXEL22_1M |
||
3178 | break; |
||
3179 | } |
||
3180 | case 8: |
||
3181 | case 12: |
||
3182 | case 136: |
||
3183 | case 140: |
||
3184 | { |
||
3185 | PIXEL00_1M |
||
3186 | PIXEL01_1 |
||
3187 | PIXEL02_2 |
||
3188 | PIXEL10_C |
||
3189 | PIXEL11 |
||
3190 | PIXEL12_1 |
||
3191 | PIXEL20_1M |
||
3192 | PIXEL21_1 |
||
3193 | PIXEL22_2 |
||
3194 | break; |
||
3195 | } |
||
3196 | case 3: |
||
3197 | case 35: |
||
3198 | case 131: |
||
3199 | case 163: |
||
3200 | { |
||
3201 | PIXEL00_1L |
||
3202 | PIXEL01_C |
||
3203 | PIXEL02_1M |
||
3204 | PIXEL10_1 |
||
3205 | PIXEL11 |
||
3206 | PIXEL12_1 |
||
3207 | PIXEL20_2 |
||
3208 | PIXEL21_1 |
||
3209 | PIXEL22_2 |
||
3210 | break; |
||
3211 | } |
||
3212 | case 6: |
||
3213 | case 38: |
||
3214 | case 134: |
||
3215 | case 166: |
||
3216 | { |
||
3217 | PIXEL00_1M |
||
3218 | PIXEL01_C |
||
3219 | PIXEL02_1R |
||
3220 | PIXEL10_1 |
||
3221 | PIXEL11 |
||
3222 | PIXEL12_1 |
||
3223 | PIXEL20_2 |
||
3224 | PIXEL21_1 |
||
3225 | PIXEL22_2 |
||
3226 | break; |
||
3227 | } |
||
3228 | case 20: |
||
3229 | case 21: |
||
3230 | case 52: |
||
3231 | case 53: |
||
3232 | { |
||
3233 | PIXEL00_2 |
||
3234 | PIXEL01_1 |
||
3235 | PIXEL02_1U |
||
3236 | PIXEL10_1 |
||
3237 | PIXEL11 |
||
3238 | PIXEL12_C |
||
3239 | PIXEL20_2 |
||
3240 | PIXEL21_1 |
||
3241 | PIXEL22_1M |
||
3242 | break; |
||
3243 | } |
||
3244 | case 144: |
||
3245 | case 145: |
||
3246 | case 176: |
||
3247 | case 177: |
||
3248 | { |
||
3249 | PIXEL00_2 |
||
3250 | PIXEL01_1 |
||
3251 | PIXEL02_1M |
||
3252 | PIXEL10_1 |
||
3253 | PIXEL11 |
||
3254 | PIXEL12_C |
||
3255 | PIXEL20_2 |
||
3256 | PIXEL21_1 |
||
3257 | PIXEL22_1D |
||
3258 | break; |
||
3259 | } |
||
3260 | case 192: |
||
3261 | case 193: |
||
3262 | case 196: |
||
3263 | case 197: |
||
3264 | { |
||
3265 | PIXEL00_2 |
||
3266 | PIXEL01_1 |
||
3267 | PIXEL02_2 |
||
3268 | PIXEL10_1 |
||
3269 | PIXEL11 |
||
3270 | PIXEL12_1 |
||
3271 | PIXEL20_1M |
||
3272 | PIXEL21_C |
||
3273 | PIXEL22_1R |
||
3274 | break; |
||
3275 | } |
||
3276 | case 96: |
||
3277 | case 97: |
||
3278 | case 100: |
||
3279 | case 101: |
||
3280 | { |
||
3281 | PIXEL00_2 |
||
3282 | PIXEL01_1 |
||
3283 | PIXEL02_2 |
||
3284 | PIXEL10_1 |
||
3285 | PIXEL11 |
||
3286 | PIXEL12_1 |
||
3287 | PIXEL20_1L |
||
3288 | PIXEL21_C |
||
3289 | PIXEL22_1M |
||
3290 | break; |
||
3291 | } |
||
3292 | case 40: |
||
3293 | case 44: |
||
3294 | case 168: |
||
3295 | case 172: |
||
3296 | { |
||
3297 | PIXEL00_1M |
||
3298 | PIXEL01_1 |
||
3299 | PIXEL02_2 |
||
3300 | PIXEL10_C |
||
3301 | PIXEL11 |
||
3302 | PIXEL12_1 |
||
3303 | PIXEL20_1D |
||
3304 | PIXEL21_1 |
||
3305 | PIXEL22_2 |
||
3306 | break; |
||
3307 | } |
||
3308 | case 9: |
||
3309 | case 13: |
||
3310 | case 137: |
||
3311 | case 141: |
||
3312 | { |
||
3313 | PIXEL00_1U |
||
3314 | PIXEL01_1 |
||
3315 | PIXEL02_2 |
||
3316 | PIXEL10_C |
||
3317 | PIXEL11 |
||
3318 | PIXEL12_1 |
||
3319 | PIXEL20_1M |
||
3320 | PIXEL21_1 |
||
3321 | PIXEL22_2 |
||
3322 | break; |
||
3323 | } |
||
3324 | case 18: |
||
3325 | case 50: |
||
3326 | { |
||
3327 | PIXEL00_1M |
||
3328 | if (Diff(w[2], w[6])) |
||
3329 | { |
||
3330 | PIXEL01_C |
||
3331 | PIXEL02_1M |
||
3332 | PIXEL12_C |
||
3333 | } |
||
3334 | else |
||
3335 | { |
||
3336 | PIXEL01_3 |
||
3337 | PIXEL02_4 |
||
3338 | PIXEL12_3 |
||
3339 | } |
||
3340 | PIXEL10_1 |
||
3341 | PIXEL11 |
||
3342 | PIXEL20_2 |
||
3343 | PIXEL21_1 |
||
3344 | PIXEL22_1M |
||
3345 | break; |
||
3346 | } |
||
3347 | case 80: |
||
3348 | case 81: |
||
3349 | { |
||
3350 | PIXEL00_2 |
||
3351 | PIXEL01_1 |
||
3352 | PIXEL02_1M |
||
3353 | PIXEL10_1 |
||
3354 | PIXEL11 |
||
3355 | PIXEL20_1M |
||
3356 | if (Diff(w[6], w[8])) |
||
3357 | { |
||
3358 | PIXEL12_C |
||
3359 | PIXEL21_C |
||
3360 | PIXEL22_1M |
||
3361 | } |
||
3362 | else |
||
3363 | { |
||
3364 | PIXEL12_3 |
||
3365 | PIXEL21_3 |
||
3366 | PIXEL22_4 |
||
3367 | } |
||
3368 | break; |
||
3369 | } |
||
3370 | case 72: |
||
3371 | case 76: |
||
3372 | { |
||
3373 | PIXEL00_1M |
||
3374 | PIXEL01_1 |
||
3375 | PIXEL02_2 |
||
3376 | PIXEL11 |
||
3377 | PIXEL12_1 |
||
3378 | if (Diff(w[8], w[4])) |
||
3379 | { |
||
3380 | PIXEL10_C |
||
3381 | PIXEL20_1M |
||
3382 | PIXEL21_C |
||
3383 | } |
||
3384 | else |
||
3385 | { |
||
3386 | PIXEL10_3 |
||
3387 | PIXEL20_4 |
||
3388 | PIXEL21_3 |
||
3389 | } |
||
3390 | PIXEL22_1M |
||
3391 | break; |
||
3392 | } |
||
3393 | case 10: |
||
3394 | case 138: |
||
3395 | { |
||
3396 | if (Diff(w[4], w[2])) |
||
3397 | { |
||
3398 | PIXEL00_1M |
||
3399 | PIXEL01_C |
||
3400 | PIXEL10_C |
||
3401 | } |
||
3402 | else |
||
3403 | { |
||
3404 | PIXEL00_4 |
||
3405 | PIXEL01_3 |
||
3406 | PIXEL10_3 |
||
3407 | } |
||
3408 | PIXEL02_1M |
||
3409 | PIXEL11 |
||
3410 | PIXEL12_1 |
||
3411 | PIXEL20_1M |
||
3412 | PIXEL21_1 |
||
3413 | PIXEL22_2 |
||
3414 | break; |
||
3415 | } |
||
3416 | case 66: |
||
3417 | { |
||
3418 | PIXEL00_1M |
||
3419 | PIXEL01_C |
||
3420 | PIXEL02_1M |
||
3421 | PIXEL10_1 |
||
3422 | PIXEL11 |
||
3423 | PIXEL12_1 |
||
3424 | PIXEL20_1M |
||
3425 | PIXEL21_C |
||
3426 | PIXEL22_1M |
||
3427 | break; |
||
3428 | } |
||
3429 | case 24: |
||
3430 | { |
||
3431 | PIXEL00_1M |
||
3432 | PIXEL01_1 |
||
3433 | PIXEL02_1M |
||
3434 | PIXEL10_C |
||
3435 | PIXEL11 |
||
3436 | PIXEL12_C |
||
3437 | PIXEL20_1M |
||
3438 | PIXEL21_1 |
||
3439 | PIXEL22_1M |
||
3440 | break; |
||
3441 | } |
||
3442 | case 7: |
||
3443 | case 39: |
||
3444 | case 135: |
||
3445 | { |
||
3446 | PIXEL00_1L |
||
3447 | PIXEL01_C |
||
3448 | PIXEL02_1R |
||
3449 | PIXEL10_1 |
||
3450 | PIXEL11 |
||
3451 | PIXEL12_1 |
||
3452 | PIXEL20_2 |
||
3453 | PIXEL21_1 |
||
3454 | PIXEL22_2 |
||
3455 | break; |
||
3456 | } |
||
3457 | case 148: |
||
3458 | case 149: |
||
3459 | case 180: |
||
3460 | { |
||
3461 | PIXEL00_2 |
||
3462 | PIXEL01_1 |
||
3463 | PIXEL02_1U |
||
3464 | PIXEL10_1 |
||
3465 | PIXEL11 |
||
3466 | PIXEL12_C |
||
3467 | PIXEL20_2 |
||
3468 | PIXEL21_1 |
||
3469 | PIXEL22_1D |
||
3470 | break; |
||
3471 | } |
||
3472 | case 224: |
||
3473 | case 228: |
||
3474 | case 225: |
||
3475 | { |
||
3476 | PIXEL00_2 |
||
3477 | PIXEL01_1 |
||
3478 | PIXEL02_2 |
||
3479 | PIXEL10_1 |
||
3480 | PIXEL11 |
||
3481 | PIXEL12_1 |
||
3482 | PIXEL20_1L |
||
3483 | PIXEL21_C |
||
3484 | PIXEL22_1R |
||
3485 | break; |
||
3486 | } |
||
3487 | case 41: |
||
3488 | case 169: |
||
3489 | case 45: |
||
3490 | { |
||
3491 | PIXEL00_1U |
||
3492 | PIXEL01_1 |
||
3493 | PIXEL02_2 |
||
3494 | PIXEL10_C |
||
3495 | PIXEL11 |
||
3496 | PIXEL12_1 |
||
3497 | PIXEL20_1D |
||
3498 | PIXEL21_1 |
||
3499 | PIXEL22_2 |
||
3500 | break; |
||
3501 | } |
||
3502 | case 22: |
||
3503 | case 54: |
||
3504 | { |
||
3505 | PIXEL00_1M |
||
3506 | if (Diff(w[2], w[6])) |
||
3507 | { |
||
3508 | PIXEL01_C |
||
3509 | PIXEL02_C |
||
3510 | PIXEL12_C |
||
3511 | } |
||
3512 | else |
||
3513 | { |
||
3514 | PIXEL01_3 |
||
3515 | PIXEL02_4 |
||
3516 | PIXEL12_3 |
||
3517 | } |
||
3518 | PIXEL10_1 |
||
3519 | PIXEL11 |
||
3520 | PIXEL20_2 |
||
3521 | PIXEL21_1 |
||
3522 | PIXEL22_1M |
||
3523 | break; |
||
3524 | } |
||
3525 | case 208: |
||
3526 | case 209: |
||
3527 | { |
||
3528 | PIXEL00_2 |
||
3529 | PIXEL01_1 |
||
3530 | PIXEL02_1M |
||
3531 | PIXEL10_1 |
||
3532 | PIXEL11 |
||
3533 | PIXEL20_1M |
||
3534 | if (Diff(w[6], w[8])) |
||
3535 | { |
||
3536 | PIXEL12_C |
||
3537 | PIXEL21_C |
||
3538 | PIXEL22_C |
||
3539 | } |
||
3540 | else |
||
3541 | { |
||
3542 | PIXEL12_3 |
||
3543 | PIXEL21_3 |
||
3544 | PIXEL22_4 |
||
3545 | } |
||
3546 | break; |
||
3547 | } |
||
3548 | case 104: |
||
3549 | case 108: |
||
3550 | { |
||
3551 | PIXEL00_1M |
||
3552 | PIXEL01_1 |
||
3553 | PIXEL02_2 |
||
3554 | PIXEL11 |
||
3555 | PIXEL12_1 |
||
3556 | if (Diff(w[8], w[4])) |
||
3557 | { |
||
3558 | PIXEL10_C |
||
3559 | PIXEL20_C |
||
3560 | PIXEL21_C |
||
3561 | } |
||
3562 | else |
||
3563 | { |
||
3564 | PIXEL10_3 |
||
3565 | PIXEL20_4 |
||
3566 | PIXEL21_3 |
||
3567 | } |
||
3568 | PIXEL22_1M |
||
3569 | break; |
||
3570 | } |
||
3571 | case 11: |
||
3572 | case 139: |
||
3573 | { |
||
3574 | if (Diff(w[4], w[2])) |
||
3575 | { |
||
3576 | PIXEL00_C |
||
3577 | PIXEL01_C |
||
3578 | PIXEL10_C |
||
3579 | } |
||
3580 | else |
||
3581 | { |
||
3582 | PIXEL00_4 |
||
3583 | PIXEL01_3 |
||
3584 | PIXEL10_3 |
||
3585 | } |
||
3586 | PIXEL02_1M |
||
3587 | PIXEL11 |
||
3588 | PIXEL12_1 |
||
3589 | PIXEL20_1M |
||
3590 | PIXEL21_1 |
||
3591 | PIXEL22_2 |
||
3592 | break; |
||
3593 | } |
||
3594 | case 19: |
||
3595 | case 51: |
||
3596 | { |
||
3597 | if (Diff(w[2], w[6])) |
||
3598 | { |
||
3599 | PIXEL00_1L |
||
3600 | PIXEL01_C |
||
3601 | PIXEL02_1M |
||
3602 | PIXEL12_C |
||
3603 | } |
||
3604 | else |
||
3605 | { |
||
3606 | PIXEL00_2 |
||
3607 | PIXEL01_6 |
||
3608 | PIXEL02_5 |
||
3609 | PIXEL12_1 |
||
3610 | } |
||
3611 | PIXEL10_1 |
||
3612 | PIXEL11 |
||
3613 | PIXEL20_2 |
||
3614 | PIXEL21_1 |
||
3615 | PIXEL22_1M |
||
3616 | break; |
||
3617 | } |
||
3618 | case 146: |
||
3619 | case 178: |
||
3620 | { |
||
3621 | if (Diff(w[2], w[6])) |
||
3622 | { |
||
3623 | PIXEL01_C |
||
3624 | PIXEL02_1M |
||
3625 | PIXEL12_C |
||
3626 | PIXEL22_1D |
||
3627 | } |
||
3628 | else |
||
3629 | { |
||
3630 | PIXEL01_1 |
||
3631 | PIXEL02_5 |
||
3632 | PIXEL12_6 |
||
3633 | PIXEL22_2 |
||
3634 | } |
||
3635 | PIXEL00_1M |
||
3636 | PIXEL10_1 |
||
3637 | PIXEL11 |
||
3638 | PIXEL20_2 |
||
3639 | PIXEL21_1 |
||
3640 | break; |
||
3641 | } |
||
3642 | case 84: |
||
3643 | case 85: |
||
3644 | { |
||
3645 | if (Diff(w[6], w[8])) |
||
3646 | { |
||
3647 | PIXEL02_1U |
||
3648 | PIXEL12_C |
||
3649 | PIXEL21_C |
||
3650 | PIXEL22_1M |
||
3651 | } |
||
3652 | else |
||
3653 | { |
||
3654 | PIXEL02_2 |
||
3655 | PIXEL12_6 |
||
3656 | PIXEL21_1 |
||
3657 | PIXEL22_5 |
||
3658 | } |
||
3659 | PIXEL00_2 |
||
3660 | PIXEL01_1 |
||
3661 | PIXEL10_1 |
||
3662 | PIXEL11 |
||
3663 | PIXEL20_1M |
||
3664 | break; |
||
3665 | } |
||
3666 | case 112: |
||
3667 | case 113: |
||
3668 | { |
||
3669 | if (Diff(w[6], w[8])) |
||
3670 | { |
||
3671 | PIXEL12_C |
||
3672 | PIXEL20_1L |
||
3673 | PIXEL21_C |
||
3674 | PIXEL22_1M |
||
3675 | } |
||
3676 | else |
||
3677 | { |
||
3678 | PIXEL12_1 |
||
3679 | PIXEL20_2 |
||
3680 | PIXEL21_6 |
||
3681 | PIXEL22_5 |
||
3682 | } |
||
3683 | PIXEL00_2 |
||
3684 | PIXEL01_1 |
||
3685 | PIXEL02_1M |
||
3686 | PIXEL10_1 |
||
3687 | PIXEL11 |
||
3688 | break; |
||
3689 | } |
||
3690 | case 200: |
||
3691 | case 204: |
||
3692 | { |
||
3693 | if (Diff(w[8], w[4])) |
||
3694 | { |
||
3695 | PIXEL10_C |
||
3696 | PIXEL20_1M |
||
3697 | PIXEL21_C |
||
3698 | PIXEL22_1R |
||
3699 | } |
||
3700 | else |
||
3701 | { |
||
3702 | PIXEL10_1 |
||
3703 | PIXEL20_5 |
||
3704 | PIXEL21_6 |
||
3705 | PIXEL22_2 |
||
3706 | } |
||
3707 | PIXEL00_1M |
||
3708 | PIXEL01_1 |
||
3709 | PIXEL02_2 |
||
3710 | PIXEL11 |
||
3711 | PIXEL12_1 |
||
3712 | break; |
||
3713 | } |
||
3714 | case 73: |
||
3715 | case 77: |
||
3716 | { |
||
3717 | if (Diff(w[8], w[4])) |
||
3718 | { |
||
3719 | PIXEL00_1U |
||
3720 | PIXEL10_C |
||
3721 | PIXEL20_1M |
||
3722 | PIXEL21_C |
||
3723 | } |
||
3724 | else |
||
3725 | { |
||
3726 | PIXEL00_2 |
||
3727 | PIXEL10_6 |
||
3728 | PIXEL20_5 |
||
3729 | PIXEL21_1 |
||
3730 | } |
||
3731 | PIXEL01_1 |
||
3732 | PIXEL02_2 |
||
3733 | PIXEL11 |
||
3734 | PIXEL12_1 |
||
3735 | PIXEL22_1M |
||
3736 | break; |
||
3737 | } |
||
3738 | case 42: |
||
3739 | case 170: |
||
3740 | { |
||
3741 | if (Diff(w[4], w[2])) |
||
3742 | { |
||
3743 | PIXEL00_1M |
||
3744 | PIXEL01_C |
||
3745 | PIXEL10_C |
||
3746 | PIXEL20_1D |
||
3747 | } |
||
3748 | else |
||
3749 | { |
||
3750 | PIXEL00_5 |
||
3751 | PIXEL01_1 |
||
3752 | PIXEL10_6 |
||
3753 | PIXEL20_2 |
||
3754 | } |
||
3755 | PIXEL02_1M |
||
3756 | PIXEL11 |
||
3757 | PIXEL12_1 |
||
3758 | PIXEL21_1 |
||
3759 | PIXEL22_2 |
||
3760 | break; |
||
3761 | } |
||
3762 | case 14: |
||
3763 | case 142: |
||
3764 | { |
||
3765 | if (Diff(w[4], w[2])) |
||
3766 | { |
||
3767 | PIXEL00_1M |
||
3768 | PIXEL01_C |
||
3769 | PIXEL02_1R |
||
3770 | PIXEL10_C |
||
3771 | } |
||
3772 | else |
||
3773 | { |
||
3774 | PIXEL00_5 |
||
3775 | PIXEL01_6 |
||
3776 | PIXEL02_2 |
||
3777 | PIXEL10_1 |
||
3778 | } |
||
3779 | PIXEL11 |
||
3780 | PIXEL12_1 |
||
3781 | PIXEL20_1M |
||
3782 | PIXEL21_1 |
||
3783 | PIXEL22_2 |
||
3784 | break; |
||
3785 | } |
||
3786 | case 67: |
||
3787 | { |
||
3788 | PIXEL00_1L |
||
3789 | PIXEL01_C |
||
3790 | PIXEL02_1M |
||
3791 | PIXEL10_1 |
||
3792 | PIXEL11 |
||
3793 | PIXEL12_1 |
||
3794 | PIXEL20_1M |
||
3795 | PIXEL21_C |
||
3796 | PIXEL22_1M |
||
3797 | break; |
||
3798 | } |
||
3799 | case 70: |
||
3800 | { |
||
3801 | PIXEL00_1M |
||
3802 | PIXEL01_C |
||
3803 | PIXEL02_1R |
||
3804 | PIXEL10_1 |
||
3805 | PIXEL11 |
||
3806 | PIXEL12_1 |
||
3807 | PIXEL20_1M |
||
3808 | PIXEL21_C |
||
3809 | PIXEL22_1M |
||
3810 | break; |
||
3811 | } |
||
3812 | case 28: |
||
3813 | { |
||
3814 | PIXEL00_1M |
||
3815 | PIXEL01_1 |
||
3816 | PIXEL02_1U |
||
3817 | PIXEL10_C |
||
3818 | PIXEL11 |
||
3819 | PIXEL12_C |
||
3820 | PIXEL20_1M |
||
3821 | PIXEL21_1 |
||
3822 | PIXEL22_1M |
||
3823 | break; |
||
3824 | } |
||
3825 | case 152: |
||
3826 | { |
||
3827 | PIXEL00_1M |
||
3828 | PIXEL01_1 |
||
3829 | PIXEL02_1M |
||
3830 | PIXEL10_C |
||
3831 | PIXEL11 |
||
3832 | PIXEL12_C |
||
3833 | PIXEL20_1M |
||
3834 | PIXEL21_1 |
||
3835 | PIXEL22_1D |
||
3836 | break; |
||
3837 | } |
||
3838 | case 194: |
||
3839 | { |
||
3840 | PIXEL00_1M |
||
3841 | PIXEL01_C |
||
3842 | PIXEL02_1M |
||
3843 | PIXEL10_1 |
||
3844 | PIXEL11 |
||
3845 | PIXEL12_1 |
||
3846 | PIXEL20_1M |
||
3847 | PIXEL21_C |
||
3848 | PIXEL22_1R |
||
3849 | break; |
||
3850 | } |
||
3851 | case 98: |
||
3852 | { |
||
3853 | PIXEL00_1M |
||
3854 | PIXEL01_C |
||
3855 | PIXEL02_1M |
||
3856 | PIXEL10_1 |
||
3857 | PIXEL11 |
||
3858 | PIXEL12_1 |
||
3859 | PIXEL20_1L |
||
3860 | PIXEL21_C |
||
3861 | PIXEL22_1M |
||
3862 | break; |
||
3863 | } |
||
3864 | case 56: |
||
3865 | { |
||
3866 | PIXEL00_1M |
||
3867 | PIXEL01_1 |
||
3868 | PIXEL02_1M |
||
3869 | PIXEL10_C |
||
3870 | PIXEL11 |
||
3871 | PIXEL12_C |
||
3872 | PIXEL20_1D |
||
3873 | PIXEL21_1 |
||
3874 | PIXEL22_1M |
||
3875 | break; |
||
3876 | } |
||
3877 | case 25: |
||
3878 | { |
||
3879 | PIXEL00_1U |
||
3880 | PIXEL01_1 |
||
3881 | PIXEL02_1M |
||
3882 | PIXEL10_C |
||
3883 | PIXEL11 |
||
3884 | PIXEL12_C |
||
3885 | PIXEL20_1M |
||
3886 | PIXEL21_1 |
||
3887 | PIXEL22_1M |
||
3888 | break; |
||
3889 | } |
||
3890 | case 26: |
||
3891 | case 31: |
||
3892 | { |
||
3893 | if (Diff(w[4], w[2])) |
||
3894 | { |
||
3895 | PIXEL00_C |
||
3896 | PIXEL10_C |
||
3897 | } |
||
3898 | else |
||
3899 | { |
||
3900 | PIXEL00_4 |
||
3901 | PIXEL10_3 |
||
3902 | } |
||
3903 | PIXEL01_C |
||
3904 | if (Diff(w[2], w[6])) |
||
3905 | { |
||
3906 | PIXEL02_C |
||
3907 | PIXEL12_C |
||
3908 | } |
||
3909 | else |
||
3910 | { |
||
3911 | PIXEL02_4 |
||
3912 | PIXEL12_3 |
||
3913 | } |
||
3914 | PIXEL11 |
||
3915 | PIXEL20_1M |
||
3916 | PIXEL21_1 |
||
3917 | PIXEL22_1M |
||
3918 | break; |
||
3919 | } |
||
3920 | case 82: |
||
3921 | case 214: |
||
3922 | { |
||
3923 | PIXEL00_1M |
||
3924 | if (Diff(w[2], w[6])) |
||
3925 | { |
||
3926 | PIXEL01_C |
||
3927 | PIXEL02_C |
||
3928 | } |
||
3929 | else |
||
3930 | { |
||
3931 | PIXEL01_3 |
||
3932 | PIXEL02_4 |
||
3933 | } |
||
3934 | PIXEL10_1 |
||
3935 | PIXEL11 |
||
3936 | PIXEL12_C |
||
3937 | PIXEL20_1M |
||
3938 | if (Diff(w[6], w[8])) |
||
3939 | { |
||
3940 | PIXEL21_C |
||
3941 | PIXEL22_C |
||
3942 | } |
||
3943 | else |
||
3944 | { |
||
3945 | PIXEL21_3 |
||
3946 | PIXEL22_4 |
||
3947 | } |
||
3948 | break; |
||
3949 | } |
||
3950 | case 88: |
||
3951 | case 248: |
||
3952 | { |
||
3953 | PIXEL00_1M |
||
3954 | PIXEL01_1 |
||
3955 | PIXEL02_1M |
||
3956 | PIXEL11 |
||
3957 | if (Diff(w[8], w[4])) |
||
3958 | { |
||
3959 | PIXEL10_C |
||
3960 | PIXEL20_C |
||
3961 | } |
||
3962 | else |
||
3963 | { |
||
3964 | PIXEL10_3 |
||
3965 | PIXEL20_4 |
||
3966 | } |
||
3967 | PIXEL21_C |
||
3968 | if (Diff(w[6], w[8])) |
||
3969 | { |
||
3970 | PIXEL12_C |
||
3971 | PIXEL22_C |
||
3972 | } |
||
3973 | else |
||
3974 | { |
||
3975 | PIXEL12_3 |
||
3976 | PIXEL22_4 |
||
3977 | } |
||
3978 | break; |
||
3979 | } |
||
3980 | case 74: |
||
3981 | case 107: |
||
3982 | { |
||
3983 | if (Diff(w[4], w[2])) |
||
3984 | { |
||
3985 | PIXEL00_C |
||
3986 | PIXEL01_C |
||
3987 | } |
||
3988 | else |
||
3989 | { |
||
3990 | PIXEL00_4 |
||
3991 | PIXEL01_3 |
||
3992 | } |
||
3993 | PIXEL02_1M |
||
3994 | PIXEL10_C |
||
3995 | PIXEL11 |
||
3996 | PIXEL12_1 |
||
3997 | if (Diff(w[8], w[4])) |
||
3998 | { |
||
3999 | PIXEL20_C |
||
4000 | PIXEL21_C |
||
4001 | } |
||
4002 | else |
||
4003 | { |
||
4004 | PIXEL20_4 |
||
4005 | PIXEL21_3 |
||
4006 | } |
||
4007 | PIXEL22_1M |
||
4008 | break; |
||
4009 | } |
||
4010 | case 27: |
||
4011 | { |
||
4012 | if (Diff(w[4], w[2])) |
||
4013 | { |
||
4014 | PIXEL00_C |
||
4015 | PIXEL01_C |
||
4016 | PIXEL10_C |
||
4017 | } |
||
4018 | else |
||
4019 | { |
||
4020 | PIXEL00_4 |
||
4021 | PIXEL01_3 |
||
4022 | PIXEL10_3 |
||
4023 | } |
||
4024 | PIXEL02_1M |
||
4025 | PIXEL11 |
||
4026 | PIXEL12_C |
||
4027 | PIXEL20_1M |
||
4028 | PIXEL21_1 |
||
4029 | PIXEL22_1M |
||
4030 | break; |
||
4031 | } |
||
4032 | case 86: |
||
4033 | { |
||
4034 | PIXEL00_1M |
||
4035 | if (Diff(w[2], w[6])) |
||
4036 | { |
||
4037 | PIXEL01_C |
||
4038 | PIXEL02_C |
||
4039 | PIXEL12_C |
||
4040 | } |
||
4041 | else |
||
4042 | { |
||
4043 | PIXEL01_3 |
||
4044 | PIXEL02_4 |
||
4045 | PIXEL12_3 |
||
4046 | } |
||
4047 | PIXEL10_1 |
||
4048 | PIXEL11 |
||
4049 | PIXEL20_1M |
||
4050 | PIXEL21_C |
||
4051 | PIXEL22_1M |
||
4052 | break; |
||
4053 | } |
||
4054 | case 216: |
||
4055 | { |
||
4056 | PIXEL00_1M |
||
4057 | PIXEL01_1 |
||
4058 | PIXEL02_1M |
||
4059 | PIXEL10_C |
||
4060 | PIXEL11 |
||
4061 | PIXEL20_1M |
||
4062 | if (Diff(w[6], w[8])) |
||
4063 | { |
||
4064 | PIXEL12_C |
||
4065 | PIXEL21_C |
||
4066 | PIXEL22_C |
||
4067 | } |
||
4068 | else |
||
4069 | { |
||
4070 | PIXEL12_3 |
||
4071 | PIXEL21_3 |
||
4072 | PIXEL22_4 |
||
4073 | } |
||
4074 | break; |
||
4075 | } |
||
4076 | case 106: |
||
4077 | { |
||
4078 | PIXEL00_1M |
||
4079 | PIXEL01_C |
||
4080 | PIXEL02_1M |
||
4081 | PIXEL11 |
||
4082 | PIXEL12_1 |
||
4083 | if (Diff(w[8], w[4])) |
||
4084 | { |
||
4085 | PIXEL10_C |
||
4086 | PIXEL20_C |
||
4087 | PIXEL21_C |
||
4088 | } |
||
4089 | else |
||
4090 | { |
||
4091 | PIXEL10_3 |
||
4092 | PIXEL20_4 |
||
4093 | PIXEL21_3 |
||
4094 | } |
||
4095 | PIXEL22_1M |
||
4096 | break; |
||
4097 | } |
||
4098 | case 30: |
||
4099 | { |
||
4100 | PIXEL00_1M |
||
4101 | if (Diff(w[2], w[6])) |
||
4102 | { |
||
4103 | PIXEL01_C |
||
4104 | PIXEL02_C |
||
4105 | PIXEL12_C |
||
4106 | } |
||
4107 | else |
||
4108 | { |
||
4109 | PIXEL01_3 |
||
4110 | PIXEL02_4 |
||
4111 | PIXEL12_3 |
||
4112 | } |
||
4113 | PIXEL10_C |
||
4114 | PIXEL11 |
||
4115 | PIXEL20_1M |
||
4116 | PIXEL21_1 |
||
4117 | PIXEL22_1M |
||
4118 | break; |
||
4119 | } |
||
4120 | case 210: |
||
4121 | { |
||
4122 | PIXEL00_1M |
||
4123 | PIXEL01_C |
||
4124 | PIXEL02_1M |
||
4125 | PIXEL10_1 |
||
4126 | PIXEL11 |
||
4127 | PIXEL20_1M |
||
4128 | if (Diff(w[6], w[8])) |
||
4129 | { |
||
4130 | PIXEL12_C |
||
4131 | PIXEL21_C |
||
4132 | PIXEL22_C |
||
4133 | } |
||
4134 | else |
||
4135 | { |
||
4136 | PIXEL12_3 |
||
4137 | PIXEL21_3 |
||
4138 | PIXEL22_4 |
||
4139 | } |
||
4140 | break; |
||
4141 | } |
||
4142 | case 120: |
||
4143 | { |
||
4144 | PIXEL00_1M |
||
4145 | PIXEL01_1 |
||
4146 | PIXEL02_1M |
||
4147 | PIXEL11 |
||
4148 | PIXEL12_C |
||
4149 | if (Diff(w[8], w[4])) |
||
4150 | { |
||
4151 | PIXEL10_C |
||
4152 | PIXEL20_C |
||
4153 | PIXEL21_C |
||
4154 | } |
||
4155 | else |
||
4156 | { |
||
4157 | PIXEL10_3 |
||
4158 | PIXEL20_4 |
||
4159 | PIXEL21_3 |
||
4160 | } |
||
4161 | PIXEL22_1M |
||
4162 | break; |
||
4163 | } |
||
4164 | case 75: |
||
4165 | { |
||
4166 | if (Diff(w[4], w[2])) |
||
4167 | { |
||
4168 | PIXEL00_C |
||
4169 | PIXEL01_C |
||
4170 | PIXEL10_C |
||
4171 | } |
||
4172 | else |
||
4173 | { |
||
4174 | PIXEL00_4 |
||
4175 | PIXEL01_3 |
||
4176 | PIXEL10_3 |
||
4177 | } |
||
4178 | PIXEL02_1M |
||
4179 | PIXEL11 |
||
4180 | PIXEL12_1 |
||
4181 | PIXEL20_1M |
||
4182 | PIXEL21_C |
||
4183 | PIXEL22_1M |
||
4184 | break; |
||
4185 | } |
||
4186 | case 29: |
||
4187 | { |
||
4188 | PIXEL00_1U |
||
4189 | PIXEL01_1 |
||
4190 | PIXEL02_1U |
||
4191 | PIXEL10_C |
||
4192 | PIXEL11 |
||
4193 | PIXEL12_C |
||
4194 | PIXEL20_1M |
||
4195 | PIXEL21_1 |
||
4196 | PIXEL22_1M |
||
4197 | break; |
||
4198 | } |
||
4199 | case 198: |
||
4200 | { |
||
4201 | PIXEL00_1M |
||
4202 | PIXEL01_C |
||
4203 | PIXEL02_1R |
||
4204 | PIXEL10_1 |
||
4205 | PIXEL11 |
||
4206 | PIXEL12_1 |
||
4207 | PIXEL20_1M |
||
4208 | PIXEL21_C |
||
4209 | PIXEL22_1R |
||
4210 | break; |
||
4211 | } |
||
4212 | case 184: |
||
4213 | { |
||
4214 | PIXEL00_1M |
||
4215 | PIXEL01_1 |
||
4216 | PIXEL02_1M |
||
4217 | PIXEL10_C |
||
4218 | PIXEL11 |
||
4219 | PIXEL12_C |
||
4220 | PIXEL20_1D |
||
4221 | PIXEL21_1 |
||
4222 | PIXEL22_1D |
||
4223 | break; |
||
4224 | } |
||
4225 | case 99: |
||
4226 | { |
||
4227 | PIXEL00_1L |
||
4228 | PIXEL01_C |
||
4229 | PIXEL02_1M |
||
4230 | PIXEL10_1 |
||
4231 | PIXEL11 |
||
4232 | PIXEL12_1 |
||
4233 | PIXEL20_1L |
||
4234 | PIXEL21_C |
||
4235 | PIXEL22_1M |
||
4236 | break; |
||
4237 | } |
||
4238 | case 57: |
||
4239 | { |
||
4240 | PIXEL00_1U |
||
4241 | PIXEL01_1 |
||
4242 | PIXEL02_1M |
||
4243 | PIXEL10_C |
||
4244 | PIXEL11 |
||
4245 | PIXEL12_C |
||
4246 | PIXEL20_1D |
||
4247 | PIXEL21_1 |
||
4248 | PIXEL22_1M |
||
4249 | break; |
||
4250 | } |
||
4251 | case 71: |
||
4252 | { |
||
4253 | PIXEL00_1L |
||
4254 | PIXEL01_C |
||
4255 | PIXEL02_1R |
||
4256 | PIXEL10_1 |
||
4257 | PIXEL11 |
||
4258 | PIXEL12_1 |
||
4259 | PIXEL20_1M |
||
4260 | PIXEL21_C |
||
4261 | PIXEL22_1M |
||
4262 | break; |
||
4263 | } |
||
4264 | case 156: |
||
4265 | { |
||
4266 | PIXEL00_1M |
||
4267 | PIXEL01_1 |
||
4268 | PIXEL02_1U |
||
4269 | PIXEL10_C |
||
4270 | PIXEL11 |
||
4271 | PIXEL12_C |
||
4272 | PIXEL20_1M |
||
4273 | PIXEL21_1 |
||
4274 | PIXEL22_1D |
||
4275 | break; |
||
4276 | } |
||
4277 | case 226: |
||
4278 | { |
||
4279 | PIXEL00_1M |
||
4280 | PIXEL01_C |
||
4281 | PIXEL02_1M |
||
4282 | PIXEL10_1 |
||
4283 | PIXEL11 |
||
4284 | PIXEL12_1 |
||
4285 | PIXEL20_1L |
||
4286 | PIXEL21_C |
||
4287 | PIXEL22_1R |
||
4288 | break; |
||
4289 | } |
||
4290 | case 60: |
||
4291 | { |
||
4292 | PIXEL00_1M |
||
4293 | PIXEL01_1 |
||
4294 | PIXEL02_1U |
||
4295 | PIXEL10_C |
||
4296 | PIXEL11 |
||
4297 | PIXEL12_C |
||
4298 | PIXEL20_1D |
||
4299 | PIXEL21_1 |
||
4300 | PIXEL22_1M |
||
4301 | break; |
||
4302 | } |
||
4303 | case 195: |
||
4304 | { |
||
4305 | PIXEL00_1L |
||
4306 | PIXEL01_C |
||
4307 | PIXEL02_1M |
||
4308 | PIXEL10_1 |
||
4309 | PIXEL11 |
||
4310 | PIXEL12_1 |
||
4311 | PIXEL20_1M |
||
4312 | PIXEL21_C |
||
4313 | PIXEL22_1R |
||
4314 | break; |
||
4315 | } |
||
4316 | case 102: |
||
4317 | { |
||
4318 | PIXEL00_1M |
||
4319 | PIXEL01_C |
||
4320 | PIXEL02_1R |
||
4321 | PIXEL10_1 |
||
4322 | PIXEL11 |
||
4323 | PIXEL12_1 |
||
4324 | PIXEL20_1L |
||
4325 | PIXEL21_C |
||
4326 | PIXEL22_1M |
||
4327 | break; |
||
4328 | } |
||
4329 | case 153: |
||
4330 | { |
||
4331 | PIXEL00_1U |
||
4332 | PIXEL01_1 |
||
4333 | PIXEL02_1M |
||
4334 | PIXEL10_C |
||
4335 | PIXEL11 |
||
4336 | PIXEL12_C |
||
4337 | PIXEL20_1M |
||
4338 | PIXEL21_1 |
||
4339 | PIXEL22_1D |
||
4340 | break; |
||
4341 | } |
||
4342 | case 58: |
||
4343 | { |
||
4344 | if (Diff(w[4], w[2])) |
||
4345 | { |
||
4346 | PIXEL00_1M |
||
4347 | } |
||
4348 | else |
||
4349 | { |
||
4350 | PIXEL00_2 |
||
4351 | } |
||
4352 | PIXEL01_C |
||
4353 | if (Diff(w[2], w[6])) |
||
4354 | { |
||
4355 | PIXEL02_1M |
||
4356 | } |
||
4357 | else |
||
4358 | { |
||
4359 | PIXEL02_2 |
||
4360 | } |
||
4361 | PIXEL10_C |
||
4362 | PIXEL11 |
||
4363 | PIXEL12_C |
||
4364 | PIXEL20_1D |
||
4365 | PIXEL21_1 |
||
4366 | PIXEL22_1M |
||
4367 | break; |
||
4368 | } |
||
4369 | case 83: |
||
4370 | { |
||
4371 | PIXEL00_1L |
||
4372 | PIXEL01_C |
||
4373 | if (Diff(w[2], w[6])) |
||
4374 | { |
||
4375 | PIXEL02_1M |
||
4376 | } |
||
4377 | else |
||
4378 | { |
||
4379 | PIXEL02_2 |
||
4380 | } |
||
4381 | PIXEL10_1 |
||
4382 | PIXEL11 |
||
4383 | PIXEL12_C |
||
4384 | PIXEL20_1M |
||
4385 | PIXEL21_C |
||
4386 | if (Diff(w[6], w[8])) |
||
4387 | { |
||
4388 | PIXEL22_1M |
||
4389 | } |
||
4390 | else |
||
4391 | { |
||
4392 | PIXEL22_2 |
||
4393 | } |
||
4394 | break; |
||
4395 | } |
||
4396 | case 92: |
||
4397 | { |
||
4398 | PIXEL00_1M |
||
4399 | PIXEL01_1 |
||
4400 | PIXEL02_1U |
||
4401 | PIXEL10_C |
||
4402 | PIXEL11 |
||
4403 | PIXEL12_C |
||
4404 | if (Diff(w[8], w[4])) |
||
4405 | { |
||
4406 | PIXEL20_1M |
||
4407 | } |
||
4408 | else |
||
4409 | { |
||
4410 | PIXEL20_2 |
||
4411 | } |
||
4412 | PIXEL21_C |
||
4413 | if (Diff(w[6], w[8])) |
||
4414 | { |
||
4415 | PIXEL22_1M |
||
4416 | } |
||
4417 | else |
||
4418 | { |
||
4419 | PIXEL22_2 |
||
4420 | } |
||
4421 | break; |
||
4422 | } |
||
4423 | case 202: |
||
4424 | { |
||
4425 | if (Diff(w[4], w[2])) |
||
4426 | { |
||
4427 | PIXEL00_1M |
||
4428 | } |
||
4429 | else |
||
4430 | { |
||
4431 | PIXEL00_2 |
||
4432 | } |
||
4433 | PIXEL01_C |
||
4434 | PIXEL02_1M |
||
4435 | PIXEL10_C |
||
4436 | PIXEL11 |
||
4437 | PIXEL12_1 |
||
4438 | if (Diff(w[8], w[4])) |
||
4439 | { |
||
4440 | PIXEL20_1M |
||
4441 | } |
||
4442 | else |
||
4443 | { |
||
4444 | PIXEL20_2 |
||
4445 | } |
||
4446 | PIXEL21_C |
||
4447 | PIXEL22_1R |
||
4448 | break; |
||
4449 | } |
||
4450 | case 78: |
||
4451 | { |
||
4452 | if (Diff(w[4], w[2])) |
||
4453 | { |
||
4454 | PIXEL00_1M |
||
4455 | } |
||
4456 | else |
||
4457 | { |
||
4458 | PIXEL00_2 |
||
4459 | } |
||
4460 | PIXEL01_C |
||
4461 | PIXEL02_1R |
||
4462 | PIXEL10_C |
||
4463 | PIXEL11 |
||
4464 | PIXEL12_1 |
||
4465 | if (Diff(w[8], w[4])) |
||
4466 | { |
||
4467 | PIXEL20_1M |
||
4468 | } |
||
4469 | else |
||
4470 | { |
||
4471 | PIXEL20_2 |
||
4472 | } |
||
4473 | PIXEL21_C |
||
4474 | PIXEL22_1M |
||
4475 | break; |
||
4476 | } |
||
4477 | case 154: |
||
4478 | { |
||
4479 | if (Diff(w[4], w[2])) |
||
4480 | { |
||
4481 | PIXEL00_1M |
||
4482 | } |
||
4483 | else |
||
4484 | { |
||
4485 | PIXEL00_2 |
||
4486 | } |
||
4487 | PIXEL01_C |
||
4488 | if (Diff(w[2], w[6])) |
||
4489 | { |
||
4490 | PIXEL02_1M |
||
4491 | } |
||
4492 | else |
||
4493 | { |
||
4494 | PIXEL02_2 |
||
4495 | } |
||
4496 | PIXEL10_C |
||
4497 | PIXEL11 |
||
4498 | PIXEL12_C |
||
4499 | PIXEL20_1M |
||
4500 | PIXEL21_1 |
||
4501 | PIXEL22_1D |
||
4502 | break; |
||
4503 | } |
||
4504 | case 114: |
||
4505 | { |
||
4506 | PIXEL00_1M |
||
4507 | PIXEL01_C |
||
4508 | if (Diff(w[2], w[6])) |
||
4509 | { |
||
4510 | PIXEL02_1M |
||
4511 | } |
||
4512 | else |
||
4513 | { |
||
4514 | PIXEL02_2 |
||
4515 | } |
||
4516 | PIXEL10_1 |
||
4517 | PIXEL11 |
||
4518 | PIXEL12_C |
||
4519 | PIXEL20_1L |
||
4520 | PIXEL21_C |
||
4521 | if (Diff(w[6], w[8])) |
||
4522 | { |
||
4523 | PIXEL22_1M |
||
4524 | } |
||
4525 | else |
||
4526 | { |
||
4527 | PIXEL22_2 |
||
4528 | } |
||
4529 | break; |
||
4530 | } |
||
4531 | case 89: |
||
4532 | { |
||
4533 | PIXEL00_1U |
||
4534 | PIXEL01_1 |
||
4535 | PIXEL02_1M |
||
4536 | PIXEL10_C |
||
4537 | PIXEL11 |
||
4538 | PIXEL12_C |
||
4539 | if (Diff(w[8], w[4])) |
||
4540 | { |
||
4541 | PIXEL20_1M |
||
4542 | } |
||
4543 | else |
||
4544 | { |
||
4545 | PIXEL20_2 |
||
4546 | } |
||
4547 | PIXEL21_C |
||
4548 | if (Diff(w[6], w[8])) |
||
4549 | { |
||
4550 | PIXEL22_1M |
||
4551 | } |
||
4552 | else |
||
4553 | { |
||
4554 | PIXEL22_2 |
||
4555 | } |
||
4556 | break; |
||
4557 | } |
||
4558 | case 90: |
||
4559 | { |
||
4560 | if (Diff(w[4], w[2])) |
||
4561 | { |
||
4562 | PIXEL00_1M |
||
4563 | } |
||
4564 | else |
||
4565 | { |
||
4566 | PIXEL00_2 |
||
4567 | } |
||
4568 | PIXEL01_C |
||
4569 | if (Diff(w[2], w[6])) |
||
4570 | { |
||
4571 | PIXEL02_1M |
||
4572 | } |
||
4573 | else |
||
4574 | { |
||
4575 | PIXEL02_2 |
||
4576 | } |
||
4577 | PIXEL10_C |
||
4578 | PIXEL11 |
||
4579 | PIXEL12_C |
||
4580 | if (Diff(w[8], w[4])) |
||
4581 | { |
||
4582 | PIXEL20_1M |
||
4583 | } |
||
4584 | else |
||
4585 | { |
||
4586 | PIXEL20_2 |
||
4587 | } |
||
4588 | PIXEL21_C |
||
4589 | if (Diff(w[6], w[8])) |
||
4590 | { |
||
4591 | PIXEL22_1M |
||
4592 | } |
||
4593 | else |
||
4594 | { |
||
4595 | PIXEL22_2 |
||
4596 | } |
||
4597 | break; |
||
4598 | } |
||
4599 | case 55: |
||
4600 | case 23: |
||
4601 | { |
||
4602 | if (Diff(w[2], w[6])) |
||
4603 | { |
||
4604 | PIXEL00_1L |
||
4605 | PIXEL01_C |
||
4606 | PIXEL02_C |
||
4607 | PIXEL12_C |
||
4608 | } |
||
4609 | else |
||
4610 | { |
||
4611 | PIXEL00_2 |
||
4612 | PIXEL01_6 |
||
4613 | PIXEL02_5 |
||
4614 | PIXEL12_1 |
||
4615 | } |
||
4616 | PIXEL10_1 |
||
4617 | PIXEL11 |
||
4618 | PIXEL20_2 |
||
4619 | PIXEL21_1 |
||
4620 | PIXEL22_1M |
||
4621 | break; |
||
4622 | } |
||
4623 | case 182: |
||
4624 | case 150: |
||
4625 | { |
||
4626 | if (Diff(w[2], w[6])) |
||
4627 | { |
||
4628 | PIXEL01_C |
||
4629 | PIXEL02_C |
||
4630 | PIXEL12_C |
||
4631 | PIXEL22_1D |
||
4632 | } |
||
4633 | else |
||
4634 | { |
||
4635 | PIXEL01_1 |
||
4636 | PIXEL02_5 |
||
4637 | PIXEL12_6 |
||
4638 | PIXEL22_2 |
||
4639 | } |
||
4640 | PIXEL00_1M |
||
4641 | PIXEL10_1 |
||
4642 | PIXEL11 |
||
4643 | PIXEL20_2 |
||
4644 | PIXEL21_1 |
||
4645 | break; |
||
4646 | } |
||
4647 | case 213: |
||
4648 | case 212: |
||
4649 | { |
||
4650 | if (Diff(w[6], w[8])) |
||
4651 | { |
||
4652 | PIXEL02_1U |
||
4653 | PIXEL12_C |
||
4654 | PIXEL21_C |
||
4655 | PIXEL22_C |
||
4656 | } |
||
4657 | else |
||
4658 | { |
||
4659 | PIXEL02_2 |
||
4660 | PIXEL12_6 |
||
4661 | PIXEL21_1 |
||
4662 | PIXEL22_5 |
||
4663 | } |
||
4664 | PIXEL00_2 |
||
4665 | PIXEL01_1 |
||
4666 | PIXEL10_1 |
||
4667 | PIXEL11 |
||
4668 | PIXEL20_1M |
||
4669 | break; |
||
4670 | } |
||
4671 | case 241: |
||
4672 | case 240: |
||
4673 | { |
||
4674 | if (Diff(w[6], w[8])) |
||
4675 | { |
||
4676 | PIXEL12_C |
||
4677 | PIXEL20_1L |
||
4678 | PIXEL21_C |
||
4679 | PIXEL22_C |
||
4680 | } |
||
4681 | else |
||
4682 | { |
||
4683 | PIXEL12_1 |
||
4684 | PIXEL20_2 |
||
4685 | PIXEL21_6 |
||
4686 | PIXEL22_5 |
||
4687 | } |
||
4688 | PIXEL00_2 |
||
4689 | PIXEL01_1 |
||
4690 | PIXEL02_1M |
||
4691 | PIXEL10_1 |
||
4692 | PIXEL11 |
||
4693 | break; |
||
4694 | } |
||
4695 | case 236: |
||
4696 | case 232: |
||
4697 | { |
||
4698 | if (Diff(w[8], w[4])) |
||
4699 | { |
||
4700 | PIXEL10_C |
||
4701 | PIXEL20_C |
||
4702 | PIXEL21_C |
||
4703 | PIXEL22_1R |
||
4704 | } |
||
4705 | else |
||
4706 | { |
||
4707 | PIXEL10_1 |
||
4708 | PIXEL20_5 |
||
4709 | PIXEL21_6 |
||
4710 | PIXEL22_2 |
||
4711 | } |
||
4712 | PIXEL00_1M |
||
4713 | PIXEL01_1 |
||
4714 | PIXEL02_2 |
||
4715 | PIXEL11 |
||
4716 | PIXEL12_1 |
||
4717 | break; |
||
4718 | } |
||
4719 | case 109: |
||
4720 | case 105: |
||
4721 | { |
||
4722 | if (Diff(w[8], w[4])) |
||
4723 | { |
||
4724 | PIXEL00_1U |
||
4725 | PIXEL10_C |
||
4726 | PIXEL20_C |
||
4727 | PIXEL21_C |
||
4728 | } |
||
4729 | else |
||
4730 | { |
||
4731 | PIXEL00_2 |
||
4732 | PIXEL10_6 |
||
4733 | PIXEL20_5 |
||
4734 | PIXEL21_1 |
||
4735 | } |
||
4736 | PIXEL01_1 |
||
4737 | PIXEL02_2 |
||
4738 | PIXEL11 |
||
4739 | PIXEL12_1 |
||
4740 | PIXEL22_1M |
||
4741 | break; |
||
4742 | } |
||
4743 | case 171: |
||
4744 | case 43: |
||
4745 | { |
||
4746 | if (Diff(w[4], w[2])) |
||
4747 | { |
||
4748 | PIXEL00_C |
||
4749 | PIXEL01_C |
||
4750 | PIXEL10_C |
||
4751 | PIXEL20_1D |
||
4752 | } |
||
4753 | else |
||
4754 | { |
||
4755 | PIXEL00_5 |
||
4756 | PIXEL01_1 |
||
4757 | PIXEL10_6 |
||
4758 | PIXEL20_2 |
||
4759 | } |
||
4760 | PIXEL02_1M |
||
4761 | PIXEL11 |
||
4762 | PIXEL12_1 |
||
4763 | PIXEL21_1 |
||
4764 | PIXEL22_2 |
||
4765 | break; |
||
4766 | } |
||
4767 | case 143: |
||
4768 | case 15: |
||
4769 | { |
||
4770 | if (Diff(w[4], w[2])) |
||
4771 | { |
||
4772 | PIXEL00_C |
||
4773 | PIXEL01_C |
||
4774 | PIXEL02_1R |
||
4775 | PIXEL10_C |
||
4776 | } |
||
4777 | else |
||
4778 | { |
||
4779 | PIXEL00_5 |
||
4780 | PIXEL01_6 |
||
4781 | PIXEL02_2 |
||
4782 | PIXEL10_1 |
||
4783 | } |
||
4784 | PIXEL11 |
||
4785 | PIXEL12_1 |
||
4786 | PIXEL20_1M |
||
4787 | PIXEL21_1 |
||
4788 | PIXEL22_2 |
||
4789 | break; |
||
4790 | } |
||
4791 | case 124: |
||
4792 | { |
||
4793 | PIXEL00_1M |
||
4794 | PIXEL01_1 |
||
4795 | PIXEL02_1U |
||
4796 | PIXEL11 |
||
4797 | PIXEL12_C |
||
4798 | if (Diff(w[8], w[4])) |
||
4799 | { |
||
4800 | PIXEL10_C |
||
4801 | PIXEL20_C |
||
4802 | PIXEL21_C |
||
4803 | } |
||
4804 | else |
||
4805 | { |
||
4806 | PIXEL10_3 |
||
4807 | PIXEL20_4 |
||
4808 | PIXEL21_3 |
||
4809 | } |
||
4810 | PIXEL22_1M |
||
4811 | break; |
||
4812 | } |
||
4813 | case 203: |
||
4814 | { |
||
4815 | if (Diff(w[4], w[2])) |
||
4816 | { |
||
4817 | PIXEL00_C |
||
4818 | PIXEL01_C |
||
4819 | PIXEL10_C |
||
4820 | } |
||
4821 | else |
||
4822 | { |
||
4823 | PIXEL00_4 |
||
4824 | PIXEL01_3 |
||
4825 | PIXEL10_3 |
||
4826 | } |
||
4827 | PIXEL02_1M |
||
4828 | PIXEL11 |
||
4829 | PIXEL12_1 |
||
4830 | PIXEL20_1M |
||
4831 | PIXEL21_C |
||
4832 | PIXEL22_1R |
||
4833 | break; |
||
4834 | } |
||
4835 | case 62: |
||
4836 | { |
||
4837 | PIXEL00_1M |
||
4838 | if (Diff(w[2], w[6])) |
||
4839 | { |
||
4840 | PIXEL01_C |
||
4841 | PIXEL02_C |
||
4842 | PIXEL12_C |
||
4843 | } |
||
4844 | else |
||
4845 | { |
||
4846 | PIXEL01_3 |
||
4847 | PIXEL02_4 |
||
4848 | PIXEL12_3 |
||
4849 | } |
||
4850 | PIXEL10_C |
||
4851 | PIXEL11 |
||
4852 | PIXEL20_1D |
||
4853 | PIXEL21_1 |
||
4854 | PIXEL22_1M |
||
4855 | break; |
||
4856 | } |
||
4857 | case 211: |
||
4858 | { |
||
4859 | PIXEL00_1L |
||
4860 | PIXEL01_C |
||
4861 | PIXEL02_1M |
||
4862 | PIXEL10_1 |
||
4863 | PIXEL11 |
||
4864 | PIXEL20_1M |
||
4865 | if (Diff(w[6], w[8])) |
||
4866 | { |
||
4867 | PIXEL12_C |
||
4868 | PIXEL21_C |
||
4869 | PIXEL22_C |
||
4870 | } |
||
4871 | else |
||
4872 | { |
||
4873 | PIXEL12_3 |
||
4874 | PIXEL21_3 |
||
4875 | PIXEL22_4 |
||
4876 | } |
||
4877 | break; |
||
4878 | } |
||
4879 | case 118: |
||
4880 | { |
||
4881 | PIXEL00_1M |
||
4882 | if (Diff(w[2], w[6])) |
||
4883 | { |
||
4884 | PIXEL01_C |
||
4885 | PIXEL02_C |
||
4886 | PIXEL12_C |
||
4887 | } |
||
4888 | else |
||
4889 | { |
||
4890 | PIXEL01_3 |
||
4891 | PIXEL02_4 |
||
4892 | PIXEL12_3 |
||
4893 | } |
||
4894 | PIXEL10_1 |
||
4895 | PIXEL11 |
||
4896 | PIXEL20_1L |
||
4897 | PIXEL21_C |
||
4898 | PIXEL22_1M |
||
4899 | break; |
||
4900 | } |
||
4901 | case 217: |
||
4902 | { |
||
4903 | PIXEL00_1U |
||
4904 | PIXEL01_1 |
||
4905 | PIXEL02_1M |
||
4906 | PIXEL10_C |
||
4907 | PIXEL11 |
||
4908 | PIXEL20_1M |
||
4909 | if (Diff(w[6], w[8])) |
||
4910 | { |
||
4911 | PIXEL12_C |
||
4912 | PIXEL21_C |
||
4913 | PIXEL22_C |
||
4914 | } |
||
4915 | else |
||
4916 | { |
||
4917 | PIXEL12_3 |
||
4918 | PIXEL21_3 |
||
4919 | PIXEL22_4 |
||
4920 | } |
||
4921 | break; |
||
4922 | } |
||
4923 | case 110: |
||
4924 | { |
||
4925 | PIXEL00_1M |
||
4926 | PIXEL01_C |
||
4927 | PIXEL02_1R |
||
4928 | PIXEL11 |
||
4929 | PIXEL12_1 |
||
4930 | if (Diff(w[8], w[4])) |
||
4931 | { |
||
4932 | PIXEL10_C |
||
4933 | PIXEL20_C |
||
4934 | PIXEL21_C |
||
4935 | } |
||
4936 | else |
||
4937 | { |
||
4938 | PIXEL10_3 |
||
4939 | PIXEL20_4 |
||
4940 | PIXEL21_3 |
||
4941 | } |
||
4942 | PIXEL22_1M |
||
4943 | break; |
||
4944 | } |
||
4945 | case 155: |
||
4946 | { |
||
4947 | if (Diff(w[4], w[2])) |
||
4948 | { |
||
4949 | PIXEL00_C |
||
4950 | PIXEL01_C |
||
4951 | PIXEL10_C |
||
4952 | } |
||
4953 | else |
||
4954 | { |
||
4955 | PIXEL00_4 |
||
4956 | PIXEL01_3 |
||
4957 | PIXEL10_3 |
||
4958 | } |
||
4959 | PIXEL02_1M |
||
4960 | PIXEL11 |
||
4961 | PIXEL12_C |
||
4962 | PIXEL20_1M |
||
4963 | PIXEL21_1 |
||
4964 | PIXEL22_1D |
||
4965 | break; |
||
4966 | } |
||
4967 | case 188: |
||
4968 | { |
||
4969 | PIXEL00_1M |
||
4970 | PIXEL01_1 |
||
4971 | PIXEL02_1U |
||
4972 | PIXEL10_C |
||
4973 | PIXEL11 |
||
4974 | PIXEL12_C |
||
4975 | PIXEL20_1D |
||
4976 | PIXEL21_1 |
||
4977 | PIXEL22_1D |
||
4978 | break; |
||
4979 | } |
||
4980 | case 185: |
||
4981 | { |
||
4982 | PIXEL00_1U |
||
4983 | PIXEL01_1 |
||
4984 | PIXEL02_1M |
||
4985 | PIXEL10_C |
||
4986 | PIXEL11 |
||
4987 | PIXEL12_C |
||
4988 | PIXEL20_1D |
||
4989 | PIXEL21_1 |
||
4990 | PIXEL22_1D |
||
4991 | break; |
||
4992 | } |
||
4993 | case 61: |
||
4994 | { |
||
4995 | PIXEL00_1U |
||
4996 | PIXEL01_1 |
||
4997 | PIXEL02_1U |
||
4998 | PIXEL10_C |
||
4999 | PIXEL11 |
||
5000 | PIXEL12_C |
||
5001 | PIXEL20_1D |
||
5002 | PIXEL21_1 |
||
5003 | PIXEL22_1M |
||
5004 | break; |
||
5005 | } |
||
5006 | case 157: |
||
5007 | { |
||
5008 | PIXEL00_1U |
||
5009 | PIXEL01_1 |
||
5010 | PIXEL02_1U |
||
5011 | PIXEL10_C |
||
5012 | PIXEL11 |
||
5013 | PIXEL12_C |
||
5014 | PIXEL20_1M |
||
5015 | PIXEL21_1 |
||
5016 | PIXEL22_1D |
||
5017 | break; |
||
5018 | } |
||
5019 | case 103: |
||
5020 | { |
||
5021 | PIXEL00_1L |
||
5022 | PIXEL01_C |
||
5023 | PIXEL02_1R |
||
5024 | PIXEL10_1 |
||
5025 | PIXEL11 |
||
5026 | PIXEL12_1 |
||
5027 | PIXEL20_1L |
||
5028 | PIXEL21_C |
||
5029 | PIXEL22_1M |
||
5030 | break; |
||
5031 | } |
||
5032 | case 227: |
||
5033 | { |
||
5034 | PIXEL00_1L |
||
5035 | PIXEL01_C |
||
5036 | PIXEL02_1M |
||
5037 | PIXEL10_1 |
||
5038 | PIXEL11 |
||
5039 | PIXEL12_1 |
||
5040 | PIXEL20_1L |
||
5041 | PIXEL21_C |
||
5042 | PIXEL22_1R |
||
5043 | break; |
||
5044 | } |
||
5045 | case 230: |
||
5046 | { |
||
5047 | PIXEL00_1M |
||
5048 | PIXEL01_C |
||
5049 | PIXEL02_1R |
||
5050 | PIXEL10_1 |
||
5051 | PIXEL11 |
||
5052 | PIXEL12_1 |
||
5053 | PIXEL20_1L |
||
5054 | PIXEL21_C |
||
5055 | PIXEL22_1R |
||
5056 | break; |
||
5057 | } |
||
5058 | case 199: |
||
5059 | { |
||
5060 | PIXEL00_1L |
||
5061 | PIXEL01_C |
||
5062 | PIXEL02_1R |
||
5063 | PIXEL10_1 |
||
5064 | PIXEL11 |
||
5065 | PIXEL12_1 |
||
5066 | PIXEL20_1M |
||
5067 | PIXEL21_C |
||
5068 | PIXEL22_1R |
||
5069 | break; |
||
5070 | } |
||
5071 | case 220: |
||
5072 | { |
||
5073 | PIXEL00_1M |
||
5074 | PIXEL01_1 |
||
5075 | PIXEL02_1U |
||
5076 | PIXEL10_C |
||
5077 | PIXEL11 |
||
5078 | if (Diff(w[8], w[4])) |
||
5079 | { |
||
5080 | PIXEL20_1M |
||
5081 | } |
||
5082 | else |
||
5083 | { |
||
5084 | PIXEL20_2 |
||
5085 | } |
||
5086 | if (Diff(w[6], w[8])) |
||
5087 | { |
||
5088 | PIXEL12_C |
||
5089 | PIXEL21_C |
||
5090 | PIXEL22_C |
||
5091 | } |
||
5092 | else |
||
5093 | { |
||
5094 | PIXEL12_3 |
||
5095 | PIXEL21_3 |
||
5096 | PIXEL22_4 |
||
5097 | } |
||
5098 | break; |
||
5099 | } |
||
5100 | case 158: |
||
5101 | { |
||
5102 | if (Diff(w[4], w[2])) |
||
5103 | { |
||
5104 | PIXEL00_1M |
||
5105 | } |
||
5106 | else |
||
5107 | { |
||
5108 | PIXEL00_2 |
||
5109 | } |
||
5110 | if (Diff(w[2], w[6])) |
||
5111 | { |
||
5112 | PIXEL01_C |
||
5113 | PIXEL02_C |
||
5114 | PIXEL12_C |
||
5115 | } |
||
5116 | else |
||
5117 | { |
||
5118 | PIXEL01_3 |
||
5119 | PIXEL02_4 |
||
5120 | PIXEL12_3 |
||
5121 | } |
||
5122 | PIXEL10_C |
||
5123 | PIXEL11 |
||
5124 | PIXEL20_1M |
||
5125 | PIXEL21_1 |
||
5126 | PIXEL22_1D |
||
5127 | break; |
||
5128 | } |
||
5129 | case 234: |
||
5130 | { |
||
5131 | if (Diff(w[4], w[2])) |
||
5132 | { |
||
5133 | PIXEL00_1M |
||
5134 | } |
||
5135 | else |
||
5136 | { |
||
5137 | PIXEL00_2 |
||
5138 | } |
||
5139 | PIXEL01_C |
||
5140 | PIXEL02_1M |
||
5141 | PIXEL11 |
||
5142 | PIXEL12_1 |
||
5143 | if (Diff(w[8], w[4])) |
||
5144 | { |
||
5145 | PIXEL10_C |
||
5146 | PIXEL20_C |
||
5147 | PIXEL21_C |
||
5148 | } |
||
5149 | else |
||
5150 | { |
||
5151 | PIXEL10_3 |
||
5152 | PIXEL20_4 |
||
5153 | PIXEL21_3 |
||
5154 | } |
||
5155 | PIXEL22_1R |
||
5156 | break; |
||
5157 | } |
||
5158 | case 242: |
||
5159 | { |
||
5160 | PIXEL00_1M |
||
5161 | PIXEL01_C |
||
5162 | if (Diff(w[2], w[6])) |
||
5163 | { |
||
5164 | PIXEL02_1M |
||
5165 | } |
||
5166 | else |
||
5167 | { |
||
5168 | PIXEL02_2 |
||
5169 | } |
||
5170 | PIXEL10_1 |
||
5171 | PIXEL11 |
||
5172 | PIXEL20_1L |
||
5173 | if (Diff(w[6], w[8])) |
||
5174 | { |
||
5175 | PIXEL12_C |
||
5176 | PIXEL21_C |
||
5177 | PIXEL22_C |
||
5178 | } |
||
5179 | else |
||
5180 | { |
||
5181 | PIXEL12_3 |
||
5182 | PIXEL21_3 |
||
5183 | PIXEL22_4 |
||
5184 | } |
||
5185 | break; |
||
5186 | } |
||
5187 | case 59: |
||
5188 | { |
||
5189 | if (Diff(w[4], w[2])) |
||
5190 | { |
||
5191 | PIXEL00_C |
||
5192 | PIXEL01_C |
||
5193 | PIXEL10_C |
||
5194 | } |
||
5195 | else |
||
5196 | { |
||
5197 | PIXEL00_4 |
||
5198 | PIXEL01_3 |
||
5199 | PIXEL10_3 |
||
5200 | } |
||
5201 | if (Diff(w[2], w[6])) |
||
5202 | { |
||
5203 | PIXEL02_1M |
||
5204 | } |
||
5205 | else |
||
5206 | { |
||
5207 | PIXEL02_2 |
||
5208 | } |
||
5209 | PIXEL11 |
||
5210 | PIXEL12_C |
||
5211 | PIXEL20_1D |
||
5212 | PIXEL21_1 |
||
5213 | PIXEL22_1M |
||
5214 | break; |
||
5215 | } |
||
5216 | case 121: |
||
5217 | { |
||
5218 | PIXEL00_1U |
||
5219 | PIXEL01_1 |
||
5220 | PIXEL02_1M |
||
5221 | PIXEL11 |
||
5222 | PIXEL12_C |
||
5223 | if (Diff(w[8], w[4])) |
||
5224 | { |
||
5225 | PIXEL10_C |
||
5226 | PIXEL20_C |
||
5227 | PIXEL21_C |
||
5228 | } |
||
5229 | else |
||
5230 | { |
||
5231 | PIXEL10_3 |
||
5232 | PIXEL20_4 |
||
5233 | PIXEL21_3 |
||
5234 | } |
||
5235 | if (Diff(w[6], w[8])) |
||
5236 | { |
||
5237 | PIXEL22_1M |
||
5238 | } |
||
5239 | else |
||
5240 | { |
||
5241 | PIXEL22_2 |
||
5242 | } |
||
5243 | break; |
||
5244 | } |
||
5245 | case 87: |
||
5246 | { |
||
5247 | PIXEL00_1L |
||
5248 | if (Diff(w[2], w[6])) |
||
5249 | { |
||
5250 | PIXEL01_C |
||
5251 | PIXEL02_C |
||
5252 | PIXEL12_C |
||
5253 | } |
||
5254 | else |
||
5255 | { |
||
5256 | PIXEL01_3 |
||
5257 | PIXEL02_4 |
||
5258 | PIXEL12_3 |
||
5259 | } |
||
5260 | PIXEL10_1 |
||
5261 | PIXEL11 |
||
5262 | PIXEL20_1M |
||
5263 | PIXEL21_C |
||
5264 | if (Diff(w[6], w[8])) |
||
5265 | { |
||
5266 | PIXEL22_1M |
||
5267 | } |
||
5268 | else |
||
5269 | { |
||
5270 | PIXEL22_2 |
||
5271 | } |
||
5272 | break; |
||
5273 | } |
||
5274 | case 79: |
||
5275 | { |
||
5276 | if (Diff(w[4], w[2])) |
||
5277 | { |
||
5278 | PIXEL00_C |
||
5279 | PIXEL01_C |
||
5280 | PIXEL10_C |
||
5281 | } |
||
5282 | else |
||
5283 | { |
||
5284 | PIXEL00_4 |
||
5285 | PIXEL01_3 |
||
5286 | PIXEL10_3 |
||
5287 | } |
||
5288 | PIXEL02_1R |
||
5289 | PIXEL11 |
||
5290 | PIXEL12_1 |
||
5291 | if (Diff(w[8], w[4])) |
||
5292 | { |
||
5293 | PIXEL20_1M |
||
5294 | } |
||
5295 | else |
||
5296 | { |
||
5297 | PIXEL20_2 |
||
5298 | } |
||
5299 | PIXEL21_C |
||
5300 | PIXEL22_1M |
||
5301 | break; |
||
5302 | } |
||
5303 | case 122: |
||
5304 | { |
||
5305 | if (Diff(w[4], w[2])) |
||
5306 | { |
||
5307 | PIXEL00_1M |
||
5308 | } |
||
5309 | else |
||
5310 | { |
||
5311 | PIXEL00_2 |
||
5312 | } |
||
5313 | PIXEL01_C |
||
5314 | if (Diff(w[2], w[6])) |
||
5315 | { |
||
5316 | PIXEL02_1M |
||
5317 | } |
||
5318 | else |
||
5319 | { |
||
5320 | PIXEL02_2 |
||
5321 | } |
||
5322 | PIXEL11 |
||
5323 | PIXEL12_C |
||
5324 | if (Diff(w[8], w[4])) |
||
5325 | { |
||
5326 | PIXEL10_C |
||
5327 | PIXEL20_C |
||
5328 | PIXEL21_C |
||
5329 | } |
||
5330 | else |
||
5331 | { |
||
5332 | PIXEL10_3 |
||
5333 | PIXEL20_4 |
||
5334 | PIXEL21_3 |
||
5335 | } |
||
5336 | if (Diff(w[6], w[8])) |
||
5337 | { |
||
5338 | PIXEL22_1M |
||
5339 | } |
||
5340 | else |
||
5341 | { |
||
5342 | PIXEL22_2 |
||
5343 | } |
||
5344 | break; |
||
5345 | } |
||
5346 | case 94: |
||
5347 | { |
||
5348 | if (Diff(w[4], w[2])) |
||
5349 | { |
||
5350 | PIXEL00_1M |
||
5351 | } |
||
5352 | else |
||
5353 | { |
||
5354 | PIXEL00_2 |
||
5355 | } |
||
5356 | if (Diff(w[2], w[6])) |
||
5357 | { |
||
5358 | PIXEL01_C |
||
5359 | PIXEL02_C |
||
5360 | PIXEL12_C |
||
5361 | } |
||
5362 | else |
||
5363 | { |
||
5364 | PIXEL01_3 |
||
5365 | PIXEL02_4 |
||
5366 | PIXEL12_3 |
||
5367 | } |
||
5368 | PIXEL10_C |
||
5369 | PIXEL11 |
||
5370 | if (Diff(w[8], w[4])) |
||
5371 | { |
||
5372 | PIXEL20_1M |
||
5373 | } |
||
5374 | else |
||
5375 | { |
||
5376 | PIXEL20_2 |
||
5377 | } |
||
5378 | PIXEL21_C |
||
5379 | if (Diff(w[6], w[8])) |
||
5380 | { |
||
5381 | PIXEL22_1M |
||
5382 | } |
||
5383 | else |
||
5384 | { |
||
5385 | PIXEL22_2 |
||
5386 | } |
||
5387 | break; |
||
5388 | } |
||
5389 | case 218: |
||
5390 | { |
||
5391 | if (Diff(w[4], w[2])) |
||
5392 | { |
||
5393 | PIXEL00_1M |
||
5394 | } |
||
5395 | else |
||
5396 | { |
||
5397 | PIXEL00_2 |
||
5398 | } |
||
5399 | PIXEL01_C |
||
5400 | if (Diff(w[2], w[6])) |
||
5401 | { |
||
5402 | PIXEL02_1M |
||
5403 | } |
||
5404 | else |
||
5405 | { |
||
5406 | PIXEL02_2 |
||
5407 | } |
||
5408 | PIXEL10_C |
||
5409 | PIXEL11 |
||
5410 | if (Diff(w[8], w[4])) |
||
5411 | { |
||
5412 | PIXEL20_1M |
||
5413 | } |
||
5414 | else |
||
5415 | { |
||
5416 | PIXEL20_2 |
||
5417 | } |
||
5418 | if (Diff(w[6], w[8])) |
||
5419 | { |
||
5420 | PIXEL12_C |
||
5421 | PIXEL21_C |
||
5422 | PIXEL22_C |
||
5423 | } |
||
5424 | else |
||
5425 | { |
||
5426 | PIXEL12_3 |
||
5427 | PIXEL21_3 |
||
5428 | PIXEL22_4 |
||
5429 | } |
||
5430 | break; |
||
5431 | } |
||
5432 | case 91: |
||
5433 | { |
||
5434 | if (Diff(w[4], w[2])) |
||
5435 | { |
||
5436 | PIXEL00_C |
||
5437 | PIXEL01_C |
||
5438 | PIXEL10_C |
||
5439 | } |
||
5440 | else |
||
5441 | { |
||
5442 | PIXEL00_4 |
||
5443 | PIXEL01_3 |
||
5444 | PIXEL10_3 |
||
5445 | } |
||
5446 | if (Diff(w[2], w[6])) |
||
5447 | { |
||
5448 | PIXEL02_1M |
||
5449 | } |
||
5450 | else |
||
5451 | { |
||
5452 | PIXEL02_2 |
||
5453 | } |
||
5454 | PIXEL11 |
||
5455 | PIXEL12_C |
||
5456 | if (Diff(w[8], w[4])) |
||
5457 | { |
||
5458 | PIXEL20_1M |
||
5459 | } |
||
5460 | else |
||
5461 | { |
||
5462 | PIXEL20_2 |
||
5463 | } |
||
5464 | PIXEL21_C |
||
5465 | if (Diff(w[6], w[8])) |
||
5466 | { |
||
5467 | PIXEL22_1M |
||
5468 | } |
||
5469 | else |
||
5470 | { |
||
5471 | PIXEL22_2 |
||
5472 | } |
||
5473 | break; |
||
5474 | } |
||
5475 | case 229: |
||
5476 | { |
||
5477 | PIXEL00_2 |
||
5478 | PIXEL01_1 |
||
5479 | PIXEL02_2 |
||
5480 | PIXEL10_1 |
||
5481 | PIXEL11 |
||
5482 | PIXEL12_1 |
||
5483 | PIXEL20_1L |
||
5484 | PIXEL21_C |
||
5485 | PIXEL22_1R |
||
5486 | break; |
||
5487 | } |
||
5488 | case 167: |
||
5489 | { |
||
5490 | PIXEL00_1L |
||
5491 | PIXEL01_C |
||
5492 | PIXEL02_1R |
||
5493 | PIXEL10_1 |
||
5494 | PIXEL11 |
||
5495 | PIXEL12_1 |
||
5496 | PIXEL20_2 |
||
5497 | PIXEL21_1 |
||
5498 | PIXEL22_2 |
||
5499 | break; |
||
5500 | } |
||
5501 | case 173: |
||
5502 | { |
||
5503 | PIXEL00_1U |
||
5504 | PIXEL01_1 |
||
5505 | PIXEL02_2 |
||
5506 | PIXEL10_C |
||
5507 | PIXEL11 |
||
5508 | PIXEL12_1 |
||
5509 | PIXEL20_1D |
||
5510 | PIXEL21_1 |
||
5511 | PIXEL22_2 |
||
5512 | break; |
||
5513 | } |
||
5514 | case 181: |
||
5515 | { |
||
5516 | PIXEL00_2 |
||
5517 | PIXEL01_1 |
||
5518 | PIXEL02_1U |
||
5519 | PIXEL10_1 |
||
5520 | PIXEL11 |
||
5521 | PIXEL12_C |
||
5522 | PIXEL20_2 |
||
5523 | PIXEL21_1 |
||
5524 | PIXEL22_1D |
||
5525 | break; |
||
5526 | } |
||
5527 | case 186: |
||
5528 | { |
||
5529 | if (Diff(w[4], w[2])) |
||
5530 | { |
||
5531 | PIXEL00_1M |
||
5532 | } |
||
5533 | else |
||
5534 | { |
||
5535 | PIXEL00_2 |
||
5536 | } |
||
5537 | PIXEL01_C |
||
5538 | if (Diff(w[2], w[6])) |
||
5539 | { |
||
5540 | PIXEL02_1M |
||
5541 | } |
||
5542 | else |
||
5543 | { |
||
5544 | PIXEL02_2 |
||
5545 | } |
||
5546 | PIXEL10_C |
||
5547 | PIXEL11 |
||
5548 | PIXEL12_C |
||
5549 | PIXEL20_1D |
||
5550 | PIXEL21_1 |
||
5551 | PIXEL22_1D |
||
5552 | break; |
||
5553 | } |
||
5554 | case 115: |
||
5555 | { |
||
5556 | PIXEL00_1L |
||
5557 | PIXEL01_C |
||
5558 | if (Diff(w[2], w[6])) |
||
5559 | { |
||
5560 | PIXEL02_1M |
||
5561 | } |
||
5562 | else |
||
5563 | { |
||
5564 | PIXEL02_2 |
||
5565 | } |
||
5566 | PIXEL10_1 |
||
5567 | PIXEL11 |
||
5568 | PIXEL12_C |
||
5569 | PIXEL20_1L |
||
5570 | PIXEL21_C |
||
5571 | if (Diff(w[6], w[8])) |
||
5572 | { |
||
5573 | PIXEL22_1M |
||
5574 | } |
||
5575 | else |
||
5576 | { |
||
5577 | PIXEL22_2 |
||
5578 | } |
||
5579 | break; |
||
5580 | } |
||
5581 | case 93: |
||
5582 | { |
||
5583 | PIXEL00_1U |
||
5584 | PIXEL01_1 |
||
5585 | PIXEL02_1U |
||
5586 | PIXEL10_C |
||
5587 | PIXEL11 |
||
5588 | PIXEL12_C |
||
5589 | if (Diff(w[8], w[4])) |
||
5590 | { |
||
5591 | PIXEL20_1M |
||
5592 | } |
||
5593 | else |
||
5594 | { |
||
5595 | PIXEL20_2 |
||
5596 | } |
||
5597 | PIXEL21_C |
||
5598 | if (Diff(w[6], w[8])) |
||
5599 | { |
||
5600 | PIXEL22_1M |
||
5601 | } |
||
5602 | else |
||
5603 | { |
||
5604 | PIXEL22_2 |
||
5605 | } |
||
5606 | break; |
||
5607 | } |
||
5608 | case 206: |
||
5609 | { |
||
5610 | if (Diff(w[4], w[2])) |
||
5611 | { |
||
5612 | PIXEL00_1M |
||
5613 | } |
||
5614 | else |
||
5615 | { |
||
5616 | PIXEL00_2 |
||
5617 | } |
||
5618 | PIXEL01_C |
||
5619 | PIXEL02_1R |
||
5620 | PIXEL10_C |
||
5621 | PIXEL11 |
||
5622 | PIXEL12_1 |
||
5623 | if (Diff(w[8], w[4])) |
||
5624 | { |
||
5625 | PIXEL20_1M |
||
5626 | } |
||
5627 | else |
||
5628 | { |
||
5629 | PIXEL20_2 |
||
5630 | } |
||
5631 | PIXEL21_C |
||
5632 | PIXEL22_1R |
||
5633 | break; |
||
5634 | } |
||
5635 | case 205: |
||
5636 | case 201: |
||
5637 | { |
||
5638 | PIXEL00_1U |
||
5639 | PIXEL01_1 |
||
5640 | PIXEL02_2 |
||
5641 | PIXEL10_C |
||
5642 | PIXEL11 |
||
5643 | PIXEL12_1 |
||
5644 | if (Diff(w[8], w[4])) |
||
5645 | { |
||
5646 | PIXEL20_1M |
||
5647 | } |
||
5648 | else |
||
5649 | { |
||
5650 | PIXEL20_2 |
||
5651 | } |
||
5652 | PIXEL21_C |
||
5653 | PIXEL22_1R |
||
5654 | break; |
||
5655 | } |
||
5656 | case 174: |
||
5657 | case 46: |
||
5658 | { |
||
5659 | if (Diff(w[4], w[2])) |
||
5660 | { |
||
5661 | PIXEL00_1M |
||
5662 | } |
||
5663 | else |
||
5664 | { |
||
5665 | PIXEL00_2 |
||
5666 | } |
||
5667 | PIXEL01_C |
||
5668 | PIXEL02_1R |
||
5669 | PIXEL10_C |
||
5670 | PIXEL11 |
||
5671 | PIXEL12_1 |
||
5672 | PIXEL20_1D |
||
5673 | PIXEL21_1 |
||
5674 | PIXEL22_2 |
||
5675 | break; |
||
5676 | } |
||
5677 | case 179: |
||
5678 | case 147: |
||
5679 | { |
||
5680 | PIXEL00_1L |
||
5681 | PIXEL01_C |
||
5682 | if (Diff(w[2], w[6])) |
||
5683 | { |
||
5684 | PIXEL02_1M |
||
5685 | } |
||
5686 | else |
||
5687 | { |
||
5688 | PIXEL02_2 |
||
5689 | } |
||
5690 | PIXEL10_1 |
||
5691 | PIXEL11 |
||
5692 | PIXEL12_C |
||
5693 | PIXEL20_2 |
||
5694 | PIXEL21_1 |
||
5695 | PIXEL22_1D |
||
5696 | break; |
||
5697 | } |
||
5698 | case 117: |
||
5699 | case 116: |
||
5700 | { |
||
5701 | PIXEL00_2 |
||
5702 | PIXEL01_1 |
||
5703 | PIXEL02_1U |
||
5704 | PIXEL10_1 |
||
5705 | PIXEL11 |
||
5706 | PIXEL12_C |
||
5707 | PIXEL20_1L |
||
5708 | PIXEL21_C |
||
5709 | if (Diff(w[6], w[8])) |
||
5710 | { |
||
5711 | PIXEL22_1M |
||
5712 | } |
||
5713 | else |
||
5714 | { |
||
5715 | PIXEL22_2 |
||
5716 | } |
||
5717 | break; |
||
5718 | } |
||
5719 | case 189: |
||
5720 | { |
||
5721 | PIXEL00_1U |
||
5722 | PIXEL01_1 |
||
5723 | PIXEL02_1U |
||
5724 | PIXEL10_C |
||
5725 | PIXEL11 |
||
5726 | PIXEL12_C |
||
5727 | PIXEL20_1D |
||
5728 | PIXEL21_1 |
||
5729 | PIXEL22_1D |
||
5730 | break; |
||
5731 | } |
||
5732 | case 231: |
||
5733 | { |
||
5734 | PIXEL00_1L |
||
5735 | PIXEL01_C |
||
5736 | PIXEL02_1R |
||
5737 | PIXEL10_1 |
||
5738 | PIXEL11 |
||
5739 | PIXEL12_1 |
||
5740 | PIXEL20_1L |
||
5741 | PIXEL21_C |
||
5742 | PIXEL22_1R |
||
5743 | break; |
||
5744 | } |
||
5745 | case 126: |
||
5746 | { |
||
5747 | PIXEL00_1M |
||
5748 | if (Diff(w[2], w[6])) |
||
5749 | { |
||
5750 | PIXEL01_C |
||
5751 | PIXEL02_C |
||
5752 | PIXEL12_C |
||
5753 | } |
||
5754 | else |
||
5755 | { |
||
5756 | PIXEL01_3 |
||
5757 | PIXEL02_4 |
||
5758 | PIXEL12_3 |
||
5759 | } |
||
5760 | PIXEL11 |
||
5761 | if (Diff(w[8], w[4])) |
||
5762 | { |
||
5763 | PIXEL10_C |
||
5764 | PIXEL20_C |
||
5765 | PIXEL21_C |
||
5766 | } |
||
5767 | else |
||
5768 | { |
||
5769 | PIXEL10_3 |
||
5770 | PIXEL20_4 |
||
5771 | PIXEL21_3 |
||
5772 | } |
||
5773 | PIXEL22_1M |
||
5774 | break; |
||
5775 | } |
||
5776 | case 219: |
||
5777 | { |
||
5778 | if (Diff(w[4], w[2])) |
||
5779 | { |
||
5780 | PIXEL00_C |
||
5781 | PIXEL01_C |
||
5782 | PIXEL10_C |
||
5783 | } |
||
5784 | else |
||
5785 | { |
||
5786 | PIXEL00_4 |
||
5787 | PIXEL01_3 |
||
5788 | PIXEL10_3 |
||
5789 | } |
||
5790 | PIXEL02_1M |
||
5791 | PIXEL11 |
||
5792 | PIXEL20_1M |
||
5793 | if (Diff(w[6], w[8])) |
||
5794 | { |
||
5795 | PIXEL12_C |
||
5796 | PIXEL21_C |
||
5797 | PIXEL22_C |
||
5798 | } |
||
5799 | else |
||
5800 | { |
||
5801 | PIXEL12_3 |
||
5802 | PIXEL21_3 |
||
5803 | PIXEL22_4 |
||
5804 | } |
||
5805 | break; |
||
5806 | } |
||
5807 | case 125: |
||
5808 | { |
||
5809 | if (Diff(w[8], w[4])) |
||
5810 | { |
||
5811 | PIXEL00_1U |
||
5812 | PIXEL10_C |
||
5813 | PIXEL20_C |
||
5814 | PIXEL21_C |
||
5815 | } |
||
5816 | else |
||
5817 | { |
||
5818 | PIXEL00_2 |
||
5819 | PIXEL10_6 |
||
5820 | PIXEL20_5 |
||
5821 | PIXEL21_1 |
||
5822 | } |
||
5823 | PIXEL01_1 |
||
5824 | PIXEL02_1U |
||
5825 | PIXEL11 |
||
5826 | PIXEL12_C |
||
5827 | PIXEL22_1M |
||
5828 | break; |
||
5829 | } |
||
5830 | case 221: |
||
5831 | { |
||
5832 | if (Diff(w[6], w[8])) |
||
5833 | { |
||
5834 | PIXEL02_1U |
||
5835 | PIXEL12_C |
||
5836 | PIXEL21_C |
||
5837 | PIXEL22_C |
||
5838 | } |
||
5839 | else |
||
5840 | { |
||
5841 | PIXEL02_2 |
||
5842 | PIXEL12_6 |
||
5843 | PIXEL21_1 |
||
5844 | PIXEL22_5 |
||
5845 | } |
||
5846 | PIXEL00_1U |
||
5847 | PIXEL01_1 |
||
5848 | PIXEL10_C |
||
5849 | PIXEL11 |
||
5850 | PIXEL20_1M |
||
5851 | break; |
||
5852 | } |
||
5853 | case 207: |
||
5854 | { |
||
5855 | if (Diff(w[4], w[2])) |
||
5856 | { |
||
5857 | PIXEL00_C |
||
5858 | PIXEL01_C |
||
5859 | PIXEL02_1R |
||
5860 | PIXEL10_C |
||
5861 | } |
||
5862 | else |
||
5863 | { |
||
5864 | PIXEL00_5 |
||
5865 | PIXEL01_6 |
||
5866 | PIXEL02_2 |
||
5867 | PIXEL10_1 |
||
5868 | } |
||
5869 | PIXEL11 |
||
5870 | PIXEL12_1 |
||
5871 | PIXEL20_1M |
||
5872 | PIXEL21_C |
||
5873 | PIXEL22_1R |
||
5874 | break; |
||
5875 | } |
||
5876 | case 238: |
||
5877 | { |
||
5878 | if (Diff(w[8], w[4])) |
||
5879 | { |
||
5880 | PIXEL10_C |
||
5881 | PIXEL20_C |
||
5882 | PIXEL21_C |
||
5883 | PIXEL22_1R |
||
5884 | } |
||
5885 | else |
||
5886 | { |
||
5887 | PIXEL10_1 |
||
5888 | PIXEL20_5 |
||
5889 | PIXEL21_6 |
||
5890 | PIXEL22_2 |
||
5891 | } |
||
5892 | PIXEL00_1M |
||
5893 | PIXEL01_C |
||
5894 | PIXEL02_1R |
||
5895 | PIXEL11 |
||
5896 | PIXEL12_1 |
||
5897 | break; |
||
5898 | } |
||
5899 | case 190: |
||
5900 | { |
||
5901 | if (Diff(w[2], w[6])) |
||
5902 | { |
||
5903 | PIXEL01_C |
||
5904 | PIXEL02_C |
||
5905 | PIXEL12_C |
||
5906 | PIXEL22_1D |
||
5907 | } |
||
5908 | else |
||
5909 | { |
||
5910 | PIXEL01_1 |
||
5911 | PIXEL02_5 |
||
5912 | PIXEL12_6 |
||
5913 | PIXEL22_2 |
||
5914 | } |
||
5915 | PIXEL00_1M |
||
5916 | PIXEL10_C |
||
5917 | PIXEL11 |
||
5918 | PIXEL20_1D |
||
5919 | PIXEL21_1 |
||
5920 | break; |
||
5921 | } |
||
5922 | case 187: |
||
5923 | { |
||
5924 | if (Diff(w[4], w[2])) |
||
5925 | { |
||
5926 | PIXEL00_C |
||
5927 | PIXEL01_C |
||
5928 | PIXEL10_C |
||
5929 | PIXEL20_1D |
||
5930 | } |
||
5931 | else |
||
5932 | { |
||
5933 | PIXEL00_5 |
||
5934 | PIXEL01_1 |
||
5935 | PIXEL10_6 |
||
5936 | PIXEL20_2 |
||
5937 | } |
||
5938 | PIXEL02_1M |
||
5939 | PIXEL11 |
||
5940 | PIXEL12_C |
||
5941 | PIXEL21_1 |
||
5942 | PIXEL22_1D |
||
5943 | break; |
||
5944 | } |
||
5945 | case 243: |
||
5946 | { |
||
5947 | if (Diff(w[6], w[8])) |
||
5948 | { |
||
5949 | PIXEL12_C |
||
5950 | PIXEL20_1L |
||
5951 | PIXEL21_C |
||
5952 | PIXEL22_C |
||
5953 | } |
||
5954 | else |
||
5955 | { |
||
5956 | PIXEL12_1 |
||
5957 | PIXEL20_2 |
||
5958 | PIXEL21_6 |
||
5959 | PIXEL22_5 |
||
5960 | } |
||
5961 | PIXEL00_1L |
||
5962 | PIXEL01_C |
||
5963 | PIXEL02_1M |
||
5964 | PIXEL10_1 |
||
5965 | PIXEL11 |
||
5966 | break; |
||
5967 | } |
||
5968 | case 119: |
||
5969 | { |
||
5970 | if (Diff(w[2], w[6])) |
||
5971 | { |
||
5972 | PIXEL00_1L |
||
5973 | PIXEL01_C |
||
5974 | PIXEL02_C |
||
5975 | PIXEL12_C |
||
5976 | } |
||
5977 | else |
||
5978 | { |
||
5979 | PIXEL00_2 |
||
5980 | PIXEL01_6 |
||
5981 | PIXEL02_5 |
||
5982 | PIXEL12_1 |
||
5983 | } |
||
5984 | PIXEL10_1 |
||
5985 | PIXEL11 |
||
5986 | PIXEL20_1L |
||
5987 | PIXEL21_C |
||
5988 | PIXEL22_1M |
||
5989 | break; |
||
5990 | } |
||
5991 | case 237: |
||
5992 | case 233: |
||
5993 | { |
||
5994 | PIXEL00_1U |
||
5995 | PIXEL01_1 |
||
5996 | PIXEL02_2 |
||
5997 | PIXEL10_C |
||
5998 | PIXEL11 |
||
5999 | PIXEL12_1 |
||
6000 | if (Diff(w[8], w[4])) |
||
6001 | { |
||
6002 | PIXEL20_C |
||
6003 | } |
||
6004 | else |
||
6005 | { |
||
6006 | PIXEL20_2 |
||
6007 | } |
||
6008 | PIXEL21_C |
||
6009 | PIXEL22_1R |
||
6010 | break; |
||
6011 | } |
||
6012 | case 175: |
||
6013 | case 47: |
||
6014 | { |
||
6015 | if (Diff(w[4], w[2])) |
||
6016 | { |
||
6017 | PIXEL00_C |
||
6018 | } |
||
6019 | else |
||
6020 | { |
||
6021 | PIXEL00_2 |
||
6022 | } |
||
6023 | PIXEL01_C |
||
6024 | PIXEL02_1R |
||
6025 | PIXEL10_C |
||
6026 | PIXEL11 |
||
6027 | PIXEL12_1 |
||
6028 | PIXEL20_1D |
||
6029 | PIXEL21_1 |
||
6030 | PIXEL22_2 |
||
6031 | break; |
||
6032 | } |
||
6033 | case 183: |
||
6034 | case 151: |
||
6035 | { |
||
6036 | PIXEL00_1L |
||
6037 | PIXEL01_C |
||
6038 | if (Diff(w[2], w[6])) |
||
6039 | { |
||
6040 | PIXEL02_C |
||
6041 | } |
||
6042 | else |
||
6043 | { |
||
6044 | PIXEL02_2 |
||
6045 | } |
||
6046 | PIXEL10_1 |
||
6047 | PIXEL11 |
||
6048 | PIXEL12_C |
||
6049 | PIXEL20_2 |
||
6050 | PIXEL21_1 |
||
6051 | PIXEL22_1D |
||
6052 | break; |
||
6053 | } |
||
6054 | case 245: |
||
6055 | case 244: |
||
6056 | { |
||
6057 | PIXEL00_2 |
||
6058 | PIXEL01_1 |
||
6059 | PIXEL02_1U |
||
6060 | PIXEL10_1 |
||
6061 | PIXEL11 |
||
6062 | PIXEL12_C |
||
6063 | PIXEL20_1L |
||
6064 | PIXEL21_C |
||
6065 | if (Diff(w[6], w[8])) |
||
6066 | { |
||
6067 | PIXEL22_C |
||
6068 | } |
||
6069 | else |
||
6070 | { |
||
6071 | PIXEL22_2 |
||
6072 | } |
||
6073 | break; |
||
6074 | } |
||
6075 | case 250: |
||
6076 | { |
||
6077 | PIXEL00_1M |
||
6078 | PIXEL01_C |
||
6079 | PIXEL02_1M |
||
6080 | PIXEL11 |
||
6081 | if (Diff(w[8], w[4])) |
||
6082 | { |
||
6083 | PIXEL10_C |
||
6084 | PIXEL20_C |
||
6085 | } |
||
6086 | else |
||
6087 | { |
||
6088 | PIXEL10_3 |
||
6089 | PIXEL20_4 |
||
6090 | } |
||
6091 | PIXEL21_C |
||
6092 | if (Diff(w[6], w[8])) |
||
6093 | { |
||
6094 | PIXEL12_C |
||
6095 | PIXEL22_C |
||
6096 | } |
||
6097 | else |
||
6098 | { |
||
6099 | PIXEL12_3 |
||
6100 | PIXEL22_4 |
||
6101 | } |
||
6102 | break; |
||
6103 | } |
||
6104 | case 123: |
||
6105 | { |
||
6106 | if (Diff(w[4], w[2])) |
||
6107 | { |
||
6108 | PIXEL00_C |
||
6109 | PIXEL01_C |
||
6110 | } |
||
6111 | else |
||
6112 | { |
||
6113 | PIXEL00_4 |
||
6114 | PIXEL01_3 |
||
6115 | } |
||
6116 | PIXEL02_1M |
||
6117 | PIXEL10_C |
||
6118 | PIXEL11 |
||
6119 | PIXEL12_C |
||
6120 | if (Diff(w[8], w[4])) |
||
6121 | { |
||
6122 | PIXEL20_C |
||
6123 | PIXEL21_C |
||
6124 | } |
||
6125 | else |
||
6126 | { |
||
6127 | PIXEL20_4 |
||
6128 | PIXEL21_3 |
||
6129 | } |
||
6130 | PIXEL22_1M |
||
6131 | break; |
||
6132 | } |
||
6133 | case 95: |
||
6134 | { |
||
6135 | if (Diff(w[4], w[2])) |
||
6136 | { |
||
6137 | PIXEL00_C |
||
6138 | PIXEL10_C |
||
6139 | } |
||
6140 | else |
||
6141 | { |
||
6142 | PIXEL00_4 |
||
6143 | PIXEL10_3 |
||
6144 | } |
||
6145 | PIXEL01_C |
||
6146 | if (Diff(w[2], w[6])) |
||
6147 | { |
||
6148 | PIXEL02_C |
||
6149 | PIXEL12_C |
||
6150 | } |
||
6151 | else |
||
6152 | { |
||
6153 | PIXEL02_4 |
||
6154 | PIXEL12_3 |
||
6155 | } |
||
6156 | PIXEL11 |
||
6157 | PIXEL20_1M |
||
6158 | PIXEL21_C |
||
6159 | PIXEL22_1M |
||
6160 | break; |
||
6161 | } |
||
6162 | case 222: |
||
6163 | { |
||
6164 | PIXEL00_1M |
||
6165 | if (Diff(w[2], w[6])) |
||
6166 | { |
||
6167 | PIXEL01_C |
||
6168 | PIXEL02_C |
||
6169 | } |
||
6170 | else |
||
6171 | { |
||
6172 | PIXEL01_3 |
||
6173 | PIXEL02_4 |
||
6174 | } |
||
6175 | PIXEL10_C |
||
6176 | PIXEL11 |
||
6177 | PIXEL12_C |
||
6178 | PIXEL20_1M |
||
6179 | if (Diff(w[6], w[8])) |
||
6180 | { |
||
6181 | PIXEL21_C |
||
6182 | PIXEL22_C |
||
6183 | } |
||
6184 | else |
||
6185 | { |
||
6186 | PIXEL21_3 |
||
6187 | PIXEL22_4 |
||
6188 | } |
||
6189 | break; |
||
6190 | } |
||
6191 | case 252: |
||
6192 | { |
||
6193 | PIXEL00_1M |
||
6194 | PIXEL01_1 |
||
6195 | PIXEL02_1U |
||
6196 | PIXEL11 |
||
6197 | PIXEL12_C |
||
6198 | if (Diff(w[8], w[4])) |
||
6199 | { |
||
6200 | PIXEL10_C |
||
6201 | PIXEL20_C |
||
6202 | } |
||
6203 | else |
||
6204 | { |
||
6205 | PIXEL10_3 |
||
6206 | PIXEL20_4 |
||
6207 | } |
||
6208 | PIXEL21_C |
||
6209 | if (Diff(w[6], w[8])) |
||
6210 | { |
||
6211 | PIXEL22_C |
||
6212 | } |
||
6213 | else |
||
6214 | { |
||
6215 | PIXEL22_2 |
||
6216 | } |
||
6217 | break; |
||
6218 | } |
||
6219 | case 249: |
||
6220 | { |
||
6221 | PIXEL00_1U |
||
6222 | PIXEL01_1 |
||
6223 | PIXEL02_1M |
||
6224 | PIXEL10_C |
||
6225 | PIXEL11 |
||
6226 | if (Diff(w[8], w[4])) |
||
6227 | { |
||
6228 | PIXEL20_C |
||
6229 | } |
||
6230 | else |
||
6231 | { |
||
6232 | PIXEL20_2 |
||
6233 | } |
||
6234 | PIXEL21_C |
||
6235 | if (Diff(w[6], w[8])) |
||
6236 | { |
||
6237 | PIXEL12_C |
||
6238 | PIXEL22_C |
||
6239 | } |
||
6240 | else |
||
6241 | { |
||
6242 | PIXEL12_3 |
||
6243 | PIXEL22_4 |
||
6244 | } |
||
6245 | break; |
||
6246 | } |
||
6247 | case 235: |
||
6248 | { |
||
6249 | if (Diff(w[4], w[2])) |
||
6250 | { |
||
6251 | PIXEL00_C |
||
6252 | PIXEL01_C |
||
6253 | } |
||
6254 | else |
||
6255 | { |
||
6256 | PIXEL00_4 |
||
6257 | PIXEL01_3 |
||
6258 | } |
||
6259 | PIXEL02_1M |
||
6260 | PIXEL10_C |
||
6261 | PIXEL11 |
||
6262 | PIXEL12_1 |
||
6263 | if (Diff(w[8], w[4])) |
||
6264 | { |
||
6265 | PIXEL20_C |
||
6266 | } |
||
6267 | else |
||
6268 | { |
||
6269 | PIXEL20_2 |
||
6270 | } |
||
6271 | PIXEL21_C |
||
6272 | PIXEL22_1R |
||
6273 | break; |
||
6274 | } |
||
6275 | case 111: |
||
6276 | { |
||
6277 | if (Diff(w[4], w[2])) |
||
6278 | { |
||
6279 | PIXEL00_C |
||
6280 | } |
||
6281 | else |
||
6282 | { |
||
6283 | PIXEL00_2 |
||
6284 | } |
||
6285 | PIXEL01_C |
||
6286 | PIXEL02_1R |
||
6287 | PIXEL10_C |
||
6288 | PIXEL11 |
||
6289 | PIXEL12_1 |
||
6290 | if (Diff(w[8], w[4])) |
||
6291 | { |
||
6292 | PIXEL20_C |
||
6293 | PIXEL21_C |
||
6294 | } |
||
6295 | else |
||
6296 | { |
||
6297 | PIXEL20_4 |
||
6298 | PIXEL21_3 |
||
6299 | } |
||
6300 | PIXEL22_1M |
||
6301 | break; |
||
6302 | } |
||
6303 | case 63: |
||
6304 | { |
||
6305 | if (Diff(w[4], w[2])) |
||
6306 | { |
||
6307 | PIXEL00_C |
||
6308 | } |
||
6309 | else |
||
6310 | { |
||
6311 | PIXEL00_2 |
||
6312 | } |
||
6313 | PIXEL01_C |
||
6314 | if (Diff(w[2], w[6])) |
||
6315 | { |
||
6316 | PIXEL02_C |
||
6317 | PIXEL12_C |
||
6318 | } |
||
6319 | else |
||
6320 | { |
||
6321 | PIXEL02_4 |
||
6322 | PIXEL12_3 |
||
6323 | } |
||
6324 | PIXEL10_C |
||
6325 | PIXEL11 |
||
6326 | PIXEL20_1D |
||
6327 | PIXEL21_1 |
||
6328 | PIXEL22_1M |
||
6329 | break; |
||
6330 | } |
||
6331 | case 159: |
||
6332 | { |
||
6333 | if (Diff(w[4], w[2])) |
||
6334 | { |
||
6335 | PIXEL00_C |
||
6336 | PIXEL10_C |
||
6337 | } |
||
6338 | else |
||
6339 | { |
||
6340 | PIXEL00_4 |
||
6341 | PIXEL10_3 |
||
6342 | } |
||
6343 | PIXEL01_C |
||
6344 | if (Diff(w[2], w[6])) |
||
6345 | { |
||
6346 | PIXEL02_C |
||
6347 | } |
||
6348 | else |
||
6349 | { |
||
6350 | PIXEL02_2 |
||
6351 | } |
||
6352 | PIXEL11 |
||
6353 | PIXEL12_C |
||
6354 | PIXEL20_1M |
||
6355 | PIXEL21_1 |
||
6356 | PIXEL22_1D |
||
6357 | break; |
||
6358 | } |
||
6359 | case 215: |
||
6360 | { |
||
6361 | PIXEL00_1L |
||
6362 | PIXEL01_C |
||
6363 | if (Diff(w[2], w[6])) |
||
6364 | { |
||
6365 | PIXEL02_C |
||
6366 | } |
||
6367 | else |
||
6368 | { |
||
6369 | PIXEL02_2 |
||
6370 | } |
||
6371 | PIXEL10_1 |
||
6372 | PIXEL11 |
||
6373 | PIXEL12_C |
||
6374 | PIXEL20_1M |
||
6375 | if (Diff(w[6], w[8])) |
||
6376 | { |
||
6377 | PIXEL21_C |
||
6378 | PIXEL22_C |
||
6379 | } |
||
6380 | else |
||
6381 | { |
||
6382 | PIXEL21_3 |
||
6383 | PIXEL22_4 |
||
6384 | } |
||
6385 | break; |
||
6386 | } |
||
6387 | case 246: |
||
6388 | { |
||
6389 | PIXEL00_1M |
||
6390 | if (Diff(w[2], w[6])) |
||
6391 | { |
||
6392 | PIXEL01_C |
||
6393 | PIXEL02_C |
||
6394 | } |
||
6395 | else |
||
6396 | { |
||
6397 | PIXEL01_3 |
||
6398 | PIXEL02_4 |
||
6399 | } |
||
6400 | PIXEL10_1 |
||
6401 | PIXEL11 |
||
6402 | PIXEL12_C |
||
6403 | PIXEL20_1L |
||
6404 | PIXEL21_C |
||
6405 | if (Diff(w[6], w[8])) |
||
6406 | { |
||
6407 | PIXEL22_C |
||
6408 | } |
||
6409 | else |
||
6410 | { |
||
6411 | PIXEL22_2 |
||
6412 | } |
||
6413 | break; |
||
6414 | } |
||
6415 | case 254: |
||
6416 | { |
||
6417 | PIXEL00_1M |
||
6418 | if (Diff(w[2], w[6])) |
||
6419 | { |
||
6420 | PIXEL01_C |
||
6421 | PIXEL02_C |
||
6422 | } |
||
6423 | else |
||
6424 | { |
||
6425 | PIXEL01_3 |
||
6426 | PIXEL02_4 |
||
6427 | } |
||
6428 | PIXEL11 |
||
6429 | if (Diff(w[8], w[4])) |
||
6430 | { |
||
6431 | PIXEL10_C |
||
6432 | PIXEL20_C |
||
6433 | } |
||
6434 | else |
||
6435 | { |
||
6436 | PIXEL10_3 |
||
6437 | PIXEL20_4 |
||
6438 | } |
||
6439 | if (Diff(w[6], w[8])) |
||
6440 | { |
||
6441 | PIXEL12_C |
||
6442 | PIXEL21_C |
||
6443 | PIXEL22_C |
||
6444 | } |
||
6445 | else |
||
6446 | { |
||
6447 | PIXEL12_3 |
||
6448 | PIXEL21_3 |
||
6449 | PIXEL22_2 |
||
6450 | } |
||
6451 | break; |
||
6452 | } |
||
6453 | case 253: |
||
6454 | { |
||
6455 | PIXEL00_1U |
||
6456 | PIXEL01_1 |
||
6457 | PIXEL02_1U |
||
6458 | PIXEL10_C |
||
6459 | PIXEL11 |
||
6460 | PIXEL12_C |
||
6461 | if (Diff(w[8], w[4])) |
||
6462 | { |
||
6463 | PIXEL20_C |
||
6464 | } |
||
6465 | else |
||
6466 | { |
||
6467 | PIXEL20_2 |
||
6468 | } |
||
6469 | PIXEL21_C |
||
6470 | if (Diff(w[6], w[8])) |
||
6471 | { |
||
6472 | PIXEL22_C |
||
6473 | } |
||
6474 | else |
||
6475 | { |
||
6476 | PIXEL22_2 |
||
6477 | } |
||
6478 | break; |
||
6479 | } |
||
6480 | case 251: |
||
6481 | { |
||
6482 | if (Diff(w[4], w[2])) |
||
6483 | { |
||
6484 | PIXEL00_C |
||
6485 | PIXEL01_C |
||
6486 | } |
||
6487 | else |
||
6488 | { |
||
6489 | PIXEL00_4 |
||
6490 | PIXEL01_3 |
||
6491 | } |
||
6492 | PIXEL02_1M |
||
6493 | PIXEL11 |
||
6494 | if (Diff(w[8], w[4])) |
||
6495 | { |
||
6496 | PIXEL10_C |
||
6497 | PIXEL20_C |
||
6498 | PIXEL21_C |
||
6499 | } |
||
6500 | else |
||
6501 | { |
||
6502 | PIXEL10_3 |
||
6503 | PIXEL20_2 |
||
6504 | PIXEL21_3 |
||
6505 | } |
||
6506 | if (Diff(w[6], w[8])) |
||
6507 | { |
||
6508 | PIXEL12_C |
||
6509 | PIXEL22_C |
||
6510 | } |
||
6511 | else |
||
6512 | { |
||
6513 | PIXEL12_3 |
||
6514 | PIXEL22_4 |
||
6515 | } |
||
6516 | break; |
||
6517 | } |
||
6518 | case 239: |
||
6519 | { |
||
6520 | if (Diff(w[4], w[2])) |
||
6521 | { |
||
6522 | PIXEL00_C |
||
6523 | } |
||
6524 | else |
||
6525 | { |
||
6526 | PIXEL00_2 |
||
6527 | } |
||
6528 | PIXEL01_C |
||
6529 | PIXEL02_1R |
||
6530 | PIXEL10_C |
||
6531 | PIXEL11 |
||
6532 | PIXEL12_1 |
||
6533 | if (Diff(w[8], w[4])) |
||
6534 | { |
||
6535 | PIXEL20_C |
||
6536 | } |
||
6537 | else |
||
6538 | { |
||
6539 | PIXEL20_2 |
||
6540 | } |
||
6541 | PIXEL21_C |
||
6542 | PIXEL22_1R |
||
6543 | break; |
||
6544 | } |
||
6545 | case 127: |
||
6546 | { |
||
6547 | if (Diff(w[4], w[2])) |
||
6548 | { |
||
6549 | PIXEL00_C |
||
6550 | PIXEL01_C |
||
6551 | PIXEL10_C |
||
6552 | } |
||
6553 | else |
||
6554 | { |
||
6555 | PIXEL00_2 |
||
6556 | PIXEL01_3 |
||
6557 | PIXEL10_3 |
||
6558 | } |
||
6559 | if (Diff(w[2], w[6])) |
||
6560 | { |
||
6561 | PIXEL02_C |
||
6562 | PIXEL12_C |
||
6563 | } |
||
6564 | else |
||
6565 | { |
||
6566 | PIXEL02_4 |
||
6567 | PIXEL12_3 |
||
6568 | } |
||
6569 | PIXEL11 |
||
6570 | if (Diff(w[8], w[4])) |
||
6571 | { |
||
6572 | PIXEL20_C |
||
6573 | PIXEL21_C |
||
6574 | } |
||
6575 | else |
||
6576 | { |
||
6577 | PIXEL20_4 |
||
6578 | PIXEL21_3 |
||
6579 | } |
||
6580 | PIXEL22_1M |
||
6581 | break; |
||
6582 | } |
||
6583 | case 191: |
||
6584 | { |
||
6585 | if (Diff(w[4], w[2])) |
||
6586 | { |
||
6587 | PIXEL00_C |
||
6588 | } |
||
6589 | else |
||
6590 | { |
||
6591 | PIXEL00_2 |
||
6592 | } |
||
6593 | PIXEL01_C |
||
6594 | if (Diff(w[2], w[6])) |
||
6595 | { |
||
6596 | PIXEL02_C |
||
6597 | } |
||
6598 | else |
||
6599 | { |
||
6600 | PIXEL02_2 |
||
6601 | } |
||
6602 | PIXEL10_C |
||
6603 | PIXEL11 |
||
6604 | PIXEL12_C |
||
6605 | PIXEL20_1D |
||
6606 | PIXEL21_1 |
||
6607 | PIXEL22_1D |
||
6608 | break; |
||
6609 | } |
||
6610 | case 223: |
||
6611 | { |
||
6612 | if (Diff(w[4], w[2])) |
||
6613 | { |
||
6614 | PIXEL00_C |
||
6615 | PIXEL10_C |
||
6616 | } |
||
6617 | else |
||
6618 | { |
||
6619 | PIXEL00_4 |
||
6620 | PIXEL10_3 |
||
6621 | } |
||
6622 | if (Diff(w[2], w[6])) |
||
6623 | { |
||
6624 | PIXEL01_C |
||
6625 | PIXEL02_C |
||
6626 | PIXEL12_C |
||
6627 | } |
||
6628 | else |
||
6629 | { |
||
6630 | PIXEL01_3 |
||
6631 | PIXEL02_2 |
||
6632 | PIXEL12_3 |
||
6633 | } |
||
6634 | PIXEL11 |
||
6635 | PIXEL20_1M |
||
6636 | if (Diff(w[6], w[8])) |
||
6637 | { |
||
6638 | PIXEL21_C |
||
6639 | PIXEL22_C |
||
6640 | } |
||
6641 | else |
||
6642 | { |
||
6643 | PIXEL21_3 |
||
6644 | PIXEL22_4 |
||
6645 | } |
||
6646 | break; |
||
6647 | } |
||
6648 | case 247: |
||
6649 | { |
||
6650 | PIXEL00_1L |
||
6651 | PIXEL01_C |
||
6652 | if (Diff(w[2], w[6])) |
||
6653 | { |
||
6654 | PIXEL02_C |
||
6655 | } |
||
6656 | else |
||
6657 | { |
||
6658 | PIXEL02_2 |
||
6659 | } |
||
6660 | PIXEL10_1 |
||
6661 | PIXEL11 |
||
6662 | PIXEL12_C |
||
6663 | PIXEL20_1L |
||
6664 | PIXEL21_C |
||
6665 | if (Diff(w[6], w[8])) |
||
6666 | { |
||
6667 | PIXEL22_C |
||
6668 | } |
||
6669 | else |
||
6670 | { |
||
6671 | PIXEL22_2 |
||
6672 | } |
||
6673 | break; |
||
6674 | } |
||
6675 | case 255: |
||
6676 | { |
||
6677 | if (Diff(w[4], w[2])) |
||
6678 | { |
||
6679 | PIXEL00_C |
||
6680 | } |
||
6681 | else |
||
6682 | { |
||
6683 | PIXEL00_2 |
||
6684 | } |
||
6685 | PIXEL01_C |
||
6686 | if (Diff(w[2], w[6])) |
||
6687 | { |
||
6688 | PIXEL02_C |
||
6689 | } |
||
6690 | else |
||
6691 | { |
||
6692 | PIXEL02_2 |
||
6693 | } |
||
6694 | PIXEL10_C |
||
6695 | PIXEL11 |
||
6696 | PIXEL12_C |
||
6697 | if (Diff(w[8], w[4])) |
||
6698 | { |
||
6699 | PIXEL20_C |
||
6700 | } |
||
6701 | else |
||
6702 | { |
||
6703 | PIXEL20_2 |
||
6704 | } |
||
6705 | PIXEL21_C |
||
6706 | if (Diff(w[6], w[8])) |
||
6707 | { |
||
6708 | PIXEL22_C |
||
6709 | } |
||
6710 | else |
||
6711 | { |
||
6712 | PIXEL22_2 |
||
6713 | } |
||
6714 | break; |
||
6715 | } |
||
6716 | } |
||
6717 | sp++; |
||
6718 | dp += 3; |
||
6719 | } |
||
6720 | |||
6721 | sRowP += srb; |
||
6722 | sp = (uint32_t *) sRowP; |
||
6723 | |||
6724 | dRowP += drb * 3; |
||
6725 | dp = (uint32_t *) dRowP; |
||
6726 | } |
||
6727 | } |
||
6728 | |||
6729 | HQX_API void HQX_CALLCONV hq3x_32 (uint32_t *src_pixels, uint32_t *dest_pixels, int src_width, int src_height) |
||
6730 | { |
||
6731 | if (!is_hqx_initialized) |
||
6732 | hqxInit (); |
||
6733 | |||
6734 | hq3x_32_rb (src_pixels, src_width * 4, dest_pixels, src_width * 4 * 3, src_width, src_height); |
||
6735 | } |
||
6736 | |||
6737 | #undef PIXEL00_1M |
||
6738 | #undef PIXEL00_1U |
||
6739 | #undef PIXEL00_1L |
||
6740 | #undef PIXEL00_2 |
||
6741 | #undef PIXEL00_4 |
||
6742 | #undef PIXEL00_5 |
||
6743 | #undef PIXEL00_C |
||
6744 | #undef PIXEL01_1 |
||
6745 | #undef PIXEL01_3 |
||
6746 | #undef PIXEL01_6 |
||
6747 | #undef PIXEL01_C |
||
6748 | #undef PIXEL02_1M |
||
6749 | #undef PIXEL02_1U |
||
6750 | #undef PIXEL02_1R |
||
6751 | #undef PIXEL02_2 |
||
6752 | #undef PIXEL02_4 |
||
6753 | #undef PIXEL02_5 |
||
6754 | #undef PIXEL02_C |
||
6755 | #undef PIXEL10_1 |
||
6756 | #undef PIXEL10_3 |
||
6757 | #undef PIXEL10_6 |
||
6758 | #undef PIXEL10_C |
||
6759 | #undef PIXEL11 |
||
6760 | #undef PIXEL12_1 |
||
6761 | #undef PIXEL12_3 |
||
6762 | #undef PIXEL12_6 |
||
6763 | #undef PIXEL12_C |
||
6764 | #undef PIXEL20_1M |
||
6765 | #undef PIXEL20_1D |
||
6766 | #undef PIXEL20_1L |
||
6767 | #undef PIXEL20_2 |
||
6768 | #undef PIXEL20_4 |
||
6769 | #undef PIXEL20_5 |
||
6770 | #undef PIXEL20_C |
||
6771 | #undef PIXEL21_1 |
||
6772 | #undef PIXEL21_3 |
||
6773 | #undef PIXEL21_6 |
||
6774 | #undef PIXEL21_C |
||
6775 | #undef PIXEL22_1M |
||
6776 | #undef PIXEL22_1D |
||
6777 | #undef PIXEL22_1R |
||
6778 | #undef PIXEL22_2 |
||
6779 | #undef PIXEL22_4 |
||
6780 | #undef PIXEL22_5 |
||
6781 | #undef PIXEL22_C |
||
6782 | #endif // WANT_HQ3X |
||
6783 | |||
6784 | |||
6785 | ////////// |
||
6786 | // HQ4X // |
||
6787 | ////////// |
||
6788 | |||
6789 | #ifdef WANT_HQ4X |
||
6790 | #define PIXEL00_0 *dp = w[5]; |
||
6791 | #define PIXEL00_11 Interp1(dp, w[5], w[4]); |
||
6792 | #define PIXEL00_12 Interp1(dp, w[5], w[2]); |
||
6793 | #define PIXEL00_20 Interp2(dp, w[5], w[2], w[4]); |
||
6794 | #define PIXEL00_50 Interp5(dp, w[2], w[4]); |
||
6795 | #define PIXEL00_80 Interp8(dp, w[5], w[1]); |
||
6796 | #define PIXEL00_81 Interp8(dp, w[5], w[4]); |
||
6797 | #define PIXEL00_82 Interp8(dp, w[5], w[2]); |
||
6798 | #define PIXEL01_0 *(dp+1) = w[5]; |
||
6799 | #define PIXEL01_10 Interp1(dp+1, w[5], w[1]); |
||
6800 | #define PIXEL01_12 Interp1(dp+1, w[5], w[2]); |
||
6801 | #define PIXEL01_14 Interp1(dp+1, w[2], w[5]); |
||
6802 | #define PIXEL01_21 Interp2(dp+1, w[2], w[5], w[4]); |
||
6803 | #define PIXEL01_31 Interp3(dp+1, w[5], w[4]); |
||
6804 | #define PIXEL01_50 Interp5(dp+1, w[2], w[5]); |
||
6805 | #define PIXEL01_60 Interp6(dp+1, w[5], w[2], w[4]); |
||
6806 | #define PIXEL01_61 Interp6(dp+1, w[5], w[2], w[1]); |
||
6807 | #define PIXEL01_82 Interp8(dp+1, w[5], w[2]); |
||
6808 | #define PIXEL01_83 Interp8(dp+1, w[2], w[4]); |
||
6809 | #define PIXEL02_0 *(dp+2) = w[5]; |
||
6810 | #define PIXEL02_10 Interp1(dp+2, w[5], w[3]); |
||
6811 | #define PIXEL02_11 Interp1(dp+2, w[5], w[2]); |
||
6812 | #define PIXEL02_13 Interp1(dp+2, w[2], w[5]); |
||
6813 | #define PIXEL02_21 Interp2(dp+2, w[2], w[5], w[6]); |
||
6814 | #define PIXEL02_32 Interp3(dp+2, w[5], w[6]); |
||
6815 | #define PIXEL02_50 Interp5(dp+2, w[2], w[5]); |
||
6816 | #define PIXEL02_60 Interp6(dp+2, w[5], w[2], w[6]); |
||
6817 | #define PIXEL02_61 Interp6(dp+2, w[5], w[2], w[3]); |
||
6818 | #define PIXEL02_81 Interp8(dp+2, w[5], w[2]); |
||
6819 | #define PIXEL02_83 Interp8(dp+2, w[2], w[6]); |
||
6820 | #define PIXEL03_0 *(dp+3) = w[5]; |
||
6821 | #define PIXEL03_11 Interp1(dp+3, w[5], w[2]); |
||
6822 | #define PIXEL03_12 Interp1(dp+3, w[5], w[6]); |
||
6823 | #define PIXEL03_20 Interp2(dp+3, w[5], w[2], w[6]); |
||
6824 | #define PIXEL03_50 Interp5(dp+3, w[2], w[6]); |
||
6825 | #define PIXEL03_80 Interp8(dp+3, w[5], w[3]); |
||
6826 | #define PIXEL03_81 Interp8(dp+3, w[5], w[2]); |
||
6827 | #define PIXEL03_82 Interp8(dp+3, w[5], w[6]); |
||
6828 | #define PIXEL10_0 *(dp+dpL) = w[5]; |
||
6829 | #define PIXEL10_10 Interp1(dp+dpL, w[5], w[1]); |
||
6830 | #define PIXEL10_11 Interp1(dp+dpL, w[5], w[4]); |
||
6831 | #define PIXEL10_13 Interp1(dp+dpL, w[4], w[5]); |
||
6832 | #define PIXEL10_21 Interp2(dp+dpL, w[4], w[5], w[2]); |
||
6833 | #define PIXEL10_32 Interp3(dp+dpL, w[5], w[2]); |
||
6834 | #define PIXEL10_50 Interp5(dp+dpL, w[4], w[5]); |
||
6835 | #define PIXEL10_60 Interp6(dp+dpL, w[5], w[4], w[2]); |
||
6836 | #define PIXEL10_61 Interp6(dp+dpL, w[5], w[4], w[1]); |
||
6837 | #define PIXEL10_81 Interp8(dp+dpL, w[5], w[4]); |
||
6838 | #define PIXEL10_83 Interp8(dp+dpL, w[4], w[2]); |
||
6839 | #define PIXEL11_0 *(dp+dpL+1) = w[5]; |
||
6840 | #define PIXEL11_30 Interp3(dp+dpL+1, w[5], w[1]); |
||
6841 | #define PIXEL11_31 Interp3(dp+dpL+1, w[5], w[4]); |
||
6842 | #define PIXEL11_32 Interp3(dp+dpL+1, w[5], w[2]); |
||
6843 | #define PIXEL11_70 Interp7(dp+dpL+1, w[5], w[4], w[2]); |
||
6844 | #define PIXEL12_0 *(dp+dpL+2) = w[5]; |
||
6845 | #define PIXEL12_30 Interp3(dp+dpL+2, w[5], w[3]); |
||
6846 | #define PIXEL12_31 Interp3(dp+dpL+2, w[5], w[2]); |
||
6847 | #define PIXEL12_32 Interp3(dp+dpL+2, w[5], w[6]); |
||
6848 | #define PIXEL12_70 Interp7(dp+dpL+2, w[5], w[6], w[2]); |
||
6849 | #define PIXEL13_0 *(dp+dpL+3) = w[5]; |
||
6850 | #define PIXEL13_10 Interp1(dp+dpL+3, w[5], w[3]); |
||
6851 | #define PIXEL13_12 Interp1(dp+dpL+3, w[5], w[6]); |
||
6852 | #define PIXEL13_14 Interp1(dp+dpL+3, w[6], w[5]); |
||
6853 | #define PIXEL13_21 Interp2(dp+dpL+3, w[6], w[5], w[2]); |
||
6854 | #define PIXEL13_31 Interp3(dp+dpL+3, w[5], w[2]); |
||
6855 | #define PIXEL13_50 Interp5(dp+dpL+3, w[6], w[5]); |
||
6856 | #define PIXEL13_60 Interp6(dp+dpL+3, w[5], w[6], w[2]); |
||
6857 | #define PIXEL13_61 Interp6(dp+dpL+3, w[5], w[6], w[3]); |
||
6858 | #define PIXEL13_82 Interp8(dp+dpL+3, w[5], w[6]); |
||
6859 | #define PIXEL13_83 Interp8(dp+dpL+3, w[6], w[2]); |
||
6860 | #define PIXEL20_0 *(dp+dpL+dpL) = w[5]; |
||
6861 | #define PIXEL20_10 Interp1(dp+dpL+dpL, w[5], w[7]); |
||
6862 | #define PIXEL20_12 Interp1(dp+dpL+dpL, w[5], w[4]); |
||
6863 | #define PIXEL20_14 Interp1(dp+dpL+dpL, w[4], w[5]); |
||
6864 | #define PIXEL20_21 Interp2(dp+dpL+dpL, w[4], w[5], w[8]); |
||
6865 | #define PIXEL20_31 Interp3(dp+dpL+dpL, w[5], w[8]); |
||
6866 | #define PIXEL20_50 Interp5(dp+dpL+dpL, w[4], w[5]); |
||
6867 | #define PIXEL20_60 Interp6(dp+dpL+dpL, w[5], w[4], w[8]); |
||
6868 | #define PIXEL20_61 Interp6(dp+dpL+dpL, w[5], w[4], w[7]); |
||
6869 | #define PIXEL20_82 Interp8(dp+dpL+dpL, w[5], w[4]); |
||
6870 | #define PIXEL20_83 Interp8(dp+dpL+dpL, w[4], w[8]); |
||
6871 | #define PIXEL21_0 *(dp+dpL+dpL+1) = w[5]; |
||
6872 | #define PIXEL21_30 Interp3(dp+dpL+dpL+1, w[5], w[7]); |
||
6873 | #define PIXEL21_31 Interp3(dp+dpL+dpL+1, w[5], w[8]); |
||
6874 | #define PIXEL21_32 Interp3(dp+dpL+dpL+1, w[5], w[4]); |
||
6875 | #define PIXEL21_70 Interp7(dp+dpL+dpL+1, w[5], w[4], w[8]); |
||
6876 | #define PIXEL22_0 *(dp+dpL+dpL+2) = w[5]; |
||
6877 | #define PIXEL22_30 Interp3(dp+dpL+dpL+2, w[5], w[9]); |
||
6878 | #define PIXEL22_31 Interp3(dp+dpL+dpL+2, w[5], w[6]); |
||
6879 | #define PIXEL22_32 Interp3(dp+dpL+dpL+2, w[5], w[8]); |
||
6880 | #define PIXEL22_70 Interp7(dp+dpL+dpL+2, w[5], w[6], w[8]); |
||
6881 | #define PIXEL23_0 *(dp+dpL+dpL+3) = w[5]; |
||
6882 | #define PIXEL23_10 Interp1(dp+dpL+dpL+3, w[5], w[9]); |
||
6883 | #define PIXEL23_11 Interp1(dp+dpL+dpL+3, w[5], w[6]); |
||
6884 | #define PIXEL23_13 Interp1(dp+dpL+dpL+3, w[6], w[5]); |
||
6885 | #define PIXEL23_21 Interp2(dp+dpL+dpL+3, w[6], w[5], w[8]); |
||
6886 | #define PIXEL23_32 Interp3(dp+dpL+dpL+3, w[5], w[8]); |
||
6887 | #define PIXEL23_50 Interp5(dp+dpL+dpL+3, w[6], w[5]); |
||
6888 | #define PIXEL23_60 Interp6(dp+dpL+dpL+3, w[5], w[6], w[8]); |
||
6889 | #define PIXEL23_61 Interp6(dp+dpL+dpL+3, w[5], w[6], w[9]); |
||
6890 | #define PIXEL23_81 Interp8(dp+dpL+dpL+3, w[5], w[6]); |
||
6891 | #define PIXEL23_83 Interp8(dp+dpL+dpL+3, w[6], w[8]); |
||
6892 | #define PIXEL30_0 *(dp+dpL+dpL+dpL) = w[5]; |
||
6893 | #define PIXEL30_11 Interp1(dp+dpL+dpL+dpL, w[5], w[8]); |
||
6894 | #define PIXEL30_12 Interp1(dp+dpL+dpL+dpL, w[5], w[4]); |
||
6895 | #define PIXEL30_20 Interp2(dp+dpL+dpL+dpL, w[5], w[8], w[4]); |
||
6896 | #define PIXEL30_50 Interp5(dp+dpL+dpL+dpL, w[8], w[4]); |
||
6897 | #define PIXEL30_80 Interp8(dp+dpL+dpL+dpL, w[5], w[7]); |
||
6898 | #define PIXEL30_81 Interp8(dp+dpL+dpL+dpL, w[5], w[8]); |
||
6899 | #define PIXEL30_82 Interp8(dp+dpL+dpL+dpL, w[5], w[4]); |
||
6900 | #define PIXEL31_0 *(dp+dpL+dpL+dpL+1) = w[5]; |
||
6901 | #define PIXEL31_10 Interp1(dp+dpL+dpL+dpL+1, w[5], w[7]); |
||
6902 | #define PIXEL31_11 Interp1(dp+dpL+dpL+dpL+1, w[5], w[8]); |
||
6903 | #define PIXEL31_13 Interp1(dp+dpL+dpL+dpL+1, w[8], w[5]); |
||
6904 | #define PIXEL31_21 Interp2(dp+dpL+dpL+dpL+1, w[8], w[5], w[4]); |
||
6905 | #define PIXEL31_32 Interp3(dp+dpL+dpL+dpL+1, w[5], w[4]); |
||
6906 | #define PIXEL31_50 Interp5(dp+dpL+dpL+dpL+1, w[8], w[5]); |
||
6907 | #define PIXEL31_60 Interp6(dp+dpL+dpL+dpL+1, w[5], w[8], w[4]); |
||
6908 | #define PIXEL31_61 Interp6(dp+dpL+dpL+dpL+1, w[5], w[8], w[7]); |
||
6909 | #define PIXEL31_81 Interp8(dp+dpL+dpL+dpL+1, w[5], w[8]); |
||
6910 | #define PIXEL31_83 Interp8(dp+dpL+dpL+dpL+1, w[8], w[4]); |
||
6911 | #define PIXEL32_0 *(dp+dpL+dpL+dpL+2) = w[5]; |
||
6912 | #define PIXEL32_10 Interp1(dp+dpL+dpL+dpL+2, w[5], w[9]); |
||
6913 | #define PIXEL32_12 Interp1(dp+dpL+dpL+dpL+2, w[5], w[8]); |
||
6914 | #define PIXEL32_14 Interp1(dp+dpL+dpL+dpL+2, w[8], w[5]); |
||
6915 | #define PIXEL32_21 Interp2(dp+dpL+dpL+dpL+2, w[8], w[5], w[6]); |
||
6916 | #define PIXEL32_31 Interp3(dp+dpL+dpL+dpL+2, w[5], w[6]); |
||
6917 | #define PIXEL32_50 Interp5(dp+dpL+dpL+dpL+2, w[8], w[5]); |
||
6918 | #define PIXEL32_60 Interp6(dp+dpL+dpL+dpL+2, w[5], w[8], w[6]); |
||
6919 | #define PIXEL32_61 Interp6(dp+dpL+dpL+dpL+2, w[5], w[8], w[9]); |
||
6920 | #define PIXEL32_82 Interp8(dp+dpL+dpL+dpL+2, w[5], w[8]); |
||
6921 | #define PIXEL32_83 Interp8(dp+dpL+dpL+dpL+2, w[8], w[6]); |
||
6922 | #define PIXEL33_0 *(dp+dpL+dpL+dpL+3) = w[5]; |
||
6923 | #define PIXEL33_11 Interp1(dp+dpL+dpL+dpL+3, w[5], w[6]); |
||
6924 | #define PIXEL33_12 Interp1(dp+dpL+dpL+dpL+3, w[5], w[8]); |
||
6925 | #define PIXEL33_20 Interp2(dp+dpL+dpL+dpL+3, w[5], w[8], w[6]); |
||
6926 | #define PIXEL33_50 Interp5(dp+dpL+dpL+dpL+3, w[8], w[6]); |
||
6927 | #define PIXEL33_80 Interp8(dp+dpL+dpL+dpL+3, w[5], w[9]); |
||
6928 | #define PIXEL33_81 Interp8(dp+dpL+dpL+dpL+3, w[5], w[6]); |
||
6929 | #define PIXEL33_82 Interp8(dp+dpL+dpL+dpL+3, w[5], w[8]); |
||
6930 | |||
6931 | HQX_API void HQX_CALLCONV hq4x_32_rb( uint32_t * sp, uint32_t srb, uint32_t * dp, uint32_t drb, int Xres, int Yres ) |
||
6932 | { |
||
6933 | int i, j, k; |
||
6934 | int prevline, nextline; |
||
6935 | uint32_t w[10]; |
||
6936 | int dpL = (drb >> 2); |
||
6937 | int spL = (srb >> 2); |
||
6938 | uint8_t *sRowP = (uint8_t *) sp; |
||
6939 | uint8_t *dRowP = (uint8_t *) dp; |
||
6940 | uint32_t yuv1, yuv2; |
||
6941 | |||
6942 | // +----+----+----+ |
||
6943 | // | | | | |
||
6944 | // | w1 | w2 | w3 | |
||
6945 | // +----+----+----+ |
||
6946 | // | | | | |
||
6947 | // | w4 | w5 | w6 | |
||
6948 | // +----+----+----+ |
||
6949 | // | | | | |
||
6950 | // | w7 | w8 | w9 | |
||
6951 | // +----+----+----+ |
||
6952 | |||
6953 | for (j=0; j<Yres; j++) |
||
6954 | { |
||
6955 | if (j>0) prevline = -spL; else prevline = 0; |
||
6956 | if (j<Yres-1) nextline = spL; else nextline = 0; |
||
6957 | |||
6958 | for (i=0; i<Xres; i++) |
||
6959 | { |
||
6960 | w[2] = *(sp + prevline); |
||
6961 | w[5] = *sp; |
||
6962 | w[8] = *(sp + nextline); |
||
6963 | |||
6964 | if (i>0) |
||
6965 | { |
||
6966 | w[1] = *(sp + prevline - 1); |
||
6967 | w[4] = *(sp - 1); |
||
6968 | w[7] = *(sp + nextline - 1); |
||
6969 | } |
||
6970 | else |
||
6971 | { |
||
6972 | w[1] = w[2]; |
||
6973 | w[4] = w[5]; |
||
6974 | w[7] = w[8]; |
||
6975 | } |
||
6976 | |||
6977 | if (i<Xres-1) |
||
6978 | { |
||
6979 | w[3] = *(sp + prevline + 1); |
||
6980 | w[6] = *(sp + 1); |
||
6981 | w[9] = *(sp + nextline + 1); |
||
6982 | } |
||
6983 | else |
||
6984 | { |
||
6985 | w[3] = w[2]; |
||
6986 | w[6] = w[5]; |
||
6987 | w[9] = w[8]; |
||
6988 | } |
||
6989 | |||
6990 | int pattern = 0; |
||
6991 | int flag = 1; |
||
6992 | |||
6993 | yuv1 = rgb_to_yuv(w[5]); |
||
6994 | |||
6995 | for (k=1; k<=9; k++) |
||
6996 | { |
||
6997 | if (k==5) continue; |
||
6998 | |||
6999 | if ( w[k] != w[5] ) |
||
7000 | { |
||
7001 | yuv2 = rgb_to_yuv(w[k]); |
||
7002 | if (yuv_diff(yuv1, yuv2)) |
||
7003 | pattern |= flag; |
||
7004 | } |
||
7005 | flag <<= 1; |
||
7006 | } |
||
7007 | |||
7008 | switch (pattern) |
||
7009 | { |
||
7010 | case 0: |
||
7011 | case 1: |
||
7012 | case 4: |
||
7013 | case 32: |
||
7014 | case 128: |
||
7015 | case 5: |
||
7016 | case 132: |
||
7017 | case 160: |
||
7018 | case 33: |
||
7019 | case 129: |
||
7020 | case 36: |
||
7021 | case 133: |
||
7022 | case 164: |
||
7023 | case 161: |
||
7024 | case 37: |
||
7025 | case 165: |
||
7026 | { |
||
7027 | PIXEL00_20 |
||
7028 | PIXEL01_60 |
||
7029 | PIXEL02_60 |
||
7030 | PIXEL03_20 |
||
7031 | PIXEL10_60 |
||
7032 | PIXEL11_70 |
||
7033 | PIXEL12_70 |
||
7034 | PIXEL13_60 |
||
7035 | PIXEL20_60 |
||
7036 | PIXEL21_70 |
||
7037 | PIXEL22_70 |
||
7038 | PIXEL23_60 |
||
7039 | PIXEL30_20 |
||
7040 | PIXEL31_60 |
||
7041 | PIXEL32_60 |
||
7042 | PIXEL33_20 |
||
7043 | break; |
||
7044 | } |
||
7045 | case 2: |
||
7046 | case 34: |
||
7047 | case 130: |
||
7048 | case 162: |
||
7049 | { |
||
7050 | PIXEL00_80 |
||
7051 | PIXEL01_10 |
||
7052 | PIXEL02_10 |
||
7053 | PIXEL03_80 |
||
7054 | PIXEL10_61 |
||
7055 | PIXEL11_30 |
||
7056 | PIXEL12_30 |
||
7057 | PIXEL13_61 |
||
7058 | PIXEL20_60 |
||
7059 | PIXEL21_70 |
||
7060 | PIXEL22_70 |
||
7061 | PIXEL23_60 |
||
7062 | PIXEL30_20 |
||
7063 | PIXEL31_60 |
||
7064 | PIXEL32_60 |
||
7065 | PIXEL33_20 |
||
7066 | break; |
||
7067 | } |
||
7068 | case 16: |
||
7069 | case 17: |
||
7070 | case 48: |
||
7071 | case 49: |
||
7072 | { |
||
7073 | PIXEL00_20 |
||
7074 | PIXEL01_60 |
||
7075 | PIXEL02_61 |
||
7076 | PIXEL03_80 |
||
7077 | PIXEL10_60 |
||
7078 | PIXEL11_70 |
||
7079 | PIXEL12_30 |
||
7080 | PIXEL13_10 |
||
7081 | PIXEL20_60 |
||
7082 | PIXEL21_70 |
||
7083 | PIXEL22_30 |
||
7084 | PIXEL23_10 |
||
7085 | PIXEL30_20 |
||
7086 | PIXEL31_60 |
||
7087 | PIXEL32_61 |
||
7088 | PIXEL33_80 |
||
7089 | break; |
||
7090 | } |
||
7091 | case 64: |
||
7092 | case 65: |
||
7093 | case 68: |
||
7094 | case 69: |
||
7095 | { |
||
7096 | PIXEL00_20 |
||
7097 | PIXEL01_60 |
||
7098 | PIXEL02_60 |
||
7099 | PIXEL03_20 |
||
7100 | PIXEL10_60 |
||
7101 | PIXEL11_70 |
||
7102 | PIXEL12_70 |
||
7103 | PIXEL13_60 |
||
7104 | PIXEL20_61 |
||
7105 | PIXEL21_30 |
||
7106 | PIXEL22_30 |
||
7107 | PIXEL23_61 |
||
7108 | PIXEL30_80 |
||
7109 | PIXEL31_10 |
||
7110 | PIXEL32_10 |
||
7111 | PIXEL33_80 |
||
7112 | break; |
||
7113 | } |
||
7114 | case 8: |
||
7115 | case 12: |
||
7116 | case 136: |
||
7117 | case 140: |
||
7118 | { |
||
7119 | PIXEL00_80 |
||
7120 | PIXEL01_61 |
||
7121 | PIXEL02_60 |
||
7122 | PIXEL03_20 |
||
7123 | PIXEL10_10 |
||
7124 | PIXEL11_30 |
||
7125 | PIXEL12_70 |
||
7126 | PIXEL13_60 |
||
7127 | PIXEL20_10 |
||
7128 | PIXEL21_30 |
||
7129 | PIXEL22_70 |
||
7130 | PIXEL23_60 |
||
7131 | PIXEL30_80 |
||
7132 | PIXEL31_61 |
||
7133 | PIXEL32_60 |
||
7134 | PIXEL33_20 |
||
7135 | break; |
||
7136 | } |
||
7137 | case 3: |
||
7138 | case 35: |
||
7139 | case 131: |
||
7140 | case 163: |
||
7141 | { |
||
7142 | PIXEL00_81 |
||
7143 | PIXEL01_31 |
||
7144 | PIXEL02_10 |
||
7145 | PIXEL03_80 |
||
7146 | PIXEL10_81 |
||
7147 | PIXEL11_31 |
||
7148 | PIXEL12_30 |
||
7149 | PIXEL13_61 |
||
7150 | PIXEL20_60 |
||
7151 | PIXEL21_70 |
||
7152 | PIXEL22_70 |
||
7153 | PIXEL23_60 |
||
7154 | PIXEL30_20 |
||
7155 | PIXEL31_60 |
||
7156 | PIXEL32_60 |
||
7157 | PIXEL33_20 |
||
7158 | break; |
||
7159 | } |
||
7160 | case 6: |
||
7161 | case 38: |
||
7162 | case 134: |
||
7163 | case 166: |
||
7164 | { |
||
7165 | PIXEL00_80 |
||
7166 | PIXEL01_10 |
||
7167 | PIXEL02_32 |
||
7168 | PIXEL03_82 |
||
7169 | PIXEL10_61 |
||
7170 | PIXEL11_30 |
||
7171 | PIXEL12_32 |
||
7172 | PIXEL13_82 |
||
7173 | PIXEL20_60 |
||
7174 | PIXEL21_70 |
||
7175 | PIXEL22_70 |
||
7176 | PIXEL23_60 |
||
7177 | PIXEL30_20 |
||
7178 | PIXEL31_60 |
||
7179 | PIXEL32_60 |
||
7180 | PIXEL33_20 |
||
7181 | break; |
||
7182 | } |
||
7183 | case 20: |
||
7184 | case 21: |
||
7185 | case 52: |
||
7186 | case 53: |
||
7187 | { |
||
7188 | PIXEL00_20 |
||
7189 | PIXEL01_60 |
||
7190 | PIXEL02_81 |
||
7191 | PIXEL03_81 |
||
7192 | PIXEL10_60 |
||
7193 | PIXEL11_70 |
||
7194 | PIXEL12_31 |
||
7195 | PIXEL13_31 |
||
7196 | PIXEL20_60 |
||
7197 | PIXEL21_70 |
||
7198 | PIXEL22_30 |
||
7199 | PIXEL23_10 |
||
7200 | PIXEL30_20 |
||
7201 | PIXEL31_60 |
||
7202 | PIXEL32_61 |
||
7203 | PIXEL33_80 |
||
7204 | break; |
||
7205 | } |
||
7206 | case 144: |
||
7207 | case 145: |
||
7208 | case 176: |
||
7209 | case 177: |
||
7210 | { |
||
7211 | PIXEL00_20 |
||
7212 | PIXEL01_60 |
||
7213 | PIXEL02_61 |
||
7214 | PIXEL03_80 |
||
7215 | PIXEL10_60 |
||
7216 | PIXEL11_70 |
||
7217 | PIXEL12_30 |
||
7218 | PIXEL13_10 |
||
7219 | PIXEL20_60 |
||
7220 | PIXEL21_70 |
||
7221 | PIXEL22_32 |
||
7222 | PIXEL23_32 |
||
7223 | PIXEL30_20 |
||
7224 | PIXEL31_60 |
||
7225 | PIXEL32_82 |
||
7226 | PIXEL33_82 |
||
7227 | break; |
||
7228 | } |
||
7229 | case 192: |
||
7230 | case 193: |
||
7231 | case 196: |
||
7232 | case 197: |
||
7233 | { |
||
7234 | PIXEL00_20 |
||
7235 | PIXEL01_60 |
||
7236 | PIXEL02_60 |
||
7237 | PIXEL03_20 |
||
7238 | PIXEL10_60 |
||
7239 | PIXEL11_70 |
||
7240 | PIXEL12_70 |
||
7241 | PIXEL13_60 |
||
7242 | PIXEL20_61 |
||
7243 | PIXEL21_30 |
||
7244 | PIXEL22_31 |
||
7245 | PIXEL23_81 |
||
7246 | PIXEL30_80 |
||
7247 | PIXEL31_10 |
||
7248 | PIXEL32_31 |
||
7249 | PIXEL33_81 |
||
7250 | break; |
||
7251 | } |
||
7252 | case 96: |
||
7253 | case 97: |
||
7254 | case 100: |
||
7255 | case 101: |
||
7256 | { |
||
7257 | PIXEL00_20 |
||
7258 | PIXEL01_60 |
||
7259 | PIXEL02_60 |
||
7260 | PIXEL03_20 |
||
7261 | PIXEL10_60 |
||
7262 | PIXEL11_70 |
||
7263 | PIXEL12_70 |
||
7264 | PIXEL13_60 |
||
7265 | PIXEL20_82 |
||
7266 | PIXEL21_32 |
||
7267 | PIXEL22_30 |
||
7268 | PIXEL23_61 |
||
7269 | PIXEL30_82 |
||
7270 | PIXEL31_32 |
||
7271 | PIXEL32_10 |
||
7272 | PIXEL33_80 |
||
7273 | break; |
||
7274 | } |
||
7275 | case 40: |
||
7276 | case 44: |
||
7277 | case 168: |
||
7278 | case 172: |
||
7279 | { |
||
7280 | PIXEL00_80 |
||
7281 | PIXEL01_61 |
||
7282 | PIXEL02_60 |
||
7283 | PIXEL03_20 |
||
7284 | PIXEL10_10 |
||
7285 | PIXEL11_30 |
||
7286 | PIXEL12_70 |
||
7287 | PIXEL13_60 |
||
7288 | PIXEL20_31 |
||
7289 | PIXEL21_31 |
||
7290 | PIXEL22_70 |
||
7291 | PIXEL23_60 |
||
7292 | PIXEL30_81 |
||
7293 | PIXEL31_81 |
||
7294 | PIXEL32_60 |
||
7295 | PIXEL33_20 |
||
7296 | break; |
||
7297 | } |
||
7298 | case 9: |
||
7299 | case 13: |
||
7300 | case 137: |
||
7301 | case 141: |
||
7302 | { |
||
7303 | PIXEL00_82 |
||
7304 | PIXEL01_82 |
||
7305 | PIXEL02_60 |
||
7306 | PIXEL03_20 |
||
7307 | PIXEL10_32 |
||
7308 | PIXEL11_32 |
||
7309 | PIXEL12_70 |
||
7310 | PIXEL13_60 |
||
7311 | PIXEL20_10 |
||
7312 | PIXEL21_30 |
||
7313 | PIXEL22_70 |
||
7314 | PIXEL23_60 |
||
7315 | PIXEL30_80 |
||
7316 | PIXEL31_61 |
||
7317 | PIXEL32_60 |
||
7318 | PIXEL33_20 |
||
7319 | break; |
||
7320 | } |
||
7321 | case 18: |
||
7322 | case 50: |
||
7323 | { |
||
7324 | PIXEL00_80 |
||
7325 | PIXEL01_10 |
||
7326 | if (Diff(w[2], w[6])) |
||
7327 | { |
||
7328 | PIXEL02_10 |
||
7329 | PIXEL03_80 |
||
7330 | PIXEL12_30 |
||
7331 | PIXEL13_10 |
||
7332 | } |
||
7333 | else |
||
7334 | { |
||
7335 | PIXEL02_50 |
||
7336 | PIXEL03_50 |
||
7337 | PIXEL12_0 |
||
7338 | PIXEL13_50 |
||
7339 | } |
||
7340 | PIXEL10_61 |
||
7341 | PIXEL11_30 |
||
7342 | PIXEL20_60 |
||
7343 | PIXEL21_70 |
||
7344 | PIXEL22_30 |
||
7345 | PIXEL23_10 |
||
7346 | PIXEL30_20 |
||
7347 | PIXEL31_60 |
||
7348 | PIXEL32_61 |
||
7349 | PIXEL33_80 |
||
7350 | break; |
||
7351 | } |
||
7352 | case 80: |
||
7353 | case 81: |
||
7354 | { |
||
7355 | PIXEL00_20 |
||
7356 | PIXEL01_60 |
||
7357 | PIXEL02_61 |
||
7358 | PIXEL03_80 |
||
7359 | PIXEL10_60 |
||
7360 | PIXEL11_70 |
||
7361 | PIXEL12_30 |
||
7362 | PIXEL13_10 |
||
7363 | PIXEL20_61 |
||
7364 | PIXEL21_30 |
||
7365 | if (Diff(w[6], w[8])) |
||
7366 | { |
||
7367 | PIXEL22_30 |
||
7368 | PIXEL23_10 |
||
7369 | PIXEL32_10 |
||
7370 | PIXEL33_80 |
||
7371 | } |
||
7372 | else |
||
7373 | { |
||
7374 | PIXEL22_0 |
||
7375 | PIXEL23_50 |
||
7376 | PIXEL32_50 |
||
7377 | PIXEL33_50 |
||
7378 | } |
||
7379 | PIXEL30_80 |
||
7380 | PIXEL31_10 |
||
7381 | break; |
||
7382 | } |
||
7383 | case 72: |
||
7384 | case 76: |
||
7385 | { |
||
7386 | PIXEL00_80 |
||
7387 | PIXEL01_61 |
||
7388 | PIXEL02_60 |
||
7389 | PIXEL03_20 |
||
7390 | PIXEL10_10 |
||
7391 | PIXEL11_30 |
||
7392 | PIXEL12_70 |
||
7393 | PIXEL13_60 |
||
7394 | if (Diff(w[8], w[4])) |
||
7395 | { |
||
7396 | PIXEL20_10 |
||
7397 | PIXEL21_30 |
||
7398 | PIXEL30_80 |
||
7399 | PIXEL31_10 |
||
7400 | } |
||
7401 | else |
||
7402 | { |
||
7403 | PIXEL20_50 |
||
7404 | PIXEL21_0 |
||
7405 | PIXEL30_50 |
||
7406 | PIXEL31_50 |
||
7407 | } |
||
7408 | PIXEL22_30 |
||
7409 | PIXEL23_61 |
||
7410 | PIXEL32_10 |
||
7411 | PIXEL33_80 |
||
7412 | break; |
||
7413 | } |
||
7414 | case 10: |
||
7415 | case 138: |
||
7416 | { |
||
7417 | if (Diff(w[4], w[2])) |
||
7418 | { |
||
7419 | PIXEL00_80 |
||
7420 | PIXEL01_10 |
||
7421 | PIXEL10_10 |
||
7422 | PIXEL11_30 |
||
7423 | } |
||
7424 | else |
||
7425 | { |
||
7426 | PIXEL00_50 |
||
7427 | PIXEL01_50 |
||
7428 | PIXEL10_50 |
||
7429 | PIXEL11_0 |
||
7430 | } |
||
7431 | PIXEL02_10 |
||
7432 | PIXEL03_80 |
||
7433 | PIXEL12_30 |
||
7434 | PIXEL13_61 |
||
7435 | PIXEL20_10 |
||
7436 | PIXEL21_30 |
||
7437 | PIXEL22_70 |
||
7438 | PIXEL23_60 |
||
7439 | PIXEL30_80 |
||
7440 | PIXEL31_61 |
||
7441 | PIXEL32_60 |
||
7442 | PIXEL33_20 |
||
7443 | break; |
||
7444 | } |
||
7445 | case 66: |
||
7446 | { |
||
7447 | PIXEL00_80 |
||
7448 | PIXEL01_10 |
||
7449 | PIXEL02_10 |
||
7450 | PIXEL03_80 |
||
7451 | PIXEL10_61 |
||
7452 | PIXEL11_30 |
||
7453 | PIXEL12_30 |
||
7454 | PIXEL13_61 |
||
7455 | PIXEL20_61 |
||
7456 | PIXEL21_30 |
||
7457 | PIXEL22_30 |
||
7458 | PIXEL23_61 |
||
7459 | PIXEL30_80 |
||
7460 | PIXEL31_10 |
||
7461 | PIXEL32_10 |
||
7462 | PIXEL33_80 |
||
7463 | break; |
||
7464 | } |
||
7465 | case 24: |
||
7466 | { |
||
7467 | PIXEL00_80 |
||
7468 | PIXEL01_61 |
||
7469 | PIXEL02_61 |
||
7470 | PIXEL03_80 |
||
7471 | PIXEL10_10 |
||
7472 | PIXEL11_30 |
||
7473 | PIXEL12_30 |
||
7474 | PIXEL13_10 |
||
7475 | PIXEL20_10 |
||
7476 | PIXEL21_30 |
||
7477 | PIXEL22_30 |
||
7478 | PIXEL23_10 |
||
7479 | PIXEL30_80 |
||
7480 | PIXEL31_61 |
||
7481 | PIXEL32_61 |
||
7482 | PIXEL33_80 |
||
7483 | break; |
||
7484 | } |
||
7485 | case 7: |
||
7486 | case 39: |
||
7487 | case 135: |
||
7488 | { |
||
7489 | PIXEL00_81 |
||
7490 | PIXEL01_31 |
||
7491 | PIXEL02_32 |
||
7492 | PIXEL03_82 |
||
7493 | PIXEL10_81 |
||
7494 | PIXEL11_31 |
||
7495 | PIXEL12_32 |
||
7496 | PIXEL13_82 |
||
7497 | PIXEL20_60 |
||
7498 | PIXEL21_70 |
||
7499 | PIXEL22_70 |
||
7500 | PIXEL23_60 |
||
7501 | PIXEL30_20 |
||
7502 | PIXEL31_60 |
||
7503 | PIXEL32_60 |
||
7504 | PIXEL33_20 |
||
7505 | break; |
||
7506 | } |
||
7507 | case 148: |
||
7508 | case 149: |
||
7509 | case 180: |
||
7510 | { |
||
7511 | PIXEL00_20 |
||
7512 | PIXEL01_60 |
||
7513 | PIXEL02_81 |
||
7514 | PIXEL03_81 |
||
7515 | PIXEL10_60 |
||
7516 | PIXEL11_70 |
||
7517 | PIXEL12_31 |
||
7518 | PIXEL13_31 |
||
7519 | PIXEL20_60 |
||
7520 | PIXEL21_70 |
||
7521 | PIXEL22_32 |
||
7522 | PIXEL23_32 |
||
7523 | PIXEL30_20 |
||
7524 | PIXEL31_60 |
||
7525 | PIXEL32_82 |
||
7526 | PIXEL33_82 |
||
7527 | break; |
||
7528 | } |
||
7529 | case 224: |
||
7530 | case 228: |
||
7531 | case 225: |
||
7532 | { |
||
7533 | PIXEL00_20 |
||
7534 | PIXEL01_60 |
||
7535 | PIXEL02_60 |
||
7536 | PIXEL03_20 |
||
7537 | PIXEL10_60 |
||
7538 | PIXEL11_70 |
||
7539 | PIXEL12_70 |
||
7540 | PIXEL13_60 |
||
7541 | PIXEL20_82 |
||
7542 | PIXEL21_32 |
||
7543 | PIXEL22_31 |
||
7544 | PIXEL23_81 |
||
7545 | PIXEL30_82 |
||
7546 | PIXEL31_32 |
||
7547 | PIXEL32_31 |
||
7548 | PIXEL33_81 |
||
7549 | break; |
||
7550 | } |
||
7551 | case 41: |
||
7552 | case 169: |
||
7553 | case 45: |
||
7554 | { |
||
7555 | PIXEL00_82 |
||
7556 | PIXEL01_82 |
||
7557 | PIXEL02_60 |
||
7558 | PIXEL03_20 |
||
7559 | PIXEL10_32 |
||
7560 | PIXEL11_32 |
||
7561 | PIXEL12_70 |
||
7562 | PIXEL13_60 |
||
7563 | PIXEL20_31 |
||
7564 | PIXEL21_31 |
||
7565 | PIXEL22_70 |
||
7566 | PIXEL23_60 |
||
7567 | PIXEL30_81 |
||
7568 | PIXEL31_81 |
||
7569 | PIXEL32_60 |
||
7570 | PIXEL33_20 |
||
7571 | break; |
||
7572 | } |
||
7573 | case 22: |
||
7574 | case 54: |
||
7575 | { |
||
7576 | PIXEL00_80 |
||
7577 | PIXEL01_10 |
||
7578 | if (Diff(w[2], w[6])) |
||
7579 | { |
||
7580 | PIXEL02_0 |
||
7581 | PIXEL03_0 |
||
7582 | PIXEL13_0 |
||
7583 | } |
||
7584 | else |
||
7585 | { |
||
7586 | PIXEL02_50 |
||
7587 | PIXEL03_50 |
||
7588 | PIXEL13_50 |
||
7589 | } |
||
7590 | PIXEL10_61 |
||
7591 | PIXEL11_30 |
||
7592 | PIXEL12_0 |
||
7593 | PIXEL20_60 |
||
7594 | PIXEL21_70 |
||
7595 | PIXEL22_30 |
||
7596 | PIXEL23_10 |
||
7597 | PIXEL30_20 |
||
7598 | PIXEL31_60 |
||
7599 | PIXEL32_61 |
||
7600 | PIXEL33_80 |
||
7601 | break; |
||
7602 | } |
||
7603 | case 208: |
||
7604 | case 209: |
||
7605 | { |
||
7606 | PIXEL00_20 |
||
7607 | PIXEL01_60 |
||
7608 | PIXEL02_61 |
||
7609 | PIXEL03_80 |
||
7610 | PIXEL10_60 |
||
7611 | PIXEL11_70 |
||
7612 | PIXEL12_30 |
||
7613 | PIXEL13_10 |
||
7614 | PIXEL20_61 |
||
7615 | PIXEL21_30 |
||
7616 | PIXEL22_0 |
||
7617 | if (Diff(w[6], w[8])) |
||
7618 | { |
||
7619 | PIXEL23_0 |
||
7620 | PIXEL32_0 |
||
7621 | PIXEL33_0 |
||
7622 | } |
||
7623 | else |
||
7624 | { |
||
7625 | PIXEL23_50 |
||
7626 | PIXEL32_50 |
||
7627 | PIXEL33_50 |
||
7628 | } |
||
7629 | PIXEL30_80 |
||
7630 | PIXEL31_10 |
||
7631 | break; |
||
7632 | } |
||
7633 | case 104: |
||
7634 | case 108: |
||
7635 | { |
||
7636 | PIXEL00_80 |
||
7637 | PIXEL01_61 |
||
7638 | PIXEL02_60 |
||
7639 | PIXEL03_20 |
||
7640 | PIXEL10_10 |
||
7641 | PIXEL11_30 |
||
7642 | PIXEL12_70 |
||
7643 | PIXEL13_60 |
||
7644 | if (Diff(w[8], w[4])) |
||
7645 | { |
||
7646 | PIXEL20_0 |
||
7647 | PIXEL30_0 |
||
7648 | PIXEL31_0 |
||
7649 | } |
||
7650 | else |
||
7651 | { |
||
7652 | PIXEL20_50 |
||
7653 | PIXEL30_50 |
||
7654 | PIXEL31_50 |
||
7655 | } |
||
7656 | PIXEL21_0 |
||
7657 | PIXEL22_30 |
||
7658 | PIXEL23_61 |
||
7659 | PIXEL32_10 |
||
7660 | PIXEL33_80 |
||
7661 | break; |
||
7662 | } |
||
7663 | case 11: |
||
7664 | case 139: |
||
7665 | { |
||
7666 | if (Diff(w[4], w[2])) |
||
7667 | { |
||
7668 | PIXEL00_0 |
||
7669 | PIXEL01_0 |
||
7670 | PIXEL10_0 |
||
7671 | } |
||
7672 | else |
||
7673 | { |
||
7674 | PIXEL00_50 |
||
7675 | PIXEL01_50 |
||
7676 | PIXEL10_50 |
||
7677 | } |
||
7678 | PIXEL02_10 |
||
7679 | PIXEL03_80 |
||
7680 | PIXEL11_0 |
||
7681 | PIXEL12_30 |
||
7682 | PIXEL13_61 |
||
7683 | PIXEL20_10 |
||
7684 | PIXEL21_30 |
||
7685 | PIXEL22_70 |
||
7686 | PIXEL23_60 |
||
7687 | PIXEL30_80 |
||
7688 | PIXEL31_61 |
||
7689 | PIXEL32_60 |
||
7690 | PIXEL33_20 |
||
7691 | break; |
||
7692 | } |
||
7693 | case 19: |
||
7694 | case 51: |
||
7695 | { |
||
7696 | if (Diff(w[2], w[6])) |
||
7697 | { |
||
7698 | PIXEL00_81 |
||
7699 | PIXEL01_31 |
||
7700 | PIXEL02_10 |
||
7701 | PIXEL03_80 |
||
7702 | PIXEL12_30 |
||
7703 | PIXEL13_10 |
||
7704 | } |
||
7705 | else |
||
7706 | { |
||
7707 | PIXEL00_12 |
||
7708 | PIXEL01_14 |
||
7709 | PIXEL02_83 |
||
7710 | PIXEL03_50 |
||
7711 | PIXEL12_70 |
||
7712 | PIXEL13_21 |
||
7713 | } |
||
7714 | PIXEL10_81 |
||
7715 | PIXEL11_31 |
||
7716 | PIXEL20_60 |
||
7717 | PIXEL21_70 |
||
7718 | PIXEL22_30 |
||
7719 | PIXEL23_10 |
||
7720 | PIXEL30_20 |
||
7721 | PIXEL31_60 |
||
7722 | PIXEL32_61 |
||
7723 | PIXEL33_80 |
||
7724 | break; |
||
7725 | } |
||
7726 | case 146: |
||
7727 | case 178: |
||
7728 | { |
||
7729 | PIXEL00_80 |
||
7730 | PIXEL01_10 |
||
7731 | if (Diff(w[2], w[6])) |
||
7732 | { |
||
7733 | PIXEL02_10 |
||
7734 | PIXEL03_80 |
||
7735 | PIXEL12_30 |
||
7736 | PIXEL13_10 |
||
7737 | PIXEL23_32 |
||
7738 | PIXEL33_82 |
||
7739 | } |
||
7740 | else |
||
7741 | { |
||
7742 | PIXEL02_21 |
||
7743 | PIXEL03_50 |
||
7744 | PIXEL12_70 |
||
7745 | PIXEL13_83 |
||
7746 | PIXEL23_13 |
||
7747 | PIXEL33_11 |
||
7748 | } |
||
7749 | PIXEL10_61 |
||
7750 | PIXEL11_30 |
||
7751 | PIXEL20_60 |
||
7752 | PIXEL21_70 |
||
7753 | PIXEL22_32 |
||
7754 | PIXEL30_20 |
||
7755 | PIXEL31_60 |
||
7756 | PIXEL32_82 |
||
7757 | break; |
||
7758 | } |
||
7759 | case 84: |
||
7760 | case 85: |
||
7761 | { |
||
7762 | PIXEL00_20 |
||
7763 | PIXEL01_60 |
||
7764 | PIXEL02_81 |
||
7765 | if (Diff(w[6], w[8])) |
||
7766 | { |
||
7767 | PIXEL03_81 |
||
7768 | PIXEL13_31 |
||
7769 | PIXEL22_30 |
||
7770 | PIXEL23_10 |
||
7771 | PIXEL32_10 |
||
7772 | PIXEL33_80 |
||
7773 | } |
||
7774 | else |
||
7775 | { |
||
7776 | PIXEL03_12 |
||
7777 | PIXEL13_14 |
||
7778 | PIXEL22_70 |
||
7779 | PIXEL23_83 |
||
7780 | PIXEL32_21 |
||
7781 | PIXEL33_50 |
||
7782 | } |
||
7783 | PIXEL10_60 |
||
7784 | PIXEL11_70 |
||
7785 | PIXEL12_31 |
||
7786 | PIXEL20_61 |
||
7787 | PIXEL21_30 |
||
7788 | PIXEL30_80 |
||
7789 | PIXEL31_10 |
||
7790 | break; |
||
7791 | } |
||
7792 | case 112: |
||
7793 | case 113: |
||
7794 | { |
||
7795 | PIXEL00_20 |
||
7796 | PIXEL01_60 |
||
7797 | PIXEL02_61 |
||
7798 | PIXEL03_80 |
||
7799 | PIXEL10_60 |
||
7800 | PIXEL11_70 |
||
7801 | PIXEL12_30 |
||
7802 | PIXEL13_10 |
||
7803 | PIXEL20_82 |
||
7804 | PIXEL21_32 |
||
7805 | if (Diff(w[6], w[8])) |
||
7806 | { |
||
7807 | PIXEL22_30 |
||
7808 | PIXEL23_10 |
||
7809 | PIXEL30_82 |
||
7810 | PIXEL31_32 |
||
7811 | PIXEL32_10 |
||
7812 | PIXEL33_80 |
||
7813 | } |
||
7814 | else |
||
7815 | { |
||
7816 | PIXEL22_70 |
||
7817 | PIXEL23_21 |
||
7818 | PIXEL30_11 |
||
7819 | PIXEL31_13 |
||
7820 | PIXEL32_83 |
||
7821 | PIXEL33_50 |
||
7822 | } |
||
7823 | break; |
||
7824 | } |
||
7825 | case 200: |
||
7826 | case 204: |
||
7827 | { |
||
7828 | PIXEL00_80 |
||
7829 | PIXEL01_61 |
||
7830 | PIXEL02_60 |
||
7831 | PIXEL03_20 |
||
7832 | PIXEL10_10 |
||
7833 | PIXEL11_30 |
||
7834 | PIXEL12_70 |
||
7835 | PIXEL13_60 |
||
7836 | if (Diff(w[8], w[4])) |
||
7837 | { |
||
7838 | PIXEL20_10 |
||
7839 | PIXEL21_30 |
||
7840 | PIXEL30_80 |
||
7841 | PIXEL31_10 |
||
7842 | PIXEL32_31 |
||
7843 | PIXEL33_81 |
||
7844 | } |
||
7845 | else |
||
7846 | { |
||
7847 | PIXEL20_21 |
||
7848 | PIXEL21_70 |
||
7849 | PIXEL30_50 |
||
7850 | PIXEL31_83 |
||
7851 | PIXEL32_14 |
||
7852 | PIXEL33_12 |
||
7853 | } |
||
7854 | PIXEL22_31 |
||
7855 | PIXEL23_81 |
||
7856 | break; |
||
7857 | } |
||
7858 | case 73: |
||
7859 | case 77: |
||
7860 | { |
||
7861 | if (Diff(w[8], w[4])) |
||
7862 | { |
||
7863 | PIXEL00_82 |
||
7864 | PIXEL10_32 |
||
7865 | PIXEL20_10 |
||
7866 | PIXEL21_30 |
||
7867 | PIXEL30_80 |
||
7868 | PIXEL31_10 |
||
7869 | } |
||
7870 | else |
||
7871 | { |
||
7872 | PIXEL00_11 |
||
7873 | PIXEL10_13 |
||
7874 | PIXEL20_83 |
||
7875 | PIXEL21_70 |
||
7876 | PIXEL30_50 |
||
7877 | PIXEL31_21 |
||
7878 | } |
||
7879 | PIXEL01_82 |
||
7880 | PIXEL02_60 |
||
7881 | PIXEL03_20 |
||
7882 | PIXEL11_32 |
||
7883 | PIXEL12_70 |
||
7884 | PIXEL13_60 |
||
7885 | PIXEL22_30 |
||
7886 | PIXEL23_61 |
||
7887 | PIXEL32_10 |
||
7888 | PIXEL33_80 |
||
7889 | break; |
||
7890 | } |
||
7891 | case 42: |
||
7892 | case 170: |
||
7893 | { |
||
7894 | if (Diff(w[4], w[2])) |
||
7895 | { |
||
7896 | PIXEL00_80 |
||
7897 | PIXEL01_10 |
||
7898 | PIXEL10_10 |
||
7899 | PIXEL11_30 |
||
7900 | PIXEL20_31 |
||
7901 | PIXEL30_81 |
||
7902 | } |
||
7903 | else |
||
7904 | { |
||
7905 | PIXEL00_50 |
||
7906 | PIXEL01_21 |
||
7907 | PIXEL10_83 |
||
7908 | PIXEL11_70 |
||
7909 | PIXEL20_14 |
||
7910 | PIXEL30_12 |
||
7911 | } |
||
7912 | PIXEL02_10 |
||
7913 | PIXEL03_80 |
||
7914 | PIXEL12_30 |
||
7915 | PIXEL13_61 |
||
7916 | PIXEL21_31 |
||
7917 | PIXEL22_70 |
||
7918 | PIXEL23_60 |
||
7919 | PIXEL31_81 |
||
7920 | PIXEL32_60 |
||
7921 | PIXEL33_20 |
||
7922 | break; |
||
7923 | } |
||
7924 | case 14: |
||
7925 | case 142: |
||
7926 | { |
||
7927 | if (Diff(w[4], w[2])) |
||
7928 | { |
||
7929 | PIXEL00_80 |
||
7930 | PIXEL01_10 |
||
7931 | PIXEL02_32 |
||
7932 | PIXEL03_82 |
||
7933 | PIXEL10_10 |
||
7934 | PIXEL11_30 |
||
7935 | } |
||
7936 | else |
||
7937 | { |
||
7938 | PIXEL00_50 |
||
7939 | PIXEL01_83 |
||
7940 | PIXEL02_13 |
||
7941 | PIXEL03_11 |
||
7942 | PIXEL10_21 |
||
7943 | PIXEL11_70 |
||
7944 | } |
||
7945 | PIXEL12_32 |
||
7946 | PIXEL13_82 |
||
7947 | PIXEL20_10 |
||
7948 | PIXEL21_30 |
||
7949 | PIXEL22_70 |
||
7950 | PIXEL23_60 |
||
7951 | PIXEL30_80 |
||
7952 | PIXEL31_61 |
||
7953 | PIXEL32_60 |
||
7954 | PIXEL33_20 |
||
7955 | break; |
||
7956 | } |
||
7957 | case 67: |
||
7958 | { |
||
7959 | PIXEL00_81 |
||
7960 | PIXEL01_31 |
||
7961 | PIXEL02_10 |
||
7962 | PIXEL03_80 |
||
7963 | PIXEL10_81 |
||
7964 | PIXEL11_31 |
||
7965 | PIXEL12_30 |
||
7966 | PIXEL13_61 |
||
7967 | PIXEL20_61 |
||
7968 | PIXEL21_30 |
||
7969 | PIXEL22_30 |
||
7970 | PIXEL23_61 |
||
7971 | PIXEL30_80 |
||
7972 | PIXEL31_10 |
||
7973 | PIXEL32_10 |
||
7974 | PIXEL33_80 |
||
7975 | break; |
||
7976 | } |
||
7977 | case 70: |
||
7978 | { |
||
7979 | PIXEL00_80 |
||
7980 | PIXEL01_10 |
||
7981 | PIXEL02_32 |
||
7982 | PIXEL03_82 |
||
7983 | PIXEL10_61 |
||
7984 | PIXEL11_30 |
||
7985 | PIXEL12_32 |
||
7986 | PIXEL13_82 |
||
7987 | PIXEL20_61 |
||
7988 | PIXEL21_30 |
||
7989 | PIXEL22_30 |
||
7990 | PIXEL23_61 |
||
7991 | PIXEL30_80 |
||
7992 | PIXEL31_10 |
||
7993 | PIXEL32_10 |
||
7994 | PIXEL33_80 |
||
7995 | break; |
||
7996 | } |
||
7997 | case 28: |
||
7998 | { |
||
7999 | PIXEL00_80 |
||
8000 | PIXEL01_61 |
||
8001 | PIXEL02_81 |
||
8002 | PIXEL03_81 |
||
8003 | PIXEL10_10 |
||
8004 | PIXEL11_30 |
||
8005 | PIXEL12_31 |
||
8006 | PIXEL13_31 |
||
8007 | PIXEL20_10 |
||
8008 | PIXEL21_30 |
||
8009 | PIXEL22_30 |
||
8010 | PIXEL23_10 |
||
8011 | PIXEL30_80 |
||
8012 | PIXEL31_61 |
||
8013 | PIXEL32_61 |
||
8014 | PIXEL33_80 |
||
8015 | break; |
||
8016 | } |
||
8017 | case 152: |
||
8018 | { |
||
8019 | PIXEL00_80 |
||
8020 | PIXEL01_61 |
||
8021 | PIXEL02_61 |
||
8022 | PIXEL03_80 |
||
8023 | PIXEL10_10 |
||
8024 | PIXEL11_30 |
||
8025 | PIXEL12_30 |
||
8026 | PIXEL13_10 |
||
8027 | PIXEL20_10 |
||
8028 | PIXEL21_30 |
||
8029 | PIXEL22_32 |
||
8030 | PIXEL23_32 |
||
8031 | PIXEL30_80 |
||
8032 | PIXEL31_61 |
||
8033 | PIXEL32_82 |
||
8034 | PIXEL33_82 |
||
8035 | break; |
||
8036 | } |
||
8037 | case 194: |
||
8038 | { |
||
8039 | PIXEL00_80 |
||
8040 | PIXEL01_10 |
||
8041 | PIXEL02_10 |
||
8042 | PIXEL03_80 |
||
8043 | PIXEL10_61 |
||
8044 | PIXEL11_30 |
||
8045 | PIXEL12_30 |
||
8046 | PIXEL13_61 |
||
8047 | PIXEL20_61 |
||
8048 | PIXEL21_30 |
||
8049 | PIXEL22_31 |
||
8050 | PIXEL23_81 |
||
8051 | PIXEL30_80 |
||
8052 | PIXEL31_10 |
||
8053 | PIXEL32_31 |
||
8054 | PIXEL33_81 |
||
8055 | break; |
||
8056 | } |
||
8057 | case 98: |
||
8058 | { |
||
8059 | PIXEL00_80 |
||
8060 | PIXEL01_10 |
||
8061 | PIXEL02_10 |
||
8062 | PIXEL03_80 |
||
8063 | PIXEL10_61 |
||
8064 | PIXEL11_30 |
||
8065 | PIXEL12_30 |
||
8066 | PIXEL13_61 |
||
8067 | PIXEL20_82 |
||
8068 | PIXEL21_32 |
||
8069 | PIXEL22_30 |
||
8070 | PIXEL23_61 |
||
8071 | PIXEL30_82 |
||
8072 | PIXEL31_32 |
||
8073 | PIXEL32_10 |
||
8074 | PIXEL33_80 |
||
8075 | break; |
||
8076 | } |
||
8077 | case 56: |
||
8078 | { |
||
8079 | PIXEL00_80 |
||
8080 | PIXEL01_61 |
||
8081 | PIXEL02_61 |
||
8082 | PIXEL03_80 |
||
8083 | PIXEL10_10 |
||
8084 | PIXEL11_30 |
||
8085 | PIXEL12_30 |
||
8086 | PIXEL13_10 |
||
8087 | PIXEL20_31 |
||
8088 | PIXEL21_31 |
||
8089 | PIXEL22_30 |
||
8090 | PIXEL23_10 |
||
8091 | PIXEL30_81 |
||
8092 | PIXEL31_81 |
||
8093 | PIXEL32_61 |
||
8094 | PIXEL33_80 |
||
8095 | break; |
||
8096 | } |
||
8097 | case 25: |
||
8098 | { |
||
8099 | PIXEL00_82 |
||
8100 | PIXEL01_82 |
||
8101 | PIXEL02_61 |
||
8102 | PIXEL03_80 |
||
8103 | PIXEL10_32 |
||
8104 | PIXEL11_32 |
||
8105 | PIXEL12_30 |
||
8106 | PIXEL13_10 |
||
8107 | PIXEL20_10 |
||
8108 | PIXEL21_30 |
||
8109 | PIXEL22_30 |
||
8110 | PIXEL23_10 |
||
8111 | PIXEL30_80 |
||
8112 | PIXEL31_61 |
||
8113 | PIXEL32_61 |
||
8114 | PIXEL33_80 |
||
8115 | break; |
||
8116 | } |
||
8117 | case 26: |
||
8118 | case 31: |
||
8119 | { |
||
8120 | if (Diff(w[4], w[2])) |
||
8121 | { |
||
8122 | PIXEL00_0 |
||
8123 | PIXEL01_0 |
||
8124 | PIXEL10_0 |
||
8125 | } |
||
8126 | else |
||
8127 | { |
||
8128 | PIXEL00_50 |
||
8129 | PIXEL01_50 |
||
8130 | PIXEL10_50 |
||
8131 | } |
||
8132 | if (Diff(w[2], w[6])) |
||
8133 | { |
||
8134 | PIXEL02_0 |
||
8135 | PIXEL03_0 |
||
8136 | PIXEL13_0 |
||
8137 | } |
||
8138 | else |
||
8139 | { |
||
8140 | PIXEL02_50 |
||
8141 | PIXEL03_50 |
||
8142 | PIXEL13_50 |
||
8143 | } |
||
8144 | PIXEL11_0 |
||
8145 | PIXEL12_0 |
||
8146 | PIXEL20_10 |
||
8147 | PIXEL21_30 |
||
8148 | PIXEL22_30 |
||
8149 | PIXEL23_10 |
||
8150 | PIXEL30_80 |
||
8151 | PIXEL31_61 |
||
8152 | PIXEL32_61 |
||
8153 | PIXEL33_80 |
||
8154 | break; |
||
8155 | } |
||
8156 | case 82: |
||
8157 | case 214: |
||
8158 | { |
||
8159 | PIXEL00_80 |
||
8160 | PIXEL01_10 |
||
8161 | if (Diff(w[2], w[6])) |
||
8162 | { |
||
8163 | PIXEL02_0 |
||
8164 | PIXEL03_0 |
||
8165 | PIXEL13_0 |
||
8166 | } |
||
8167 | else |
||
8168 | { |
||
8169 | PIXEL02_50 |
||
8170 | PIXEL03_50 |
||
8171 | PIXEL13_50 |
||
8172 | } |
||
8173 | PIXEL10_61 |
||
8174 | PIXEL11_30 |
||
8175 | PIXEL12_0 |
||
8176 | PIXEL20_61 |
||
8177 | PIXEL21_30 |
||
8178 | PIXEL22_0 |
||
8179 | if (Diff(w[6], w[8])) |
||
8180 | { |
||
8181 | PIXEL23_0 |
||
8182 | PIXEL32_0 |
||
8183 | PIXEL33_0 |
||
8184 | } |
||
8185 | else |
||
8186 | { |
||
8187 | PIXEL23_50 |
||
8188 | PIXEL32_50 |
||
8189 | PIXEL33_50 |
||
8190 | } |
||
8191 | PIXEL30_80 |
||
8192 | PIXEL31_10 |
||
8193 | break; |
||
8194 | } |
||
8195 | case 88: |
||
8196 | case 248: |
||
8197 | { |
||
8198 | PIXEL00_80 |
||
8199 | PIXEL01_61 |
||
8200 | PIXEL02_61 |
||
8201 | PIXEL03_80 |
||
8202 | PIXEL10_10 |
||
8203 | PIXEL11_30 |
||
8204 | PIXEL12_30 |
||
8205 | PIXEL13_10 |
||
8206 | if (Diff(w[8], w[4])) |
||
8207 | { |
||
8208 | PIXEL20_0 |
||
8209 | PIXEL30_0 |
||
8210 | PIXEL31_0 |
||
8211 | } |
||
8212 | else |
||
8213 | { |
||
8214 | PIXEL20_50 |
||
8215 | PIXEL30_50 |
||
8216 | PIXEL31_50 |
||
8217 | } |
||
8218 | PIXEL21_0 |
||
8219 | PIXEL22_0 |
||
8220 | if (Diff(w[6], w[8])) |
||
8221 | { |
||
8222 | PIXEL23_0 |
||
8223 | PIXEL32_0 |
||
8224 | PIXEL33_0 |
||
8225 | } |
||
8226 | else |
||
8227 | { |
||
8228 | PIXEL23_50 |
||
8229 | PIXEL32_50 |
||
8230 | PIXEL33_50 |
||
8231 | } |
||
8232 | break; |
||
8233 | } |
||
8234 | case 74: |
||
8235 | case 107: |
||
8236 | { |
||
8237 | if (Diff(w[4], w[2])) |
||
8238 | { |
||
8239 | PIXEL00_0 |
||
8240 | PIXEL01_0 |
||
8241 | PIXEL10_0 |
||
8242 | } |
||
8243 | else |
||
8244 | { |
||
8245 | PIXEL00_50 |
||
8246 | PIXEL01_50 |
||
8247 | PIXEL10_50 |
||
8248 | } |
||
8249 | PIXEL02_10 |
||
8250 | PIXEL03_80 |
||
8251 | PIXEL11_0 |
||
8252 | PIXEL12_30 |
||
8253 | PIXEL13_61 |
||
8254 | if (Diff(w[8], w[4])) |
||
8255 | { |
||
8256 | PIXEL20_0 |
||
8257 | PIXEL30_0 |
||
8258 | PIXEL31_0 |
||
8259 | } |
||
8260 | else |
||
8261 | { |
||
8262 | PIXEL20_50 |
||
8263 | PIXEL30_50 |
||
8264 | PIXEL31_50 |
||
8265 | } |
||
8266 | PIXEL21_0 |
||
8267 | PIXEL22_30 |
||
8268 | PIXEL23_61 |
||
8269 | PIXEL32_10 |
||
8270 | PIXEL33_80 |
||
8271 | break; |
||
8272 | } |
||
8273 | case 27: |
||
8274 | { |
||
8275 | if (Diff(w[4], w[2])) |
||
8276 | { |
||
8277 | PIXEL00_0 |
||
8278 | PIXEL01_0 |
||
8279 | PIXEL10_0 |
||
8280 | } |
||
8281 | else |
||
8282 | { |
||
8283 | PIXEL00_50 |
||
8284 | PIXEL01_50 |
||
8285 | PIXEL10_50 |
||
8286 | } |
||
8287 | PIXEL02_10 |
||
8288 | PIXEL03_80 |
||
8289 | PIXEL11_0 |
||
8290 | PIXEL12_30 |
||
8291 | PIXEL13_10 |
||
8292 | PIXEL20_10 |
||
8293 | PIXEL21_30 |
||
8294 | PIXEL22_30 |
||
8295 | PIXEL23_10 |
||
8296 | PIXEL30_80 |
||
8297 | PIXEL31_61 |
||
8298 | PIXEL32_61 |
||
8299 | PIXEL33_80 |
||
8300 | break; |
||
8301 | } |
||
8302 | case 86: |
||
8303 | { |
||
8304 | PIXEL00_80 |
||
8305 | PIXEL01_10 |
||
8306 | if (Diff(w[2], w[6])) |
||
8307 | { |
||
8308 | PIXEL02_0 |
||
8309 | PIXEL03_0 |
||
8310 | PIXEL13_0 |
||
8311 | } |
||
8312 | else |
||
8313 | { |
||
8314 | PIXEL02_50 |
||
8315 | PIXEL03_50 |
||
8316 | PIXEL13_50 |
||
8317 | } |
||
8318 | PIXEL10_61 |
||
8319 | PIXEL11_30 |
||
8320 | PIXEL12_0 |
||
8321 | PIXEL20_61 |
||
8322 | PIXEL21_30 |
||
8323 | PIXEL22_30 |
||
8324 | PIXEL23_10 |
||
8325 | PIXEL30_80 |
||
8326 | PIXEL31_10 |
||
8327 | PIXEL32_10 |
||
8328 | PIXEL33_80 |
||
8329 | break; |
||
8330 | } |
||
8331 | case 216: |
||
8332 | { |
||
8333 | PIXEL00_80 |
||
8334 | PIXEL01_61 |
||
8335 | PIXEL02_61 |
||
8336 | PIXEL03_80 |
||
8337 | PIXEL10_10 |
||
8338 | PIXEL11_30 |
||
8339 | PIXEL12_30 |
||
8340 | PIXEL13_10 |
||
8341 | PIXEL20_10 |
||
8342 | PIXEL21_30 |
||
8343 | PIXEL22_0 |
||
8344 | if (Diff(w[6], w[8])) |
||
8345 | { |
||
8346 | PIXEL23_0 |
||
8347 | PIXEL32_0 |
||
8348 | PIXEL33_0 |
||
8349 | } |
||
8350 | else |
||
8351 | { |
||
8352 | PIXEL23_50 |
||
8353 | PIXEL32_50 |
||
8354 | PIXEL33_50 |
||
8355 | } |
||
8356 | PIXEL30_80 |
||
8357 | PIXEL31_10 |
||
8358 | break; |
||
8359 | } |
||
8360 | case 106: |
||
8361 | { |
||
8362 | PIXEL00_80 |
||
8363 | PIXEL01_10 |
||
8364 | PIXEL02_10 |
||
8365 | PIXEL03_80 |
||
8366 | PIXEL10_10 |
||
8367 | PIXEL11_30 |
||
8368 | PIXEL12_30 |
||
8369 | PIXEL13_61 |
||
8370 | if (Diff(w[8], w[4])) |
||
8371 | { |
||
8372 | PIXEL20_0 |
||
8373 | PIXEL30_0 |
||
8374 | PIXEL31_0 |
||
8375 | } |
||
8376 | else |
||
8377 | { |
||
8378 | PIXEL20_50 |
||
8379 | PIXEL30_50 |
||
8380 | PIXEL31_50 |
||
8381 | } |
||
8382 | PIXEL21_0 |
||
8383 | PIXEL22_30 |
||
8384 | PIXEL23_61 |
||
8385 | PIXEL32_10 |
||
8386 | PIXEL33_80 |
||
8387 | break; |
||
8388 | } |
||
8389 | case 30: |
||
8390 | { |
||
8391 | PIXEL00_80 |
||
8392 | PIXEL01_10 |
||
8393 | if (Diff(w[2], w[6])) |
||
8394 | { |
||
8395 | PIXEL02_0 |
||
8396 | PIXEL03_0 |
||
8397 | PIXEL13_0 |
||
8398 | } |
||
8399 | else |
||
8400 | { |
||
8401 | PIXEL02_50 |
||
8402 | PIXEL03_50 |
||
8403 | PIXEL13_50 |
||
8404 | } |
||
8405 | PIXEL10_10 |
||
8406 | PIXEL11_30 |
||
8407 | PIXEL12_0 |
||
8408 | PIXEL20_10 |
||
8409 | PIXEL21_30 |
||
8410 | PIXEL22_30 |
||
8411 | PIXEL23_10 |
||
8412 | PIXEL30_80 |
||
8413 | PIXEL31_61 |
||
8414 | PIXEL32_61 |
||
8415 | PIXEL33_80 |
||
8416 | break; |
||
8417 | } |
||
8418 | case 210: |
||
8419 | { |
||
8420 | PIXEL00_80 |
||
8421 | PIXEL01_10 |
||
8422 | PIXEL02_10 |
||
8423 | PIXEL03_80 |
||
8424 | PIXEL10_61 |
||
8425 | PIXEL11_30 |
||
8426 | PIXEL12_30 |
||
8427 | PIXEL13_10 |
||
8428 | PIXEL20_61 |
||
8429 | PIXEL21_30 |
||
8430 | PIXEL22_0 |
||
8431 | if (Diff(w[6], w[8])) |
||
8432 | { |
||
8433 | PIXEL23_0 |
||
8434 | PIXEL32_0 |
||
8435 | PIXEL33_0 |
||
8436 | } |
||
8437 | else |
||
8438 | { |
||
8439 | PIXEL23_50 |
||
8440 | PIXEL32_50 |
||
8441 | PIXEL33_50 |
||
8442 | } |
||
8443 | PIXEL30_80 |
||
8444 | PIXEL31_10 |
||
8445 | break; |
||
8446 | } |
||
8447 | case 120: |
||
8448 | { |
||
8449 | PIXEL00_80 |
||
8450 | PIXEL01_61 |
||
8451 | PIXEL02_61 |
||
8452 | PIXEL03_80 |
||
8453 | PIXEL10_10 |
||
8454 | PIXEL11_30 |
||
8455 | PIXEL12_30 |
||
8456 | PIXEL13_10 |
||
8457 | if (Diff(w[8], w[4])) |
||
8458 | { |
||
8459 | PIXEL20_0 |
||
8460 | PIXEL30_0 |
||
8461 | PIXEL31_0 |
||
8462 | } |
||
8463 | else |
||
8464 | { |
||
8465 | PIXEL20_50 |
||
8466 | PIXEL30_50 |
||
8467 | PIXEL31_50 |
||
8468 | } |
||
8469 | PIXEL21_0 |
||
8470 | PIXEL22_30 |
||
8471 | PIXEL23_10 |
||
8472 | PIXEL32_10 |
||
8473 | PIXEL33_80 |
||
8474 | break; |
||
8475 | } |
||
8476 | case 75: |
||
8477 | { |
||
8478 | if (Diff(w[4], w[2])) |
||
8479 | { |
||
8480 | PIXEL00_0 |
||
8481 | PIXEL01_0 |
||
8482 | PIXEL10_0 |
||
8483 | } |
||
8484 | else |
||
8485 | { |
||
8486 | PIXEL00_50 |
||
8487 | PIXEL01_50 |
||
8488 | PIXEL10_50 |
||
8489 | } |
||
8490 | PIXEL02_10 |
||
8491 | PIXEL03_80 |
||
8492 | PIXEL11_0 |
||
8493 | PIXEL12_30 |
||
8494 | PIXEL13_61 |
||
8495 | PIXEL20_10 |
||
8496 | PIXEL21_30 |
||
8497 | PIXEL22_30 |
||
8498 | PIXEL23_61 |
||
8499 | PIXEL30_80 |
||
8500 | PIXEL31_10 |
||
8501 | PIXEL32_10 |
||
8502 | PIXEL33_80 |
||
8503 | break; |
||
8504 | } |
||
8505 | case 29: |
||
8506 | { |
||
8507 | PIXEL00_82 |
||
8508 | PIXEL01_82 |
||
8509 | PIXEL02_81 |
||
8510 | PIXEL03_81 |
||
8511 | PIXEL10_32 |
||
8512 | PIXEL11_32 |
||
8513 | PIXEL12_31 |
||
8514 | PIXEL13_31 |
||
8515 | PIXEL20_10 |
||
8516 | PIXEL21_30 |
||
8517 | PIXEL22_30 |
||
8518 | PIXEL23_10 |
||
8519 | PIXEL30_80 |
||
8520 | PIXEL31_61 |
||
8521 | PIXEL32_61 |
||
8522 | PIXEL33_80 |
||
8523 | break; |
||
8524 | } |
||
8525 | case 198: |
||
8526 | { |
||
8527 | PIXEL00_80 |
||
8528 | PIXEL01_10 |
||
8529 | PIXEL02_32 |
||
8530 | PIXEL03_82 |
||
8531 | PIXEL10_61 |
||
8532 | PIXEL11_30 |
||
8533 | PIXEL12_32 |
||
8534 | PIXEL13_82 |
||
8535 | PIXEL20_61 |
||
8536 | PIXEL21_30 |
||
8537 | PIXEL22_31 |
||
8538 | PIXEL23_81 |
||
8539 | PIXEL30_80 |
||
8540 | PIXEL31_10 |
||
8541 | PIXEL32_31 |
||
8542 | PIXEL33_81 |
||
8543 | break; |
||
8544 | } |
||
8545 | case 184: |
||
8546 | { |
||
8547 | PIXEL00_80 |
||
8548 | PIXEL01_61 |
||
8549 | PIXEL02_61 |
||
8550 | PIXEL03_80 |
||
8551 | PIXEL10_10 |
||
8552 | PIXEL11_30 |
||
8553 | PIXEL12_30 |
||
8554 | PIXEL13_10 |
||
8555 | PIXEL20_31 |
||
8556 | PIXEL21_31 |
||
8557 | PIXEL22_32 |
||
8558 | PIXEL23_32 |
||
8559 | PIXEL30_81 |
||
8560 | PIXEL31_81 |
||
8561 | PIXEL32_82 |
||
8562 | PIXEL33_82 |
||
8563 | break; |
||
8564 | } |
||
8565 | case 99: |
||
8566 | { |
||
8567 | PIXEL00_81 |
||
8568 | PIXEL01_31 |
||
8569 | PIXEL02_10 |
||
8570 | PIXEL03_80 |
||
8571 | PIXEL10_81 |
||
8572 | PIXEL11_31 |
||
8573 | PIXEL12_30 |
||
8574 | PIXEL13_61 |
||
8575 | PIXEL20_82 |
||
8576 | PIXEL21_32 |
||
8577 | PIXEL22_30 |
||
8578 | PIXEL23_61 |
||
8579 | PIXEL30_82 |
||
8580 | PIXEL31_32 |
||
8581 | PIXEL32_10 |
||
8582 | PIXEL33_80 |
||
8583 | break; |
||
8584 | } |
||
8585 | case 57: |
||
8586 | { |
||
8587 | PIXEL00_82 |
||
8588 | PIXEL01_82 |
||
8589 | PIXEL02_61 |
||
8590 | PIXEL03_80 |
||
8591 | PIXEL10_32 |
||
8592 | PIXEL11_32 |
||
8593 | PIXEL12_30 |
||
8594 | PIXEL13_10 |
||
8595 | PIXEL20_31 |
||
8596 | PIXEL21_31 |
||
8597 | PIXEL22_30 |
||
8598 | PIXEL23_10 |
||
8599 | PIXEL30_81 |
||
8600 | PIXEL31_81 |
||
8601 | PIXEL32_61 |
||
8602 | PIXEL33_80 |
||
8603 | break; |
||
8604 | } |
||
8605 | case 71: |
||
8606 | { |
||
8607 | PIXEL00_81 |
||
8608 | PIXEL01_31 |
||
8609 | PIXEL02_32 |
||
8610 | PIXEL03_82 |
||
8611 | PIXEL10_81 |
||
8612 | PIXEL11_31 |
||
8613 | PIXEL12_32 |
||
8614 | PIXEL13_82 |
||
8615 | PIXEL20_61 |
||
8616 | PIXEL21_30 |
||
8617 | PIXEL22_30 |
||
8618 | PIXEL23_61 |
||
8619 | PIXEL30_80 |
||
8620 | PIXEL31_10 |
||
8621 | PIXEL32_10 |
||
8622 | PIXEL33_80 |
||
8623 | break; |
||
8624 | } |
||
8625 | case 156: |
||
8626 | { |
||
8627 | PIXEL00_80 |
||
8628 | PIXEL01_61 |
||
8629 | PIXEL02_81 |
||
8630 | PIXEL03_81 |
||
8631 | PIXEL10_10 |
||
8632 | PIXEL11_30 |
||
8633 | PIXEL12_31 |
||
8634 | PIXEL13_31 |
||
8635 | PIXEL20_10 |
||
8636 | PIXEL21_30 |
||
8637 | PIXEL22_32 |
||
8638 | PIXEL23_32 |
||
8639 | PIXEL30_80 |
||
8640 | PIXEL31_61 |
||
8641 | PIXEL32_82 |
||
8642 | PIXEL33_82 |
||
8643 | break; |
||
8644 | } |
||
8645 | case 226: |
||
8646 | { |
||
8647 | PIXEL00_80 |
||
8648 | PIXEL01_10 |
||
8649 | PIXEL02_10 |
||
8650 | PIXEL03_80 |
||
8651 | PIXEL10_61 |
||
8652 | PIXEL11_30 |
||
8653 | PIXEL12_30 |
||
8654 | PIXEL13_61 |
||
8655 | PIXEL20_82 |
||
8656 | PIXEL21_32 |
||
8657 | PIXEL22_31 |
||
8658 | PIXEL23_81 |
||
8659 | PIXEL30_82 |
||
8660 | PIXEL31_32 |
||
8661 | PIXEL32_31 |
||
8662 | PIXEL33_81 |
||
8663 | break; |
||
8664 | } |
||
8665 | case 60: |
||
8666 | { |
||
8667 | PIXEL00_80 |
||
8668 | PIXEL01_61 |
||
8669 | PIXEL02_81 |
||
8670 | PIXEL03_81 |
||
8671 | PIXEL10_10 |
||
8672 | PIXEL11_30 |
||
8673 | PIXEL12_31 |
||
8674 | PIXEL13_31 |
||
8675 | PIXEL20_31 |
||
8676 | PIXEL21_31 |
||
8677 | PIXEL22_30 |
||
8678 | PIXEL23_10 |
||
8679 | PIXEL30_81 |
||
8680 | PIXEL31_81 |
||
8681 | PIXEL32_61 |
||
8682 | PIXEL33_80 |
||
8683 | break; |
||
8684 | } |
||
8685 | case 195: |
||
8686 | { |
||
8687 | PIXEL00_81 |
||
8688 | PIXEL01_31 |
||
8689 | PIXEL02_10 |
||
8690 | PIXEL03_80 |
||
8691 | PIXEL10_81 |
||
8692 | PIXEL11_31 |
||
8693 | PIXEL12_30 |
||
8694 | PIXEL13_61 |
||
8695 | PIXEL20_61 |
||
8696 | PIXEL21_30 |
||
8697 | PIXEL22_31 |
||
8698 | PIXEL23_81 |
||
8699 | PIXEL30_80 |
||
8700 | PIXEL31_10 |
||
8701 | PIXEL32_31 |
||
8702 | PIXEL33_81 |
||
8703 | break; |
||
8704 | } |
||
8705 | case 102: |
||
8706 | { |
||
8707 | PIXEL00_80 |
||
8708 | PIXEL01_10 |
||
8709 | PIXEL02_32 |
||
8710 | PIXEL03_82 |
||
8711 | PIXEL10_61 |
||
8712 | PIXEL11_30 |
||
8713 | PIXEL12_32 |
||
8714 | PIXEL13_82 |
||
8715 | PIXEL20_82 |
||
8716 | PIXEL21_32 |
||
8717 | PIXEL22_30 |
||
8718 | PIXEL23_61 |
||
8719 | PIXEL30_82 |
||
8720 | PIXEL31_32 |
||
8721 | PIXEL32_10 |
||
8722 | PIXEL33_80 |
||
8723 | break; |
||
8724 | } |
||
8725 | case 153: |
||
8726 | { |
||
8727 | PIXEL00_82 |
||
8728 | PIXEL01_82 |
||
8729 | PIXEL02_61 |
||
8730 | PIXEL03_80 |
||
8731 | PIXEL10_32 |
||
8732 | PIXEL11_32 |
||
8733 | PIXEL12_30 |
||
8734 | PIXEL13_10 |
||
8735 | PIXEL20_10 |
||
8736 | PIXEL21_30 |
||
8737 | PIXEL22_32 |
||
8738 | PIXEL23_32 |
||
8739 | PIXEL30_80 |
||
8740 | PIXEL31_61 |
||
8741 | PIXEL32_82 |
||
8742 | PIXEL33_82 |
||
8743 | break; |
||
8744 | } |
||
8745 | case 58: |
||
8746 | { |
||
8747 | if (Diff(w[4], w[2])) |
||
8748 | { |
||
8749 | PIXEL00_80 |
||
8750 | PIXEL01_10 |
||
8751 | PIXEL10_10 |
||
8752 | PIXEL11_30 |
||
8753 | } |
||
8754 | else |
||
8755 | { |
||
8756 | PIXEL00_20 |
||
8757 | PIXEL01_12 |
||
8758 | PIXEL10_11 |
||
8759 | PIXEL11_0 |
||
8760 | } |
||
8761 | if (Diff(w[2], w[6])) |
||
8762 | { |
||
8763 | PIXEL02_10 |
||
8764 | PIXEL03_80 |
||
8765 | PIXEL12_30 |
||
8766 | PIXEL13_10 |
||
8767 | } |
||
8768 | else |
||
8769 | { |
||
8770 | PIXEL02_11 |
||
8771 | PIXEL03_20 |
||
8772 | PIXEL12_0 |
||
8773 | PIXEL13_12 |
||
8774 | } |
||
8775 | PIXEL20_31 |
||
8776 | PIXEL21_31 |
||
8777 | PIXEL22_30 |
||
8778 | PIXEL23_10 |
||
8779 | PIXEL30_81 |
||
8780 | PIXEL31_81 |
||
8781 | PIXEL32_61 |
||
8782 | PIXEL33_80 |
||
8783 | break; |
||
8784 | } |
||
8785 | case 83: |
||
8786 | { |
||
8787 | PIXEL00_81 |
||
8788 | PIXEL01_31 |
||
8789 | if (Diff(w[2], w[6])) |
||
8790 | { |
||
8791 | PIXEL02_10 |
||
8792 | PIXEL03_80 |
||
8793 | PIXEL12_30 |
||
8794 | PIXEL13_10 |
||
8795 | } |
||
8796 | else |
||
8797 | { |
||
8798 | PIXEL02_11 |
||
8799 | PIXEL03_20 |
||
8800 | PIXEL12_0 |
||
8801 | PIXEL13_12 |
||
8802 | } |
||
8803 | PIXEL10_81 |
||
8804 | PIXEL11_31 |
||
8805 | PIXEL20_61 |
||
8806 | PIXEL21_30 |
||
8807 | if (Diff(w[6], w[8])) |
||
8808 | { |
||
8809 | PIXEL22_30 |
||
8810 | PIXEL23_10 |
||
8811 | PIXEL32_10 |
||
8812 | PIXEL33_80 |
||
8813 | } |
||
8814 | else |
||
8815 | { |
||
8816 | PIXEL22_0 |
||
8817 | PIXEL23_11 |
||
8818 | PIXEL32_12 |
||
8819 | PIXEL33_20 |
||
8820 | } |
||
8821 | PIXEL30_80 |
||
8822 | PIXEL31_10 |
||
8823 | break; |
||
8824 | } |
||
8825 | case 92: |
||
8826 | { |
||
8827 | PIXEL00_80 |
||
8828 | PIXEL01_61 |
||
8829 | PIXEL02_81 |
||
8830 | PIXEL03_81 |
||
8831 | PIXEL10_10 |
||
8832 | PIXEL11_30 |
||
8833 | PIXEL12_31 |
||
8834 | PIXEL13_31 |
||
8835 | if (Diff(w[8], w[4])) |
||
8836 | { |
||
8837 | PIXEL20_10 |
||
8838 | PIXEL21_30 |
||
8839 | PIXEL30_80 |
||
8840 | PIXEL31_10 |
||
8841 | } |
||
8842 | else |
||
8843 | { |
||
8844 | PIXEL20_12 |
||
8845 | PIXEL21_0 |
||
8846 | PIXEL30_20 |
||
8847 | PIXEL31_11 |
||
8848 | } |
||
8849 | if (Diff(w[6], w[8])) |
||
8850 | { |
||
8851 | PIXEL22_30 |
||
8852 | PIXEL23_10 |
||
8853 | PIXEL32_10 |
||
8854 | PIXEL33_80 |
||
8855 | } |
||
8856 | else |
||
8857 | { |
||
8858 | PIXEL22_0 |
||
8859 | PIXEL23_11 |
||
8860 | PIXEL32_12 |
||
8861 | PIXEL33_20 |
||
8862 | } |
||
8863 | break; |
||
8864 | } |
||
8865 | case 202: |
||
8866 | { |
||
8867 | if (Diff(w[4], w[2])) |
||
8868 | { |
||
8869 | PIXEL00_80 |
||
8870 | PIXEL01_10 |
||
8871 | PIXEL10_10 |
||
8872 | PIXEL11_30 |
||
8873 | } |
||
8874 | else |
||
8875 | { |
||
8876 | PIXEL00_20 |
||
8877 | PIXEL01_12 |
||
8878 | PIXEL10_11 |
||
8879 | PIXEL11_0 |
||
8880 | } |
||
8881 | PIXEL02_10 |
||
8882 | PIXEL03_80 |
||
8883 | PIXEL12_30 |
||
8884 | PIXEL13_61 |
||
8885 | if (Diff(w[8], w[4])) |
||
8886 | { |
||
8887 | PIXEL20_10 |
||
8888 | PIXEL21_30 |
||
8889 | PIXEL30_80 |
||
8890 | PIXEL31_10 |
||
8891 | } |
||
8892 | else |
||
8893 | { |
||
8894 | PIXEL20_12 |
||
8895 | PIXEL21_0 |
||
8896 | PIXEL30_20 |
||
8897 | PIXEL31_11 |
||
8898 | } |
||
8899 | PIXEL22_31 |
||
8900 | PIXEL23_81 |
||
8901 | PIXEL32_31 |
||
8902 | PIXEL33_81 |
||
8903 | break; |
||
8904 | } |
||
8905 | case 78: |
||
8906 | { |
||
8907 | if (Diff(w[4], w[2])) |
||
8908 | { |
||
8909 | PIXEL00_80 |
||
8910 | PIXEL01_10 |
||
8911 | PIXEL10_10 |
||
8912 | PIXEL11_30 |
||
8913 | } |
||
8914 | else |
||
8915 | { |
||
8916 | PIXEL00_20 |
||
8917 | PIXEL01_12 |
||
8918 | PIXEL10_11 |
||
8919 | PIXEL11_0 |
||
8920 | } |
||
8921 | PIXEL02_32 |
||
8922 | PIXEL03_82 |
||
8923 | PIXEL12_32 |
||
8924 | PIXEL13_82 |
||
8925 | if (Diff(w[8], w[4])) |
||
8926 | { |
||
8927 | PIXEL20_10 |
||
8928 | PIXEL21_30 |
||
8929 | PIXEL30_80 |
||
8930 | PIXEL31_10 |
||
8931 | } |
||
8932 | else |
||
8933 | { |
||
8934 | PIXEL20_12 |
||
8935 | PIXEL21_0 |
||
8936 | PIXEL30_20 |
||
8937 | PIXEL31_11 |
||
8938 | } |
||
8939 | PIXEL22_30 |
||
8940 | PIXEL23_61 |
||
8941 | PIXEL32_10 |
||
8942 | PIXEL33_80 |
||
8943 | break; |
||
8944 | } |
||
8945 | case 154: |
||
8946 | { |
||
8947 | if (Diff(w[4], w[2])) |
||
8948 | { |
||
8949 | PIXEL00_80 |
||
8950 | PIXEL01_10 |
||
8951 | PIXEL10_10 |
||
8952 | PIXEL11_30 |
||
8953 | } |
||
8954 | else |
||
8955 | { |
||
8956 | PIXEL00_20 |
||
8957 | PIXEL01_12 |
||
8958 | PIXEL10_11 |
||
8959 | PIXEL11_0 |
||
8960 | } |
||
8961 | if (Diff(w[2], w[6])) |
||
8962 | { |
||
8963 | PIXEL02_10 |
||
8964 | PIXEL03_80 |
||
8965 | PIXEL12_30 |
||
8966 | PIXEL13_10 |
||
8967 | } |
||
8968 | else |
||
8969 | { |
||
8970 | PIXEL02_11 |
||
8971 | PIXEL03_20 |
||
8972 | PIXEL12_0 |
||
8973 | PIXEL13_12 |
||
8974 | } |
||
8975 | PIXEL20_10 |
||
8976 | PIXEL21_30 |
||
8977 | PIXEL22_32 |
||
8978 | PIXEL23_32 |
||
8979 | PIXEL30_80 |
||
8980 | PIXEL31_61 |
||
8981 | PIXEL32_82 |
||
8982 | PIXEL33_82 |
||
8983 | break; |
||
8984 | } |
||
8985 | case 114: |
||
8986 | { |
||
8987 | PIXEL00_80 |
||
8988 | PIXEL01_10 |
||
8989 | if (Diff(w[2], w[6])) |
||
8990 | { |
||
8991 | PIXEL02_10 |
||
8992 | PIXEL03_80 |
||
8993 | PIXEL12_30 |
||
8994 | PIXEL13_10 |
||
8995 | } |
||
8996 | else |
||
8997 | { |
||
8998 | PIXEL02_11 |
||
8999 | PIXEL03_20 |
||
9000 | PIXEL12_0 |
||
9001 | PIXEL13_12 |
||
9002 | } |
||
9003 | PIXEL10_61 |
||
9004 | PIXEL11_30 |
||
9005 | PIXEL20_82 |
||
9006 | PIXEL21_32 |
||
9007 | if (Diff(w[6], w[8])) |
||
9008 | { |
||
9009 | PIXEL22_30 |
||
9010 | PIXEL23_10 |
||
9011 | PIXEL32_10 |
||
9012 | PIXEL33_80 |
||
9013 | } |
||
9014 | else |
||
9015 | { |
||
9016 | PIXEL22_0 |
||
9017 | PIXEL23_11 |
||
9018 | PIXEL32_12 |
||
9019 | PIXEL33_20 |
||
9020 | } |
||
9021 | PIXEL30_82 |
||
9022 | PIXEL31_32 |
||
9023 | break; |
||
9024 | } |
||
9025 | case 89: |
||
9026 | { |
||
9027 | PIXEL00_82 |
||
9028 | PIXEL01_82 |
||
9029 | PIXEL02_61 |
||
9030 | PIXEL03_80 |
||
9031 | PIXEL10_32 |
||
9032 | PIXEL11_32 |
||
9033 | PIXEL12_30 |
||
9034 | PIXEL13_10 |
||
9035 | if (Diff(w[8], w[4])) |
||
9036 | { |
||
9037 | PIXEL20_10 |
||
9038 | PIXEL21_30 |
||
9039 | PIXEL30_80 |
||
9040 | PIXEL31_10 |
||
9041 | } |
||
9042 | else |
||
9043 | { |
||
9044 | PIXEL20_12 |
||
9045 | PIXEL21_0 |
||
9046 | PIXEL30_20 |
||
9047 | PIXEL31_11 |
||
9048 | } |
||
9049 | if (Diff(w[6], w[8])) |
||
9050 | { |
||
9051 | PIXEL22_30 |
||
9052 | PIXEL23_10 |
||
9053 | PIXEL32_10 |
||
9054 | PIXEL33_80 |
||
9055 | } |
||
9056 | else |
||
9057 | { |
||
9058 | PIXEL22_0 |
||
9059 | PIXEL23_11 |
||
9060 | PIXEL32_12 |
||
9061 | PIXEL33_20 |
||
9062 | } |
||
9063 | break; |
||
9064 | } |
||
9065 | case 90: |
||
9066 | { |
||
9067 | if (Diff(w[4], w[2])) |
||
9068 | { |
||
9069 | PIXEL00_80 |
||
9070 | PIXEL01_10 |
||
9071 | PIXEL10_10 |
||
9072 | PIXEL11_30 |
||
9073 | } |
||
9074 | else |
||
9075 | { |
||
9076 | PIXEL00_20 |
||
9077 | PIXEL01_12 |
||
9078 | PIXEL10_11 |
||
9079 | PIXEL11_0 |
||
9080 | } |
||
9081 | if (Diff(w[2], w[6])) |
||
9082 | { |
||
9083 | PIXEL02_10 |
||
9084 | PIXEL03_80 |
||
9085 | PIXEL12_30 |
||
9086 | PIXEL13_10 |
||
9087 | } |
||
9088 | else |
||
9089 | { |
||
9090 | PIXEL02_11 |
||
9091 | PIXEL03_20 |
||
9092 | PIXEL12_0 |
||
9093 | PIXEL13_12 |
||
9094 | } |
||
9095 | if (Diff(w[8], w[4])) |
||
9096 | { |
||
9097 | PIXEL20_10 |
||
9098 | PIXEL21_30 |
||
9099 | PIXEL30_80 |
||
9100 | PIXEL31_10 |
||
9101 | } |
||
9102 | else |
||
9103 | { |
||
9104 | PIXEL20_12 |
||
9105 | PIXEL21_0 |
||
9106 | PIXEL30_20 |
||
9107 | PIXEL31_11 |
||
9108 | } |
||
9109 | if (Diff(w[6], w[8])) |
||
9110 | { |
||
9111 | PIXEL22_30 |
||
9112 | PIXEL23_10 |
||
9113 | PIXEL32_10 |
||
9114 | PIXEL33_80 |
||
9115 | } |
||
9116 | else |
||
9117 | { |
||
9118 | PIXEL22_0 |
||
9119 | PIXEL23_11 |
||
9120 | PIXEL32_12 |
||
9121 | PIXEL33_20 |
||
9122 | } |
||
9123 | break; |
||
9124 | } |
||
9125 | case 55: |
||
9126 | case 23: |
||
9127 | { |
||
9128 | if (Diff(w[2], w[6])) |
||
9129 | { |
||
9130 | PIXEL00_81 |
||
9131 | PIXEL01_31 |
||
9132 | PIXEL02_0 |
||
9133 | PIXEL03_0 |
||
9134 | PIXEL12_0 |
||
9135 | PIXEL13_0 |
||
9136 | } |
||
9137 | else |
||
9138 | { |
||
9139 | PIXEL00_12 |
||
9140 | PIXEL01_14 |
||
9141 | PIXEL02_83 |
||
9142 | PIXEL03_50 |
||
9143 | PIXEL12_70 |
||
9144 | PIXEL13_21 |
||
9145 | } |
||
9146 | PIXEL10_81 |
||
9147 | PIXEL11_31 |
||
9148 | PIXEL20_60 |
||
9149 | PIXEL21_70 |
||
9150 | PIXEL22_30 |
||
9151 | PIXEL23_10 |
||
9152 | PIXEL30_20 |
||
9153 | PIXEL31_60 |
||
9154 | PIXEL32_61 |
||
9155 | PIXEL33_80 |
||
9156 | break; |
||
9157 | } |
||
9158 | case 182: |
||
9159 | case 150: |
||
9160 | { |
||
9161 | PIXEL00_80 |
||
9162 | PIXEL01_10 |
||
9163 | if (Diff(w[2], w[6])) |
||
9164 | { |
||
9165 | PIXEL02_0 |
||
9166 | PIXEL03_0 |
||
9167 | PIXEL12_0 |
||
9168 | PIXEL13_0 |
||
9169 | PIXEL23_32 |
||
9170 | PIXEL33_82 |
||
9171 | } |
||
9172 | else |
||
9173 | { |
||
9174 | PIXEL02_21 |
||
9175 | PIXEL03_50 |
||
9176 | PIXEL12_70 |
||
9177 | PIXEL13_83 |
||
9178 | PIXEL23_13 |
||
9179 | PIXEL33_11 |
||
9180 | } |
||
9181 | PIXEL10_61 |
||
9182 | PIXEL11_30 |
||
9183 | PIXEL20_60 |
||
9184 | PIXEL21_70 |
||
9185 | PIXEL22_32 |
||
9186 | PIXEL30_20 |
||
9187 | PIXEL31_60 |
||
9188 | PIXEL32_82 |
||
9189 | break; |
||
9190 | } |
||
9191 | case 213: |
||
9192 | case 212: |
||
9193 | { |
||
9194 | PIXEL00_20 |
||
9195 | PIXEL01_60 |
||
9196 | PIXEL02_81 |
||
9197 | if (Diff(w[6], w[8])) |
||
9198 | { |
||
9199 | PIXEL03_81 |
||
9200 | PIXEL13_31 |
||
9201 | PIXEL22_0 |
||
9202 | PIXEL23_0 |
||
9203 | PIXEL32_0 |
||
9204 | PIXEL33_0 |
||
9205 | } |
||
9206 | else |
||
9207 | { |
||
9208 | PIXEL03_12 |
||
9209 | PIXEL13_14 |
||
9210 | PIXEL22_70 |
||
9211 | PIXEL23_83 |
||
9212 | PIXEL32_21 |
||
9213 | PIXEL33_50 |
||
9214 | } |
||
9215 | PIXEL10_60 |
||
9216 | PIXEL11_70 |
||
9217 | PIXEL12_31 |
||
9218 | PIXEL20_61 |
||
9219 | PIXEL21_30 |
||
9220 | PIXEL30_80 |
||
9221 | PIXEL31_10 |
||
9222 | break; |
||
9223 | } |
||
9224 | case 241: |
||
9225 | case 240: |
||
9226 | { |
||
9227 | PIXEL00_20 |
||
9228 | PIXEL01_60 |
||
9229 | PIXEL02_61 |
||
9230 | PIXEL03_80 |
||
9231 | PIXEL10_60 |
||
9232 | PIXEL11_70 |
||
9233 | PIXEL12_30 |
||
9234 | PIXEL13_10 |
||
9235 | PIXEL20_82 |
||
9236 | PIXEL21_32 |
||
9237 | if (Diff(w[6], w[8])) |
||
9238 | { |
||
9239 | PIXEL22_0 |
||
9240 | PIXEL23_0 |
||
9241 | PIXEL30_82 |
||
9242 | PIXEL31_32 |
||
9243 | PIXEL32_0 |
||
9244 | PIXEL33_0 |
||
9245 | } |
||
9246 | else |
||
9247 | { |
||
9248 | PIXEL22_70 |
||
9249 | PIXEL23_21 |
||
9250 | PIXEL30_11 |
||
9251 | PIXEL31_13 |
||
9252 | PIXEL32_83 |
||
9253 | PIXEL33_50 |
||
9254 | } |
||
9255 | break; |
||
9256 | } |
||
9257 | case 236: |
||
9258 | case 232: |
||
9259 | { |
||
9260 | PIXEL00_80 |
||
9261 | PIXEL01_61 |
||
9262 | PIXEL02_60 |
||
9263 | PIXEL03_20 |
||
9264 | PIXEL10_10 |
||
9265 | PIXEL11_30 |
||
9266 | PIXEL12_70 |
||
9267 | PIXEL13_60 |
||
9268 | if (Diff(w[8], w[4])) |
||
9269 | { |
||
9270 | PIXEL20_0 |
||
9271 | PIXEL21_0 |
||
9272 | PIXEL30_0 |
||
9273 | PIXEL31_0 |
||
9274 | PIXEL32_31 |
||
9275 | PIXEL33_81 |
||
9276 | } |
||
9277 | else |
||
9278 | { |
||
9279 | PIXEL20_21 |
||
9280 | PIXEL21_70 |
||
9281 | PIXEL30_50 |
||
9282 | PIXEL31_83 |
||
9283 | PIXEL32_14 |
||
9284 | PIXEL33_12 |
||
9285 | } |
||
9286 | PIXEL22_31 |
||
9287 | PIXEL23_81 |
||
9288 | break; |
||
9289 | } |
||
9290 | case 109: |
||
9291 | case 105: |
||
9292 | { |
||
9293 | if (Diff(w[8], w[4])) |
||
9294 | { |
||
9295 | PIXEL00_82 |
||
9296 | PIXEL10_32 |
||
9297 | PIXEL20_0 |
||
9298 | PIXEL21_0 |
||
9299 | PIXEL30_0 |
||
9300 | PIXEL31_0 |
||
9301 | } |
||
9302 | else |
||
9303 | { |
||
9304 | PIXEL00_11 |
||
9305 | PIXEL10_13 |
||
9306 | PIXEL20_83 |
||
9307 | PIXEL21_70 |
||
9308 | PIXEL30_50 |
||
9309 | PIXEL31_21 |
||
9310 | } |
||
9311 | PIXEL01_82 |
||
9312 | PIXEL02_60 |
||
9313 | PIXEL03_20 |
||
9314 | PIXEL11_32 |
||
9315 | PIXEL12_70 |
||
9316 | PIXEL13_60 |
||
9317 | PIXEL22_30 |
||
9318 | PIXEL23_61 |
||
9319 | PIXEL32_10 |
||
9320 | PIXEL33_80 |
||
9321 | break; |
||
9322 | } |
||
9323 | case 171: |
||
9324 | case 43: |
||
9325 | { |
||
9326 | if (Diff(w[4], w[2])) |
||
9327 | { |
||
9328 | PIXEL00_0 |
||
9329 | PIXEL01_0 |
||
9330 | PIXEL10_0 |
||
9331 | PIXEL11_0 |
||
9332 | PIXEL20_31 |
||
9333 | PIXEL30_81 |
||
9334 | } |
||
9335 | else |
||
9336 | { |
||
9337 | PIXEL00_50 |
||
9338 | PIXEL01_21 |
||
9339 | PIXEL10_83 |
||
9340 | PIXEL11_70 |
||
9341 | PIXEL20_14 |
||
9342 | PIXEL30_12 |
||
9343 | } |
||
9344 | PIXEL02_10 |
||
9345 | PIXEL03_80 |
||
9346 | PIXEL12_30 |
||
9347 | PIXEL13_61 |
||
9348 | PIXEL21_31 |
||
9349 | PIXEL22_70 |
||
9350 | PIXEL23_60 |
||
9351 | PIXEL31_81 |
||
9352 | PIXEL32_60 |
||
9353 | PIXEL33_20 |
||
9354 | break; |
||
9355 | } |
||
9356 | case 143: |
||
9357 | case 15: |
||
9358 | { |
||
9359 | if (Diff(w[4], w[2])) |
||
9360 | { |
||
9361 | PIXEL00_0 |
||
9362 | PIXEL01_0 |
||
9363 | PIXEL02_32 |
||
9364 | PIXEL03_82 |
||
9365 | PIXEL10_0 |
||
9366 | PIXEL11_0 |
||
9367 | } |
||
9368 | else |
||
9369 | { |
||
9370 | PIXEL00_50 |
||
9371 | PIXEL01_83 |
||
9372 | PIXEL02_13 |
||
9373 | PIXEL03_11 |
||
9374 | PIXEL10_21 |
||
9375 | PIXEL11_70 |
||
9376 | } |
||
9377 | PIXEL12_32 |
||
9378 | PIXEL13_82 |
||
9379 | PIXEL20_10 |
||
9380 | PIXEL21_30 |
||
9381 | PIXEL22_70 |
||
9382 | PIXEL23_60 |
||
9383 | PIXEL30_80 |
||
9384 | PIXEL31_61 |
||
9385 | PIXEL32_60 |
||
9386 | PIXEL33_20 |
||
9387 | break; |
||
9388 | } |
||
9389 | case 124: |
||
9390 | { |
||
9391 | PIXEL00_80 |
||
9392 | PIXEL01_61 |
||
9393 | PIXEL02_81 |
||
9394 | PIXEL03_81 |
||
9395 | PIXEL10_10 |
||
9396 | PIXEL11_30 |
||
9397 | PIXEL12_31 |
||
9398 | PIXEL13_31 |
||
9399 | if (Diff(w[8], w[4])) |
||
9400 | { |
||
9401 | PIXEL20_0 |
||
9402 | PIXEL30_0 |
||
9403 | PIXEL31_0 |
||
9404 | } |
||
9405 | else |
||
9406 | { |
||
9407 | PIXEL20_50 |
||
9408 | PIXEL30_50 |
||
9409 | PIXEL31_50 |
||
9410 | } |
||
9411 | PIXEL21_0 |
||
9412 | PIXEL22_30 |
||
9413 | PIXEL23_10 |
||
9414 | PIXEL32_10 |
||
9415 | PIXEL33_80 |
||
9416 | break; |
||
9417 | } |
||
9418 | case 203: |
||
9419 | { |
||
9420 | if (Diff(w[4], w[2])) |
||
9421 | { |
||
9422 | PIXEL00_0 |
||
9423 | PIXEL01_0 |
||
9424 | PIXEL10_0 |
||
9425 | } |
||
9426 | else |
||
9427 | { |
||
9428 | PIXEL00_50 |
||
9429 | PIXEL01_50 |
||
9430 | PIXEL10_50 |
||
9431 | } |
||
9432 | PIXEL02_10 |
||
9433 | PIXEL03_80 |
||
9434 | PIXEL11_0 |
||
9435 | PIXEL12_30 |
||
9436 | PIXEL13_61 |
||
9437 | PIXEL20_10 |
||
9438 | PIXEL21_30 |
||
9439 | PIXEL22_31 |
||
9440 | PIXEL23_81 |
||
9441 | PIXEL30_80 |
||
9442 | PIXEL31_10 |
||
9443 | PIXEL32_31 |
||
9444 | PIXEL33_81 |
||
9445 | break; |
||
9446 | } |
||
9447 | case 62: |
||
9448 | { |
||
9449 | PIXEL00_80 |
||
9450 | PIXEL01_10 |
||
9451 | if (Diff(w[2], w[6])) |
||
9452 | { |
||
9453 | PIXEL02_0 |
||
9454 | PIXEL03_0 |
||
9455 | PIXEL13_0 |
||
9456 | } |
||
9457 | else |
||
9458 | { |
||
9459 | PIXEL02_50 |
||
9460 | PIXEL03_50 |
||
9461 | PIXEL13_50 |
||
9462 | } |
||
9463 | PIXEL10_10 |
||
9464 | PIXEL11_30 |
||
9465 | PIXEL12_0 |
||
9466 | PIXEL20_31 |
||
9467 | PIXEL21_31 |
||
9468 | PIXEL22_30 |
||
9469 | PIXEL23_10 |
||
9470 | PIXEL30_81 |
||
9471 | PIXEL31_81 |
||
9472 | PIXEL32_61 |
||
9473 | PIXEL33_80 |
||
9474 | break; |
||
9475 | } |
||
9476 | case 211: |
||
9477 | { |
||
9478 | PIXEL00_81 |
||
9479 | PIXEL01_31 |
||
9480 | PIXEL02_10 |
||
9481 | PIXEL03_80 |
||
9482 | PIXEL10_81 |
||
9483 | PIXEL11_31 |
||
9484 | PIXEL12_30 |
||
9485 | PIXEL13_10 |
||
9486 | PIXEL20_61 |
||
9487 | PIXEL21_30 |
||
9488 | PIXEL22_0 |
||
9489 | if (Diff(w[6], w[8])) |
||
9490 | { |
||
9491 | PIXEL23_0 |
||
9492 | PIXEL32_0 |
||
9493 | PIXEL33_0 |
||
9494 | } |
||
9495 | else |
||
9496 | { |
||
9497 | PIXEL23_50 |
||
9498 | PIXEL32_50 |
||
9499 | PIXEL33_50 |
||
9500 | } |
||
9501 | PIXEL30_80 |
||
9502 | PIXEL31_10 |
||
9503 | break; |
||
9504 | } |
||
9505 | case 118: |
||
9506 | { |
||
9507 | PIXEL00_80 |
||
9508 | PIXEL01_10 |
||
9509 | if (Diff(w[2], w[6])) |
||
9510 | { |
||
9511 | PIXEL02_0 |
||
9512 | PIXEL03_0 |
||
9513 | PIXEL13_0 |
||
9514 | } |
||
9515 | else |
||
9516 | { |
||
9517 | PIXEL02_50 |
||
9518 | PIXEL03_50 |
||
9519 | PIXEL13_50 |
||
9520 | } |
||
9521 | PIXEL10_61 |
||
9522 | PIXEL11_30 |
||
9523 | PIXEL12_0 |
||
9524 | PIXEL20_82 |
||
9525 | PIXEL21_32 |
||
9526 | PIXEL22_30 |
||
9527 | PIXEL23_10 |
||
9528 | PIXEL30_82 |
||
9529 | PIXEL31_32 |
||
9530 | PIXEL32_10 |
||
9531 | PIXEL33_80 |
||
9532 | break; |
||
9533 | } |
||
9534 | case 217: |
||
9535 | { |
||
9536 | PIXEL00_82 |
||
9537 | PIXEL01_82 |
||
9538 | PIXEL02_61 |
||
9539 | PIXEL03_80 |
||
9540 | PIXEL10_32 |
||
9541 | PIXEL11_32 |
||
9542 | PIXEL12_30 |
||
9543 | PIXEL13_10 |
||
9544 | PIXEL20_10 |
||
9545 | PIXEL21_30 |
||
9546 | PIXEL22_0 |
||
9547 | if (Diff(w[6], w[8])) |
||
9548 | { |
||
9549 | PIXEL23_0 |
||
9550 | PIXEL32_0 |
||
9551 | PIXEL33_0 |
||
9552 | } |
||
9553 | else |
||
9554 | { |
||
9555 | PIXEL23_50 |
||
9556 | PIXEL32_50 |
||
9557 | PIXEL33_50 |
||
9558 | } |
||
9559 | PIXEL30_80 |
||
9560 | PIXEL31_10 |
||
9561 | break; |
||
9562 | } |
||
9563 | case 110: |
||
9564 | { |
||
9565 | PIXEL00_80 |
||
9566 | PIXEL01_10 |
||
9567 | PIXEL02_32 |
||
9568 | PIXEL03_82 |
||
9569 | PIXEL10_10 |
||
9570 | PIXEL11_30 |
||
9571 | PIXEL12_32 |
||
9572 | PIXEL13_82 |
||
9573 | if (Diff(w[8], w[4])) |
||
9574 | { |
||
9575 | PIXEL20_0 |
||
9576 | PIXEL30_0 |
||
9577 | PIXEL31_0 |
||
9578 | } |
||
9579 | else |
||
9580 | { |
||
9581 | PIXEL20_50 |
||
9582 | PIXEL30_50 |
||
9583 | PIXEL31_50 |
||
9584 | } |
||
9585 | PIXEL21_0 |
||
9586 | PIXEL22_30 |
||
9587 | PIXEL23_61 |
||
9588 | PIXEL32_10 |
||
9589 | PIXEL33_80 |
||
9590 | break; |
||
9591 | } |
||
9592 | case 155: |
||
9593 | { |
||
9594 | if (Diff(w[4], w[2])) |
||
9595 | { |
||
9596 | PIXEL00_0 |
||
9597 | PIXEL01_0 |
||
9598 | PIXEL10_0 |
||
9599 | } |
||
9600 | else |
||
9601 | { |
||
9602 | PIXEL00_50 |
||
9603 | PIXEL01_50 |
||
9604 | PIXEL10_50 |
||
9605 | } |
||
9606 | PIXEL02_10 |
||
9607 | PIXEL03_80 |
||
9608 | PIXEL11_0 |
||
9609 | PIXEL12_30 |
||
9610 | PIXEL13_10 |
||
9611 | PIXEL20_10 |
||
9612 | PIXEL21_30 |
||
9613 | PIXEL22_32 |
||
9614 | PIXEL23_32 |
||
9615 | PIXEL30_80 |
||
9616 | PIXEL31_61 |
||
9617 | PIXEL32_82 |
||
9618 | PIXEL33_82 |
||
9619 | break; |
||
9620 | } |
||
9621 | case 188: |
||
9622 | { |
||
9623 | PIXEL00_80 |
||
9624 | PIXEL01_61 |
||
9625 | PIXEL02_81 |
||
9626 | PIXEL03_81 |
||
9627 | PIXEL10_10 |
||
9628 | PIXEL11_30 |
||
9629 | PIXEL12_31 |
||
9630 | PIXEL13_31 |
||
9631 | PIXEL20_31 |
||
9632 | PIXEL21_31 |
||
9633 | PIXEL22_32 |
||
9634 | PIXEL23_32 |
||
9635 | PIXEL30_81 |
||
9636 | PIXEL31_81 |
||
9637 | PIXEL32_82 |
||
9638 | PIXEL33_82 |
||
9639 | break; |
||
9640 | } |
||
9641 | case 185: |
||
9642 | { |
||
9643 | PIXEL00_82 |
||
9644 | PIXEL01_82 |
||
9645 | PIXEL02_61 |
||
9646 | PIXEL03_80 |
||
9647 | PIXEL10_32 |
||
9648 | PIXEL11_32 |
||
9649 | PIXEL12_30 |
||
9650 | PIXEL13_10 |
||
9651 | PIXEL20_31 |
||
9652 | PIXEL21_31 |
||
9653 | PIXEL22_32 |
||
9654 | PIXEL23_32 |
||
9655 | PIXEL30_81 |
||
9656 | PIXEL31_81 |
||
9657 | PIXEL32_82 |
||
9658 | PIXEL33_82 |
||
9659 | break; |
||
9660 | } |
||
9661 | case 61: |
||
9662 | { |
||
9663 | PIXEL00_82 |
||
9664 | PIXEL01_82 |
||
9665 | PIXEL02_81 |
||
9666 | PIXEL03_81 |
||
9667 | PIXEL10_32 |
||
9668 | PIXEL11_32 |
||
9669 | PIXEL12_31 |
||
9670 | PIXEL13_31 |
||
9671 | PIXEL20_31 |
||
9672 | PIXEL21_31 |
||
9673 | PIXEL22_30 |
||
9674 | PIXEL23_10 |
||
9675 | PIXEL30_81 |
||
9676 | PIXEL31_81 |
||
9677 | PIXEL32_61 |
||
9678 | PIXEL33_80 |
||
9679 | break; |
||
9680 | } |
||
9681 | case 157: |
||
9682 | { |
||
9683 | PIXEL00_82 |
||
9684 | PIXEL01_82 |
||
9685 | PIXEL02_81 |
||
9686 | PIXEL03_81 |
||
9687 | PIXEL10_32 |
||
9688 | PIXEL11_32 |
||
9689 | PIXEL12_31 |
||
9690 | PIXEL13_31 |
||
9691 | PIXEL20_10 |
||
9692 | PIXEL21_30 |
||
9693 | PIXEL22_32 |
||
9694 | PIXEL23_32 |
||
9695 | PIXEL30_80 |
||
9696 | PIXEL31_61 |
||
9697 | PIXEL32_82 |
||
9698 | PIXEL33_82 |
||
9699 | break; |
||
9700 | } |
||
9701 | case 103: |
||
9702 | { |
||
9703 | PIXEL00_81 |
||
9704 | PIXEL01_31 |
||
9705 | PIXEL02_32 |
||
9706 | PIXEL03_82 |
||
9707 | PIXEL10_81 |
||
9708 | PIXEL11_31 |
||
9709 | PIXEL12_32 |
||
9710 | PIXEL13_82 |
||
9711 | PIXEL20_82 |
||
9712 | PIXEL21_32 |
||
9713 | PIXEL22_30 |
||
9714 | PIXEL23_61 |
||
9715 | PIXEL30_82 |
||
9716 | PIXEL31_32 |
||
9717 | PIXEL32_10 |
||
9718 | PIXEL33_80 |
||
9719 | break; |
||
9720 | } |
||
9721 | case 227: |
||
9722 | { |
||
9723 | PIXEL00_81 |
||
9724 | PIXEL01_31 |
||
9725 | PIXEL02_10 |
||
9726 | PIXEL03_80 |
||
9727 | PIXEL10_81 |
||
9728 | PIXEL11_31 |
||
9729 | PIXEL12_30 |
||
9730 | PIXEL13_61 |
||
9731 | PIXEL20_82 |
||
9732 | PIXEL21_32 |
||
9733 | PIXEL22_31 |
||
9734 | PIXEL23_81 |
||
9735 | PIXEL30_82 |
||
9736 | PIXEL31_32 |
||
9737 | PIXEL32_31 |
||
9738 | PIXEL33_81 |
||
9739 | break; |
||
9740 | } |
||
9741 | case 230: |
||
9742 | { |
||
9743 | PIXEL00_80 |
||
9744 | PIXEL01_10 |
||
9745 | PIXEL02_32 |
||
9746 | PIXEL03_82 |
||
9747 | PIXEL10_61 |
||
9748 | PIXEL11_30 |
||
9749 | PIXEL12_32 |
||
9750 | PIXEL13_82 |
||
9751 | PIXEL20_82 |
||
9752 | PIXEL21_32 |
||
9753 | PIXEL22_31 |
||
9754 | PIXEL23_81 |
||
9755 | PIXEL30_82 |
||
9756 | PIXEL31_32 |
||
9757 | PIXEL32_31 |
||
9758 | PIXEL33_81 |
||
9759 | break; |
||
9760 | } |
||
9761 | case 199: |
||
9762 | { |
||
9763 | PIXEL00_81 |
||
9764 | PIXEL01_31 |
||
9765 | PIXEL02_32 |
||
9766 | PIXEL03_82 |
||
9767 | PIXEL10_81 |
||
9768 | PIXEL11_31 |
||
9769 | PIXEL12_32 |
||
9770 | PIXEL13_82 |
||
9771 | PIXEL20_61 |
||
9772 | PIXEL21_30 |
||
9773 | PIXEL22_31 |
||
9774 | PIXEL23_81 |
||
9775 | PIXEL30_80 |
||
9776 | PIXEL31_10 |
||
9777 | PIXEL32_31 |
||
9778 | PIXEL33_81 |
||
9779 | break; |
||
9780 | } |
||
9781 | case 220: |
||
9782 | { |
||
9783 | PIXEL00_80 |
||
9784 | PIXEL01_61 |
||
9785 | PIXEL02_81 |
||
9786 | PIXEL03_81 |
||
9787 | PIXEL10_10 |
||
9788 | PIXEL11_30 |
||
9789 | PIXEL12_31 |
||
9790 | PIXEL13_31 |
||
9791 | if (Diff(w[8], w[4])) |
||
9792 | { |
||
9793 | PIXEL20_10 |
||
9794 | PIXEL21_30 |
||
9795 | PIXEL30_80 |
||
9796 | PIXEL31_10 |
||
9797 | } |
||
9798 | else |
||
9799 | { |
||
9800 | PIXEL20_12 |
||
9801 | PIXEL21_0 |
||
9802 | PIXEL30_20 |
||
9803 | PIXEL31_11 |
||
9804 | } |
||
9805 | PIXEL22_0 |
||
9806 | if (Diff(w[6], w[8])) |
||
9807 | { |
||
9808 | PIXEL23_0 |
||
9809 | PIXEL32_0 |
||
9810 | PIXEL33_0 |
||
9811 | } |
||
9812 | else |
||
9813 | { |
||
9814 | PIXEL23_50 |
||
9815 | PIXEL32_50 |
||
9816 | PIXEL33_50 |
||
9817 | } |
||
9818 | break; |
||
9819 | } |
||
9820 | case 158: |
||
9821 | { |
||
9822 | if (Diff(w[4], w[2])) |
||
9823 | { |
||
9824 | PIXEL00_80 |
||
9825 | PIXEL01_10 |
||
9826 | PIXEL10_10 |
||
9827 | PIXEL11_30 |
||
9828 | } |
||
9829 | else |
||
9830 | { |
||
9831 | PIXEL00_20 |
||
9832 | PIXEL01_12 |
||
9833 | PIXEL10_11 |
||
9834 | PIXEL11_0 |
||
9835 | } |
||
9836 | if (Diff(w[2], w[6])) |
||
9837 | { |
||
9838 | PIXEL02_0 |
||
9839 | PIXEL03_0 |
||
9840 | PIXEL13_0 |
||
9841 | } |
||
9842 | else |
||
9843 | { |
||
9844 | PIXEL02_50 |
||
9845 | PIXEL03_50 |
||
9846 | PIXEL13_50 |
||
9847 | } |
||
9848 | PIXEL12_0 |
||
9849 | PIXEL20_10 |
||
9850 | PIXEL21_30 |
||
9851 | PIXEL22_32 |
||
9852 | PIXEL23_32 |
||
9853 | PIXEL30_80 |
||
9854 | PIXEL31_61 |
||
9855 | PIXEL32_82 |
||
9856 | PIXEL33_82 |
||
9857 | break; |
||
9858 | } |
||
9859 | case 234: |
||
9860 | { |
||
9861 | if (Diff(w[4], w[2])) |
||
9862 | { |
||
9863 | PIXEL00_80 |
||
9864 | PIXEL01_10 |
||
9865 | PIXEL10_10 |
||
9866 | PIXEL11_30 |
||
9867 | } |
||
9868 | else |
||
9869 | { |
||
9870 | PIXEL00_20 |
||
9871 | PIXEL01_12 |
||
9872 | PIXEL10_11 |
||
9873 | PIXEL11_0 |
||
9874 | } |
||
9875 | PIXEL02_10 |
||
9876 | PIXEL03_80 |
||
9877 | PIXEL12_30 |
||
9878 | PIXEL13_61 |
||
9879 | if (Diff(w[8], w[4])) |
||
9880 | { |
||
9881 | PIXEL20_0 |
||
9882 | PIXEL30_0 |
||
9883 | PIXEL31_0 |
||
9884 | } |
||
9885 | else |
||
9886 | { |
||
9887 | PIXEL20_50 |
||
9888 | PIXEL30_50 |
||
9889 | PIXEL31_50 |
||
9890 | } |
||
9891 | PIXEL21_0 |
||
9892 | PIXEL22_31 |
||
9893 | PIXEL23_81 |
||
9894 | PIXEL32_31 |
||
9895 | PIXEL33_81 |
||
9896 | break; |
||
9897 | } |
||
9898 | case 242: |
||
9899 | { |
||
9900 | PIXEL00_80 |
||
9901 | PIXEL01_10 |
||
9902 | if (Diff(w[2], w[6])) |
||
9903 | { |
||
9904 | PIXEL02_10 |
||
9905 | PIXEL03_80 |
||
9906 | PIXEL12_30 |
||
9907 | PIXEL13_10 |
||
9908 | } |
||
9909 | else |
||
9910 | { |
||
9911 | PIXEL02_11 |
||
9912 | PIXEL03_20 |
||
9913 | PIXEL12_0 |
||
9914 | PIXEL13_12 |
||
9915 | } |
||
9916 | PIXEL10_61 |
||
9917 | PIXEL11_30 |
||
9918 | PIXEL20_82 |
||
9919 | PIXEL21_32 |
||
9920 | PIXEL22_0 |
||
9921 | if (Diff(w[6], w[8])) |
||
9922 | { |
||
9923 | PIXEL23_0 |
||
9924 | PIXEL32_0 |
||
9925 | PIXEL33_0 |
||
9926 | } |
||
9927 | else |
||
9928 | { |
||
9929 | PIXEL23_50 |
||
9930 | PIXEL32_50 |
||
9931 | PIXEL33_50 |
||
9932 | } |
||
9933 | PIXEL30_82 |
||
9934 | PIXEL31_32 |
||
9935 | break; |
||
9936 | } |
||
9937 | case 59: |
||
9938 | { |
||
9939 | if (Diff(w[4], w[2])) |
||
9940 | { |
||
9941 | PIXEL00_0 |
||
9942 | PIXEL01_0 |
||
9943 | PIXEL10_0 |
||
9944 | } |
||
9945 | else |
||
9946 | { |
||
9947 | PIXEL00_50 |
||
9948 | PIXEL01_50 |
||
9949 | PIXEL10_50 |
||
9950 | } |
||
9951 | if (Diff(w[2], w[6])) |
||
9952 | { |
||
9953 | PIXEL02_10 |
||
9954 | PIXEL03_80 |
||
9955 | PIXEL12_30 |
||
9956 | PIXEL13_10 |
||
9957 | } |
||
9958 | else |
||
9959 | { |
||
9960 | PIXEL02_11 |
||
9961 | PIXEL03_20 |
||
9962 | PIXEL12_0 |
||
9963 | PIXEL13_12 |
||
9964 | } |
||
9965 | PIXEL11_0 |
||
9966 | PIXEL20_31 |
||
9967 | PIXEL21_31 |
||
9968 | PIXEL22_30 |
||
9969 | PIXEL23_10 |
||
9970 | PIXEL30_81 |
||
9971 | PIXEL31_81 |
||
9972 | PIXEL32_61 |
||
9973 | PIXEL33_80 |
||
9974 | break; |
||
9975 | } |
||
9976 | case 121: |
||
9977 | { |
||
9978 | PIXEL00_82 |
||
9979 | PIXEL01_82 |
||
9980 | PIXEL02_61 |
||
9981 | PIXEL03_80 |
||
9982 | PIXEL10_32 |
||
9983 | PIXEL11_32 |
||
9984 | PIXEL12_30 |
||
9985 | PIXEL13_10 |
||
9986 | if (Diff(w[8], w[4])) |
||
9987 | { |
||
9988 | PIXEL20_0 |
||
9989 | PIXEL30_0 |
||
9990 | PIXEL31_0 |
||
9991 | } |
||
9992 | else |
||
9993 | { |
||
9994 | PIXEL20_50 |
||
9995 | PIXEL30_50 |
||
9996 | PIXEL31_50 |
||
9997 | } |
||
9998 | PIXEL21_0 |
||
9999 | if (Diff(w[6], w[8])) |
||
10000 | { |
||
10001 | PIXEL22_30 |
||
10002 | PIXEL23_10 |
||
10003 | PIXEL32_10 |
||
10004 | PIXEL33_80 |
||
10005 | } |
||
10006 | else |
||
10007 | { |
||
10008 | PIXEL22_0 |
||
10009 | PIXEL23_11 |
||
10010 | PIXEL32_12 |
||
10011 | PIXEL33_20 |
||
10012 | } |
||
10013 | break; |
||
10014 | } |
||
10015 | case 87: |
||
10016 | { |
||
10017 | PIXEL00_81 |
||
10018 | PIXEL01_31 |
||
10019 | if (Diff(w[2], w[6])) |
||
10020 | { |
||
10021 | PIXEL02_0 |
||
10022 | PIXEL03_0 |
||
10023 | PIXEL13_0 |
||
10024 | } |
||
10025 | else |
||
10026 | { |
||
10027 | PIXEL02_50 |
||
10028 | PIXEL03_50 |
||
10029 | PIXEL13_50 |
||
10030 | } |
||
10031 | PIXEL10_81 |
||
10032 | PIXEL11_31 |
||
10033 | PIXEL12_0 |
||
10034 | PIXEL20_61 |
||
10035 | PIXEL21_30 |
||
10036 | if (Diff(w[6], w[8])) |
||
10037 | { |
||
10038 | PIXEL22_30 |
||
10039 | PIXEL23_10 |
||
10040 | PIXEL32_10 |
||
10041 | PIXEL33_80 |
||
10042 | } |
||
10043 | else |
||
10044 | { |
||
10045 | PIXEL22_0 |
||
10046 | PIXEL23_11 |
||
10047 | PIXEL32_12 |
||
10048 | PIXEL33_20 |
||
10049 | } |
||
10050 | PIXEL30_80 |
||
10051 | PIXEL31_10 |
||
10052 | break; |
||
10053 | } |
||
10054 | case 79: |
||
10055 | { |
||
10056 | if (Diff(w[4], w[2])) |
||
10057 | { |
||
10058 | PIXEL00_0 |
||
10059 | PIXEL01_0 |
||
10060 | PIXEL10_0 |
||
10061 | } |
||
10062 | else |
||
10063 | { |
||
10064 | PIXEL00_50 |
||
10065 | PIXEL01_50 |
||
10066 | PIXEL10_50 |
||
10067 | } |
||
10068 | PIXEL02_32 |
||
10069 | PIXEL03_82 |
||
10070 | PIXEL11_0 |
||
10071 | PIXEL12_32 |
||
10072 | PIXEL13_82 |
||
10073 | if (Diff(w[8], w[4])) |
||
10074 | { |
||
10075 | PIXEL20_10 |
||
10076 | PIXEL21_30 |
||
10077 | PIXEL30_80 |
||
10078 | PIXEL31_10 |
||
10079 | } |
||
10080 | else |
||
10081 | { |
||
10082 | PIXEL20_12 |
||
10083 | PIXEL21_0 |
||
10084 | PIXEL30_20 |
||
10085 | PIXEL31_11 |
||
10086 | } |
||
10087 | PIXEL22_30 |
||
10088 | PIXEL23_61 |
||
10089 | PIXEL32_10 |
||
10090 | PIXEL33_80 |
||
10091 | break; |
||
10092 | } |
||
10093 | case 122: |
||
10094 | { |
||
10095 | if (Diff(w[4], w[2])) |
||
10096 | { |
||
10097 | PIXEL00_80 |
||
10098 | PIXEL01_10 |
||
10099 | PIXEL10_10 |
||
10100 | PIXEL11_30 |
||
10101 | } |
||
10102 | else |
||
10103 | { |
||
10104 | PIXEL00_20 |
||
10105 | PIXEL01_12 |
||
10106 | PIXEL10_11 |
||
10107 | PIXEL11_0 |
||
10108 | } |
||
10109 | if (Diff(w[2], w[6])) |
||
10110 | { |
||
10111 | PIXEL02_10 |
||
10112 | PIXEL03_80 |
||
10113 | PIXEL12_30 |
||
10114 | PIXEL13_10 |
||
10115 | } |
||
10116 | else |
||
10117 | { |
||
10118 | PIXEL02_11 |
||
10119 | PIXEL03_20 |
||
10120 | PIXEL12_0 |
||
10121 | PIXEL13_12 |
||
10122 | } |
||
10123 | if (Diff(w[8], w[4])) |
||
10124 | { |
||
10125 | PIXEL20_0 |
||
10126 | PIXEL30_0 |
||
10127 | PIXEL31_0 |
||
10128 | } |
||
10129 | else |
||
10130 | { |
||
10131 | PIXEL20_50 |
||
10132 | PIXEL30_50 |
||
10133 | PIXEL31_50 |
||
10134 | } |
||
10135 | PIXEL21_0 |
||
10136 | if (Diff(w[6], w[8])) |
||
10137 | { |
||
10138 | PIXEL22_30 |
||
10139 | PIXEL23_10 |
||
10140 | PIXEL32_10 |
||
10141 | PIXEL33_80 |
||
10142 | } |
||
10143 | else |
||
10144 | { |
||
10145 | PIXEL22_0 |
||
10146 | PIXEL23_11 |
||
10147 | PIXEL32_12 |
||
10148 | PIXEL33_20 |
||
10149 | } |
||
10150 | break; |
||
10151 | } |
||
10152 | case 94: |
||
10153 | { |
||
10154 | if (Diff(w[4], w[2])) |
||
10155 | { |
||
10156 | PIXEL00_80 |
||
10157 | PIXEL01_10 |
||
10158 | PIXEL10_10 |
||
10159 | PIXEL11_30 |
||
10160 | } |
||
10161 | else |
||
10162 | { |
||
10163 | PIXEL00_20 |
||
10164 | PIXEL01_12 |
||
10165 | PIXEL10_11 |
||
10166 | PIXEL11_0 |
||
10167 | } |
||
10168 | if (Diff(w[2], w[6])) |
||
10169 | { |
||
10170 | PIXEL02_0 |
||
10171 | PIXEL03_0 |
||
10172 | PIXEL13_0 |
||
10173 | } |
||
10174 | else |
||
10175 | { |
||
10176 | PIXEL02_50 |
||
10177 | PIXEL03_50 |
||
10178 | PIXEL13_50 |
||
10179 | } |
||
10180 | PIXEL12_0 |
||
10181 | if (Diff(w[8], w[4])) |
||
10182 | { |
||
10183 | PIXEL20_10 |
||
10184 | PIXEL21_30 |
||
10185 | PIXEL30_80 |
||
10186 | PIXEL31_10 |
||
10187 | } |
||
10188 | else |
||
10189 | { |
||
10190 | PIXEL20_12 |
||
10191 | PIXEL21_0 |
||
10192 | PIXEL30_20 |
||
10193 | PIXEL31_11 |
||
10194 | } |
||
10195 | if (Diff(w[6], w[8])) |
||
10196 | { |
||
10197 | PIXEL22_30 |
||
10198 | PIXEL23_10 |
||
10199 | PIXEL32_10 |
||
10200 | PIXEL33_80 |
||
10201 | } |
||
10202 | else |
||
10203 | { |
||
10204 | PIXEL22_0 |
||
10205 | PIXEL23_11 |
||
10206 | PIXEL32_12 |
||
10207 | PIXEL33_20 |
||
10208 | } |
||
10209 | break; |
||
10210 | } |
||
10211 | case 218: |
||
10212 | { |
||
10213 | if (Diff(w[4], w[2])) |
||
10214 | { |
||
10215 | PIXEL00_80 |
||
10216 | PIXEL01_10 |
||
10217 | PIXEL10_10 |
||
10218 | PIXEL11_30 |
||
10219 | } |
||
10220 | else |
||
10221 | { |
||
10222 | PIXEL00_20 |
||
10223 | PIXEL01_12 |
||
10224 | PIXEL10_11 |
||
10225 | PIXEL11_0 |
||
10226 | } |
||
10227 | if (Diff(w[2], w[6])) |
||
10228 | { |
||
10229 | PIXEL02_10 |
||
10230 | PIXEL03_80 |
||
10231 | PIXEL12_30 |
||
10232 | PIXEL13_10 |
||
10233 | } |
||
10234 | else |
||
10235 | { |
||
10236 | PIXEL02_11 |
||
10237 | PIXEL03_20 |
||
10238 | PIXEL12_0 |
||
10239 | PIXEL13_12 |
||
10240 | } |
||
10241 | if (Diff(w[8], w[4])) |
||
10242 | { |
||
10243 | PIXEL20_10 |
||
10244 | PIXEL21_30 |
||
10245 | PIXEL30_80 |
||
10246 | PIXEL31_10 |
||
10247 | } |
||
10248 | else |
||
10249 | { |
||
10250 | PIXEL20_12 |
||
10251 | PIXEL21_0 |
||
10252 | PIXEL30_20 |
||
10253 | PIXEL31_11 |
||
10254 | } |
||
10255 | PIXEL22_0 |
||
10256 | if (Diff(w[6], w[8])) |
||
10257 | { |
||
10258 | PIXEL23_0 |
||
10259 | PIXEL32_0 |
||
10260 | PIXEL33_0 |
||
10261 | } |
||
10262 | else |
||
10263 | { |
||
10264 | PIXEL23_50 |
||
10265 | PIXEL32_50 |
||
10266 | PIXEL33_50 |
||
10267 | } |
||
10268 | break; |
||
10269 | } |
||
10270 | case 91: |
||
10271 | { |
||
10272 | if (Diff(w[4], w[2])) |
||
10273 | { |
||
10274 | PIXEL00_0 |
||
10275 | PIXEL01_0 |
||
10276 | PIXEL10_0 |
||
10277 | } |
||
10278 | else |
||
10279 | { |
||
10280 | PIXEL00_50 |
||
10281 | PIXEL01_50 |
||
10282 | PIXEL10_50 |
||
10283 | } |
||
10284 | if (Diff(w[2], w[6])) |
||
10285 | { |
||
10286 | PIXEL02_10 |
||
10287 | PIXEL03_80 |
||
10288 | PIXEL12_30 |
||
10289 | PIXEL13_10 |
||
10290 | } |
||
10291 | else |
||
10292 | { |
||
10293 | PIXEL02_11 |
||
10294 | PIXEL03_20 |
||
10295 | PIXEL12_0 |
||
10296 | PIXEL13_12 |
||
10297 | } |
||
10298 | PIXEL11_0 |
||
10299 | if (Diff(w[8], w[4])) |
||
10300 | { |
||
10301 | PIXEL20_10 |
||
10302 | PIXEL21_30 |
||
10303 | PIXEL30_80 |
||
10304 | PIXEL31_10 |
||
10305 | } |
||
10306 | else |
||
10307 | { |
||
10308 | PIXEL20_12 |
||
10309 | PIXEL21_0 |
||
10310 | PIXEL30_20 |
||
10311 | PIXEL31_11 |
||
10312 | } |
||
10313 | if (Diff(w[6], w[8])) |
||
10314 | { |
||
10315 | PIXEL22_30 |
||
10316 | PIXEL23_10 |
||
10317 | PIXEL32_10 |
||
10318 | PIXEL33_80 |
||
10319 | } |
||
10320 | else |
||
10321 | { |
||
10322 | PIXEL22_0 |
||
10323 | PIXEL23_11 |
||
10324 | PIXEL32_12 |
||
10325 | PIXEL33_20 |
||
10326 | } |
||
10327 | break; |
||
10328 | } |
||
10329 | case 229: |
||
10330 | { |
||
10331 | PIXEL00_20 |
||
10332 | PIXEL01_60 |
||
10333 | PIXEL02_60 |
||
10334 | PIXEL03_20 |
||
10335 | PIXEL10_60 |
||
10336 | PIXEL11_70 |
||
10337 | PIXEL12_70 |
||
10338 | PIXEL13_60 |
||
10339 | PIXEL20_82 |
||
10340 | PIXEL21_32 |
||
10341 | PIXEL22_31 |
||
10342 | PIXEL23_81 |
||
10343 | PIXEL30_82 |
||
10344 | PIXEL31_32 |
||
10345 | PIXEL32_31 |
||
10346 | PIXEL33_81 |
||
10347 | break; |
||
10348 | } |
||
10349 | case 167: |
||
10350 | { |
||
10351 | PIXEL00_81 |
||
10352 | PIXEL01_31 |
||
10353 | PIXEL02_32 |
||
10354 | PIXEL03_82 |
||
10355 | PIXEL10_81 |
||
10356 | PIXEL11_31 |
||
10357 | PIXEL12_32 |
||
10358 | PIXEL13_82 |
||
10359 | PIXEL20_60 |
||
10360 | PIXEL21_70 |
||
10361 | PIXEL22_70 |
||
10362 | PIXEL23_60 |
||
10363 | PIXEL30_20 |
||
10364 | PIXEL31_60 |
||
10365 | PIXEL32_60 |
||
10366 | PIXEL33_20 |
||
10367 | break; |
||
10368 | } |
||
10369 | case 173: |
||
10370 | { |
||
10371 | PIXEL00_82 |
||
10372 | PIXEL01_82 |
||
10373 | PIXEL02_60 |
||
10374 | PIXEL03_20 |
||
10375 | PIXEL10_32 |
||
10376 | PIXEL11_32 |
||
10377 | PIXEL12_70 |
||
10378 | PIXEL13_60 |
||
10379 | PIXEL20_31 |
||
10380 | PIXEL21_31 |
||
10381 | PIXEL22_70 |
||
10382 | PIXEL23_60 |
||
10383 | PIXEL30_81 |
||
10384 | PIXEL31_81 |
||
10385 | PIXEL32_60 |
||
10386 | PIXEL33_20 |
||
10387 | break; |
||
10388 | } |
||
10389 | case 181: |
||
10390 | { |
||
10391 | PIXEL00_20 |
||
10392 | PIXEL01_60 |
||
10393 | PIXEL02_81 |
||
10394 | PIXEL03_81 |
||
10395 | PIXEL10_60 |
||
10396 | PIXEL11_70 |
||
10397 | PIXEL12_31 |
||
10398 | PIXEL13_31 |
||
10399 | PIXEL20_60 |
||
10400 | PIXEL21_70 |
||
10401 | PIXEL22_32 |
||
10402 | PIXEL23_32 |
||
10403 | PIXEL30_20 |
||
10404 | PIXEL31_60 |
||
10405 | PIXEL32_82 |
||
10406 | PIXEL33_82 |
||
10407 | break; |
||
10408 | } |
||
10409 | case 186: |
||
10410 | { |
||
10411 | if (Diff(w[4], w[2])) |
||
10412 | { |
||
10413 | PIXEL00_80 |
||
10414 | PIXEL01_10 |
||
10415 | PIXEL10_10 |
||
10416 | PIXEL11_30 |
||
10417 | } |
||
10418 | else |
||
10419 | { |
||
10420 | PIXEL00_20 |
||
10421 | PIXEL01_12 |
||
10422 | PIXEL10_11 |
||
10423 | PIXEL11_0 |
||
10424 | } |
||
10425 | if (Diff(w[2], w[6])) |
||
10426 | { |
||
10427 | PIXEL02_10 |
||
10428 | PIXEL03_80 |
||
10429 | PIXEL12_30 |
||
10430 | PIXEL13_10 |
||
10431 | } |
||
10432 | else |
||
10433 | { |
||
10434 | PIXEL02_11 |
||
10435 | PIXEL03_20 |
||
10436 | PIXEL12_0 |
||
10437 | PIXEL13_12 |
||
10438 | } |
||
10439 | PIXEL20_31 |
||
10440 | PIXEL21_31 |
||
10441 | PIXEL22_32 |
||
10442 | PIXEL23_32 |
||
10443 | PIXEL30_81 |
||
10444 | PIXEL31_81 |
||
10445 | PIXEL32_82 |
||
10446 | PIXEL33_82 |
||
10447 | break; |
||
10448 | } |
||
10449 | case 115: |
||
10450 | { |
||
10451 | PIXEL00_81 |
||
10452 | PIXEL01_31 |
||
10453 | if (Diff(w[2], w[6])) |
||
10454 | { |
||
10455 | PIXEL02_10 |
||
10456 | PIXEL03_80 |
||
10457 | PIXEL12_30 |
||
10458 | PIXEL13_10 |
||
10459 | } |
||
10460 | else |
||
10461 | { |
||
10462 | PIXEL02_11 |
||
10463 | PIXEL03_20 |
||
10464 | PIXEL12_0 |
||
10465 | PIXEL13_12 |
||
10466 | } |
||
10467 | PIXEL10_81 |
||
10468 | PIXEL11_31 |
||
10469 | PIXEL20_82 |
||
10470 | PIXEL21_32 |
||
10471 | if (Diff(w[6], w[8])) |
||
10472 | { |
||
10473 | PIXEL22_30 |
||
10474 | PIXEL23_10 |
||
10475 | PIXEL32_10 |
||
10476 | PIXEL33_80 |
||
10477 | } |
||
10478 | else |
||
10479 | { |
||
10480 | PIXEL22_0 |
||
10481 | PIXEL23_11 |
||
10482 | PIXEL32_12 |
||
10483 | PIXEL33_20 |
||
10484 | } |
||
10485 | PIXEL30_82 |
||
10486 | PIXEL31_32 |
||
10487 | break; |
||
10488 | } |
||
10489 | case 93: |
||
10490 | { |
||
10491 | PIXEL00_82 |
||
10492 | PIXEL01_82 |
||
10493 | PIXEL02_81 |
||
10494 | PIXEL03_81 |
||
10495 | PIXEL10_32 |
||
10496 | PIXEL11_32 |
||
10497 | PIXEL12_31 |
||
10498 | PIXEL13_31 |
||
10499 | if (Diff(w[8], w[4])) |
||
10500 | { |
||
10501 | PIXEL20_10 |
||
10502 | PIXEL21_30 |
||
10503 | PIXEL30_80 |
||
10504 | PIXEL31_10 |
||
10505 | } |
||
10506 | else |
||
10507 | { |
||
10508 | PIXEL20_12 |
||
10509 | PIXEL21_0 |
||
10510 | PIXEL30_20 |
||
10511 | PIXEL31_11 |
||
10512 | } |
||
10513 | if (Diff(w[6], w[8])) |
||
10514 | { |
||
10515 | PIXEL22_30 |
||
10516 | PIXEL23_10 |
||
10517 | PIXEL32_10 |
||
10518 | PIXEL33_80 |
||
10519 | } |
||
10520 | else |
||
10521 | { |
||
10522 | PIXEL22_0 |
||
10523 | PIXEL23_11 |
||
10524 | PIXEL32_12 |
||
10525 | PIXEL33_20 |
||
10526 | } |
||
10527 | break; |
||
10528 | } |
||
10529 | case 206: |
||
10530 | { |
||
10531 | if (Diff(w[4], w[2])) |
||
10532 | { |
||
10533 | PIXEL00_80 |
||
10534 | PIXEL01_10 |
||
10535 | PIXEL10_10 |
||
10536 | PIXEL11_30 |
||
10537 | } |
||
10538 | else |
||
10539 | { |
||
10540 | PIXEL00_20 |
||
10541 | PIXEL01_12 |
||
10542 | PIXEL10_11 |
||
10543 | PIXEL11_0 |
||
10544 | } |
||
10545 | PIXEL02_32 |
||
10546 | PIXEL03_82 |
||
10547 | PIXEL12_32 |
||
10548 | PIXEL13_82 |
||
10549 | if (Diff(w[8], w[4])) |
||
10550 | { |
||
10551 | PIXEL20_10 |
||
10552 | PIXEL21_30 |
||
10553 | PIXEL30_80 |
||
10554 | PIXEL31_10 |
||
10555 | } |
||
10556 | else |
||
10557 | { |
||
10558 | PIXEL20_12 |
||
10559 | PIXEL21_0 |
||
10560 | PIXEL30_20 |
||
10561 | PIXEL31_11 |
||
10562 | } |
||
10563 | PIXEL22_31 |
||
10564 | PIXEL23_81 |
||
10565 | PIXEL32_31 |
||
10566 | PIXEL33_81 |
||
10567 | break; |
||
10568 | } |
||
10569 | case 205: |
||
10570 | case 201: |
||
10571 | { |
||
10572 | PIXEL00_82 |
||
10573 | PIXEL01_82 |
||
10574 | PIXEL02_60 |
||
10575 | PIXEL03_20 |
||
10576 | PIXEL10_32 |
||
10577 | PIXEL11_32 |
||
10578 | PIXEL12_70 |
||
10579 | PIXEL13_60 |
||
10580 | if (Diff(w[8], w[4])) |
||
10581 | { |
||
10582 | PIXEL20_10 |
||
10583 | PIXEL21_30 |
||
10584 | PIXEL30_80 |
||
10585 | PIXEL31_10 |
||
10586 | } |
||
10587 | else |
||
10588 | { |
||
10589 | PIXEL20_12 |
||
10590 | PIXEL21_0 |
||
10591 | PIXEL30_20 |
||
10592 | PIXEL31_11 |
||
10593 | } |
||
10594 | PIXEL22_31 |
||
10595 | PIXEL23_81 |
||
10596 | PIXEL32_31 |
||
10597 | PIXEL33_81 |
||
10598 | break; |
||
10599 | } |
||
10600 | case 174: |
||
10601 | case 46: |
||
10602 | { |
||
10603 | if (Diff(w[4], w[2])) |
||
10604 | { |
||
10605 | PIXEL00_80 |
||
10606 | PIXEL01_10 |
||
10607 | PIXEL10_10 |
||
10608 | PIXEL11_30 |
||
10609 | } |
||
10610 | else |
||
10611 | { |
||
10612 | PIXEL00_20 |
||
10613 | PIXEL01_12 |
||
10614 | PIXEL10_11 |
||
10615 | PIXEL11_0 |
||
10616 | } |
||
10617 | PIXEL02_32 |
||
10618 | PIXEL03_82 |
||
10619 | PIXEL12_32 |
||
10620 | PIXEL13_82 |
||
10621 | PIXEL20_31 |
||
10622 | PIXEL21_31 |
||
10623 | PIXEL22_70 |
||
10624 | PIXEL23_60 |
||
10625 | PIXEL30_81 |
||
10626 | PIXEL31_81 |
||
10627 | PIXEL32_60 |
||
10628 | PIXEL33_20 |
||
10629 | break; |
||
10630 | } |
||
10631 | case 179: |
||
10632 | case 147: |
||
10633 | { |
||
10634 | PIXEL00_81 |
||
10635 | PIXEL01_31 |
||
10636 | if (Diff(w[2], w[6])) |
||
10637 | { |
||
10638 | PIXEL02_10 |
||
10639 | PIXEL03_80 |
||
10640 | PIXEL12_30 |
||
10641 | PIXEL13_10 |
||
10642 | } |
||
10643 | else |
||
10644 | { |
||
10645 | PIXEL02_11 |
||
10646 | PIXEL03_20 |
||
10647 | PIXEL12_0 |
||
10648 | PIXEL13_12 |
||
10649 | } |
||
10650 | PIXEL10_81 |
||
10651 | PIXEL11_31 |
||
10652 | PIXEL20_60 |
||
10653 | PIXEL21_70 |
||
10654 | PIXEL22_32 |
||
10655 | PIXEL23_32 |
||
10656 | PIXEL30_20 |
||
10657 | PIXEL31_60 |
||
10658 | PIXEL32_82 |
||
10659 | PIXEL33_82 |
||
10660 | break; |
||
10661 | } |
||
10662 | case 117: |
||
10663 | case 116: |
||
10664 | { |
||
10665 | PIXEL00_20 |
||
10666 | PIXEL01_60 |
||
10667 | PIXEL02_81 |
||
10668 | PIXEL03_81 |
||
10669 | PIXEL10_60 |
||
10670 | PIXEL11_70 |
||
10671 | PIXEL12_31 |
||
10672 | PIXEL13_31 |
||
10673 | PIXEL20_82 |
||
10674 | PIXEL21_32 |
||
10675 | if (Diff(w[6], w[8])) |
||
10676 | { |
||
10677 | PIXEL22_30 |
||
10678 | PIXEL23_10 |
||
10679 | PIXEL32_10 |
||
10680 | PIXEL33_80 |
||
10681 | } |
||
10682 | else |
||
10683 | { |
||
10684 | PIXEL22_0 |
||
10685 | PIXEL23_11 |
||
10686 | PIXEL32_12 |
||
10687 | PIXEL33_20 |
||
10688 | } |
||
10689 | PIXEL30_82 |
||
10690 | PIXEL31_32 |
||
10691 | break; |
||
10692 | } |
||
10693 | case 189: |
||
10694 | { |
||
10695 | PIXEL00_82 |
||
10696 | PIXEL01_82 |
||
10697 | PIXEL02_81 |
||
10698 | PIXEL03_81 |
||
10699 | PIXEL10_32 |
||
10700 | PIXEL11_32 |
||
10701 | PIXEL12_31 |
||
10702 | PIXEL13_31 |
||
10703 | PIXEL20_31 |
||
10704 | PIXEL21_31 |
||
10705 | PIXEL22_32 |
||
10706 | PIXEL23_32 |
||
10707 | PIXEL30_81 |
||
10708 | PIXEL31_81 |
||
10709 | PIXEL32_82 |
||
10710 | PIXEL33_82 |
||
10711 | break; |
||
10712 | } |
||
10713 | case 231: |
||
10714 | { |
||
10715 | PIXEL00_81 |
||
10716 | PIXEL01_31 |
||
10717 | PIXEL02_32 |
||
10718 | PIXEL03_82 |
||
10719 | PIXEL10_81 |
||
10720 | PIXEL11_31 |
||
10721 | PIXEL12_32 |
||
10722 | PIXEL13_82 |
||
10723 | PIXEL20_82 |
||
10724 | PIXEL21_32 |
||
10725 | PIXEL22_31 |
||
10726 | PIXEL23_81 |
||
10727 | PIXEL30_82 |
||
10728 | PIXEL31_32 |
||
10729 | PIXEL32_31 |
||
10730 | PIXEL33_81 |
||
10731 | break; |
||
10732 | } |
||
10733 | case 126: |
||
10734 | { |
||
10735 | PIXEL00_80 |
||
10736 | PIXEL01_10 |
||
10737 | if (Diff(w[2], w[6])) |
||
10738 | { |
||
10739 | PIXEL02_0 |
||
10740 | PIXEL03_0 |
||
10741 | PIXEL13_0 |
||
10742 | } |
||
10743 | else |
||
10744 | { |
||
10745 | PIXEL02_50 |
||
10746 | PIXEL03_50 |
||
10747 | PIXEL13_50 |
||
10748 | } |
||
10749 | PIXEL10_10 |
||
10750 | PIXEL11_30 |
||
10751 | PIXEL12_0 |
||
10752 | if (Diff(w[8], w[4])) |
||
10753 | { |
||
10754 | PIXEL20_0 |
||
10755 | PIXEL30_0 |
||
10756 | PIXEL31_0 |
||
10757 | } |
||
10758 | else |
||
10759 | { |
||
10760 | PIXEL20_50 |
||
10761 | PIXEL30_50 |
||
10762 | PIXEL31_50 |
||
10763 | } |
||
10764 | PIXEL21_0 |
||
10765 | PIXEL22_30 |
||
10766 | PIXEL23_10 |
||
10767 | PIXEL32_10 |
||
10768 | PIXEL33_80 |
||
10769 | break; |
||
10770 | } |
||
10771 | case 219: |
||
10772 | { |
||
10773 | if (Diff(w[4], w[2])) |
||
10774 | { |
||
10775 | PIXEL00_0 |
||
10776 | PIXEL01_0 |
||
10777 | PIXEL10_0 |
||
10778 | } |
||
10779 | else |
||
10780 | { |
||
10781 | PIXEL00_50 |
||
10782 | PIXEL01_50 |
||
10783 | PIXEL10_50 |
||
10784 | } |
||
10785 | PIXEL02_10 |
||
10786 | PIXEL03_80 |
||
10787 | PIXEL11_0 |
||
10788 | PIXEL12_30 |
||
10789 | PIXEL13_10 |
||
10790 | PIXEL20_10 |
||
10791 | PIXEL21_30 |
||
10792 | PIXEL22_0 |
||
10793 | if (Diff(w[6], w[8])) |
||
10794 | { |
||
10795 | PIXEL23_0 |
||
10796 | PIXEL32_0 |
||
10797 | PIXEL33_0 |
||
10798 | } |
||
10799 | else |
||
10800 | { |
||
10801 | PIXEL23_50 |
||
10802 | PIXEL32_50 |
||
10803 | PIXEL33_50 |
||
10804 | } |
||
10805 | PIXEL30_80 |
||
10806 | PIXEL31_10 |
||
10807 | break; |
||
10808 | } |
||
10809 | case 125: |
||
10810 | { |
||
10811 | if (Diff(w[8], w[4])) |
||
10812 | { |
||
10813 | PIXEL00_82 |
||
10814 | PIXEL10_32 |
||
10815 | PIXEL20_0 |
||
10816 | PIXEL21_0 |
||
10817 | PIXEL30_0 |
||
10818 | PIXEL31_0 |
||
10819 | } |
||
10820 | else |
||
10821 | { |
||
10822 | PIXEL00_11 |
||
10823 | PIXEL10_13 |
||
10824 | PIXEL20_83 |
||
10825 | PIXEL21_70 |
||
10826 | PIXEL30_50 |
||
10827 | PIXEL31_21 |
||
10828 | } |
||
10829 | PIXEL01_82 |
||
10830 | PIXEL02_81 |
||
10831 | PIXEL03_81 |
||
10832 | PIXEL11_32 |
||
10833 | PIXEL12_31 |
||
10834 | PIXEL13_31 |
||
10835 | PIXEL22_30 |
||
10836 | PIXEL23_10 |
||
10837 | PIXEL32_10 |
||
10838 | PIXEL33_80 |
||
10839 | break; |
||
10840 | } |
||
10841 | case 221: |
||
10842 | { |
||
10843 | PIXEL00_82 |
||
10844 | PIXEL01_82 |
||
10845 | PIXEL02_81 |
||
10846 | if (Diff(w[6], w[8])) |
||
10847 | { |
||
10848 | PIXEL03_81 |
||
10849 | PIXEL13_31 |
||
10850 | PIXEL22_0 |
||
10851 | PIXEL23_0 |
||
10852 | PIXEL32_0 |
||
10853 | PIXEL33_0 |
||
10854 | } |
||
10855 | else |
||
10856 | { |
||
10857 | PIXEL03_12 |
||
10858 | PIXEL13_14 |
||
10859 | PIXEL22_70 |
||
10860 | PIXEL23_83 |
||
10861 | PIXEL32_21 |
||
10862 | PIXEL33_50 |
||
10863 | } |
||
10864 | PIXEL10_32 |
||
10865 | PIXEL11_32 |
||
10866 | PIXEL12_31 |
||
10867 | PIXEL20_10 |
||
10868 | PIXEL21_30 |
||
10869 | PIXEL30_80 |
||
10870 | PIXEL31_10 |
||
10871 | break; |
||
10872 | } |
||
10873 | case 207: |
||
10874 | { |
||
10875 | if (Diff(w[4], w[2])) |
||
10876 | { |
||
10877 | PIXEL00_0 |
||
10878 | PIXEL01_0 |
||
10879 | PIXEL02_32 |
||
10880 | PIXEL03_82 |
||
10881 | PIXEL10_0 |
||
10882 | PIXEL11_0 |
||
10883 | } |
||
10884 | else |
||
10885 | { |
||
10886 | PIXEL00_50 |
||
10887 | PIXEL01_83 |
||
10888 | PIXEL02_13 |
||
10889 | PIXEL03_11 |
||
10890 | PIXEL10_21 |
||
10891 | PIXEL11_70 |
||
10892 | } |
||
10893 | PIXEL12_32 |
||
10894 | PIXEL13_82 |
||
10895 | PIXEL20_10 |
||
10896 | PIXEL21_30 |
||
10897 | PIXEL22_31 |
||
10898 | PIXEL23_81 |
||
10899 | PIXEL30_80 |
||
10900 | PIXEL31_10 |
||
10901 | PIXEL32_31 |
||
10902 | PIXEL33_81 |
||
10903 | break; |
||
10904 | } |
||
10905 | case 238: |
||
10906 | { |
||
10907 | PIXEL00_80 |
||
10908 | PIXEL01_10 |
||
10909 | PIXEL02_32 |
||
10910 | PIXEL03_82 |
||
10911 | PIXEL10_10 |
||
10912 | PIXEL11_30 |
||
10913 | PIXEL12_32 |
||
10914 | PIXEL13_82 |
||
10915 | if (Diff(w[8], w[4])) |
||
10916 | { |
||
10917 | PIXEL20_0 |
||
10918 | PIXEL21_0 |
||
10919 | PIXEL30_0 |
||
10920 | PIXEL31_0 |
||
10921 | PIXEL32_31 |
||
10922 | PIXEL33_81 |
||
10923 | } |
||
10924 | else |
||
10925 | { |
||
10926 | PIXEL20_21 |
||
10927 | PIXEL21_70 |
||
10928 | PIXEL30_50 |
||
10929 | PIXEL31_83 |
||
10930 | PIXEL32_14 |
||
10931 | PIXEL33_12 |
||
10932 | } |
||
10933 | PIXEL22_31 |
||
10934 | PIXEL23_81 |
||
10935 | break; |
||
10936 | } |
||
10937 | case 190: |
||
10938 | { |
||
10939 | PIXEL00_80 |
||
10940 | PIXEL01_10 |
||
10941 | if (Diff(w[2], w[6])) |
||
10942 | { |
||
10943 | PIXEL02_0 |
||
10944 | PIXEL03_0 |
||
10945 | PIXEL12_0 |
||
10946 | PIXEL13_0 |
||
10947 | PIXEL23_32 |
||
10948 | PIXEL33_82 |
||
10949 | } |
||
10950 | else |
||
10951 | { |
||
10952 | PIXEL02_21 |
||
10953 | PIXEL03_50 |
||
10954 | PIXEL12_70 |
||
10955 | PIXEL13_83 |
||
10956 | PIXEL23_13 |
||
10957 | PIXEL33_11 |
||
10958 | } |
||
10959 | PIXEL10_10 |
||
10960 | PIXEL11_30 |
||
10961 | PIXEL20_31 |
||
10962 | PIXEL21_31 |
||
10963 | PIXEL22_32 |
||
10964 | PIXEL30_81 |
||
10965 | PIXEL31_81 |
||
10966 | PIXEL32_82 |
||
10967 | break; |
||
10968 | } |
||
10969 | case 187: |
||
10970 | { |
||
10971 | if (Diff(w[4], w[2])) |
||
10972 | { |
||
10973 | PIXEL00_0 |
||
10974 | PIXEL01_0 |
||
10975 | PIXEL10_0 |
||
10976 | PIXEL11_0 |
||
10977 | PIXEL20_31 |
||
10978 | PIXEL30_81 |
||
10979 | } |
||
10980 | else |
||
10981 | { |
||
10982 | PIXEL00_50 |
||
10983 | PIXEL01_21 |
||
10984 | PIXEL10_83 |
||
10985 | PIXEL11_70 |
||
10986 | PIXEL20_14 |
||
10987 | PIXEL30_12 |
||
10988 | } |
||
10989 | PIXEL02_10 |
||
10990 | PIXEL03_80 |
||
10991 | PIXEL12_30 |
||
10992 | PIXEL13_10 |
||
10993 | PIXEL21_31 |
||
10994 | PIXEL22_32 |
||
10995 | PIXEL23_32 |
||
10996 | PIXEL31_81 |
||
10997 | PIXEL32_82 |
||
10998 | PIXEL33_82 |
||
10999 | break; |
||
11000 | } |
||
11001 | case 243: |
||
11002 | { |
||
11003 | PIXEL00_81 |
||
11004 | PIXEL01_31 |
||
11005 | PIXEL02_10 |
||
11006 | PIXEL03_80 |
||
11007 | PIXEL10_81 |
||
11008 | PIXEL11_31 |
||
11009 | PIXEL12_30 |
||
11010 | PIXEL13_10 |
||
11011 | PIXEL20_82 |
||
11012 | PIXEL21_32 |
||
11013 | if (Diff(w[6], w[8])) |
||
11014 | { |
||
11015 | PIXEL22_0 |
||
11016 | PIXEL23_0 |
||
11017 | PIXEL30_82 |
||
11018 | PIXEL31_32 |
||
11019 | PIXEL32_0 |
||
11020 | PIXEL33_0 |
||
11021 | } |
||
11022 | else |
||
11023 | { |
||
11024 | PIXEL22_70 |
||
11025 | PIXEL23_21 |
||
11026 | PIXEL30_11 |
||
11027 | PIXEL31_13 |
||
11028 | PIXEL32_83 |
||
11029 | PIXEL33_50 |
||
11030 | } |
||
11031 | break; |
||
11032 | } |
||
11033 | case 119: |
||
11034 | { |
||
11035 | if (Diff(w[2], w[6])) |
||
11036 | { |
||
11037 | PIXEL00_81 |
||
11038 | PIXEL01_31 |
||
11039 | PIXEL02_0 |
||
11040 | PIXEL03_0 |
||
11041 | PIXEL12_0 |
||
11042 | PIXEL13_0 |
||
11043 | } |
||
11044 | else |
||
11045 | { |
||
11046 | PIXEL00_12 |
||
11047 | PIXEL01_14 |
||
11048 | PIXEL02_83 |
||
11049 | PIXEL03_50 |
||
11050 | PIXEL12_70 |
||
11051 | PIXEL13_21 |
||
11052 | } |
||
11053 | PIXEL10_81 |
||
11054 | PIXEL11_31 |
||
11055 | PIXEL20_82 |
||
11056 | PIXEL21_32 |
||
11057 | PIXEL22_30 |
||
11058 | PIXEL23_10 |
||
11059 | PIXEL30_82 |
||
11060 | PIXEL31_32 |
||
11061 | PIXEL32_10 |
||
11062 | PIXEL33_80 |
||
11063 | break; |
||
11064 | } |
||
11065 | case 237: |
||
11066 | case 233: |
||
11067 | { |
||
11068 | PIXEL00_82 |
||
11069 | PIXEL01_82 |
||
11070 | PIXEL02_60 |
||
11071 | PIXEL03_20 |
||
11072 | PIXEL10_32 |
||
11073 | PIXEL11_32 |
||
11074 | PIXEL12_70 |
||
11075 | PIXEL13_60 |
||
11076 | PIXEL20_0 |
||
11077 | PIXEL21_0 |
||
11078 | PIXEL22_31 |
||
11079 | PIXEL23_81 |
||
11080 | if (Diff(w[8], w[4])) |
||
11081 | { |
||
11082 | PIXEL30_0 |
||
11083 | } |
||
11084 | else |
||
11085 | { |
||
11086 | PIXEL30_20 |
||
11087 | } |
||
11088 | PIXEL31_0 |
||
11089 | PIXEL32_31 |
||
11090 | PIXEL33_81 |
||
11091 | break; |
||
11092 | } |
||
11093 | case 175: |
||
11094 | case 47: |
||
11095 | { |
||
11096 | if (Diff(w[4], w[2])) |
||
11097 | { |
||
11098 | PIXEL00_0 |
||
11099 | } |
||
11100 | else |
||
11101 | { |
||
11102 | PIXEL00_20 |
||
11103 | } |
||
11104 | PIXEL01_0 |
||
11105 | PIXEL02_32 |
||
11106 | PIXEL03_82 |
||
11107 | PIXEL10_0 |
||
11108 | PIXEL11_0 |
||
11109 | PIXEL12_32 |
||
11110 | PIXEL13_82 |
||
11111 | PIXEL20_31 |
||
11112 | PIXEL21_31 |
||
11113 | PIXEL22_70 |
||
11114 | PIXEL23_60 |
||
11115 | PIXEL30_81 |
||
11116 | PIXEL31_81 |
||
11117 | PIXEL32_60 |
||
11118 | PIXEL33_20 |
||
11119 | break; |
||
11120 | } |
||
11121 | case 183: |
||
11122 | case 151: |
||
11123 | { |
||
11124 | PIXEL00_81 |
||
11125 | PIXEL01_31 |
||
11126 | PIXEL02_0 |
||
11127 | if (Diff(w[2], w[6])) |
||
11128 | { |
||
11129 | PIXEL03_0 |
||
11130 | } |
||
11131 | else |
||
11132 | { |
||
11133 | PIXEL03_20 |
||
11134 | } |
||
11135 | PIXEL10_81 |
||
11136 | PIXEL11_31 |
||
11137 | PIXEL12_0 |
||
11138 | PIXEL13_0 |
||
11139 | PIXEL20_60 |
||
11140 | PIXEL21_70 |
||
11141 | PIXEL22_32 |
||
11142 | PIXEL23_32 |
||
11143 | PIXEL30_20 |
||
11144 | PIXEL31_60 |
||
11145 | PIXEL32_82 |
||
11146 | PIXEL33_82 |
||
11147 | break; |
||
11148 | } |
||
11149 | case 245: |
||
11150 | case 244: |
||
11151 | { |
||
11152 | PIXEL00_20 |
||
11153 | PIXEL01_60 |
||
11154 | PIXEL02_81 |
||
11155 | PIXEL03_81 |
||
11156 | PIXEL10_60 |
||
11157 | PIXEL11_70 |
||
11158 | PIXEL12_31 |
||
11159 | PIXEL13_31 |
||
11160 | PIXEL20_82 |
||
11161 | PIXEL21_32 |
||
11162 | PIXEL22_0 |
||
11163 | PIXEL23_0 |
||
11164 | PIXEL30_82 |
||
11165 | PIXEL31_32 |
||
11166 | PIXEL32_0 |
||
11167 | if (Diff(w[6], w[8])) |
||
11168 | { |
||
11169 | PIXEL33_0 |
||
11170 | } |
||
11171 | else |
||
11172 | { |
||
11173 | PIXEL33_20 |
||
11174 | } |
||
11175 | break; |
||
11176 | } |
||
11177 | case 250: |
||
11178 | { |
||
11179 | PIXEL00_80 |
||
11180 | PIXEL01_10 |
||
11181 | PIXEL02_10 |
||
11182 | PIXEL03_80 |
||
11183 | PIXEL10_10 |
||
11184 | PIXEL11_30 |
||
11185 | PIXEL12_30 |
||
11186 | PIXEL13_10 |
||
11187 | if (Diff(w[8], w[4])) |
||
11188 | { |
||
11189 | PIXEL20_0 |
||
11190 | PIXEL30_0 |
||
11191 | PIXEL31_0 |
||
11192 | } |
||
11193 | else |
||
11194 | { |
||
11195 | PIXEL20_50 |
||
11196 | PIXEL30_50 |
||
11197 | PIXEL31_50 |
||
11198 | } |
||
11199 | PIXEL21_0 |
||
11200 | PIXEL22_0 |
||
11201 | if (Diff(w[6], w[8])) |
||
11202 | { |
||
11203 | PIXEL23_0 |
||
11204 | PIXEL32_0 |
||
11205 | PIXEL33_0 |
||
11206 | } |
||
11207 | else |
||
11208 | { |
||
11209 | PIXEL23_50 |
||
11210 | PIXEL32_50 |
||
11211 | PIXEL33_50 |
||
11212 | } |
||
11213 | break; |
||
11214 | } |
||
11215 | case 123: |
||
11216 | { |
||
11217 | if (Diff(w[4], w[2])) |
||
11218 | { |
||
11219 | PIXEL00_0 |
||
11220 | PIXEL01_0 |
||
11221 | PIXEL10_0 |
||
11222 | } |
||
11223 | else |
||
11224 | { |
||
11225 | PIXEL00_50 |
||
11226 | PIXEL01_50 |
||
11227 | PIXEL10_50 |
||
11228 | } |
||
11229 | PIXEL02_10 |
||
11230 | PIXEL03_80 |
||
11231 | PIXEL11_0 |
||
11232 | PIXEL12_30 |
||
11233 | PIXEL13_10 |
||
11234 | if (Diff(w[8], w[4])) |
||
11235 | { |
||
11236 | PIXEL20_0 |
||
11237 | PIXEL30_0 |
||
11238 | PIXEL31_0 |
||
11239 | } |
||
11240 | else |
||
11241 | { |
||
11242 | PIXEL20_50 |
||
11243 | PIXEL30_50 |
||
11244 | PIXEL31_50 |
||
11245 | } |
||
11246 | PIXEL21_0 |
||
11247 | PIXEL22_30 |
||
11248 | PIXEL23_10 |
||
11249 | PIXEL32_10 |
||
11250 | PIXEL33_80 |
||
11251 | break; |
||
11252 | } |
||
11253 | case 95: |
||
11254 | { |
||
11255 | if (Diff(w[4], w[2])) |
||
11256 | { |
||
11257 | PIXEL00_0 |
||
11258 | PIXEL01_0 |
||
11259 | PIXEL10_0 |
||
11260 | } |
||
11261 | else |
||
11262 | { |
||
11263 | PIXEL00_50 |
||
11264 | PIXEL01_50 |
||
11265 | PIXEL10_50 |
||
11266 | } |
||
11267 | if (Diff(w[2], w[6])) |
||
11268 | { |
||
11269 | PIXEL02_0 |
||
11270 | PIXEL03_0 |
||
11271 | PIXEL13_0 |
||
11272 | } |
||
11273 | else |
||
11274 | { |
||
11275 | PIXEL02_50 |
||
11276 | PIXEL03_50 |
||
11277 | PIXEL13_50 |
||
11278 | } |
||
11279 | PIXEL11_0 |
||
11280 | PIXEL12_0 |
||
11281 | PIXEL20_10 |
||
11282 | PIXEL21_30 |
||
11283 | PIXEL22_30 |
||
11284 | PIXEL23_10 |
||
11285 | PIXEL30_80 |
||
11286 | PIXEL31_10 |
||
11287 | PIXEL32_10 |
||
11288 | PIXEL33_80 |
||
11289 | break; |
||
11290 | } |
||
11291 | case 222: |
||
11292 | { |
||
11293 | PIXEL00_80 |
||
11294 | PIXEL01_10 |
||
11295 | if (Diff(w[2], w[6])) |
||
11296 | { |
||
11297 | PIXEL02_0 |
||
11298 | PIXEL03_0 |
||
11299 | PIXEL13_0 |
||
11300 | } |
||
11301 | else |
||
11302 | { |
||
11303 | PIXEL02_50 |
||
11304 | PIXEL03_50 |
||
11305 | PIXEL13_50 |
||
11306 | } |
||
11307 | PIXEL10_10 |
||
11308 | PIXEL11_30 |
||
11309 | PIXEL12_0 |
||
11310 | PIXEL20_10 |
||
11311 | PIXEL21_30 |
||
11312 | PIXEL22_0 |
||
11313 | if (Diff(w[6], w[8])) |
||
11314 | { |
||
11315 | PIXEL23_0 |
||
11316 | PIXEL32_0 |
||
11317 | PIXEL33_0 |
||
11318 | } |
||
11319 | else |
||
11320 | { |
||
11321 | PIXEL23_50 |
||
11322 | PIXEL32_50 |
||
11323 | PIXEL33_50 |
||
11324 | } |
||
11325 | PIXEL30_80 |
||
11326 | PIXEL31_10 |
||
11327 | break; |
||
11328 | } |
||
11329 | case 252: |
||
11330 | { |
||
11331 | PIXEL00_80 |
||
11332 | PIXEL01_61 |
||
11333 | PIXEL02_81 |
||
11334 | PIXEL03_81 |
||
11335 | PIXEL10_10 |
||
11336 | PIXEL11_30 |
||
11337 | PIXEL12_31 |
||
11338 | PIXEL13_31 |
||
11339 | if (Diff(w[8], w[4])) |
||
11340 | { |
||
11341 | PIXEL20_0 |
||
11342 | PIXEL30_0 |
||
11343 | PIXEL31_0 |
||
11344 | } |
||
11345 | else |
||
11346 | { |
||
11347 | PIXEL20_50 |
||
11348 | PIXEL30_50 |
||
11349 | PIXEL31_50 |
||
11350 | } |
||
11351 | PIXEL21_0 |
||
11352 | PIXEL22_0 |
||
11353 | PIXEL23_0 |
||
11354 | PIXEL32_0 |
||
11355 | if (Diff(w[6], w[8])) |
||
11356 | { |
||
11357 | PIXEL33_0 |
||
11358 | } |
||
11359 | else |
||
11360 | { |
||
11361 | PIXEL33_20 |
||
11362 | } |
||
11363 | break; |
||
11364 | } |
||
11365 | case 249: |
||
11366 | { |
||
11367 | PIXEL00_82 |
||
11368 | PIXEL01_82 |
||
11369 | PIXEL02_61 |
||
11370 | PIXEL03_80 |
||
11371 | PIXEL10_32 |
||
11372 | PIXEL11_32 |
||
11373 | PIXEL12_30 |
||
11374 | PIXEL13_10 |
||
11375 | PIXEL20_0 |
||
11376 | PIXEL21_0 |
||
11377 | PIXEL22_0 |
||
11378 | if (Diff(w[6], w[8])) |
||
11379 | { |
||
11380 | PIXEL23_0 |
||
11381 | PIXEL32_0 |
||
11382 | PIXEL33_0 |
||
11383 | } |
||
11384 | else |
||
11385 | { |
||
11386 | PIXEL23_50 |
||
11387 | PIXEL32_50 |
||
11388 | PIXEL33_50 |
||
11389 | } |
||
11390 | if (Diff(w[8], w[4])) |
||
11391 | { |
||
11392 | PIXEL30_0 |
||
11393 | } |
||
11394 | else |
||
11395 | { |
||
11396 | PIXEL30_20 |
||
11397 | } |
||
11398 | PIXEL31_0 |
||
11399 | break; |
||
11400 | } |
||
11401 | case 235: |
||
11402 | { |
||
11403 | if (Diff(w[4], w[2])) |
||
11404 | { |
||
11405 | PIXEL00_0 |
||
11406 | PIXEL01_0 |
||
11407 | PIXEL10_0 |
||
11408 | } |
||
11409 | else |
||
11410 | { |
||
11411 | PIXEL00_50 |
||
11412 | PIXEL01_50 |
||
11413 | PIXEL10_50 |
||
11414 | } |
||
11415 | PIXEL02_10 |
||
11416 | PIXEL03_80 |
||
11417 | PIXEL11_0 |
||
11418 | PIXEL12_30 |
||
11419 | PIXEL13_61 |
||
11420 | PIXEL20_0 |
||
11421 | PIXEL21_0 |
||
11422 | PIXEL22_31 |
||
11423 | PIXEL23_81 |
||
11424 | if (Diff(w[8], w[4])) |
||
11425 | { |
||
11426 | PIXEL30_0 |
||
11427 | } |
||
11428 | else |
||
11429 | { |
||
11430 | PIXEL30_20 |
||
11431 | } |
||
11432 | PIXEL31_0 |
||
11433 | PIXEL32_31 |
||
11434 | PIXEL33_81 |
||
11435 | break; |
||
11436 | } |
||
11437 | case 111: |
||
11438 | { |
||
11439 | if (Diff(w[4], w[2])) |
||
11440 | { |
||
11441 | PIXEL00_0 |
||
11442 | } |
||
11443 | else |
||
11444 | { |
||
11445 | PIXEL00_20 |
||
11446 | } |
||
11447 | PIXEL01_0 |
||
11448 | PIXEL02_32 |
||
11449 | PIXEL03_82 |
||
11450 | PIXEL10_0 |
||
11451 | PIXEL11_0 |
||
11452 | PIXEL12_32 |
||
11453 | PIXEL13_82 |
||
11454 | if (Diff(w[8], w[4])) |
||
11455 | { |
||
11456 | PIXEL20_0 |
||
11457 | PIXEL30_0 |
||
11458 | PIXEL31_0 |
||
11459 | } |
||
11460 | else |
||
11461 | { |
||
11462 | PIXEL20_50 |
||
11463 | PIXEL30_50 |
||
11464 | PIXEL31_50 |
||
11465 | } |
||
11466 | PIXEL21_0 |
||
11467 | PIXEL22_30 |
||
11468 | PIXEL23_61 |
||
11469 | PIXEL32_10 |
||
11470 | PIXEL33_80 |
||
11471 | break; |
||
11472 | } |
||
11473 | case 63: |
||
11474 | { |
||
11475 | if (Diff(w[4], w[2])) |
||
11476 | { |
||
11477 | PIXEL00_0 |
||
11478 | } |
||
11479 | else |
||
11480 | { |
||
11481 | PIXEL00_20 |
||
11482 | } |
||
11483 | PIXEL01_0 |
||
11484 | if (Diff(w[2], w[6])) |
||
11485 | { |
||
11486 | PIXEL02_0 |
||
11487 | PIXEL03_0 |
||
11488 | PIXEL13_0 |
||
11489 | } |
||
11490 | else |
||
11491 | { |
||
11492 | PIXEL02_50 |
||
11493 | PIXEL03_50 |
||
11494 | PIXEL13_50 |
||
11495 | } |
||
11496 | PIXEL10_0 |
||
11497 | PIXEL11_0 |
||
11498 | PIXEL12_0 |
||
11499 | PIXEL20_31 |
||
11500 | PIXEL21_31 |
||
11501 | PIXEL22_30 |
||
11502 | PIXEL23_10 |
||
11503 | PIXEL30_81 |
||
11504 | PIXEL31_81 |
||
11505 | PIXEL32_61 |
||
11506 | PIXEL33_80 |
||
11507 | break; |
||
11508 | } |
||
11509 | case 159: |
||
11510 | { |
||
11511 | if (Diff(w[4], w[2])) |
||
11512 | { |
||
11513 | PIXEL00_0 |
||
11514 | PIXEL01_0 |
||
11515 | PIXEL10_0 |
||
11516 | } |
||
11517 | else |
||
11518 | { |
||
11519 | PIXEL00_50 |
||
11520 | PIXEL01_50 |
||
11521 | PIXEL10_50 |
||
11522 | } |
||
11523 | PIXEL02_0 |
||
11524 | if (Diff(w[2], w[6])) |
||
11525 | { |
||
11526 | PIXEL03_0 |
||
11527 | } |
||
11528 | else |
||
11529 | { |
||
11530 | PIXEL03_20 |
||
11531 | } |
||
11532 | PIXEL11_0 |
||
11533 | PIXEL12_0 |
||
11534 | PIXEL13_0 |
||
11535 | PIXEL20_10 |
||
11536 | PIXEL21_30 |
||
11537 | PIXEL22_32 |
||
11538 | PIXEL23_32 |
||
11539 | PIXEL30_80 |
||
11540 | PIXEL31_61 |
||
11541 | PIXEL32_82 |
||
11542 | PIXEL33_82 |
||
11543 | break; |
||
11544 | } |
||
11545 | case 215: |
||
11546 | { |
||
11547 | PIXEL00_81 |
||
11548 | PIXEL01_31 |
||
11549 | PIXEL02_0 |
||
11550 | if (Diff(w[2], w[6])) |
||
11551 | { |
||
11552 | PIXEL03_0 |
||
11553 | } |
||
11554 | else |
||
11555 | { |
||
11556 | PIXEL03_20 |
||
11557 | } |
||
11558 | PIXEL10_81 |
||
11559 | PIXEL11_31 |
||
11560 | PIXEL12_0 |
||
11561 | PIXEL13_0 |
||
11562 | PIXEL20_61 |
||
11563 | PIXEL21_30 |
||
11564 | PIXEL22_0 |
||
11565 | if (Diff(w[6], w[8])) |
||
11566 | { |
||
11567 | PIXEL23_0 |
||
11568 | PIXEL32_0 |
||
11569 | PIXEL33_0 |
||
11570 | } |
||
11571 | else |
||
11572 | { |
||
11573 | PIXEL23_50 |
||
11574 | PIXEL32_50 |
||
11575 | PIXEL33_50 |
||
11576 | } |
||
11577 | PIXEL30_80 |
||
11578 | PIXEL31_10 |
||
11579 | break; |
||
11580 | } |
||
11581 | case 246: |
||
11582 | { |
||
11583 | PIXEL00_80 |
||
11584 | PIXEL01_10 |
||
11585 | if (Diff(w[2], w[6])) |
||
11586 | { |
||
11587 | PIXEL02_0 |
||
11588 | PIXEL03_0 |
||
11589 | PIXEL13_0 |
||
11590 | } |
||
11591 | else |
||
11592 | { |
||
11593 | PIXEL02_50 |
||
11594 | PIXEL03_50 |
||
11595 | PIXEL13_50 |
||
11596 | } |
||
11597 | PIXEL10_61 |
||
11598 | PIXEL11_30 |
||
11599 | PIXEL12_0 |
||
11600 | PIXEL20_82 |
||
11601 | PIXEL21_32 |
||
11602 | PIXEL22_0 |
||
11603 | PIXEL23_0 |
||
11604 | PIXEL30_82 |
||
11605 | PIXEL31_32 |
||
11606 | PIXEL32_0 |
||
11607 | if (Diff(w[6], w[8])) |
||
11608 | { |
||
11609 | PIXEL33_0 |
||
11610 | } |
||
11611 | else |
||
11612 | { |
||
11613 | PIXEL33_20 |
||
11614 | } |
||
11615 | break; |
||
11616 | } |
||
11617 | case 254: |
||
11618 | { |
||
11619 | PIXEL00_80 |
||
11620 | PIXEL01_10 |
||
11621 | if (Diff(w[2], w[6])) |
||
11622 | { |
||
11623 | PIXEL02_0 |
||
11624 | PIXEL03_0 |
||
11625 | PIXEL13_0 |
||
11626 | } |
||
11627 | else |
||
11628 | { |
||
11629 | PIXEL02_50 |
||
11630 | PIXEL03_50 |
||
11631 | PIXEL13_50 |
||
11632 | } |
||
11633 | PIXEL10_10 |
||
11634 | PIXEL11_30 |
||
11635 | PIXEL12_0 |
||
11636 | if (Diff(w[8], w[4])) |
||
11637 | { |
||
11638 | PIXEL20_0 |
||
11639 | PIXEL30_0 |
||
11640 | PIXEL31_0 |
||
11641 | } |
||
11642 | else |
||
11643 | { |
||
11644 | PIXEL20_50 |
||
11645 | PIXEL30_50 |
||
11646 | PIXEL31_50 |
||
11647 | } |
||
11648 | PIXEL21_0 |
||
11649 | PIXEL22_0 |
||
11650 | PIXEL23_0 |
||
11651 | PIXEL32_0 |
||
11652 | if (Diff(w[6], w[8])) |
||
11653 | { |
||
11654 | PIXEL33_0 |
||
11655 | } |
||
11656 | else |
||
11657 | { |
||
11658 | PIXEL33_20 |
||
11659 | } |
||
11660 | break; |
||
11661 | } |
||
11662 | case 253: |
||
11663 | { |
||
11664 | PIXEL00_82 |
||
11665 | PIXEL01_82 |
||
11666 | PIXEL02_81 |
||
11667 | PIXEL03_81 |
||
11668 | PIXEL10_32 |
||
11669 | PIXEL11_32 |
||
11670 | PIXEL12_31 |
||
11671 | PIXEL13_31 |
||
11672 | PIXEL20_0 |
||
11673 | PIXEL21_0 |
||
11674 | PIXEL22_0 |
||
11675 | PIXEL23_0 |
||
11676 | if (Diff(w[8], w[4])) |
||
11677 | { |
||
11678 | PIXEL30_0 |
||
11679 | } |
||
11680 | else |
||
11681 | { |
||
11682 | PIXEL30_20 |
||
11683 | } |
||
11684 | PIXEL31_0 |
||
11685 | PIXEL32_0 |
||
11686 | if (Diff(w[6], w[8])) |
||
11687 | { |
||
11688 | PIXEL33_0 |
||
11689 | } |
||
11690 | else |
||
11691 | { |
||
11692 | PIXEL33_20 |
||
11693 | } |
||
11694 | break; |
||
11695 | } |
||
11696 | case 251: |
||
11697 | { |
||
11698 | if (Diff(w[4], w[2])) |
||
11699 | { |
||
11700 | PIXEL00_0 |
||
11701 | PIXEL01_0 |
||
11702 | PIXEL10_0 |
||
11703 | } |
||
11704 | else |
||
11705 | { |
||
11706 | PIXEL00_50 |
||
11707 | PIXEL01_50 |
||
11708 | PIXEL10_50 |
||
11709 | } |
||
11710 | PIXEL02_10 |
||
11711 | PIXEL03_80 |
||
11712 | PIXEL11_0 |
||
11713 | PIXEL12_30 |
||
11714 | PIXEL13_10 |
||
11715 | PIXEL20_0 |
||
11716 | PIXEL21_0 |
||
11717 | PIXEL22_0 |
||
11718 | if (Diff(w[6], w[8])) |
||
11719 | { |
||
11720 | PIXEL23_0 |
||
11721 | PIXEL32_0 |
||
11722 | PIXEL33_0 |
||
11723 | } |
||
11724 | else |
||
11725 | { |
||
11726 | PIXEL23_50 |
||
11727 | PIXEL32_50 |
||
11728 | PIXEL33_50 |
||
11729 | } |
||
11730 | if (Diff(w[8], w[4])) |
||
11731 | { |
||
11732 | PIXEL30_0 |
||
11733 | } |
||
11734 | else |
||
11735 | { |
||
11736 | PIXEL30_20 |
||
11737 | } |
||
11738 | PIXEL31_0 |
||
11739 | break; |
||
11740 | } |
||
11741 | case 239: |
||
11742 | { |
||
11743 | if (Diff(w[4], w[2])) |
||
11744 | { |
||
11745 | PIXEL00_0 |
||
11746 | } |
||
11747 | else |
||
11748 | { |
||
11749 | PIXEL00_20 |
||
11750 | } |
||
11751 | PIXEL01_0 |
||
11752 | PIXEL02_32 |
||
11753 | PIXEL03_82 |
||
11754 | PIXEL10_0 |
||
11755 | PIXEL11_0 |
||
11756 | PIXEL12_32 |
||
11757 | PIXEL13_82 |
||
11758 | PIXEL20_0 |
||
11759 | PIXEL21_0 |
||
11760 | PIXEL22_31 |
||
11761 | PIXEL23_81 |
||
11762 | if (Diff(w[8], w[4])) |
||
11763 | { |
||
11764 | PIXEL30_0 |
||
11765 | } |
||
11766 | else |
||
11767 | { |
||
11768 | PIXEL30_20 |
||
11769 | } |
||
11770 | PIXEL31_0 |
||
11771 | PIXEL32_31 |
||
11772 | PIXEL33_81 |
||
11773 | break; |
||
11774 | } |
||
11775 | case 127: |
||
11776 | { |
||
11777 | if (Diff(w[4], w[2])) |
||
11778 | { |
||
11779 | PIXEL00_0 |
||
11780 | } |
||
11781 | else |
||
11782 | { |
||
11783 | PIXEL00_20 |
||
11784 | } |
||
11785 | PIXEL01_0 |
||
11786 | if (Diff(w[2], w[6])) |
||
11787 | { |
||
11788 | PIXEL02_0 |
||
11789 | PIXEL03_0 |
||
11790 | PIXEL13_0 |
||
11791 | } |
||
11792 | else |
||
11793 | { |
||
11794 | PIXEL02_50 |
||
11795 | PIXEL03_50 |
||
11796 | PIXEL13_50 |
||
11797 | } |
||
11798 | PIXEL10_0 |
||
11799 | PIXEL11_0 |
||
11800 | PIXEL12_0 |
||
11801 | if (Diff(w[8], w[4])) |
||
11802 | { |
||
11803 | PIXEL20_0 |
||
11804 | PIXEL30_0 |
||
11805 | PIXEL31_0 |
||
11806 | } |
||
11807 | else |
||
11808 | { |
||
11809 | PIXEL20_50 |
||
11810 | PIXEL30_50 |
||
11811 | PIXEL31_50 |
||
11812 | } |
||
11813 | PIXEL21_0 |
||
11814 | PIXEL22_30 |
||
11815 | PIXEL23_10 |
||
11816 | PIXEL32_10 |
||
11817 | PIXEL33_80 |
||
11818 | break; |
||
11819 | } |
||
11820 | case 191: |
||
11821 | { |
||
11822 | if (Diff(w[4], w[2])) |
||
11823 | { |
||
11824 | PIXEL00_0 |
||
11825 | } |
||
11826 | else |
||
11827 | { |
||
11828 | PIXEL00_20 |
||
11829 | } |
||
11830 | PIXEL01_0 |
||
11831 | PIXEL02_0 |
||
11832 | if (Diff(w[2], w[6])) |
||
11833 | { |
||
11834 | PIXEL03_0 |
||
11835 | } |
||
11836 | else |
||
11837 | { |
||
11838 | PIXEL03_20 |
||
11839 | } |
||
11840 | PIXEL10_0 |
||
11841 | PIXEL11_0 |
||
11842 | PIXEL12_0 |
||
11843 | PIXEL13_0 |
||
11844 | PIXEL20_31 |
||
11845 | PIXEL21_31 |
||
11846 | PIXEL22_32 |
||
11847 | PIXEL23_32 |
||
11848 | PIXEL30_81 |
||
11849 | PIXEL31_81 |
||
11850 | PIXEL32_82 |
||
11851 | PIXEL33_82 |
||
11852 | break; |
||
11853 | } |
||
11854 | case 223: |
||
11855 | { |
||
11856 | if (Diff(w[4], w[2])) |
||
11857 | { |
||
11858 | PIXEL00_0 |
||
11859 | PIXEL01_0 |
||
11860 | PIXEL10_0 |
||
11861 | } |
||
11862 | else |
||
11863 | { |
||
11864 | PIXEL00_50 |
||
11865 | PIXEL01_50 |
||
11866 | PIXEL10_50 |
||
11867 | } |
||
11868 | PIXEL02_0 |
||
11869 | if (Diff(w[2], w[6])) |
||
11870 | { |
||
11871 | PIXEL03_0 |
||
11872 | } |
||
11873 | else |
||
11874 | { |
||
11875 | PIXEL03_20 |
||
11876 | } |
||
11877 | PIXEL11_0 |
||
11878 | PIXEL12_0 |
||
11879 | PIXEL13_0 |
||
11880 | PIXEL20_10 |
||
11881 | PIXEL21_30 |
||
11882 | PIXEL22_0 |
||
11883 | if (Diff(w[6], w[8])) |
||
11884 | { |
||
11885 | PIXEL23_0 |
||
11886 | PIXEL32_0 |
||
11887 | PIXEL33_0 |
||
11888 | } |
||
11889 | else |
||
11890 | { |
||
11891 | PIXEL23_50 |
||
11892 | PIXEL32_50 |
||
11893 | PIXEL33_50 |
||
11894 | } |
||
11895 | PIXEL30_80 |
||
11896 | PIXEL31_10 |
||
11897 | break; |
||
11898 | } |
||
11899 | case 247: |
||
11900 | { |
||
11901 | PIXEL00_81 |
||
11902 | PIXEL01_31 |
||
11903 | PIXEL02_0 |
||
11904 | if (Diff(w[2], w[6])) |
||
11905 | { |
||
11906 | PIXEL03_0 |
||
11907 | } |
||
11908 | else |
||
11909 | { |
||
11910 | PIXEL03_20 |
||
11911 | } |
||
11912 | PIXEL10_81 |
||
11913 | PIXEL11_31 |
||
11914 | PIXEL12_0 |
||
11915 | PIXEL13_0 |
||
11916 | PIXEL20_82 |
||
11917 | PIXEL21_32 |
||
11918 | PIXEL22_0 |
||
11919 | PIXEL23_0 |
||
11920 | PIXEL30_82 |
||
11921 | PIXEL31_32 |
||
11922 | PIXEL32_0 |
||
11923 | if (Diff(w[6], w[8])) |
||
11924 | { |
||
11925 | PIXEL33_0 |
||
11926 | } |
||
11927 | else |
||
11928 | { |
||
11929 | PIXEL33_20 |
||
11930 | } |
||
11931 | break; |
||
11932 | } |
||
11933 | case 255: |
||
11934 | { |
||
11935 | if (Diff(w[4], w[2])) |
||
11936 | { |
||
11937 | PIXEL00_0 |
||
11938 | } |
||
11939 | else |
||
11940 | { |
||
11941 | PIXEL00_20 |
||
11942 | } |
||
11943 | PIXEL01_0 |
||
11944 | PIXEL02_0 |
||
11945 | if (Diff(w[2], w[6])) |
||
11946 | { |
||
11947 | PIXEL03_0 |
||
11948 | } |
||
11949 | else |
||
11950 | { |
||
11951 | PIXEL03_20 |
||
11952 | } |
||
11953 | PIXEL10_0 |
||
11954 | PIXEL11_0 |
||
11955 | PIXEL12_0 |
||
11956 | PIXEL13_0 |
||
11957 | PIXEL20_0 |
||
11958 | PIXEL21_0 |
||
11959 | PIXEL22_0 |
||
11960 | PIXEL23_0 |
||
11961 | if (Diff(w[8], w[4])) |
||
11962 | { |
||
11963 | PIXEL30_0 |
||
11964 | } |
||
11965 | else |
||
11966 | { |
||
11967 | PIXEL30_20 |
||
11968 | } |
||
11969 | PIXEL31_0 |
||
11970 | PIXEL32_0 |
||
11971 | if (Diff(w[6], w[8])) |
||
11972 | { |
||
11973 | PIXEL33_0 |
||
11974 | } |
||
11975 | else |
||
11976 | { |
||
11977 | PIXEL33_20 |
||
11978 | } |
||
11979 | break; |
||
11980 | } |
||
11981 | } |
||
11982 | sp++; |
||
11983 | dp += 4; |
||
11984 | } |
||
11985 | |||
11986 | sRowP += srb; |
||
11987 | sp = (uint32_t *) sRowP; |
||
11988 | |||
11989 | dRowP += drb * 4; |
||
11990 | dp = (uint32_t *) dRowP; |
||
11991 | } |
||
11992 | } |
||
11993 | |||
11994 | HQX_API void HQX_CALLCONV hq4x_32 (uint32_t *src_pixels, uint32_t *dest_pixels, int src_width, int src_height) |
||
11995 | { |
||
11996 | if (!is_hqx_initialized) |
||
11997 | hqxInit (); |
||
11998 | |||
11999 | hq4x_32_rb (src_pixels, src_width * 4, dest_pixels, src_width * 4 * 4, src_width, src_height); |
||
12000 | } |
||
12001 | |||
12002 | #undef PIXEL00_0 |
||
12003 | #undef PIXEL00_11 |
||
12004 | #undef PIXEL00_12 |
||
12005 | #undef PIXEL00_20 |
||
12006 | #undef PIXEL00_50 |
||
12007 | #undef PIXEL00_80 |
||
12008 | #undef PIXEL00_81 |
||
12009 | #undef PIXEL00_82 |
||
12010 | #undef PIXEL01_0 |
||
12011 | #undef PIXEL01_10 |
||
12012 | #undef PIXEL01_12 |
||
12013 | #undef PIXEL01_14 |
||
12014 | #undef PIXEL01_21 |
||
12015 | #undef PIXEL01_31 |
||
12016 | #undef PIXEL01_50 |
||
12017 | #undef PIXEL01_60 |
||
12018 | #undef PIXEL01_61 |
||
12019 | #undef PIXEL01_82 |
||
12020 | #undef PIXEL01_83 |
||
12021 | #undef PIXEL02_0 |
||
12022 | #undef PIXEL02_10 |
||
12023 | #undef PIXEL02_11 |
||
12024 | #undef PIXEL02_13 |
||
12025 | #undef PIXEL02_21 |
||
12026 | #undef PIXEL02_32 |
||
12027 | #undef PIXEL02_50 |
||
12028 | #undef PIXEL02_60 |
||
12029 | #undef PIXEL02_61 |
||
12030 | #undef PIXEL02_81 |
||
12031 | #undef PIXEL02_83 |
||
12032 | #undef PIXEL03_0 |
||
12033 | #undef PIXEL03_11 |
||
12034 | #undef PIXEL03_12 |
||
12035 | #undef PIXEL03_20 |
||
12036 | #undef PIXEL03_50 |
||
12037 | #undef PIXEL03_80 |
||
12038 | #undef PIXEL03_81 |
||
12039 | #undef PIXEL03_82 |
||
12040 | #undef PIXEL10_0 |
||
12041 | #undef PIXEL10_10 |
||
12042 | #undef PIXEL10_11 |
||
12043 | #undef PIXEL10_13 |
||
12044 | #undef PIXEL10_21 |
||
12045 | #undef PIXEL10_32 |
||
12046 | #undef PIXEL10_50 |
||
12047 | #undef PIXEL10_60 |
||
12048 | #undef PIXEL10_61 |
||
12049 | #undef PIXEL10_81 |
||
12050 | #undef PIXEL10_83 |
||
12051 | #undef PIXEL11_0 |
||
12052 | #undef PIXEL11_30 |
||
12053 | #undef PIXEL11_31 |
||
12054 | #undef PIXEL11_32 |
||
12055 | #undef PIXEL11_70 |
||
12056 | #undef PIXEL12_0 |
||
12057 | #undef PIXEL12_30 |
||
12058 | #undef PIXEL12_31 |
||
12059 | #undef PIXEL12_32 |
||
12060 | #undef PIXEL12_70 |
||
12061 | #undef PIXEL13_0 |
||
12062 | #undef PIXEL13_10 |
||
12063 | #undef PIXEL13_12 |
||
12064 | #undef PIXEL13_14 |
||
12065 | #undef PIXEL13_21 |
||
12066 | #undef PIXEL13_31 |
||
12067 | #undef PIXEL13_50 |
||
12068 | #undef PIXEL13_60 |
||
12069 | #undef PIXEL13_61 |
||
12070 | #undef PIXEL13_82 |
||
12071 | #undef PIXEL13_83 |
||
12072 | #undef PIXEL20_0 |
||
12073 | #undef PIXEL20_10 |
||
12074 | #undef PIXEL20_12 |
||
12075 | #undef PIXEL20_14 |
||
12076 | #undef PIXEL20_21 |
||
12077 | #undef PIXEL20_31 |
||
12078 | #undef PIXEL20_50 |
||
12079 | #undef PIXEL20_60 |
||
12080 | #undef PIXEL20_61 |
||
12081 | #undef PIXEL20_82 |
||
12082 | #undef PIXEL20_83 |
||
12083 | #undef PIXEL21_0 |
||
12084 | #undef PIXEL21_30 |
||
12085 | #undef PIXEL21_31 |
||
12086 | #undef PIXEL21_32 |
||
12087 | #undef PIXEL21_70 |
||
12088 | #undef PIXEL22_0 |
||
12089 | #undef PIXEL22_30 |
||
12090 | #undef PIXEL22_31 |
||
12091 | #undef PIXEL22_32 |
||
12092 | #undef PIXEL22_70 |
||
12093 | #undef PIXEL23_0 |
||
12094 | #undef PIXEL23_10 |
||
12095 | #undef PIXEL23_11 |
||
12096 | #undef PIXEL23_13 |
||
12097 | #undef PIXEL23_21 |
||
12098 | #undef PIXEL23_32 |
||
12099 | #undef PIXEL23_50 |
||
12100 | #undef PIXEL23_60 |
||
12101 | #undef PIXEL23_61 |
||
12102 | #undef PIXEL23_81 |
||
12103 | #undef PIXEL23_83 |
||
12104 | #undef PIXEL30_0 |
||
12105 | #undef PIXEL30_11 |
||
12106 | #undef PIXEL30_12 |
||
12107 | #undef PIXEL30_20 |
||
12108 | #undef PIXEL30_50 |
||
12109 | #undef PIXEL30_80 |
||
12110 | #undef PIXEL30_81 |
||
12111 | #undef PIXEL30_82 |
||
12112 | #undef PIXEL31_0 |
||
12113 | #undef PIXEL31_10 |
||
12114 | #undef PIXEL31_11 |
||
12115 | #undef PIXEL31_13 |
||
12116 | #undef PIXEL31_21 |
||
12117 | #undef PIXEL31_32 |
||
12118 | #undef PIXEL31_50 |
||
12119 | #undef PIXEL31_60 |
||
12120 | #undef PIXEL31_61 |
||
12121 | #undef PIXEL31_81 |
||
12122 | #undef PIXEL31_83 |
||
12123 | #undef PIXEL32_0 |
||
12124 | #undef PIXEL32_10 |
||
12125 | #undef PIXEL32_12 |
||
12126 | #undef PIXEL32_14 |
||
12127 | #undef PIXEL32_21 |
||
12128 | #undef PIXEL32_31 |
||
12129 | #undef PIXEL32_50 |
||
12130 | #undef PIXEL32_60 |
||
12131 | #undef PIXEL32_61 |
||
12132 | #undef PIXEL32_82 |
||
12133 | #undef PIXEL32_83 |
||
12134 | #undef PIXEL33_0 |
||
12135 | #undef PIXEL33_11 |
||
12136 | #undef PIXEL33_12 |
||
12137 | #undef PIXEL33_20 |
||
12138 | #undef PIXEL33_50 |
||
12139 | #undef PIXEL33_80 |
||
12140 | #undef PIXEL33_81 |
||
12141 | #undef PIXEL33_82 |
||
12142 | #endif // WANT_HQ4X |
||
12143 | |||
12144 | |||
12145 | /////////////// |
||
12146 | // CATCH_ALL // |
||
12147 | /////////////// |
||
12148 | |||
12149 | HQX_API void HQX_CALLCONV hqx_32 (int level, uint32_t *src_pixels, uint32_t *dest_pixels, int src_width, int src_height) |
||
12150 | { |
||
12151 | #ifdef WANT_HQ2X |
||
12152 | if (level == 2) hq2x_32 (src_pixels, dest_pixels, src_width, src_height); else |
||
12153 | #endif // WANT_HQ2X |
||
12154 | #ifdef WANT_HQ3X |
||
12155 | if (level == 3) hq3x_32 (src_pixels, dest_pixels, src_width, src_height); else |
||
12156 | #endif // WANT_HQ3X |
||
12157 | #ifdef WANT_HQ4X |
||
12158 | if (level == 4) hq4x_32 (src_pixels, dest_pixels, src_width, src_height); |
||
12159 | #endif // WANT_HQ4X |
||
12160 | } |