Blame libtiff/tif_predict.h

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