1 /* PDFlib GmbH cvsid:
2  * $Id: tif_predict.h,v 1.6 2005/12/19 18:36:55 rjs Exp $ */
3 
4 /*
5  * Copyright (c) 1995-1997 Sam Leffler
6  * Copyright (c) 1995-1997 Silicon Graphics, Inc.
7  *
8  * Permission to use, copy, modify, distribute, and sell this software and
9  * its documentation for any purpose is hereby granted without fee, provided
10  * that (i) the above copyright notices and this permission notice appear in
11  * all copies of the software and related documentation, and (ii) the names of
12  * Sam Leffler and Silicon Graphics may not be used in any advertising or
13  * publicity relating to the software without the specific, prior written
14  * permission of Sam Leffler and Silicon Graphics.
15  *
16  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
18  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
21  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
22  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
23  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
24  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
25  * OF THIS SOFTWARE.
26  */
27 
28 #ifndef _TIFFPREDICT_
29 #define	_TIFFPREDICT_
30 /*
31  * ``Library-private'' Support for the Predictor Tag
32  */
33 
34 /*
35  * Codecs that want to support the Predictor tag must place
36  * this structure first in their private state block so that
37  * the predictor code can cast tif_data to find its state.
38  */
39 typedef struct {
40 	int		predictor;	/* predictor tag value */
41 	int		stride;		/* sample stride over data */
42 	tsize_t		rowsize;	/* tile/strip row size */
43 
44 	TIFFPostMethod	pfunc;		/* horizontal differencer/accumulator */
45 	TIFFCodeMethod	coderow;	/* parent codec encode/decode row */
46 	TIFFCodeMethod	codestrip;	/* parent codec encode/decode strip */
47 	TIFFCodeMethod	codetile;	/* parent codec encode/decode tile */
48 	TIFFVGetMethod	vgetparent;	/* super-class method */
49 	TIFFVSetMethod	vsetparent;	/* super-class method */
50 	TIFFPrintMethod	printdir;	/* super-class method */
51 	TIFFBoolMethod	setupdecode;	/* super-class method */
52 	TIFFBoolMethod	setupencode;	/* super-class method */
53 } TIFFPredictorState;
54 
55 #if defined(__cplusplus)
56 extern "C" {
57 #endif
58 extern	int TIFFPredictorInit(TIFF*);
59 #if defined(__cplusplus)
60 }
61 #endif
62 #endif /* _TIFFPREDICT_ */
63 
64 /* vim: set ts=8 sts=8 sw=8 noet: */
65