]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - libs/jpeg6/jchuff.h
transfer from internal tree r5311 branches/1.4-gpl
[xonotic/netradiant.git] / libs / jpeg6 / jchuff.h
1 /*\r
2 \r
3  * jchuff.h\r
4 \r
5  *\r
6 \r
7  * Copyright (C) 1991-1995, Thomas G. Lane.\r
8 \r
9  * This file is part of the Independent JPEG Group's software.\r
10 \r
11  * For conditions of distribution and use, see the accompanying README file.\r
12 \r
13  *\r
14 \r
15  * This file contains declarations for Huffman entropy encoding routines\r
16 \r
17  * that are shared between the sequential encoder (jchuff.c) and the\r
18 \r
19  * progressive encoder (jcphuff.c).  No other modules need to see these.\r
20 \r
21  */\r
22 \r
23 \r
24 \r
25 /* Derived data constructed for each Huffman table */\r
26 \r
27 \r
28 \r
29 typedef struct {\r
30 \r
31   unsigned int ehufco[256];     /* code for each symbol */\r
32 \r
33   char ehufsi[256];             /* length of code for each symbol */\r
34 \r
35   /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */\r
36 \r
37 } c_derived_tbl;\r
38 \r
39 \r
40 \r
41 /* Short forms of external names for systems with brain-damaged linkers. */\r
42 \r
43 \r
44 \r
45 #ifdef NEED_SHORT_EXTERNAL_NAMES\r
46 \r
47 #define jpeg_make_c_derived_tbl jMkCDerived\r
48 \r
49 #define jpeg_gen_optimal_table  jGenOptTbl\r
50 \r
51 #endif /* NEED_SHORT_EXTERNAL_NAMES */\r
52 \r
53 \r
54 \r
55 /* Expand a Huffman table definition into the derived format */\r
56 \r
57 EXTERN void jpeg_make_c_derived_tbl JPP((j_compress_ptr cinfo,\r
58 \r
59                                 JHUFF_TBL * htbl, c_derived_tbl ** pdtbl));\r
60 \r
61 \r
62 \r
63 /* Generate an optimal table definition given the specified counts */\r
64 \r
65 EXTERN void jpeg_gen_optimal_table JPP((j_compress_ptr cinfo,\r
66 \r
67                                         JHUFF_TBL * htbl, long freq[]));\r
68 \r