roentgen b75cab
/* $Id: tif_predict.h,v 1.8 2010-03-10 18:56:49 bfriesen Exp $ */
roentgen b75cab
roentgen b75cab
/*
roentgen b75cab
 * Copyright (c) 1995-1997 Sam Leffler
roentgen b75cab
 * Copyright (c) 1995-1997 Silicon Graphics, Inc.
roentgen b75cab
 *
roentgen b75cab
 * Permission to use, copy, modify, distribute, and sell this software and
roentgen b75cab
 * its documentation for any purpose is hereby granted without fee, provided
roentgen b75cab
 * that (i) the above copyright notices and this permission notice appear in
roentgen b75cab
 * all copies of the software and related documentation, and (ii) the names of
roentgen b75cab
 * Sam Leffler and Silicon Graphics may not be used in any advertising or
roentgen b75cab
 * publicity relating to the software without the specific, prior written
roentgen b75cab
 * permission of Sam Leffler and Silicon Graphics.
roentgen b75cab
 *
roentgen b75cab
 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
roentgen b75cab
 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
roentgen b75cab
 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
roentgen b75cab
 *
roentgen b75cab
 * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
roentgen b75cab
 * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
roentgen b75cab
 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
roentgen b75cab
 * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
roentgen b75cab
 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
roentgen b75cab
 * OF THIS SOFTWARE.
roentgen b75cab
 */
roentgen b75cab
roentgen b75cab
#ifndef _TIFFPREDICT_
roentgen b75cab
#define	_TIFFPREDICT_
roentgen b75cab
/*
roentgen b75cab
 * ``Library-private'' Support for the Predictor Tag
roentgen b75cab
 */
roentgen b75cab
roentgen b75cab
/*
roentgen b75cab
 * Codecs that want to support the Predictor tag must place
roentgen b75cab
 * this structure first in their private state block so that
roentgen b75cab
 * the predictor code can cast tif_data to find its state.
roentgen b75cab
 */
roentgen b75cab
typedef struct {
roentgen b75cab
	int             predictor;	/* predictor tag value */
roentgen b75cab
	tmsize_t        stride;		/* sample stride over data */
roentgen b75cab
	tmsize_t        rowsize;	/* tile/strip row size */
roentgen b75cab
roentgen b75cab
	TIFFCodeMethod  encoderow;	/* parent codec encode/decode row */
roentgen b75cab
	TIFFCodeMethod  encodestrip;	/* parent codec encode/decode strip */
roentgen b75cab
	TIFFCodeMethod  encodetile;	/* parent codec encode/decode tile */ 
roentgen b75cab
	TIFFPostMethod  encodepfunc;	/* horizontal differencer */
roentgen b75cab
roentgen b75cab
	TIFFCodeMethod  decoderow;	/* parent codec encode/decode row */
roentgen b75cab
	TIFFCodeMethod  decodestrip;	/* parent codec encode/decode strip */
roentgen b75cab
	TIFFCodeMethod  decodetile;	/* parent codec encode/decode tile */ 
roentgen b75cab
	TIFFPostMethod  decodepfunc;	/* horizontal accumulator */
roentgen b75cab
roentgen b75cab
	TIFFVGetMethod  vgetparent;	/* super-class method */
roentgen b75cab
	TIFFVSetMethod  vsetparent;	/* super-class method */
roentgen b75cab
	TIFFPrintMethod printdir;	/* super-class method */
roentgen b75cab
	TIFFBoolMethod  setupdecode;	/* super-class method */
roentgen b75cab
	TIFFBoolMethod  setupencode;	/* super-class method */
roentgen b75cab
} TIFFPredictorState;
roentgen b75cab
roentgen b75cab
#if defined(__cplusplus)
roentgen b75cab
extern "C" {
roentgen b75cab
#endif
roentgen b75cab
extern int TIFFPredictorInit(TIFF*);
roentgen b75cab
extern int TIFFPredictorCleanup(TIFF*);
roentgen b75cab
#if defined(__cplusplus)
roentgen b75cab
}
roentgen b75cab
#endif
roentgen b75cab
#endif /* _TIFFPREDICT_ */
roentgen b75cab
roentgen b75cab
/* vim: set ts=8 sts=8 sw=8 noet: */
roentgen b75cab
/*
roentgen b75cab
 * Local Variables:
roentgen b75cab
 * mode: c
roentgen b75cab
 * c-basic-offset: 8
roentgen b75cab
 * fill-column: 78
roentgen b75cab
 * End:
roentgen b75cab
 */