63#define Fax3State(tif) ((Fax3BaseState*) (tif)->tif_data)
65typedef enum { G3_1D, G3_2D } Ttag;
70 const unsigned char*
bitmap;
81 unsigned char* refline;
87#define DecoderState(tif) ((Fax3CodecState*) Fax3State(tif))
88#define EncoderState(tif) ((Fax3CodecState*) Fax3State(tif))
90#define is2DEncoding(sp) (sp->b.groupoptions & GROUP3OPT_2DENCODING)
91#define isAligned(p,t) ((((size_t)(p)) & (sizeof (t)-1)) == 0)
101#define DECLARE_STATE(tif, sp, mod) \
102 static const char module[] = mod; \
103 Fax3CodecState* sp = DecoderState(tif); \
105 int lastx = sp->b.rowpixels; \
114 const unsigned char* bitmap = sp->bitmap; \
115 const TIFFFaxTabEnt* TabEnt
116#define DECLARE_STATE_2D(tif, sp, mod) \
117 DECLARE_STATE(tif, sp, mod); \
123#define CACHE_STATE(tif, sp) do { \
125 BitsAvail = sp->bit; \
126 EOLcnt = sp->EOLcnt; \
127 cp = (unsigned char*) tif->tif_rawcp; \
128 ep = cp + tif->tif_rawcc; \
133#define UNCACHE_STATE(tif, sp) do { \
134 sp->bit = BitsAvail; \
136 sp->EOLcnt = EOLcnt; \
137 tif->tif_rawcc -= (tmsize_t)((uint8*) cp - tif->tif_rawcp); \
138 tif->tif_rawcp = (uint8*) cp; \
147 Fax3CodecState*
sp = DecoderState(tif);
185#define unexpected(table, a0) Fax3Unexpected(module, tif, sp->line, a0)
191 "Uncompressed data (not supported) at line %u of %s %u (x %u)",
196#define extension(a0) Fax3Extension(module, tif, sp->line, a0)
202 a0 < lastx ?
"Premature EOL" :
"Line length mismatch",
207#define badlength(a0,lastx) Fax3BadLength(module, tif, sp->line, a0, lastx)
217#define prematureEOF(a0) Fax3PrematureEOF(module, tif, sp->line, a0)
227 DECLARE_STATE(tif,
sp,
"Fax3Decode1D");
229 if (occ %
sp->b.rowbytes)
234 CACHE_STATE(tif,
sp);
235 thisrun =
sp->curruns;
241 printf(
"\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
247 (*
sp->fill)(
buf, thisrun,
pa, lastx);
248 buf +=
sp->b.rowbytes;
249 occ -=
sp->b.rowbytes;
255 (*
sp->fill)(
buf, thisrun,
pa, lastx);
256 UNCACHE_STATE(tif,
sp);
259 UNCACHE_STATE(tif,
sp);
263#define SWAP(t,a,b) { t x; x = (a); (a) = (b); (b) = x; }
270 DECLARE_STATE_2D(tif,
sp,
"Fax3Decode2D");
273 if (occ %
sp->b.rowbytes)
278 CACHE_STATE(tif,
sp);
282 pa = thisrun =
sp->curruns;
284 printf(
"\nBitAcc=%08X, BitsAvail = %d EOLcnt = %d",
285 BitAcc, BitsAvail, EOLcnt);
292 printf(
" %s\n-------------------- %d\n",
293 is1D ?
"1D" :
"2D", tif->
tif_row);
302 (*
sp->fill)(
buf, thisrun,
pa, lastx);
305 buf +=
sp->b.rowbytes;
306 occ -=
sp->b.rowbytes;
312 (*
sp->fill)(
buf, thisrun,
pa, lastx);
313 UNCACHE_STATE(tif,
sp);
316 UNCACHE_STATE(tif,
sp);
327#if SIZEOF_UNSIGNED_LONG == 8
328# define FILL(n, cp) \
330 case 15:(cp)[14] = 0xff; \
331 case 14:(cp)[13] = 0xff; \
332 case 13:(cp)[12] = 0xff; \
333 case 12:(cp)[11] = 0xff; \
334 case 11:(cp)[10] = 0xff; \
335 case 10: (cp)[9] = 0xff; \
336 case 9: (cp)[8] = 0xff; \
337 case 8: (cp)[7] = 0xff; \
338 case 7: (cp)[6] = 0xff; \
339 case 6: (cp)[5] = 0xff; \
340 case 5: (cp)[4] = 0xff; \
341 case 4: (cp)[3] = 0xff; \
342 case 3: (cp)[2] = 0xff; \
343 case 2: (cp)[1] = 0xff; \
344 case 1: (cp)[0] = 0xff; (cp) += (n); \
347# define ZERO(n, cp) \
349 case 15:(cp)[14] = 0; \
350 case 14:(cp)[13] = 0; \
351 case 13:(cp)[12] = 0; \
352 case 12:(cp)[11] = 0; \
353 case 11:(cp)[10] = 0; \
354 case 10: (cp)[9] = 0; \
355 case 9: (cp)[8] = 0; \
356 case 8: (cp)[7] = 0; \
357 case 7: (cp)[6] = 0; \
358 case 6: (cp)[5] = 0; \
359 case 5: (cp)[4] = 0; \
360 case 4: (cp)[3] = 0; \
361 case 3: (cp)[2] = 0; \
362 case 2: (cp)[1] = 0; \
363 case 1: (cp)[0] = 0; (cp) += (n); \
367# define FILL(n, cp) \
369 case 7: (cp)[6] = 0xff; \
370 case 6: (cp)[5] = 0xff; \
371 case 5: (cp)[4] = 0xff; \
372 case 4: (cp)[3] = 0xff; \
373 case 3: (cp)[2] = 0xff; \
374 case 2: (cp)[1] = 0xff; \
375 case 1: (cp)[0] = 0xff; (cp) += (n); \
378# define ZERO(n, cp) \
380 case 7: (cp)[6] = 0; \
381 case 6: (cp)[5] = 0; \
382 case 5: (cp)[4] = 0; \
383 case 4: (cp)[3] = 0; \
384 case 3: (cp)[2] = 0; \
385 case 2: (cp)[1] = 0; \
386 case 1: (cp)[0] = 0; (cp) += (n); \
398 static const unsigned char _fillmasks[] =
399 { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
408 for (; runs < erun; runs += 2) {
410 if (
x+run > lastx || run > lastx )
411 run = runs[0] = (
uint32) (lastx -
x);
417 *
cp++ &= 0xff << (8-bx);
420 if( (
n = run >> 3) != 0 ) {
421 if ((
n/
sizeof (
long)) > 1) {
425 for (;
n && !isAligned(
cp,
long);
n--)
428 nw = (
int32)(
n /
sizeof (
long));
429 n -= nw *
sizeof (
long);
433 cp = (
unsigned char*) lp;
439 cp[0] &= 0xff >> run;
441 cp[0] &= ~(_fillmasks[run]>>bx);
445 if (
x+run > lastx || run > lastx )
446 run = runs[1] = lastx -
x;
455 if( (
n = run>>3) != 0 ) {
456 if ((
n/
sizeof (
long)) > 1) {
460 for (;
n && !isAligned(
cp,
long);
n--)
463 nw = (
int32)(
n /
sizeof (
long));
464 n -= nw *
sizeof (
long);
468 cp = (
unsigned char*) lp;
475 cp[0] = (
unsigned char)((
cp[0] | (0xff00 >> run))&0xff);
477 cp[0] |= _fillmasks[run]>>bx;
487Fax3FixupTags(
TIFF* tif)
501Fax3SetupState(
TIFF* tif)
503 static const char module[] =
"Fax3SetupState";
505 Fax3BaseState*
sp = Fax3State(tif);
507 Fax3CodecState* dsp = (Fax3CodecState*) Fax3State(tif);
513 "Bits/sample must be 1 for Group 3/4 encoding/decoding");
526 sp->rowbytes = rowbytes;
527 sp->rowpixels = rowpixels;
548 "Row pixels integer overflow (rowpixels %u)",
555 "for Group 3/4 run arrays");
556 if (dsp->runs ==
NULL)
559 dsp->curruns = dsp->runs;
561 dsp->refruns = dsp->runs + nruns;
565 && is2DEncoding(dsp)) {
572 Fax3CodecState* esp = EncoderState(tif);
580 esp->refline = (
unsigned char*)
_TIFFmalloc(rowbytes);
581 if (esp->refline ==
NULL) {
583 "No space for Group 3/4 reference line");
587 EncoderState(tif)->refline =
NULL;
596#define Fax3FlushBits(tif, sp) { \
597 if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \
598 (void) TIFFFlushData1(tif); \
599 *(tif)->tif_rawcp++ = (uint8) (sp)->data; \
600 (tif)->tif_rawcc++; \
601 (sp)->data = 0, (sp)->bit = 8; \
603#define _FlushBits(tif) { \
604 if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \
605 (void) TIFFFlushData1(tif); \
606 *(tif)->tif_rawcp++ = (uint8) data; \
607 (tif)->tif_rawcc++; \
610static const int _msbmask[9] =
611 { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
612#define _PutBits(tif, bits, length) { \
613 while (length > bit) { \
614 data |= bits >> (length - bit); \
618 assert( length < 9 ); \
619 data |= (bits & _msbmask[length]) << (bit - length); \
633 Fax3CodecState*
sp = EncoderState(tif);
634 unsigned int bit =
sp->bit;
646#define putcode(tif, te) Fax3PutBits(tif, (te)->code, (te)->length)
649#define DEBUG_COLOR(w) (tab == TIFFFaxWhiteCodes ? w "W" : w "B")
650#define DEBUG_PRINT(what,len) { \
652 printf("%08X/%-2d: %s%5d\t", data, bit, DEBUG_COLOR(what), len); \
653 for (t = length-1; t >= 0; t--) \
654 putchar(code & (1<<t) ? '1' : '0'); \
668 Fax3CodecState*
sp = EncoderState(tif);
669 unsigned int bit =
sp->bit;
673 while (
span >= 2624) {
678 DEBUG_PRINT(
"MakeUp", te->
runlen);
689 DEBUG_PRINT(
"MakeUp", te->
runlen);
697 DEBUG_PRINT(
" Term",
tab[
span].runlen);
714 Fax3CodecState*
sp = EncoderState(tif);
715 unsigned int bit =
sp->bit;
732 _PutBits(tif, 0, tparm);
737 if (is2DEncoding(
sp)) {
753 Fax3CodecState*
sp = EncoderState(tif);
767 if (is2DEncoding(
sp)) {
781 sp->maxk = (
res > 150 ? 4 : 2);
784 sp->k =
sp->maxk = 0;
789static const unsigned char zeroruns[256] = {
790 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
791 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
792 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
793 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
794 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
795 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
796 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
797 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
798 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
799 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
801 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
802 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
803 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
804 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
807static const unsigned char oneruns[256] = {
808 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
809 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
811 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
812 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
814 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
816 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
817 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
818 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
819 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
820 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
821 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
822 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
823 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8,
833#pragma inline(find0span,find1span)
851 if (
bits > 0 && (
n = (
bs & 7)) != 0) {
852 span = zeroruns[(*bp <<
n) & 0xff];
868 while (!isAligned(bp,
long)) {
870 return (
span + zeroruns[*bp]);
881 bp = (
unsigned char*) lp;
888 return (
span + zeroruns[*bp]);
913 if (
bits > 0 && (
n = (
bs & 7)) != 0) {
914 span = oneruns[(*bp <<
n) & 0xff];
930 while (!isAligned(bp,
long)) {
932 return (
span + oneruns[*bp]);
943 bp = (
unsigned char*) lp;
950 return (
span + oneruns[*bp]);
971#define finddiff(_cp, _bs, _be, _color) \
972 (_bs + (_color ? find1span(_cp,_bs,_be) : find0span(_cp,_bs,_be)))
977#define finddiff2(_cp, _bs, _be, _color) \
978 (_bs < _be ? finddiff(_cp,_bs,_be,_color) : _be)
988 Fax3CodecState*
sp = EncoderState(tif);
1006 Fax3FlushBits(tif,
sp);
1009 Fax3FlushBits(tif,
sp);
1033Fax3Encode2DRow(
TIFF* tif,
unsigned char* bp,
unsigned char* rp,
uint32 bits)
1035#define PIXEL(buf,ix) ((((buf)[(ix)>>3]) >> (7-((ix)&7))) & 1)
1037 uint32 a1 = (PIXEL(bp, 0) != 0 ? 0 : finddiff(bp, 0,
bits, 0));
1038 uint32 b1 = (PIXEL(rp, 0) != 0 ? 0 : finddiff(rp, 0,
bits, 0));
1049 if (!(-3 <=
d &&
d <= 3)) {
1051 putcode(tif, &horizcode);
1052 if (a0+
a1 == 0 || PIXEL(bp, a0) == 0) {
1061 putcode(tif, &vcodes[
d+3]);
1065 putcode(tif, &passcode);
1070 a1 = finddiff(bp, a0,
bits, PIXEL(bp,a0));
1071 b1 = finddiff(rp, a0,
bits, !PIXEL(bp,a0));
1072 b1 = finddiff(rp,
b1,
bits, PIXEL(bp,a0));
1084 static const char module[] =
"Fax3Encode";
1085 Fax3CodecState*
sp = EncoderState(tif);
1087 if (
cc %
sp->b.rowbytes)
1095 if (is2DEncoding(
sp)) {
1096 if (
sp->tag == G3_1D) {
1097 if (!Fax3Encode1DRow(tif, bp,
sp->b.rowpixels))
1101 if (!Fax3Encode2DRow(tif, bp,
sp->refline,
1112 if (!Fax3Encode1DRow(tif, bp,
sp->b.rowpixels))
1115 bp +=
sp->b.rowbytes;
1116 cc -=
sp->b.rowbytes;
1122Fax3PostEncode(
TIFF* tif)
1124 Fax3CodecState*
sp = EncoderState(tif);
1127 Fax3FlushBits(tif,
sp);
1135 Fax3CodecState*
sp = EncoderState(tif);
1137 unsigned int length = 12;
1140 if (is2DEncoding(
sp)) {
1144 for (
i = 0;
i < 6;
i++)
1146 Fax3FlushBits(tif,
sp);
1151Fax3Cleanup(
TIFF* tif)
1153 Fax3CodecState*
sp = DecoderState(tif);
1172#define FIELD_BADFAXLINES (FIELD_CODEC+0)
1173#define FIELD_CLEANFAXDATA (FIELD_CODEC+1)
1174#define FIELD_BADFAXRUN (FIELD_CODEC+2)
1176#define FIELD_OPTIONS (FIELD_CODEC+7)
1179 {
TIFFTAG_FAXMODE, 0, 0,
TIFF_ANY, 0,
TIFF_SETGET_INT,
TIFF_SETGET_UNDEFINED,
FIELD_PSEUDO,
FALSE,
FALSE,
"FaxMode",
NULL },
1180 {
TIFFTAG_FAXFILLFUNC, 0, 0,
TIFF_ANY, 0,
TIFF_SETGET_OTHER,
TIFF_SETGET_UNDEFINED,
FIELD_PSEUDO,
FALSE,
FALSE,
"FaxFillFunc",
NULL },
1181 {
TIFFTAG_BADFAXLINES, 1, 1,
TIFF_LONG, 0,
TIFF_SETGET_UINT32,
TIFF_SETGET_UINT32, FIELD_BADFAXLINES,
TRUE,
FALSE,
"BadFaxLines",
NULL },
1182 {
TIFFTAG_CLEANFAXDATA, 1, 1,
TIFF_SHORT, 0,
TIFF_SETGET_UINT16,
TIFF_SETGET_UINT16, FIELD_CLEANFAXDATA,
TRUE,
FALSE,
"CleanFaxData",
NULL },
1183 {
TIFFTAG_CONSECUTIVEBADFAXLINES, 1, 1,
TIFF_LONG, 0,
TIFF_SETGET_UINT32,
TIFF_SETGET_UINT32, FIELD_BADFAXRUN,
TRUE,
FALSE,
"ConsecutiveBadFaxLines",
NULL }};
1185 {
TIFFTAG_GROUP3OPTIONS, 1, 1,
TIFF_LONG, 0,
TIFF_SETGET_UINT32,
TIFF_SETGET_UINT32, FIELD_OPTIONS,
FALSE,
FALSE,
"Group3Options",
NULL },
1188 {
TIFFTAG_GROUP4OPTIONS, 1, 1,
TIFF_LONG, 0,
TIFF_SETGET_UINT32,
TIFF_SETGET_UINT32, FIELD_OPTIONS,
FALSE,
FALSE,
"Group4Options",
NULL },
1194 Fax3BaseState*
sp = Fax3State(tif);
1227 return (*
sp->vsetparent)(tif,
tag,
ap);
1242 Fax3BaseState*
sp = Fax3State(tif);
1267 return (*
sp->vgetparent)(tif,
tag,
ap);
1275 Fax3BaseState*
sp = Fax3State(tif);
1281 const char* sep =
" ";
1285 fprintf(
fd,
"%suncompressed data", sep);
1298 fprintf(
fd,
"%suncompressed data", sep);
1301 (
unsigned long)
sp->groupoptions,
1302 (
unsigned long)
sp->groupoptions);
1306 switch (
sp->cleanfaxdata) {
1318 sp->cleanfaxdata,
sp->cleanfaxdata);
1322 (
unsigned long)
sp->badfaxlines);
1324 fprintf(
fd,
" Consecutive Bad Fax Lines: %lu\n",
1325 (
unsigned long)
sp->badfaxrun);
1331InitCCITTFax3(
TIFF* tif)
1333 static const char module[] =
"InitCCITTFax3";
1341 "Merging common CCITT Fax codec-specific tags failed");
1353 "No space for state block");
1358 sp = Fax3State(tif);
1370 sp->groupoptions = 0;
1374 DecoderState(tif)->runs =
NULL;
1376 EncoderState(tif)->refline =
NULL;
1403 if (InitCCITTFax3(tif)) {
1410 "Merging CCITT Fax 3 codec-specific tags failed");
1427#define SWAP(t,a,b) { t x; x = (a); (a) = (b); (b) = x; }
1434 DECLARE_STATE_2D(tif,
sp,
"Fax4Decode");
1436 if (occ %
sp->b.rowbytes)
1441 CACHE_STATE(tif,
sp);
1445 pa = thisrun =
sp->curruns;
1449 printf(
"\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
1456 (*
sp->fill)(
buf, thisrun,
pa, lastx);
1459 buf +=
sp->b.rowbytes;
1460 occ -=
sp->b.rowbytes;
1471 (*
sp->fill)(
buf, thisrun,
pa, lastx);
1472 UNCACHE_STATE(tif,
sp);
1473 return (
sp->line ? 1 : -1);
1475 UNCACHE_STATE(tif,
sp);
1486 static const char module[] =
"Fax4Encode";
1487 Fax3CodecState *
sp = EncoderState(tif);
1489 if (
cc %
sp->b.rowbytes)
1495 if (!Fax3Encode2DRow(tif, bp,
sp->refline,
sp->b.rowpixels))
1498 bp +=
sp->b.rowbytes;
1499 cc -=
sp->b.rowbytes;
1505Fax4PostEncode(
TIFF* tif)
1507 Fax3CodecState *
sp = EncoderState(tif);
1510 Fax3PutBits(tif,
EOL, 12);
1511 Fax3PutBits(tif,
EOL, 12);
1513 Fax3FlushBits(tif,
sp);
1521 if (InitCCITTFax3(tif)) {
1528 "Merging CCITT Fax 4 codec-specific tags failed");
1558 DECLARE_STATE(tif,
sp,
"Fax3DecodeRLE");
1561 if (occ %
sp->b.rowbytes)
1566 CACHE_STATE(tif,
sp);
1567 thisrun =
sp->curruns;
1573 printf(
"\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
1578 (*
sp->fill)(
buf, thisrun,
pa, lastx);
1583 int n = BitsAvail - (BitsAvail &~ 7);
1586 int n = BitsAvail - (BitsAvail &~ 15);
1588 if (BitsAvail == 0 && !isAligned(
cp,
uint16))
1591 buf +=
sp->b.rowbytes;
1592 occ -=
sp->b.rowbytes;
1596 (*
sp->fill)(
buf, thisrun,
pa, lastx);
1597 UNCACHE_STATE(tif,
sp);
1600 UNCACHE_STATE(tif,
sp);
1608 if (InitCCITTFax3(tif)) {
1625 if (InitCCITTFax3(tif)) {
_STLP_MOVE_TO_STD_NAMESPACE void fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
int align(int length, int align)
GLint GLint GLint GLint GLint x
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLvoid GLvoid GLvoid * span
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP int __cdecl fputs(_In_z_ const char *_Str, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static struct msdos_boot_sector bs
static const struct update_accum a1
static const struct update_accum a2
static CRYPT_DATA_BLOB b2[]
static CRYPT_DATA_BLOB b1[]
TIFFCodeMethod tif_encodestrip
TIFFCodeMethod tif_encodetile
TIFFTagMethods tif_tagmethods
TIFFPreMethod tif_preencode
TIFFBoolMethod tif_fixuptags
TIFFPreMethod tif_predecode
TIFFCodeMethod tif_decodestrip
TIFFCodeMethod tif_decoderow
TIFFBoolMethod tif_setupencode
TIFFBoolMethod tif_postencode
TIFFCodeMethod tif_encoderow
TIFFVoidMethod tif_cleanup
TIFFBoolMethod tif_setupdecode
TIFFCodeMethod tif_decodetile
const tableentry TIFFFaxWhiteCodes[]
const tableentry TIFFFaxBlackCodes[]
void * _TIFFCheckMalloc(TIFF *tif, tmsize_t nmemb, tmsize_t elem_size, const char *what)
#define TIFFInitCCITTRLEW
#define TIFFInitCCITTFax4
#define TIFFInitCCITTFax3
void _TIFFSetDefaultCompressionState(TIFF *tif)
int TIFFSetField(TIFF *tif, uint32 tag,...)
#define TIFFFieldSet(tif, field)
#define TIFFSetFieldBit(tif, field)
const TIFFField * TIFFFieldWithTag(TIFF *tif, uint32 tag)
int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32 n)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
void _TIFFFax3fillruns(unsigned char *, uint32 *, uint32 *, uint32)
void(* TIFFFaxFillFunc)(unsigned char *, uint32 *, uint32 *, uint32)
#define NeedBits16(n, eoflab)
#define NeedBits8(n, eoflab)
tmsize_t TIFFScanlineSize(TIFF *tif)
const unsigned char * TIFFGetBitRevTable(int reversed)
tmsize_t TIFFTileRowSize(TIFF *tif)
void _TIFFmemset(void *p, int v, tmsize_t c)
void * _TIFFmalloc(tmsize_t s)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
void TIFFWarningExt(thandle_t fd, const char *module, const char *fmt,...)
#define COMPRESSION_CCITTFAX3
#define RESUNIT_CENTIMETER
#define GROUP3OPT_2DENCODING
#define TIFFTAG_GROUP3OPTIONS
#define TIFFTAG_FAXFILLFUNC
#define TIFFTAG_GROUP4OPTIONS
#define CLEANFAXDATA_REGENERATED
#define TIFFTAG_CONSECUTIVEBADFAXLINES
#define FAXMODE_BYTEALIGN
#define GROUP3OPT_UNCOMPRESSED
#define FILLORDER_LSB2MSB
#define CLEANFAXDATA_CLEAN
#define CLEANFAXDATA_UNCLEAN
#define GROUP3OPT_FILLBITS
#define TIFFTAG_CLEANFAXDATA
#define TIFFTAG_BADFAXLINES
#define COMPRESSION_CCITTFAX4
#define GROUP4OPT_UNCOMPRESSED
#define FAXMODE_WORDALIGN
void(* TIFFPrintMethod)(TIFF *, FILE *, long)
int(* TIFFVGetMethod)(TIFF *, uint32, va_list)
int(* TIFFVSetMethod)(TIFF *, uint32, va_list)
#define TIFFSafeMultiply(t, v, m)
#define TIFFroundup_32(x, y)
#define TIFFArrayCount(a)
static struct wctab tab[]
void int int ULONGLONG int va_list * ap
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList