7 * Copyright (C) 1991-1995, Thomas G. Lane.
9 * This file is part of the Independent JPEG Group's software.
11 * For conditions of distribution and use, see the accompanying README file.
15 * This file contains declarations for Huffman entropy encoding routines
17 * that are shared between the sequential encoder (jchuff.c) and the
19 * progressive encoder (jcphuff.c). No other modules need to see these.
25 /* Derived data constructed for each Huffman table */
31 unsigned int ehufco[256]; /* code for each symbol */
33 char ehufsi[256]; /* length of code for each symbol */
35 /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
41 /* Short forms of external names for systems with brain-damaged linkers. */
45 #ifdef NEED_SHORT_EXTERNAL_NAMES
47 #define jpeg_make_c_derived_tbl jMkCDerived
49 #define jpeg_gen_optimal_table jGenOptTbl
51 #endif /* NEED_SHORT_EXTERNAL_NAMES */
55 /* Expand a Huffman table definition into the derived format */
57 EXTERN void jpeg_make_c_derived_tbl JPP((j_compress_ptr cinfo,
59 JHUFF_TBL * htbl, c_derived_tbl ** pdtbl));
63 /* Generate an optimal table definition given the specified counts */
65 EXTERN void jpeg_gen_optimal_table JPP((j_compress_ptr cinfo,
67 JHUFF_TBL * htbl, long freq[]));