Tizen 2.1 base
[platform/upstream/hplip.git] / ip / xjpg_huf.h
1 /* libhpojip -- HP OfficeJet image-processing library. */
2
3 /* Copyright (C) 1995-2002 Hewlett-Packard Company
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * is provided AS IS, WITHOUT ANY WARRANTY; without even the implied
12  * warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, and
13  * NON-INFRINGEMENT.  See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18  * MA 02111-1307, USA.
19  *
20  * In addition, as a special exception, Hewlett-Packard Company
21  * gives permission to link the code of this program with any
22  * version of the OpenSSL library which is distributed under a
23  * license identical to that listed in the included LICENSE.OpenSSL
24  * file, and distribute linked combinations including the two.
25  * You must obey the GNU General Public License in all respects
26  * for all of the code used other than OpenSSL.  If you modify
27  * this file, you may extend this exception to your version of the
28  * file, but you are not obligated to do so.  If you do not wish to
29  * do so, delete this exception statement from your version.
30  */
31
32 /* Original author: Mark Overton and others.
33  *
34  * Ported to Linux by David Paschal.
35  */
36
37 /*____________________________________________________________________________
38  |            |                                                               |
39  | xjpg_huf.h | Huffman tables for JPEG encoder and decoder                   |
40  |____________|_______________________________________________________________|
41  |                                                                            |
42  | Mark Overton, April 1996                                                   |
43  |____________________________________________________________________________|
44 */
45
46 #include "hpip.h"
47
48 typedef struct {
49     WORD code;
50     BYTE size;
51 } enc_huff_elem_t;
52
53 typedef struct {
54     BYTE size;
55     BYTE value;
56 } dec_huff_elem_t;
57
58
59 /* Tables used by encoder */
60 extern const enc_huff_elem_t enc_DC_table[17];
61 extern const enc_huff_elem_t enc_AC_table[256];
62
63 /* Tables used by decoder */
64 extern const dec_huff_elem_t dec_DC_table[13];
65 extern const BYTE           dec_DC_table_index[512];
66 extern const dec_huff_elem_t dec_AC_main_table[37];
67 extern const BYTE           dec_AC_main_table_index[4096];
68 extern const BYTE           dec_AC_aux_table[128];
69
70 /* Tables from which Huffman tables are computed */
71 extern const BYTE LuminanceDCCounts[16];
72 extern const BYTE LuminanceDCValues[12];
73 extern const BYTE LuminanceACCounts[16];
74 extern const BYTE LuminanceACValues[162];
75
76 #if 0
77 extern const BYTE ChrominanceDCCounts[16];
78 extern const BYTE ChrominanceDCValues[12];
79 extern const BYTE ChrominanceACCounts[16];
80 extern const BYTE ChrominanceACValues[162];
81 #endif
82
83 /* End of File */