Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / DtHelp / il / iljpgencode.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: iljpgencode.h /main/3 1995/10/23 15:55:58 rswiston $ */
24 /**---------------------------------------------------------------------
25 ***     
26 ***    (c)Copyright 1992 Hewlett-Packard Co.
27 ***    
28 ***                             RESTRICTED RIGHTS LEGEND
29 ***    Use, duplication, or disclosure by the U.S. Government is subject to
30 ***    restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
31 ***    Technical Data and Computer Software clause in DFARS 252.227-7013.
32 ***                             Hewlett-Packard Company
33 ***                             3000 Hanover Street
34 ***                             Palo Alto, CA 94304 U.S.A.
35 ***    Rights for non-DOD U.S. Government Departments and Agencies are as set
36 ***    forth in FAR 52.227-19(c)(1,2).
37 ***
38 ***-------------------------------------------------------------------*/
39
40
41
42 #ifndef ILJPGENCODE_H
43 #define ILJPGENCODE_H
44
45 #ifndef ILJPG_H
46 #include "iljpg.h"
47 #endif
48 #ifndef ILJPGENCODEDEFS_H
49 #include "iljpgencodedefs.h"
50 #endif
51
52     /*  Optionally returned by iljpgEncodeJIF(): offsets to tables
53         within the JIF encoded stream, as needed for writing JPEG to
54         TIFF.  QTables[i] points to the 64 bytes of Q values for table
55         "i"; DC/ACTables[] to the 16 bytes of code lengths.  All
56         offsets are from the beginning of the JIF image.
57     */
58 typedef struct {
59     long                QTables[4];
60     long                DCTables[4];
61     long                ACTables[4];
62     } iljpgJIFOffsetsRec, *iljpgJIFOffsetsPtr;
63
64
65     /*  Default Q, AC and DC tables. */
66 ILJPG_PUBLIC_EXTERN iljpgByte iljpgLuminanceQTable[];
67 ILJPG_PUBLIC_EXTERN iljpgByte iljpgChrominanceQTable[];
68 ILJPG_PUBLIC_EXTERN iljpgByte iljpgLuminanceDCTable[];
69 ILJPG_PUBLIC_EXTERN iljpgByte iljpgChrominanceDCTable[];
70 ILJPG_PUBLIC_EXTERN iljpgByte iljpgLuminanceACTable[];
71 ILJPG_PUBLIC_EXTERN iljpgByte iljpgChrominanceACTable[];
72
73
74     ILJPG_PUBLIC_EXTERN 
75 iljpgError iljpgEncodeJIF (
76     ILJPG_ENCODE_STREAM stream,
77     iljpgDataPtr        pData,
78     iljpgJIFOffsetsPtr  pOffsets
79     );
80
81     ILJPG_PUBLIC_EXTERN 
82 iljpgError iljpgEncodeInit (
83     iljpgDataPtr        pData,
84     iljpgPtr           *pPrivate                /* RETURNED */
85     );
86
87     ILJPG_PUBLIC_EXTERN 
88 iljpgError iljpgEncodeCleanup (
89     iljpgPtr            pPrivate
90     );
91
92     ILJPG_PUBLIC_EXTERN 
93 iljpgError iljpgEncodeExecute (
94     iljpgPtr            pPrivate,
95     ILJPG_ENCODE_STREAM stream,
96     long                nSrcLines,
97     iljpgPtr            pSrcPixels[],
98     long                nSrcBytesPerRow[]
99     );
100
101 #endif