Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Functions
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.

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 N(a)   (sizeof(a)/sizeof(a[0]))
 
#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

◆ CLAMP [1/3]

#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 )
T log(T a)
Definition: glsl_math.hpp:486
const GLdouble * v
typedef int
Definition: png.h:978

◆ CLAMP [2/3]

#define CLAMP (   v)    From14[(v) >> 2]

◆ CLAMP [3/3]

#define CLAMP (   v)    (From8[(v)])

◆ CLAMP12

#define CLAMP12 (   t)    (((t) < 3071) ? (uint16) (t) : 3071)

◆ CODE_MASK

#define CODE_MASK   0x7ff /* 11 bits. */

Definition at line 103 of file tif_pixarlog.c.

◆ DecoderState

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

Definition at line 590 of file tif_pixarlog.c.

◆ EncoderState

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

Definition at line 591 of file tif_pixarlog.c.

◆ N

#define N (   a)    (sizeof(a)/sizeof(a[0]))

Definition at line 596 of file tif_pixarlog.c.

◆ ONE

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

Definition at line 100 of file tif_pixarlog.c.

◆ PIXARLOGDATAFMT_UNKNOWN

#define PIXARLOGDATAFMT_UNKNOWN   -1

Definition at line 597 of file tif_pixarlog.c.

Referenced by TIFFInitPixarLog().

◆ PLSTATE_INIT

#define PLSTATE_INIT   1

Definition at line 462 of file tif_pixarlog.c.

◆ RATIO

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

Definition at line 101 of file tif_pixarlog.c.

◆ REPEAT

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

Definition at line 108 of file tif_pixarlog.c.

◆ SCALE12

#define SCALE12   2048.0F

◆ TSIZE

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

Definition at line 98 of file tif_pixarlog.c.

◆ TSIZEP1

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

Definition at line 99 of file tif_pixarlog.c.

Function Documentation

◆ TIFFInitPixarLog()

int TIFFInitPixarLog ( TIFF tif,
int  scheme 
)