Bsoft  1.9
Bernard's software package
tif_fax3.h File Reference
#include "tiff.h"

Go to the source code of this file.

Classes

struct  TIFFFaxTabEnt
 

Macros

#define S_Null   0
 
#define S_Pass   1
 
#define S_Horiz   2
 
#define S_V0   3
 
#define S_VR   4
 
#define S_VL   5
 
#define S_Ext   6
 
#define S_TermW   7
 
#define S_TermB   8
 
#define S_MakeUpW   9
 
#define S_MakeUpB   10
 
#define S_MakeUp   11
 
#define S_EOL   12
 
#define EndOfData()   (cp >= ep)
 
#define NeedBits8(n, eoflab)
 
#define NeedBits16(n, eoflab)
 
#define GetBits(n)   (BitAcc & ((1<<(n))-1))
 
#define ClrBits(n)
 
#define LOOKUP8(wid, tab, eoflab)
 
#define LOOKUP16(wid, tab, eoflab)
 
#define SETVALUE(x)
 
#define SYNC_EOL(eoflab)
 
#define CLEANUP_RUNS()
 
#define EXPAND1D(eoflab)
 
#define CHECK_b1
 
#define EXPAND2D(eoflab)
 

Typedefs

typedef void(* TIFFFaxFillFunc) (unsigned char *, uint32 *, uint32 *, uint32)
 

Functions

void _TIFFFax3fillruns (unsigned char *, uint32 *, uint32 *, uint32)
 

Variables

const TIFFFaxTabEnt TIFFFaxMainTable []
 
const TIFFFaxTabEnt TIFFFaxWhiteTable []
 
const TIFFFaxTabEnt TIFFFaxBlackTable []
 

Macro Definition Documentation

#define CHECK_b1
Value:
do { \
if (pa != thisrun) while (b1 <= a0 && b1 < lastx) { \
b1 += pb[0] + pb[1]; \
pb += 2; \
} \
} while (0)

Definition at line 378 of file tif_fax3.h.

#define CLEANUP_RUNS ( )
Value:
do { \
if (RunLength) \
SETVALUE(0); \
if (a0 != lastx) { \
badlength(a0, lastx); \
while (a0 > lastx && pa > thisrun) \
a0 -= *--pa; \
if (a0 < lastx) { \
if (a0 < 0) \
a0 = 0; \
if ((pa-thisrun)&1) \
SETVALUE(0); \
SETVALUE(lastx - a0); \
} else if (a0 > lastx) { \
SETVALUE(lastx); \
SETVALUE(0); \
} \
} \
} while (0)
#define badlength(a0, lastx)
Definition: tif_fax3.c:214
#define SETVALUE(x)
Definition: tif_fax3.h:242

Definition at line 285 of file tif_fax3.h.

#define ClrBits (   n)
Value:
do { \
BitsAvail -= (n); \
BitAcc >>= (n); \
} while (0)

Definition at line 173 of file tif_fax3.h.

#define EndOfData ( )    (cp >= ep)

Definition at line 111 of file tif_fax3.h.

#define EXPAND1D (   eoflab)

Definition at line 317 of file tif_fax3.h.

#define EXPAND2D (   eoflab)

Definition at line 388 of file tif_fax3.h.

#define GetBits (   n)    (BitAcc & ((1<<(n))-1))

Definition at line 172 of file tif_fax3.h.

#define LOOKUP16 (   wid,
  tab,
  eoflab 
)
Value:
do { \
NeedBits16(wid,eoflab); \
TabEnt = tab + GetBits(wid); \
ClrBits(TabEnt->Width); \
} while (0)
#define GetBits(n)
Definition: tif_fax3.h:172
ostream & tab(ostream &out)
Definition: utilities.cpp:21

Definition at line 232 of file tif_fax3.h.

#define LOOKUP8 (   wid,
  tab,
  eoflab 
)
Value:
do { \
NeedBits8(wid,eoflab); \
TabEnt = tab + GetBits(wid); \
ClrBits(TabEnt->Width); \
} while (0)
#define GetBits(n)
Definition: tif_fax3.h:172
ostream & tab(ostream &out)
Definition: utilities.cpp:21

Definition at line 227 of file tif_fax3.h.

#define NeedBits16 (   n,
  eoflab 
)
Value:
do { \
if (BitsAvail < (n)) { \
if (EndOfData()) { \
if (BitsAvail == 0) /* no valid bits */ \
goto eoflab; \
BitsAvail = (n); /* pad with zeros */ \
} else { \
BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail; \
if ((BitsAvail += 8) < (n)) { \
if (EndOfData()) { \
/* NB: we know BitsAvail is non-zero here */ \
BitsAvail = (n); /* pad with zeros */ \
} else { \
BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail; \
BitsAvail += 8; \
} \
} \
} \
} \
} while (0)
#define EndOfData()
Definition: tif_fax3.h:111

Definition at line 151 of file tif_fax3.h.

#define NeedBits8 (   n,
  eoflab 
)
Value:
do { \
if (BitsAvail < (n)) { \
if (EndOfData()) { \
if (BitsAvail == 0) /* no valid bits */ \
goto eoflab; \
BitsAvail = (n); /* pad with zeros */ \
} else { \
BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail; \
BitsAvail += 8; \
} \
} \
} while (0)
#define EndOfData()
Definition: tif_fax3.h:111

Definition at line 137 of file tif_fax3.h.

#define S_EOL   12

Definition at line 82 of file tif_fax3.h.

#define S_Ext   6

Definition at line 76 of file tif_fax3.h.

#define S_Horiz   2

Definition at line 72 of file tif_fax3.h.

#define S_MakeUp   11

Definition at line 81 of file tif_fax3.h.

#define S_MakeUpB   10

Definition at line 80 of file tif_fax3.h.

#define S_MakeUpW   9

Definition at line 79 of file tif_fax3.h.

#define S_Null   0

Definition at line 70 of file tif_fax3.h.

#define S_Pass   1

Definition at line 71 of file tif_fax3.h.

#define S_TermB   8

Definition at line 78 of file tif_fax3.h.

#define S_TermW   7

Definition at line 77 of file tif_fax3.h.

#define S_V0   3

Definition at line 73 of file tif_fax3.h.

#define S_VL   5

Definition at line 75 of file tif_fax3.h.

#define S_VR   4

Definition at line 74 of file tif_fax3.h.

#define SETVALUE (   x)
Value:
do { \
*pa++ = RunLength + (x); \
a0 += (x); \
RunLength = 0; \
} while (0)

Definition at line 242 of file tif_fax3.h.

#define SYNC_EOL (   eoflab)
Value:
do { \
if (EOLcnt == 0) { \
for (;;) { \
NeedBits16(11,eoflab); \
if (GetBits(11) == 0) \
break; \
ClrBits(1); \
} \
} \
for (;;) { \
NeedBits8(8,eoflab); \
if (GetBits(8)) \
break; \
ClrBits(8); \
} \
while (GetBits(1) == 0) \
ClrBits(1); \
ClrBits(1); /* EOL bit */ \
EOLcnt = 0; /* reset EOL counter/flag */ \
} while (0)
#define GetBits(n)
Definition: tif_fax3.h:172
#define NeedBits8(n, eoflab)
Definition: tif_fax3.h:137
#define ClrBits(n)
Definition: tif_fax3.h:173

Definition at line 259 of file tif_fax3.h.

Typedef Documentation

typedef void(* TIFFFaxFillFunc) (unsigned char *, uint32 *, uint32 *, uint32)

Definition at line 55 of file tif_fax3.h.

Function Documentation

void _TIFFFax3fillruns ( unsigned char *  ,
uint32 *  ,
uint32 *  ,
uint32   
)

Definition at line 366 of file tif_fax3.c.

Variable Documentation

const TIFFFaxTabEnt TIFFFaxBlackTable[]

Definition at line 362 of file fax3sm_winnt.c.

const TIFFFaxTabEnt TIFFFaxMainTable[]

Definition at line 5 of file fax3sm_winnt.c.

const TIFFFaxTabEnt TIFFFaxWhiteTable[]

Definition at line 18 of file fax3sm_winnt.c.