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