Bsoft  1.9
Bernard's software package
tif_pixarlog.c File Reference
#include "tiffiop.h"
#include "tif_predict.h"
#include "zlib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

Go to the source code of this file.

Classes

struct  PixarLogState
 

Macros

#define TSIZE   2048 /* decode table size (11-bit tokens) */
 
#define TSIZEP1   2049 /* Plus one for slop */
 
#define ONE   1250 /* token value of 1.0 exactly */
 
#define RATIO   1.004 /* nominal ratio for log part */
 
#define CODE_MASK   0x7ff /* 11 bits. */
 
#define REPEAT(n, op)    { int i; i=n; do { i--; op; } while (i>0); }
 
#define SCALE12   2048.0F
 
#define CLAMP12(t)   (((t) < 3071) ? (uint16) (t) : 3071)
 
#define PLSTATE_INIT   1
 
#define DecoderState(tif)   ((PixarLogState*) (tif)->tif_data)
 
#define EncoderState(tif)   ((PixarLogState*) (tif)->tif_data)
 
#define PIXARLOGDATAFMT_UNKNOWN   -1
 
#define CLAMP(v)
 
#define CLAMP(v)   From14[(v) >> 2]
 
#define CLAMP(v)   (From8[(v)])
 

Functions

int TIFFInitPixarLog (TIFF *tif, int scheme)
 

Macro Definition Documentation

#define CLAMP (   v)
Value:
( (v<(float)0.) ? 0 \
: (v<(float)2.) ? FromLT2[(int)(v*fltsize)] \
: (v>(float)24.2) ? 2047 \
: LogK1*log(v*LogK2) + 0.5 )
#define CLAMP (   v)    From14[(v) >> 2]
#define CLAMP (   v)    (From8[(v)])
#define CLAMP12 (   t)    (((t) < 3071) ? (uint16) (t) : 3071)
#define CODE_MASK   0x7ff /* 11 bits. */

Definition at line 103 of file tif_pixarlog.c.

#define DecoderState (   tif)    ((PixarLogState*) (tif)->tif_data)

Definition at line 590 of file tif_pixarlog.c.

#define EncoderState (   tif)    ((PixarLogState*) (tif)->tif_data)

Definition at line 591 of file tif_pixarlog.c.

#define ONE   1250 /* token value of 1.0 exactly */

Definition at line 100 of file tif_pixarlog.c.

#define PIXARLOGDATAFMT_UNKNOWN   -1

Definition at line 596 of file tif_pixarlog.c.

#define PLSTATE_INIT   1

Definition at line 462 of file tif_pixarlog.c.

#define RATIO   1.004 /* nominal ratio for log part */

Definition at line 101 of file tif_pixarlog.c.

#define REPEAT (   n,
  op 
)    { int i; i=n; do { i--; op; } while (i>0); }

Definition at line 108 of file tif_pixarlog.c.

#define SCALE12   2048.0F
#define TSIZE   2048 /* decode table size (11-bit tokens) */

Definition at line 98 of file tif_pixarlog.c.

#define TSIZEP1   2049 /* Plus one for slop */

Definition at line 99 of file tif_pixarlog.c.

Function Documentation

int TIFFInitPixarLog ( TIFF *  tif,
int  scheme 
)

Definition at line 1290 of file tif_pixarlog.c.