7 ** $VER: encoder.h 2.2 (13.4.98)
8 ** gifanim.datatype 2.2
10 ** GIF Encoder header of gifanim.datatype
12 ** Written 1997/1998 by Roland 'Gizzy' Mainz
13 ** Original example source from David N. Junod
17 /* project includes */
18 #include "classbase.h"
24 /*****************************************************************************/
27 #define HSIZE (5003) /* 80% occupancy */
29 /*****************************************************************************/
31 /* a code_int must be able to hold 2**BITS values of type int, and also -1 */
33 typedef long int count_int
;
35 /*****************************************************************************/
37 /* encoder context data */
40 struct ClassBase
*classbase
;
43 struct adtFrame loadmsg
;
45 UBYTE
*srcchunkymap
[ 2 ],
47 struct RastPort rpa8tmprp
;
49 UWORD whichbm
; /* which source bm ? */
73 int n_bits
; /* number of bits/code */
74 code_int maxcode
; /* maximum code, given n_bits */
76 count_int htab
[ HSIZE
];
77 unsigned short codetab
[ HSIZE
];
79 code_int free_ent
/* = 0*/; /* first unused entry */
81 /* block compression parameters -- after all codes are used up, and compression rate changes, start over. */
82 BOOL clear_flg
/* = 0*/;
87 unsigned long cur_accum
/* = 0*/;
90 char accum
[ 256 ]; /* Define the storage for the packet accumulator */
91 int a_count
; /* Number of characters so far in this 'packet' */
94 #endif /* !ENCODER_H */