ReactOS 0.4.15-dev-8222-g9164419
tif_predict.h File Reference
#include "tiffio.h"
#include "tiffiop.h"
Include dependency graph for tif_predict.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TIFFPredictorState
 

Typedefs

typedef int(* TIFFEncodeDecodeMethod) (TIFF *tif, uint8 *buf, tmsize_t size)
 

Functions

int TIFFPredictorInit (TIFF *)
 
int TIFFPredictorCleanup (TIFF *)
 

Typedef Documentation

◆ TIFFEncodeDecodeMethod

typedef int(* TIFFEncodeDecodeMethod) (TIFF *tif, uint8 *buf, tmsize_t size)

Definition at line 35 of file tif_predict.h.

Function Documentation

◆ TIFFPredictorCleanup()

int TIFFPredictorCleanup ( TIFF tif)

Definition at line 857 of file tif_predict.c.

858{
860
861 assert(sp != 0);
862
863 tif->tif_tagmethods.vgetfield = sp->vgetparent;
864 tif->tif_tagmethods.vsetfield = sp->vsetparent;
865 tif->tif_tagmethods.printdir = sp->printdir;
866 tif->tif_setupdecode = sp->setupdecode;
867 tif->tif_setupencode = sp->setupencode;
868
869 return 1;
870}
#define assert(x)
Definition: debug.h:53
static const WCHAR sp[]
Definition: suminfo.c:287
TIFFVGetMethod vgetfield
Definition: tiffio.h:334
TIFFVSetMethod vsetfield
Definition: tiffio.h:333
TIFFPrintMethod printdir
Definition: tiffio.h:335
TIFFTagMethods tif_tagmethods
Definition: tiffiop.h:219
TIFFBoolMethod tif_setupencode
Definition: tiffiop.h:176
TIFFBoolMethod tif_setupdecode
Definition: tiffiop.h:174
#define PredictorState(tif)
Definition: tif_predict.c:33

◆ TIFFPredictorInit()

int TIFFPredictorInit ( TIFF tif)

Definition at line 816 of file tif_predict.c.

817{
819
820 assert(sp != 0);
821
822 /*
823 * Merge codec-specific tag information.
824 */
827 TIFFErrorExt(tif->tif_clientdata, "TIFFPredictorInit",
828 "Merging Predictor codec-specific tags failed");
829 return 0;
830 }
831
832 /*
833 * Override parent get/set field methods.
834 */
835 sp->vgetparent = tif->tif_tagmethods.vgetfield;
837 PredictorVGetField;/* hook for predictor tag */
838 sp->vsetparent = tif->tif_tagmethods.vsetfield;
840 PredictorVSetField;/* hook for predictor tag */
841 sp->printdir = tif->tif_tagmethods.printdir;
843 PredictorPrintDir; /* hook for predictor tag */
844
845 sp->setupdecode = tif->tif_setupdecode;
847 sp->setupencode = tif->tif_setupencode;
849
850 sp->predictor = 1; /* default value */
851 sp->encodepfunc = NULL; /* no predictor routine */
852 sp->decodepfunc = NULL; /* no predictor routine */
853 return 1;
854}
#define NULL
Definition: types.h:112
thandle_t tif_clientdata
Definition: tiffiop.h:207
int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32 n)
Definition: tif_dirinfo.c:369
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
static void PredictorPrintDir(TIFF *tif, FILE *fd, long flags)
Definition: tif_predict.c:797
static int PredictorSetupDecode(TIFF *tif)
Definition: tif_predict.c:113
static int PredictorSetupEncode(TIFF *tif)
Definition: tif_predict.c:195
static const TIFFField predictFields[]
Definition: tif_predict.c:754
static int PredictorVGetField(TIFF *tif, uint32 tag, va_list ap)
Definition: tif_predict.c:779
static int PredictorVSetField(TIFF *tif, uint32 tag, va_list ap)
Definition: tif_predict.c:759
#define TIFFArrayCount(a)
Definition: tiffiop.h:283