Go to the source code of this file.
|
static RD_BOOL | bitmap_decompress1 (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) |
|
static RD_BOOL | bitmap_decompress3 (uint8 *output, int width, int height, uint8 *input, int size) |
|
static int | process_plane (uint8 *in, int width, int height, uint8 *out, int size) |
|
static RD_BOOL | bitmap_decompress4 (uint8 *output, int width, int height, uint8 *input, int size) |
|
RD_BOOL | bitmap_decompress (uint8 *output, int width, int height, uint8 *input, int size, int Bpp) |
|
◆ 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 55 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 42 of file bitmap.c.
◆ UNROLL8
◆ bitmap_decompress()
Definition at line 884 of file bitmap.c.
885{
887
888 switch (Bpp)
889 {
890 case 1:
892 break;
893 case 2:
895 break;
896 case 3:
898 break;
899 case 4:
901 break;
902 default:
904 break;
905 }
906 return rv;
907}
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_decompress4(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)
void unimpl(char *format,...)
GLint GLint GLsizei GLsizei height
Referenced by process_bitmap_updates(), process_bmpcache(), and process_bmpcache2().
◆ bitmap_decompress1()
Definition at line 67 of file bitmap.c.
68{
72 int lastopcode = -1, insertmix =
False, bicolour =
False;
74 uint8 colour1 = 0, colour2 = 0;
77 int fom_mask = 0;
78
80 {
81 fom_mask = 0;
84
85 switch (opcode)
86 {
87 case 0xc:
88 case 0xd:
89 case 0xe:
90 opcode -= 6;
93 break;
94 case 0xf:
96 if (opcode < 9)
97 {
100 }
101 else
102 {
103 count = (opcode < 0xb) ? 8 : 1;
104 }
106 break;
107 default:
108 opcode >>= 1;
111 break;
112 }
113
115 {
116 isfillormix = ((opcode == 2) || (opcode == 7));
118 {
119 if (isfillormix)
121 else
123 }
124 else if (isfillormix)
125 {
127 }
128 }
129
130 switch (opcode)
131 {
132 case 0:
133 if ((lastopcode == opcode) && !((
x ==
width) && (prevline ==
NULL)))
135 break;
136 case 8:
138 case 3:
140 break;
141 case 6:
142 case 7:
144 opcode -= 5;
145 break;
146 case 9:
148 opcode = 0x02;
149 fom_mask = 3;
150 break;
151 case 0x0a:
153 opcode = 0x02;
154 fom_mask = 5;
155 break;
156 }
157 lastopcode = opcode;
158 mixmask = 0;
159
161 {
163 {
170 }
171 switch (opcode)
172 {
173 case 0:
174 if (insertmix)
175 {
176 if (prevline ==
NULL)
178 else
183 }
184 if (prevline ==
NULL)
185 {
187 }
188 else
189 {
191 }
192 break;
193 case 1:
194 if (prevline ==
NULL)
195 {
197 }
198 else
199 {
201 }
202 break;
203 case 2:
204 if (prevline ==
NULL)
205 {
207 (
211 else
213 )
214 }
215 else
216 {
218 (
222 else
224 )
225 }
226 break;
227 case 3:
229 break;
230 case 4:
232 break;
233 case 8:
235 (
236 if (bicolour)
237 {
240 }
241 else
242 {
245 }
246 )
247 break;
248 case 0xd:
250 break;
251 case 0xe:
253 break;
254 default:
257 }
258 }
259 }
261}
#define REPEAT(statement)
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL _In_ MIX mix
Referenced by bitmap_decompress().
◆ bitmap_decompress2()
Definition at line 265 of file bitmap.c.
266{
270 int lastopcode = -1, insertmix =
False, bicolour =
False;
272 uint16 colour1 = 0, colour2 = 0;
275 int fom_mask = 0;
276
278 {
279 fom_mask = 0;
282
283 switch (opcode)
284 {
285 case 0xc:
286 case 0xd:
287 case 0xe:
288 opcode -= 6;
291 break;
292 case 0xf:
294 if (opcode < 9)
295 {
298 }
299 else
300 {
301 count = (opcode < 0xb) ? 8 : 1;
302 }
304 break;
305 default:
306 opcode >>= 1;
309 break;
310 }
311
313 {
314 isfillormix = ((opcode == 2) || (opcode == 7));
316 {
317 if (isfillormix)
319 else
321 }
322 else if (isfillormix)
323 {
325 }
326 }
327
328 switch (opcode)
329 {
330 case 0:
331 if ((lastopcode == opcode) && !((
x ==
width) && (prevline ==
NULL)))
333 break;
334 case 8:
336 case 3:
338 break;
339 case 6:
340 case 7:
342 opcode -= 5;
343 break;
344 case 9:
346 opcode = 0x02;
347 fom_mask = 3;
348 break;
349 case 0x0a:
351 opcode = 0x02;
352 fom_mask = 5;
353 break;
354 }
355 lastopcode = opcode;
356 mixmask = 0;
357
359 {
361 {
368 }
369 switch (opcode)
370 {
371 case 0:
372 if (insertmix)
373 {
374 if (prevline ==
NULL)
376 else
381 }
382 if (prevline ==
NULL)
383 {
385 }
386 else
387 {
389 }
390 break;
391 case 1:
392 if (prevline ==
NULL)
393 {
395 }
396 else
397 {
399 }
400 break;
401 case 2:
402 if (prevline ==
NULL)
403 {
405 (
409 else
411 )
412 }
413 else
414 {
416 (
420 else
422 )
423 }
424 break;
425 case 3:
427 break;
428 case 4:
430 break;
431 case 8:
433 (
434 if (bicolour)
435 {
438 }
439 else
440 {
444 }
445 )
446 break;
447 case 0xd:
449 break;
450 case 0xe:
452 break;
453 default:
456 }
457 }
458 }
460}
Referenced by bitmap_decompress().
◆ bitmap_decompress3()
Definition at line 464 of file bitmap.c.
465{
469 int lastopcode = -1, insertmix =
False, bicolour =
False;
471 uint8 colour1[3] = {0, 0, 0}, colour2[3] = {0, 0, 0};
474 int fom_mask = 0;
475
477 {
478 fom_mask = 0;
481
482 switch (opcode)
483 {
484 case 0xc:
485 case 0xd:
486 case 0xe:
487 opcode -= 6;
490 break;
491 case 0xf:
493 if (opcode < 9)
494 {
497 }
498 else
499 {
501 0xb) ? 8 : 1;
502 }
504 break;
505 default:
506 opcode >>= 1;
509 break;
510 }
511
513 {
514 isfillormix = ((opcode == 2) || (opcode == 7));
516 {
517 if (isfillormix)
519 else
521 }
522 else if (isfillormix)
523 {
525 }
526 }
527
528 switch (opcode)
529 {
530 case 0:
531 if ((lastopcode == opcode) && !((
x ==
width) && (prevline ==
NULL)))
533 break;
534 case 8:
538 case 3:
542 break;
543 case 6:
544 case 7:
548 opcode -= 5;
549 break;
550 case 9:
552 opcode = 0x02;
553 fom_mask = 3;
554 break;
555 case 0x0a:
557 opcode = 0x02;
558 fom_mask = 5;
559 break;
560 }
561 lastopcode = opcode;
562 mixmask = 0;
563
565 {
567 {
574 }
575 switch (opcode)
576 {
577 case 0:
578 if (insertmix)
579 {
580 if (prevline ==
NULL)
581 {
585 }
586 else
587 {
589 prevline[
x * 3] ^
mix[0];
591 prevline[
x * 3 + 1] ^
mix[1];
593 prevline[
x * 3 + 2] ^
mix[2];
594 }
598 }
599 if (prevline ==
NULL)
600 {
602 (
606 )
607 }
608 else
609 {
611 (
612 line[
x * 3] = prevline[
x * 3];
613 line[
x * 3 + 1] = prevline[
x * 3 + 1];
614 line[
x * 3 + 2] = prevline[
x * 3 + 2];
615 )
616 }
617 break;
618 case 1:
619 if (prevline ==
NULL)
620 {
622 (
626 )
627 }
628 else
629 {
631 (
633 prevline[
x * 3] ^
mix[0];
635 prevline[
x * 3 + 1] ^
mix[1];
637 prevline[
x * 3 + 2] ^
mix[2];
638 )
639 }
640 break;
641 case 2:
642 if (prevline ==
NULL)
643 {
645 (
648 {
652 }
653 else
654 {
658 }
659 )
660 }
661 else
662 {
664 (
667 {
669 prevline[
x * 3] ^
mix [0];
671 prevline[
x * 3 + 1] ^
mix [1];
673 prevline[
x * 3 + 2] ^
mix [2];
674 }
675 else
676 {
683 }
684 )
685 }
686 break;
687 case 3:
689 (
690 line[
x * 3] = colour2 [0];
691 line[
x * 3 + 1] = colour2 [1];
692 line[
x * 3 + 2] = colour2 [2];
693 )
694 break;
695 case 4:
697 (
701 )
702 break;
703 case 8:
705 (
706 if (bicolour)
707 {
708 line[
x * 3] = colour2[0];
709 line[
x * 3 + 1] = colour2[1];
710 line[
x * 3 + 2] = colour2[2];
712 }
713 else
714 {
715 line[
x * 3] = colour1[0];
716 line[
x * 3 + 1] = colour1[1];
717 line[
x * 3 + 2] = colour1[2];
720 }
721 )
722 break;
723 case 0xd:
725 (
727 line[
x * 3 + 1] = 0xff;
728 line[
x * 3 + 2] = 0xff;
729 )
730 break;
731 case 0xe:
733 (
737 )
738 break;
739 default:
740 unimpl(
"bitmap opcode 0x%x\n", opcode);
742 }
743 }
744 }
746}
Referenced by bitmap_decompress().
◆ bitmap_decompress4()
Definition at line 856 of file bitmap.c.
857{
859 int bytes_pro;
860 int total_pro;
861
864 {
866 }
867 total_pro = 1;
869 total_pro += bytes_pro;
872 total_pro += bytes_pro;
875 total_pro += bytes_pro;
878 total_pro += bytes_pro;
879 return size == total_pro;
880}
static int process_plane(uint8 *in, int width, int height, uint8 *out, int size)
Referenced by bitmap_decompress().
◆ process_plane()
Definition at line 750 of file bitmap.c.
751{
752 int indexw;
753 int indexh;
755 int collen;
756 int replen;
759 int revcode;
764
767 last_line = 0;
768 indexh = 0;
770 {
774 indexw = 0;
775 if (last_line == 0)
776 {
777 while (indexw <
width)
778 {
781 collen = (
code >> 4) & 0xf;
782 revcode = (replen << 4) | collen;
783 if ((revcode <= 47) && (revcode >= 16))
784 {
785 replen = revcode;
786 collen = 0;
787 }
788 while (collen > 0)
789 {
793 indexw++;
794 collen--;
795 }
796 while (replen > 0)
797 {
800 indexw++;
801 replen--;
802 }
803 }
804 }
805 else
806 {
807 while (indexw <
width)
808 {
811 collen = (
code >> 4) & 0xf;
812 revcode = (replen << 4) | collen;
813 if ((revcode <= 47) && (revcode >= 16))
814 {
815 replen = revcode;
816 collen = 0;
817 }
818 while (collen > 0)
819 {
822 {
826 }
827 else
828 {
831 }
832 x = last_line[indexw * 4] +
color;
835 indexw++;
836 collen--;
837 }
838 while (replen > 0)
839 {
840 x = last_line[indexw * 4] +
color;
843 indexw++;
844 replen--;
845 }
846 }
847 }
848 indexh++;
849 last_line = this_line;
850 }
851 return (
int) (
in - org_in);
852}
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Referenced by bitmap_decompress4().