Go to the source code of this file.
|
static BOOL | bitmap_decompress1 (uint8 *output, int width, int height, uint8 *input, int size) |
|
static BOOL | bitmap_decompress2 (uint8 *output, int width, int height, uint8 *input, int size) |
|
static BOOL | bitmap_decompress3 (uint8 *output, int width, int height, uint8 *input, int size) |
|
BOOL | bitmap_decompress (uint8 *output, int width, int height, uint8 *input, int size, int Bpp) |
|
◆ BITMAP_SPEED_OVER_SIZE
#define BITMAP_SPEED_OVER_SIZE |
◆ CVAL
◆ CVAL2
#define CVAL2 |
( |
|
p, |
|
|
|
v |
|
) |
| { v = (*(p++)); v |= (*(p++)) << 8; } |
◆ MASK_UPDATE
Value:{ \
mixmask <<= 1; \
if (mixmask == 0) \
{ \
mixmask = 1; \
} \
}
GLenum GLenum GLenum input
Definition at line 59 of file bitmap.c.
◆ REPEAT
Value:{ \
UNROLL8( statement;
count--;
x++; ); \
\
{ \
statement; \
} \
}
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLsizei width
Definition at line 46 of file bitmap.c.
◆ UNROLL8
◆ bitmap_decompress()
Definition at line 1089 of file bitmap.c.
1090{
1091#ifdef BITMAP_SPEED_OVER_SIZE
1093 switch (Bpp)
1094 {
1095 case 1:
1097 break;
1098 case 2:
1100 break;
1101 case 3:
1103 break;
1104 }
1105#else
1108#endif
1109 return rv;
1110}
static RD_BOOL bitmap_decompress1(uint8 *output, int width, int height, uint8 *input, int size)
static RD_BOOL bitmap_decompress3(uint8 *output, int width, int height, uint8 *input, int size)
static RD_BOOL bitmap_decompress2(uint8 *output, int width, int height, uint8 *input, int size)
GLint GLint GLsizei GLsizei height
◆ bitmap_decompress1()
Definition at line 73 of file bitmap.c.
74{
78 int lastopcode = -1, insertmix =
False, bicolour =
False;
80 uint8 colour1 = 0, colour2 = 0;
83 int fom_mask = 0;
84#if 0
87#else
91#endif
92
94 {
95 fom_mask = 0;
98
99 switch (opcode)
100 {
101 case 0xc:
102 case 0xd:
103 case 0xe:
104 opcode -= 6;
107 break;
108 case 0xf:
110 if (opcode < 9)
111 {
114 }
115 else
116 {
117 count = (opcode < 0xb) ? 8 : 1;
118 }
120 break;
121 default:
122 opcode >>= 1;
125 break;
126 }
127
129 {
130 isfillormix = ((opcode == 2) || (opcode == 7));
132 {
133 if (isfillormix)
135 else
137 }
138 else if (isfillormix)
139 {
141 }
142 }
143
144 switch (opcode)
145 {
146 case 0:
147 if ((lastopcode == opcode) && !((
x ==
width) && (prevline ==
NULL)))
149 break;
150 case 8:
152 case 3:
154 break;
155 case 6:
156 case 7:
158 opcode -= 5;
159 break;
160 case 9:
162 opcode = 0x02;
163 fom_mask = 3;
164 break;
165 case 0x0a:
167 opcode = 0x02;
168 fom_mask = 5;
169 break;
170 }
171 lastopcode = opcode;
172 mixmask = 0;
173
175 {
177 {
178#if 0
180#else
182#endif
185
186#if 0
188#else
190#endif
191
193
194#if 0
196#else
198#endif
199 }
200 switch (opcode)
201 {
202 case 0:
203 if (insertmix)
204 {
205 if (prevline ==
NULL)
207 else
212 }
213 if (prevline ==
NULL)
214 {
216 }
217 else
218 {
220 }
221 break;
222 case 1:
223 if (prevline ==
NULL)
224 {
226 }
227 else
228 {
230 }
231 break;
232 case 2:
233 if (prevline ==
NULL)
234 {
236 (
240 else
242 )
243 }
244 else
245 {
247 (
251 else
253 )
254 }
255 break;
256 case 3:
258 break;
259 case 4:
261 break;
262 case 8:
264 (
265 if (bicolour)
266 {
269 }
270 else
271 {
274 }
275 )
276 break;
277 case 0xd:
279 break;
280 case 0xe:
282 break;
283 default:
286 }
287 }
288 }
290}
#define REPEAT(statement)
void unimpl(char *format,...)
GLint GLint GLint GLint GLint GLint y
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL _In_ MIX mix
◆ bitmap_decompress2()
Definition at line 294 of file bitmap.c.
295{
299 int lastopcode = -1, insertmix =
False, bicolour =
False;
301 uint16 colour1 = 0, colour2 = 0;
304 int fom_mask = 0;
305#if 0
308#else
312#endif
313
315 {
316 fom_mask = 0;
319
320 switch (opcode)
321 {
322 case 0xc:
323 case 0xd:
324 case 0xe:
325 opcode -= 6;
328 break;
329 case 0xf:
331 if (opcode < 9)
332 {
335 }
336 else
337 {
338 count = (opcode < 0xb) ? 8 : 1;
339 }
341 break;
342 default:
343 opcode >>= 1;
346 break;
347 }
348
350 {
351 isfillormix = ((opcode == 2) || (opcode == 7));
353 {
354 if (isfillormix)
356 else
358 }
359 else if (isfillormix)
360 {
362 }
363 }
364
365 switch (opcode)
366 {
367 case 0:
368 if ((lastopcode == opcode) && !((
x ==
width) && (prevline ==
NULL)))
370 break;
371 case 8:
373 case 3:
375 break;
376 case 6:
377 case 7:
379 opcode -= 5;
380 break;
381 case 9:
383 opcode = 0x02;
384 fom_mask = 3;
385 break;
386 case 0x0a:
388 opcode = 0x02;
389 fom_mask = 5;
390 break;
391 }
392 lastopcode = opcode;
393 mixmask = 0;
394
396 {
398 {
399#if 0
401#else
403#endif
406
407#if 0
409#else
411#endif
412
414
415#if 0
417#else
419#endif
420 }
421 switch (opcode)
422 {
423 case 0:
424 if (insertmix)
425 {
426 if (prevline ==
NULL)
428 else
433 }
434 if (prevline ==
NULL)
435 {
437 }
438 else
439 {
441 }
442 break;
443 case 1:
444 if (prevline ==
NULL)
445 {
447 }
448 else
449 {
451 }
452 break;
453 case 2:
454 if (prevline ==
NULL)
455 {
457 (
461 else
463 )
464 }
465 else
466 {
468 (
472 else
474 )
475 }
476 break;
477 case 3:
479 break;
480 case 4:
482 break;
483 case 8:
485 (
486 if (bicolour)
487 {
490 }
491 else
492 {
496 }
497 )
498 break;
499 case 0xd:
501 break;
502 case 0xe:
504 break;
505 default:
508 }
509 }
510 }
512}
◆ bitmap_decompress3()
Definition at line 516 of file bitmap.c.
517{
521 int lastopcode = -1, insertmix =
False, bicolour =
False;
523 uint8 colour1[3] = {0, 0, 0}, colour2[3] = {0, 0, 0};
526 int fom_mask = 0;
527#if 0
530#else
534#endif
535
537 {
538 fom_mask = 0;
541
542 switch (opcode)
543 {
544 case 0xc:
545 case 0xd:
546 case 0xe:
547 opcode -= 6;
550 break;
551 case 0xf:
553 if (opcode < 9)
554 {
557 }
558 else
559 {
561 0xb) ? 8 : 1;
562 }
564 break;
565 default:
566 opcode >>= 1;
569 break;
570 }
571
573 {
574 isfillormix = ((opcode == 2) || (opcode == 7));
576 {
577 if (isfillormix)
579 else
581 }
582 else if (isfillormix)
583 {
585 }
586 }
587
588 switch (opcode)
589 {
590 case 0:
591 if ((lastopcode == opcode) && !((
x ==
width) && (prevline ==
NULL)))
593 break;
594 case 8:
598 case 3:
602 break;
603 case 6:
604 case 7:
608 opcode -= 5;
609 break;
610 case 9:
612 opcode = 0x02;
613 fom_mask = 3;
614 break;
615 case 0x0a:
617 opcode = 0x02;
618 fom_mask = 5;
619 break;
620 }
621 lastopcode = opcode;
622 mixmask = 0;
623
625 {
627 {
628#if 0
630#else
632#endif
635
636#if 0
638#else
640#endif
641
643
644#if 0
646#else
648#endif
649 }
650 switch (opcode)
651 {
652 case 0:
653 if (insertmix)
654 {
655 if (prevline ==
NULL)
656 {
660 }
661 else
662 {
664 prevline[
x * 3] ^
mix[0];
666 prevline[
x * 3 + 1] ^
mix[1];
668 prevline[
x * 3 + 2] ^
mix[2];
669 }
673 }
674 if (prevline ==
NULL)
675 {
677 (
681 )
682 }
683 else
684 {
686 (
687 line[
x * 3] = prevline[
x * 3];
688 line[
x * 3 + 1] = prevline[
x * 3 + 1];
689 line[
x * 3 + 2] = prevline[
x * 3 + 2];
690 )
691 }
692 break;
693 case 1:
694 if (prevline ==
NULL)
695 {
697 (
701 )
702 }
703 else
704 {
706 (
708 prevline[
x * 3] ^
mix[0];
710 prevline[
x * 3 + 1] ^
mix[1];
712 prevline[
x * 3 + 2] ^
mix[2];
713 )
714 }
715 break;
716 case 2:
717 if (prevline ==
NULL)
718 {
720 (
723 {
727 }
728 else
729 {
733 }
734 )
735 }
736 else
737 {
739 (
742 {
744 prevline[
x * 3] ^
mix [0];
746 prevline[
x * 3 + 1] ^
mix [1];
748 prevline[
x * 3 + 2] ^
mix [2];
749 }
750 else
751 {
758 }
759 )
760 }
761 break;
762 case 3:
764 (
765 line[
x * 3] = colour2 [0];
766 line[
x * 3 + 1] = colour2 [1];
767 line[
x * 3 + 2] = colour2 [2];
768 )
769 break;
770 case 4:
772 (
776 )
777 break;
778 case 8:
780 (
781 if (bicolour)
782 {
783 line[
x * 3] = colour2[0];
784 line[
x * 3 + 1] = colour2[1];
785 line[
x * 3 + 2] = colour2[2];
787 }
788 else
789 {
790 line[
x * 3] = colour1[0];
791 line[
x * 3 + 1] = colour1[1];
792 line[
x * 3 + 2] = colour1[2];
795 }
796 )
797 break;
798 case 0xd:
800 (
802 line[
x * 3 + 1] = 0xff;
803 line[
x * 3 + 2] = 0xff;
804 )
805 break;
806 case 0xe:
808 (
812 )
813 break;
814 default:
815 unimpl(
"bitmap opcode 0x%x\n", opcode);
817 }
818 }
819 }
821}