/*1* Copyright (c) 1995-1997 Sam Leffler2* Copyright (c) 1995-1997 Silicon Graphics, Inc.3*4* Permission to use, copy, modify, distribute, and sell this software and5* its documentation for any purpose is hereby granted without fee, provided6* that (i) the above copyright notices and this permission notice appear in7* all copies of the software and related documentation, and (ii) the names of8* Sam Leffler and Silicon Graphics may not be used in any advertising or9* publicity relating to the software without the specific, prior written10* permission of Sam Leffler and Silicon Graphics.11*12* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,13* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY14* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.15*16* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR17* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,18* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,19* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF20* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE21* OF THIS SOFTWARE.22*/2324#ifndef _TIFFPREDICT_25#define _TIFFPREDICT_2627#include "tiffio.h"28#include "tiffiop.h"2930/*31* ``Library-private'' Support for the Predictor Tag32*/3334typedef int (*TIFFEncodeDecodeMethod)(TIFF *tif, uint8_t *buf, tmsize_t size);3536/*37* Codecs that want to support the Predictor tag must place38* this structure first in their private state block so that39* the predictor code can cast tif_data to find its state.40*/41typedef struct42{43int predictor; /* predictor tag value */44tmsize_t stride; /* sample stride over data */45tmsize_t rowsize; /* tile/strip row size */4647TIFFCodeMethod encoderow; /* parent codec encode/decode row */48TIFFCodeMethod encodestrip; /* parent codec encode/decode strip */49TIFFCodeMethod encodetile; /* parent codec encode/decode tile */50TIFFEncodeDecodeMethod encodepfunc; /* horizontal differencer */5152TIFFCodeMethod decoderow; /* parent codec encode/decode row */53TIFFCodeMethod decodestrip; /* parent codec encode/decode strip */54TIFFCodeMethod decodetile; /* parent codec encode/decode tile */55TIFFEncodeDecodeMethod decodepfunc; /* horizontal accumulator */5657TIFFVGetMethod vgetparent; /* super-class method */58TIFFVSetMethod vsetparent; /* super-class method */59TIFFPrintMethod printdir; /* super-class method */60TIFFBoolMethod setupdecode; /* super-class method */61TIFFBoolMethod setupencode; /* super-class method */62} TIFFPredictorState;6364#if defined(__cplusplus)65extern "C"66{67#endif68extern int TIFFPredictorInit(TIFF *);69extern int TIFFPredictorCleanup(TIFF *);70#if defined(__cplusplus)71}72#endif73#endif /* _TIFFPREDICT_ */747576