1 
2 /*
3  * xavid.h
4  *
5  * Copyright (C) 1995-1998,1999 by Mark Podlipec.
6  * All rights reserved.
7  *
8  * This software may be freely used, copied and redistributed without
9  * fee for non-commerical purposes provided that this copyright
10  * notice is preserved intact on all copies.
11  *
12  * There is no warranty or other guarantee of fitness of this software.
13  * It is provided solely "as is". The author disclaims all
14  * responsibility and liability with respect to this software's usage
15  * or its effect upon hardware or computer systems.
16  *
17  */
18 
19 typedef int             xaLONG;
20 typedef unsigned int    xaULONG;
21 typedef short           xaSHORT;
22 typedef unsigned short  xaUSHORT;
23 typedef char            xaBYTE;
24 typedef unsigned char   xaUBYTE;
25 
26 typedef int             int32;
27 typedef unsigned int    uint32;
28 typedef short           in16;
29 typedef unsigned short  uint16;
30 typedef char            int8;
31 typedef unsigned char   uint8;
32 
33 #define xaFALSE  0
34 #define xaTRUE   1
35 #define xaNOFILE 2
36 #define xaERROR  3
37 
38 #define xaMIN(x,y)   ( ((x)>(y))?(y):(x) )
39 #define xaMAX(x,y)   ( ((x)>(y))?(x):(y) )
40 
41 
42 typedef struct
43 {
44   xaUSHORT red,green,blue,gray;
45 } ColorReg;
46 
47 typedef struct XA_ACTION_STRUCT
48 {
49  xaLONG type;           /* type of action */
50  xaLONG cmap_rev;          /* rev of cmap */
51  xaUBYTE *data;         /* data ptr */
52  struct XA_ACTION_STRUCT *next;
53  struct XA_CHDR_STRUCT *chdr;
54  ColorReg *h_cmap;      /* For IFF HAM images */
55  xaULONG *map;
56  struct XA_ACTION_STRUCT *next_same_chdr; /*ptr to next action with same cmap*/
57 } XA_ACTION;
58 
59 typedef struct XA_CHDR_STRUCT
60 {
61  xaLONG rev;
62  ColorReg *cmap;
63  xaULONG csize,coff;
64  xaULONG *map;
65  xaULONG msize,moff;
66  struct XA_CHDR_STRUCT *next;
67  XA_ACTION *acts;
68  struct XA_CHDR_STRUCT *new_chdr;
69 } XA_CHDR;
70 
71 #define DEBUG_LEVEL1   if (xa_debug >= 1)
72 #define DEBUG_LEVEL2   if (xa_debug >= 2)
73 #define DEBUG_LEVEL3   if (xa_debug >= 3)
74 #define DEBUG_LEVEL4   if (xa_debug >= 4)
75 #define DEBUG_LEVEL5   if (xa_debug >= 5)
76 
77 /* DELTA Return VALUES */
78 #define ACT_DLTA_NORM   0x00000000   /* nothing special */
79 #define ACT_DLTA_BODY   0x00000001   /* IFF BODY - used for dbl buffer */
80 #define ACT_DLTA_XOR    0x00000002   /* delta work in both directions */
81 #define ACT_DLTA_NOP    0x00000004   /* delta didn't change anything */
82 #define ACT_DLTA_MAPD   0x00000008   /* delta was able to map image */
83 #define ACT_DLTA_BAD    0x80000000   /* uninitialize value if needed */
84 #define ACT_DLTA_DROP   0x00000010   /* drop this one */
85 
86 #include <xa_color.h>
87 #include <xa_codecs.h>
88 #include <xa_dec2.h>
89 #include <xavid_mod.h>
90 
91 
92