| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Classes | Macros | Typedefs | Functions
tif_luv.c File Reference
`#include "tiffiop.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <math.h>`
`#include "uvcode.h"`

Go to the source code of this file.

## Classes
struct | logLuvState

## Macros
#define | DecoderState(tif) ((LogLuvState*) (tif)->tif_data)
#define | EncoderState(tif) ((LogLuvState*) (tif)->tif_data)
#define | SGILOGDATAFMT_UNKNOWN -1
#define | MINRUN 4 /* minimum run length */
#define | M_LN2 0.69314718055994530942
#define | M_PI 3.14159265358979323846
#define | log2(x) ((1./M_LN2)*log(x))
#define | exp2(x) exp(M_LN2*(x))
#define | itrunc(x, m)
#define | NANGLES 100
#define | uv2ang(u, v)
#define | PACK(s, b, f) (((b)<<6)|((s)<<3)|(f))
#define | PACK(a, b) (((a)<<3)|(b))

## Typedefs
typedef struct logLuvState | LogLuvState

## Functions
double | LogL16toY (int p16)
int | LogL16fromY (double Y, int em)
void | XYZtoRGB24 (float xyz[3], uint8 rgb[3])
double | LogL10toY (int p10)
int | LogL10fromY (double Y, int em)
int | uv_encode (double u, double v, int em)
int | uv_decode (double *up, double *vp, int c)
void | LogLuv24toXYZ (uint32 p, float XYZ[3])
uint32 | LogLuv24fromXYZ (float XYZ[3], int em)
void | LogLuv32toXYZ (uint32 p, float XYZ[3])
uint32 | LogLuv32fromXYZ (float XYZ[3], int em)
int | TIFFInitSGILog (TIFF *tif, int scheme)

## Macro Definition Documentation

#define DecoderState | ( |  | tif | ) | ((LogLuvState*) (tif)->tif_data)

Definition at line 173 of file tif_luv.c.

#define EncoderState | ( |  | tif | ) | ((LogLuvState*) (tif)->tif_data)

Definition at line 174 of file tif_luv.c.

#define exp2 | ( |  | x | ) | exp(M_LN2*(x))

Definition at line 640 of file tif_luv.c.

#define itrunc | ( |  | x,
|  |  | m
| ) |  |

Value:
((m)==SGILOGENCODE_NODITHER ? \
(int)(x) : \
(int)((x) + rand()*(1./RAND_MAX) - .5))
SGILOGENCODE_NODITHER
#define SGILOGENCODE_NODITHER
Definition: tiff.h:577

Definition at line 642 of file tif_luv.c.

#define log2 | ( |  | x | ) | ((1./M_LN2)*log(x))

Definition at line 639 of file tif_luv.c.

#define M_LN2 0.69314718055994530942

Definition at line 634 of file tif_luv.c.

#define M_PI 3.14159265358979323846

Definition at line 637 of file tif_luv.c.

#define MINRUN 4 /* minimum run length */

Definition at line 178 of file tif_luv.c.

#define NANGLES 100

Definition at line 753 of file tif_luv.c.

#define PACK | ( |  | s,
|  |  | b,
|  |  | f
| ) |  | (((b)<<6)|((s)<<3)|(f))

#define PACK | ( |  | a,
|  |  | b
| ) |  | (((a)<<3)|(b))

#define SGILOGDATAFMT_UNKNOWN -1

Definition at line 176 of file tif_luv.c.

#define uv2ang | ( |  | u,
|  |  | v
| ) |  |

Value:
( (NANGLES*.499999999/M_PI) \
* atan2((v)-V_NEU,(u)-U_NEU) + .5*NANGLES )
M_PI
#define M_PI
Definition: tif_luv.c:637
V_NEU
#define V_NEU
Definition: tiffio.h:480
U_NEU
#define U_NEU
Definition: tiffio.h:479
NANGLES
#define NANGLES
Definition: tif_luv.c:753

Definition at line 754 of file tif_luv.c.

## Typedef Documentation

typedef struct logLuvState LogLuvState

Definition at line 158 of file tif_luv.c.

## Function Documentation

int LogL10fromY | ( | double | Y,
|  | int | em
| ) |  |

Definition at line 743 of file tif_luv.c.

double LogL10toY | ( | int | p10 | ) |

Definition at line 732 of file tif_luv.c.

int LogL16fromY | ( | double | Y,
|  | int | em
| ) |  |

Definition at line 665 of file tif_luv.c.

double LogL16toY | ( | int | p16 | ) |

Definition at line 650 of file tif_luv.c.

uint32 LogLuv24fromXYZ | ( | float | XYZ[3],
|  | int | em
| ) |  |

Definition at line 896 of file tif_luv.c.

void LogLuv24toXYZ | ( | uint32 | p,
|  | float | XYZ[3]
| ) |  |

Definition at line 868 of file tif_luv.c.

uint32 LogLuv32fromXYZ | ( | float | XYZ[3],
|  | int | em
| ) |  |

Definition at line 1034 of file tif_luv.c.

void LogLuv32toXYZ | ( | uint32 | p,
|  | float | XYZ[3]
| ) |  |

Definition at line 1009 of file tif_luv.c.

int TIFFInitSGILog | ( | TIFF * | tif,
|  | int | scheme
| ) |  |

Definition at line 1562 of file tif_luv.c.

int uv_decode | ( | double * | up,
|  | double * | vp,
|  | int | c
| ) |  |

Definition at line 836 of file tif_luv.c.

int uv_encode | ( | double | u,
|  | double | v,
|  | int | em
| ) |  |

Definition at line 814 of file tif_luv.c.

void XYZtoRGB24 | ( | float | xyz[3],
|  | uint8 | rgb[3]
| ) |  |

Definition at line 714 of file tif_luv.c.