GIFHASH.H

Go to the documentation of this file.
00001 /* --
00002 OpenFX version >= 1.0 - Modelling, Animation and Rendering Package
00003 -- */
00004 
00005 /* file GIFHASH.H   */
00006 
00007 
00008 #define HT_SIZE                 8192       /* 12bits = 4096 or twice as big! */
00009 #define HT_KEY_MASK             0x1FFF                        /* 13bits keys */
00010 #define HT_KEY_NUM_BITS         13                            /* 13bits keys */
00011 #define HT_MAX_KEY              8191    /* 13bits - 1, maximal code possible */
00012 #define HT_MAX_CODE             4095    /* Biggest code possible in 12 bits. */
00013 
00014 /* The 32 bits of the long are divided into two parts for the key & code:   */
00015 /* 1. The code is 12 bits as our compression algorithm is limited to 12bits */
00016 /* 2. The key is 12 bits Prefix code + 8 bit new char or 20 bits.           */
00017 #define HT_GET_KEY(l)   (l >> 12)
00018 #define HT_GET_CODE(l)  (l & 0x0FFF)
00019 #define HT_PUT_KEY(l)   (l << 12)
00020 #define HT_PUT_CODE(l)  (l & 0x0FFF)
00021 
00029 typedef struct GifHashTableType {
00030     unsigned long HTable[HT_SIZE];
00031 } GifHashTableType;
00032 
00033 #ifdef _SUNSTYLE
00034 GifHashTableType *_InitHashTable();
00035 void _ClearHashTable();
00036 void _InsertHashTable();
00037 long _ExistsHashTable();
00038 #else
00039 GifHashTableType *_InitHashTable(void);
00040 void _ClearHashTable(GifHashTableType *HashTable);
00041 void _InsertHashTable(GifHashTableType *HashTable, unsigned long Key, long Code);
00042 long _ExistsHashTable(GifHashTableType *HashTable, unsigned long Key);
00043 #endif

Generated on Sun Apr 27 14:20:13 2014 for OpenFX by  doxygen 1.5.6