67 #define Fax3State(tif) ((Fax3BaseState*) (tif)->tif_data) 74 const unsigned char* bitmap;
85 unsigned char* refline;
89 #define DecoderState(tif) ((Fax3CodecState*) Fax3State(tif)) 90 #define EncoderState(tif) ((Fax3CodecState*) Fax3State(tif)) 92 #define is2DEncoding(sp) \ 93 (sp->b.groupoptions & GROUP3OPT_2DENCODING) 94 #define isAligned(p,t) ((((unsigned long)(p)) & (sizeof (t)-1)) == 0) 104 #define DECLARE_STATE(tif, sp, mod) \ 105 static const char module[] = mod; \ 106 Fax3CodecState* sp = DecoderState(tif); \ 108 int lastx = sp->b.rowpixels; \ 117 const unsigned char* bitmap = sp->bitmap; \ 118 const TIFFFaxTabEnt* TabEnt 119 #define DECLARE_STATE_2D(tif, sp, mod) \ 120 DECLARE_STATE(tif, sp, mod); \ 126 #define CACHE_STATE(tif, sp) do { \ 128 BitsAvail = sp->bit; \ 129 EOLcnt = sp->EOLcnt; \ 130 cp = (unsigned char*) tif->tif_rawcp; \ 131 ep = cp + tif->tif_rawcc; \ 136 #define UNCACHE_STATE(tif, sp) do { \ 137 sp->bit = BitsAvail; \ 139 sp->EOLcnt = EOLcnt; \ 140 tif->tif_rawcc -= (tidata_t) cp - tif->tif_rawcp; \ 141 tif->tif_rawcp = (tidata_t) cp; \ 167 sp->refruns[0] = (
uint32) sp->b.rowpixels;
187 #define unexpected(table, a0) Fax3Unexpected(module, tif, line, a0) 193 "%s: Uncompressed data (not supported) at line %lu of %s %lu (x %lu)",
198 #define extension(a0) Fax3Extension(module, tif, line, a0) 205 a0 < lastx ?
"Premature EOL" :
"Line length mismatch",
206 (
unsigned long) line,
isTiled(tif) ?
"tile" :
"strip",
208 (
unsigned long) a0, lastx);
210 #define badlength(a0,lastx) Fax3BadLength(module, tif, line, a0, lastx) 217 (
unsigned long) line,
isTiled(tif) ?
"tile" :
"strip",
221 #define prematureEOF(a0) Fax3PrematureEOF(module, tif, line, a0) 236 thisrun = sp->curruns;
237 while ((
long)occ > 0) {
242 printf(
"\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
243 printf(
"-------------------- %d\n", tif->
tif_row);
248 (*sp->fill)(buf, thisrun, pa, lastx);
249 buf += sp->b.rowbytes;
250 occ -= sp->b.rowbytes;
256 (*sp->fill)(buf, thisrun, pa, lastx);
264 #define SWAP(t,a,b) { t x; x = (a); (a) = (b); (b) = x; } 277 while ((
long)occ > 0) {
280 pa = thisrun = sp->curruns;
282 printf(
"\nBitAcc=%08X, BitsAvail = %d EOLcnt = %d",
283 BitAcc, BitsAvail, EOLcnt);
290 printf(
" %s\n-------------------- %d\n",
291 is1D ?
"1D" :
"2D", tif->
tif_row);
300 (*sp->fill)(
buf, thisrun, pa, lastx);
303 buf += sp->b.rowbytes;
304 occ -= sp->b.rowbytes;
310 (*sp->fill)(
buf, thisrun, pa, lastx);
326 # define FILL(n, cp) \ 328 case 15:(cp)[14] = 0xff; case 14:(cp)[13] = 0xff; case 13: (cp)[12] = 0xff;\ 329 case 12:(cp)[11] = 0xff; case 11:(cp)[10] = 0xff; case 10: (cp)[9] = 0xff;\ 330 case 9: (cp)[8] = 0xff; case 8: (cp)[7] = 0xff; case 7: (cp)[6] = 0xff;\ 331 case 6: (cp)[5] = 0xff; case 5: (cp)[4] = 0xff; case 4: (cp)[3] = 0xff;\ 332 case 3: (cp)[2] = 0xff; case 2: (cp)[1] = 0xff; \ 333 case 1: (cp)[0] = 0xff; (cp) += (n); case 0: ; \ 335 # define ZERO(n, cp) \ 337 case 15:(cp)[14] = 0; case 14:(cp)[13] = 0; case 13: (cp)[12] = 0; \ 338 case 12:(cp)[11] = 0; case 11:(cp)[10] = 0; case 10: (cp)[9] = 0; \ 339 case 9: (cp)[8] = 0; case 8: (cp)[7] = 0; case 7: (cp)[6] = 0; \ 340 case 6: (cp)[5] = 0; case 5: (cp)[4] = 0; case 4: (cp)[3] = 0; \ 341 case 3: (cp)[2] = 0; case 2: (cp)[1] = 0; \ 342 case 1: (cp)[0] = 0; (cp) += (n); case 0: ; \ 345 # define FILL(n, cp) \ 347 case 7: (cp)[6] = 0xff; case 6: (cp)[5] = 0xff; case 5: (cp)[4] = 0xff; \ 348 case 4: (cp)[3] = 0xff; case 3: (cp)[2] = 0xff; case 2: (cp)[1] = 0xff; \ 349 case 1: (cp)[0] = 0xff; (cp) += (n); case 0: ; \ 351 # define ZERO(n, cp) \ 353 case 7: (cp)[6] = 0; case 6: (cp)[5] = 0; case 5: (cp)[4] = 0; \ 354 case 4: (cp)[3] = 0; case 3: (cp)[2] = 0; case 2: (cp)[1] = 0; \ 355 case 1: (cp)[0] = 0; (cp) += (n); case 0: ; \ 366 static const unsigned char _fillmasks[] =
367 { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
376 for (; runs < erun; runs += 2) {
378 if (x+run > lastx || run > lastx )
379 run = runs[0] = (
uint32) (lastx - x);
385 *cp++ &= 0xff << (8-bx);
388 if( (n = run >> 3) != 0 ) {
389 if ((n/
sizeof (
long)) > 1) {
396 nw = (int32)(n /
sizeof (
long));
397 n -= nw *
sizeof (
long);
401 cp = (
unsigned char*) lp;
407 cp[0] &= 0xff >> run;
409 cp[0] &= ~(_fillmasks[run]>>bx);
413 if (x+run > lastx || run > lastx )
414 run = runs[1] = lastx -
x;
423 if( (n = run>>3) != 0 ) {
424 if ((n/
sizeof (
long)) > 1) {
431 nw = (int32)(n /
sizeof (
long));
432 n -= nw *
sizeof (
long);
436 cp = (
unsigned char*) lp;
442 cp[0] |= 0xff00 >> run;
444 cp[0] |= _fillmasks[run]>>bx;
461 Fax3SetupState(
TIFF* tif)
466 Fax3CodecState* dsp = (Fax3CodecState*)
Fax3State(tif);
467 uint32 rowbytes, rowpixels, nruns;
471 "Bits/sample must be 1 for Group 3/4 encoding/decoding");
484 sp->rowbytes = (
uint32) rowbytes;
485 sp->rowpixels = (
uint32) rowpixels;
494 nruns = needsRefLine ? 2*
TIFFroundup(rowpixels,32) : rowpixels;
497 "for Group 3/4 run arrays");
498 if (dsp->runs ==
NULL)
500 dsp->curruns = dsp->runs;
502 dsp->refruns = dsp->runs + (nruns>>1);
521 esp->refline = (
unsigned char*)
_TIFFmalloc(rowbytes);
522 if (esp->refline ==
NULL) {
524 "%s: No space for Group 3/4 reference line",
538 #define Fax3FlushBits(tif, sp) { \ 539 if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \ 540 (void) TIFFFlushData1(tif); \ 541 *(tif)->tif_rawcp++ = (tidataval_t) (sp)->data; \ 542 (tif)->tif_rawcc++; \ 543 (sp)->data = 0, (sp)->bit = 8; \ 545 #define _FlushBits(tif) { \ 546 if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \ 547 (void) TIFFFlushData1(tif); \ 548 *(tif)->tif_rawcp++ = (tidataval_t) data; \ 549 (tif)->tif_rawcc++; \ 552 static const int _msbmask[9] =
553 { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
554 #define _PutBits(tif, bits, length) { \ 555 while (length > bit) { \ 556 data |= bits >> (length - bit); \ 560 data |= (bits & _msbmask[length]) << (bit - length); \ 575 unsigned int bit = sp->bit;
587 #define putcode(tif, te) Fax3PutBits(tif, (te)->code, (te)->length) 590 #define DEBUG_COLOR(w) (tab == TIFFFaxWhiteCodes ? w "W" : w "B") 591 #define DEBUG_PRINT(what,len) { \ 593 printf("%08X/%-2d: %s%5d\t", data, bit, DEBUG_COLOR(what), len); \ 594 for (t = length-1; t >= 0; t--) \ 595 putchar(code & (1<<t) ? '1' : '0'); \ 610 unsigned int bit = sp->bit;
614 while (span >= 2624) {
618 DEBUG_PRINT(
"MakeUp", te->
runlen);
625 assert(te->
runlen == 64*(span>>6));
628 DEBUG_PRINT(
"MakeUp", te->
runlen);
635 DEBUG_PRINT(
" Term", tab[span].runlen);
650 Fax3PutEOL(
TIFF* tif)
653 unsigned int bit = sp->bit;
664 if (align != sp->bit) {
666 align = sp->bit + (8 - align);
668 align = sp->bit - align;
674 code =
EOL, length = 12;
676 code = (code<<1) | (sp->tag ==
G3_1D), length++;
717 sp->maxk = (res > 150 ? 4 : 2);
720 sp->k = sp->maxk = 0;
724 static const unsigned char zeroruns[256] = {
725 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
726 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
727 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
728 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
729 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
730 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
731 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
732 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
733 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
742 static const unsigned char oneruns[256] = {
743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
745 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
747 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
749 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
751 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
752 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
753 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
754 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
755 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
756 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
757 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
758 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8,
766 static int32 find0span(
unsigned char*, int32, int32);
767 static int32 find1span(
unsigned char*, int32, int32);
768 #pragma inline(find0span,find1span) 777 find0span(
unsigned char* bp, int32 bs, int32 be)
779 int32
bits = be - bs;
786 if (bits > 0 && (n = (bs & 7))) {
787 span = zeroruns[(*bp <<
n) & 0xff];
798 if (bits >= (int32)(2 * 8 *
sizeof(
long))) {
805 return (span + zeroruns[*bp]);
806 span += 8, bits -= 8;
810 while ((bits >= (int32)(8 *
sizeof(
long))) && (0 == *lp)) {
811 span += 8*
sizeof (
long), bits -= 8*
sizeof (
long);
814 bp = (
unsigned char*) lp;
821 return (span + zeroruns[*bp]);
822 span += 8, bits -= 8;
830 span += (n > bits ?
bits :
n);
836 find1span(
unsigned char* bp, int32 bs, int32 be)
838 int32
bits = be - bs;
845 if (bits > 0 && (n = (bs & 7))) {
846 span = oneruns[(*bp <<
n) & 0xff];
857 if (bits >= (int32)(2 * 8 *
sizeof(
long))) {
864 return (span + oneruns[*bp]);
865 span += 8, bits -= 8;
869 while ((bits >= (int32)(8 *
sizeof(
long))) && (~0 == *lp)) {
870 span += 8*
sizeof (
long), bits -= 8*
sizeof (
long);
873 bp = (
unsigned char*) lp;
880 return (span + oneruns[*bp]);
881 span += 8, bits -= 8;
889 span += (n > bits ?
bits :
n);
900 #define finddiff(_cp, _bs, _be, _color) \ 901 (_bs + (_color ? find1span(_cp,_bs,_be) : find0span(_cp,_bs,_be))) 906 #define finddiff2(_cp, _bs, _be, _color) \ 907 (_bs < _be ? finddiff(_cp,_bs,_be,_color) : _be) 922 span = find0span(bp, bs, bits);
927 span = find1span(bp, bs, bits);
962 Fax3Encode2DRow(
TIFF* tif,
unsigned char* bp,
unsigned char* rp,
uint32 bits)
964 #define PIXEL(buf,ix) ((((buf)[(ix)>>3]) >> (7-((ix)&7))) & 1) 974 if (!(-3 <= d && d <= 3)) {
977 if (a0+a1 == 0 ||
PIXEL(bp, a0) == 0) {
1012 while ((
long)cc > 0) {
1016 if (sp->tag ==
G3_1D) {
1017 if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels))
1021 if (!Fax3Encode2DRow(tif, bp, sp->refline,
1032 if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels))
1035 bp += sp->b.rowbytes;
1036 cc -= sp->b.rowbytes;
1042 Fax3PostEncode(
TIFF* tif)
1052 Fax3Close(
TIFF* tif)
1057 unsigned int length = 12;
1061 code = (code<<1) | (sp->tag ==
G3_1D), length++;
1062 for (i = 0; i < 6; i++)
1063 Fax3PutBits(tif, code, length);
1069 Fax3Cleanup(
TIFF* tif)
1091 #define FIELD_BADFAXLINES (FIELD_CODEC+0) 1092 #define FIELD_CLEANFAXDATA (FIELD_CODEC+1) 1093 #define FIELD_BADFAXRUN (FIELD_CODEC+2) 1094 #define FIELD_RECVPARAMS (FIELD_CODEC+3) 1095 #define FIELD_SUBADDRESS (FIELD_CODEC+4) 1096 #define FIELD_RECVTIME (FIELD_CODEC+5) 1097 #define FIELD_FAXDCS (FIELD_CODEC+6) 1099 #define FIELD_OPTIONS (FIELD_CODEC+7) 1113 TRUE,
FALSE,
"ConsecutiveBadFaxLines" },
1115 TRUE,
FALSE,
"ConsecutiveBadFaxLines" },
1133 #define N(a) (sizeof (a) / sizeof (a[0])) 1136 Fax3VSetField(
TIFF* tif,
ttag_t tag, va_list ap)
1141 assert(sp->vsetparent != 0);
1145 sp->mode = va_arg(ap,
int);
1153 sp->groupoptions = va_arg(ap,
uint32);
1158 sp->groupoptions = va_arg(ap,
uint32);
1161 sp->badfaxlines = va_arg(ap,
uint32);
1164 sp->cleanfaxdata = (
uint16) va_arg(ap,
int);
1167 sp->badfaxrun = va_arg(ap,
uint32);
1170 sp->recvparams = va_arg(ap,
uint32);
1176 sp->recvtime = va_arg(ap,
uint32);
1182 return (*sp->vsetparent)(tif, tag, ap);
1190 Fax3VGetField(
TIFF* tif,
ttag_t tag, va_list ap)
1196 *va_arg(ap,
int*) = sp->mode;
1203 *va_arg(ap,
uint32*) = sp->groupoptions;
1206 *va_arg(ap,
uint32*) = sp->badfaxlines;
1209 *va_arg(ap,
uint16*) = sp->cleanfaxdata;
1212 *va_arg(ap,
uint32*) = sp->badfaxrun;
1215 *va_arg(ap,
uint32*) = sp->recvparams;
1218 *va_arg(ap,
char**) = sp->subaddress;
1221 *va_arg(ap,
uint32*) = sp->recvtime;
1224 *va_arg(ap,
char**) = sp->faxdcs;
1227 return (*sp->vgetparent)(tif, tag, ap);
1233 Fax3PrintDir(
TIFF* tif, FILE* fd,
long flags)
1239 const char* sep =
" ";
1241 fprintf(fd,
" Group 4 Options:");
1243 fprintf(fd,
"%suncompressed data", sep);
1246 fprintf(fd,
" Group 3 Options:");
1248 fprintf(fd,
"%s2-d encoding", sep), sep =
"+";
1250 fprintf(fd,
"%sEOL padding", sep), sep =
"+";
1252 fprintf(fd,
"%suncompressed data", sep);
1254 fprintf(fd,
" (%lu = 0x%lx)\n",
1255 (
unsigned long) sp->groupoptions,
1256 (
unsigned long) sp->groupoptions);
1259 fprintf(fd,
" Fax Data:");
1260 switch (sp->cleanfaxdata) {
1262 fprintf(fd,
" clean");
1265 fprintf(fd,
" receiver regenerated");
1268 fprintf(fd,
" uncorrected errors");
1271 fprintf(fd,
" (%u = 0x%x)\n",
1272 sp->cleanfaxdata, sp->cleanfaxdata);
1275 fprintf(fd,
" Bad Fax Lines: %lu\n",
1276 (
unsigned long) sp->badfaxlines);
1278 fprintf(fd,
" Consecutive Bad Fax Lines: %lu\n",
1279 (
unsigned long) sp->badfaxrun);
1281 fprintf(fd,
" Fax Receive Parameters: %08lx\n",
1282 (
unsigned long) sp->recvparams);
1284 fprintf(fd,
" Fax SubAddress: %s\n", sp->subaddress);
1286 fprintf(fd,
" Fax Receive Time: %lu secs\n",
1287 (
unsigned long) sp->recvtime);
1289 fprintf(fd,
" Fax DCS: %s\n", sp->faxdcs);
1293 InitCCITTFax3(
TIFF* tif)
1305 "%s: No space for state block", tif->
tif_name);
1322 sp->groupoptions = 0;
1324 sp->subaddress =
NULL;
1327 if (sp->rw_mode == O_RDONLY)
1357 if (InitCCITTFax3(tif)) {
1373 #define SWAP(t,a,b) { t x; x = (a); (a) = (b); (b) = x; } 1385 while ((
long)occ > 0) {
1388 pa = thisrun = sp->curruns;
1392 printf(
"\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
1393 printf(
"-------------------- %d\n", tif->
tif_row);
1399 (*sp->fill)(buf, thisrun, pa, lastx);
1402 buf += sp->b.rowbytes;
1403 occ -= sp->b.rowbytes;
1411 fputs(
"Bad RTC\n", stderr );
1414 (*sp->fill)(buf, thisrun, pa, lastx);
1432 while ((
long)cc > 0) {
1433 if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels))
1436 bp += sp->b.rowbytes;
1437 cc -= sp->b.rowbytes;
1443 Fax4PostEncode(
TIFF* tif)
1448 Fax3PutBits(tif,
EOL, 12);
1449 Fax3PutBits(tif,
EOL, 12);
1459 if (InitCCITTFax3(tif)) {
1489 int mode = sp->b.mode;
1494 thisrun = sp->curruns;
1495 while ((
long)occ > 0) {
1500 printf(
"\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
1501 printf(
"-------------------- %d\n", tif->
tif_row);
1505 (*sp->fill)(
buf, thisrun, pa, lastx);
1510 int n = BitsAvail - (BitsAvail &~ 7);
1513 int n = BitsAvail - (BitsAvail &~ 15);
1518 buf += sp->b.rowbytes;
1519 occ -= sp->b.rowbytes;
1523 (*sp->fill)(
buf, thisrun, pa, lastx);
1535 if (InitCCITTFax3(tif)) {
1552 if (InitCCITTFax3(tif)) {
GLenum GLuint GLenum GLsizei length
int TIFFInitCCITTFax3(TIFF *tif, int scheme)
TIFFCodeMethod tif_decoderow
TIFFTagMethods tif_tagmethods
void _TIFFsetString(char **cpp, char *cp)
tsize_t TIFFTileRowSize(TIFF *tif)
TIFFPreMethod tif_predecode
#define EncoderState(tif)
void TIFFWarningExt(thandle_t fd, const char *module, const char *fmt,...)
#define FIELD_CLEANFAXDATA
#define DecoderState(tif)
TIFFCodeMethod tif_encodestrip
const tableentry TIFFFaxWhiteCodes[]
#define COMPRESSION_CCITTFAX3
TIFFCodeMethod tif_encoderow
const tableentry TIFFFaxBlackCodes[]
#define FILLORDER_LSB2MSB
#define TIFFTAG_CONSECUTIVEBADFAXLINES
tsize_t TIFFScanlineSize(TIFF *tif)
#define FAXMODE_WORDALIGN
#define CACHE_STATE(tif, sp)
GLenum GLenum GLvoid GLvoid GLvoid * span
GLint GLint GLint GLint GLint x
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
#define NeedBits16(n, eoflab)
#define GROUP3OPT_2DENCODING
GLboolean GLboolean GLboolean b
#define CLEANFAXDATA_CLEAN
void _TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define TIFFSetFieldBit(tif, field)
#define UNCACHE_STATE(tif, sp)
#define GROUP3OPT_FILLBITS
#define _PutBits(tif, bits, length)
#define CLEANFAXDATA_REGENERATED
#define COMPRESSION_CCITTFAX4
void _TIFFFax3fillruns(unsigned char *buf, uint32 *runs, uint32 *erun, uint32 lastx)
TIFFCodeMethod tif_decodestrip
#define DECLARE_STATE_2D(tif, sp, mod)
TIFFCodeMethod tif_encodetile
#define finddiff(_cp, _bs, _be, _color)
TIFFPreMethod tif_preencode
#define Fax3FlushBits(tif, sp)
GLsizei GLsizei GLenum GLenum const GLvoid * data
#define TIFFTAG_FAXRECVTIME
TIFFBoolMethod tif_postencode
#define RESUNIT_CENTIMETER
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
void _TIFFMergeFieldInfo(TIFF *tif, const TIFFFieldInfo info[], int n)
#define TIFFTAG_GROUP3OPTIONS
#define NeedBits8(n, eoflab)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
#define DECLARE_STATE(tif, sp, mod)
#define TIFFFieldSet(tif, field)
#define TIFFroundup(x, y)
int TIFFInitCCITTRLEW(TIFF *tif, int scheme)
TIFFCodeMethod tif_decodetile
#define TIFFTAG_BADFAXLINES
TIFFVoidMethod tif_cleanup
void _TIFFmemset(tdata_t p, int v, tsize_t c)
void _TIFFSetDefaultCompressionState(TIFF *tif)
const unsigned char * TIFFGetBitRevTable(int reversed)
const TIFFFieldInfo * _TIFFFieldWithTag(TIFF *tif, ttag_t tag)
#define FIELD_BADFAXLINES
int(* TIFFVGetMethod)(TIFF *, ttag_t, va_list)
#define GROUP4OPT_UNCOMPRESSED
#define TIFFTAG_GROUP4OPTIONS
int TIFFInitCCITTFax4(TIFF *tif, int scheme)
int TIFFSetField(TIFF *tif, ttag_t tag,...)
void(* TIFFFaxFillFunc)(unsigned char *, uint32 *, uint32 *, uint32)
void * _TIFFmalloc(tsize_t s)
#define TIFFTAG_FAXFILLFUNC
int TIFFInitCCITTRLE(TIFF *tif, int scheme)
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
tdata_t _TIFFCheckMalloc(TIFF *tif, size_t nmemb, size_t elem_size, const char *what)
#define CLEANFAXDATA_UNCLEAN
#define TIFFTAG_FAXSUBADDRESS
void _TIFFfree(tdata_t p)
#define FAXMODE_BYTEALIGN
int(* TIFFVSetMethod)(TIFF *, ttag_t, va_list)
#define TIFFTAG_CLEANFAXDATA
TIFFBoolMethod tif_setupencode
#define finddiff2(_cp, _bs, _be, _color)
#define GROUP3OPT_UNCOMPRESSED
#define TIFFTAG_FAXRECVPARAMS
TIFFBoolMethod tif_setupdecode