1 /* -*-C-*-
2 ******************************************************************************
3 *
4 * File:         public.h
5 * Description:  A semi-private structure for the "public.c" routines,
6 *               separated just in case somebody wants to share it.
7 * Author:       Kirt Winter
8 * Created:      Fri Mar  1 11:21:06 1995
9 * Initial Source Release:     Thursday, March 7 1996
10 * Language:     C
11 * Package:      Hewlett-Packard JPEG Encoder/Decoder
12 *
13 * Copyright (c) 1999 Digital Imaging Group, Inc.
14 * For conditions of distribution and use, see copyright notice
15 * in Flashpix.h
16 *
17 ******************************************************************************
18 */
19 #ifndef JPEGEXPORT
20 #include "jpegconf.h"
21 #endif
22 
23 typedef struct {
24   unsigned char subsampling;  /* stored in FPX tile header format */
25     int     iHsamp[4];  /* same thing, but in the format the
26            encoder prefers */
27     int     iVsamp[4];
28     JPEG_STRUCT jpegStruct; /* used by the encoder to store tables */
29     unsigned char ssDisabled; /* if non-zero, internal subsampling is
30            disabled */
31     unsigned char YCrCbDisabled;  /* if non-zero, internal YCrCb is disabled */
32     int   xPixels;  /* x dimension of a tile in pixels */
33     int   yPixels;  /* y dimension of a tile in pixels */
34     int   bytes;    /* number of bytes per pixel */
35     int   qFactor;  /* the quality level of the encoding */
36     int   interleaveType; /* 0 =interleaved channels, 1 = non-interleaved */
37     TILE_DATA tile_data;
38     int   nu_huff;  /* # of Huffman Tables (8, four DC-AC sets) */
39     int   nu_qtables; /* # of Q-tables (a max of 4 tables) */
40     unsigned char  *scratch;  /* place to hold rotated/subsampled data */
41     unsigned char  *header; /* place to hold the JPEG header */
42     long  headerBytes;  /* how big is the header anyway? */
43     JPEGHuffTable  HuffTables[8]; /* Pointers to a maximum of four pairs of DC-AC
44                                       Huffman Tables */
45     JPEGQuantTable QuantTables[4]; /* Pointers to a maximum of 4 Quantization Tables */
46     unsigned char   CompDCHuffIdent[4];  /* CompHuffIdent[i] = k, associates channel i with
47                                           the DC Huffman whose Ident number is k */
48     unsigned char   CompACHuffIdent[4];  /* CompHuffIdent[i] = k, associates channel i with
49                                           the AC Huffman whose Ident number is k */
50     unsigned char   CompQuantIdent[4]; /* CompQuantIdent[i] = k, associates channel i with
51                                           the Quantization Table whose Ident number is k */
52 } ENCODER_STRUCT, *ENCODER;
53