LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
tif_predict.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1995-1997 Sam Leffler
3 * Copyright (c) 1995-1997 Silicon Graphics, Inc.
4 *
5 * Permission to use, copy, modify, distribute, and sell this software and
6 * its documentation for any purpose is hereby granted without fee, provided
7 * that (i) the above copyright notices and this permission notice appear in
8 * all copies of the software and related documentation, and (ii) the names of
9 * Sam Leffler and Silicon Graphics may not be used in any advertising or
10 * publicity relating to the software without the specific, prior written
11 * permission of Sam Leffler and Silicon Graphics.
12 *
13 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16 *
17 * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18 * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22 * OF THIS SOFTWARE.
23 */
24
30#ifndef _TIFFPREDICT_
31#define _TIFFPREDICT_
32
33#include "tiffio.h"
34#include "tiffiop.h"
35
36/*
37 * ``Library-private'' Support for the Predictor Tag
38 */
39
59typedef int (*TIFFEncodeDecodeMethod)(TIFF *tif, uint8_t *buf, tmsize_t size);
60
61/*
62 * Codecs that want to support the Predictor tag must place
63 * this structure first in their private state block so that
64 * the predictor code can cast tif_data to find its state.
65 */
122
123#if defined(__cplusplus)
124extern "C"
125{
126#endif
145 extern int TIFFPredictorInit(TIFF *tif);
160 extern int TIFFPredictorCleanup(TIFF *tif);
161#if defined(__cplusplus)
162}
163#endif
164#endif /* _TIFFPREDICT_ */
int(* TIFFCodeMethod)(TIFF *tif, uint8_t *buf, tmsize_t size, uint16_t sample)
Encode or decode a requested image-data extent.
Definition tiffiop.h:241
int(* TIFFBoolMethod)(TIFF *tif)
Run a codec setup or completion operation.
Definition tiffiop.h:202
int TIFFPredictorCleanup(TIFF *tif)
Restore saved Predictor tag print and setup hooks.
int(* TIFFEncodeDecodeMethod)(TIFF *tif, uint8_t *buf, tmsize_t size)
Transform one decoded row in place for a Predictor wrapper.
Definition tif_predict.h:59
int TIFFPredictorInit(TIFF *tif)
Install Predictor tag and setup hooks around a codec.
int(* TIFFVGetMethod)(TIFF *tif, uint32_t tag, va_list ap)
Implement a handle's variadic tag getter.
Definition tiffio.h:1540
void(* TIFFPrintMethod)(TIFF *tif, FILE *fd, long flags)
Append extension-specific directory information to a stream.
Definition tiffio.h:1561
int(* TIFFVSetMethod)(TIFF *tif, uint32_t tag, va_list ap)
Implement a handle's variadic tag setter.
Definition tiffio.h:1521
TIFF_SSIZE_T tmsize_t
Represent a signed memory or I/O size in bytes.
Definition tiffio.h:89
Prefix codec state with Predictor method chains and row geometry.
Definition tif_predict.h:76
tmsize_t stride
Positive channel stride in samples, not bytes, for active transforms.
Definition tif_predict.h:83
TIFFEncodeDecodeMethod decodepfunc
Selected in-place row accumulator, NULL before setup.
TIFFVSetMethod vsetparent
Saved borrowed tag setter.
TIFFCodeMethod encoderow
Saved parent row encoder.
Definition tif_predict.h:88
TIFFVGetMethod vgetparent
Saved borrowed tag getter.
TIFFCodeMethod encodetile
Saved parent strile encoder invoked by the shared wrapper.
Definition tif_predict.h:95
TIFFCodeMethod encodestrip
Saved parent strip encoder; shared strile wrapper dispatch currently uses encodetile.
Definition tif_predict.h:93
TIFFCodeMethod decodestrip
Saved parent strip decoder; shared strile wrapper dispatch currently uses decodetile.
tmsize_t rowsize
Positive decoded row byte extent for active strile transforms.
Definition tif_predict.h:85
int predictor
Predictor tag value; validated at setup.
Definition tif_predict.h:78
TIFFCodeMethod decodetile
Saved parent strile decoder invoked by the shared wrapper.
TIFFCodeMethod decoderow
Saved parent row decoder.
TIFFPrintMethod printdir
Saved optional borrowed directory printer.
TIFFBoolMethod setupdecode
Saved borrowed decoder setup method.
TIFFBoolMethod setupencode
Saved borrowed encoder setup method.
TIFFEncodeDecodeMethod encodepfunc
Selected in-place row differencer, NULL before setup.
Definition tif_predict.h:97
Hold private state for one open TIFF library instance.
Definition tiffiop.h:389
Declare the public C library interface and its supporting types.
Declare private library state, callbacks, and implementation helpers.