ReactOS  0.4.14-dev-552-g2fad488
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 )

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 PredictorState(tif)
Definition: tif_predict.c:33
#define assert(x)
Definition: debug.h:53
static const WCHAR sp[]
Definition: suminfo.c:288

◆ TIFFPredictorInit()

int TIFFPredictorInit ( TIFF )

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;
836  tif->tif_tagmethods.vgetfield =
837  PredictorVGetField;/* hook for predictor tag */
838  sp->vsetparent = tif->tif_tagmethods.vsetfield;
839  tif->tif_tagmethods.vsetfield =
840  PredictorVSetField;/* hook for predictor tag */
841  sp->printdir = tif->tif_tagmethods.printdir;
842  tif->tif_tagmethods.printdir =
843  PredictorPrintDir; /* hook for predictor tag */
844 
845  sp->setupdecode = tif->tif_setupdecode;
846  tif->tif_setupdecode = PredictorSetupDecode;
847  sp->setupencode = tif->tif_setupencode;
848  tif->tif_setupencode = PredictorSetupEncode;
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 PredictorState(tif)
Definition: tif_predict.c:33
static const TIFFField predictFields[]
Definition: tif_predict.c:754
#define assert(x)
Definition: debug.h:53
static int PredictorVGetField(TIFF *tif, uint32 tag, va_list ap)
Definition: tif_predict.c:779
static int PredictorSetupDecode(TIFF *tif)
Definition: tif_predict.c:113
int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32 n)
Definition: tif_dirinfo.c:369
smooth NULL
Definition: ftsmooth.c:416
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
#define TIFFArrayCount(a)
Definition: tiffiop.h:267
static int PredictorSetupEncode(TIFF *tif)
Definition: tif_predict.c:195
static void PredictorPrintDir(TIFF *tif, FILE *fd, long flags)
Definition: tif_predict.c:797
static const WCHAR sp[]
Definition: suminfo.c:288
static int PredictorVSetField(TIFF *tif, uint32 tag, va_list ap)
Definition: tif_predict.c:759