Blender V2.61 - r43446
Defines | Functions | Variables

gammaCorrectionTables.c File Reference

#include "gammaCorrectionTables.h"
#include <stdlib.h>
#include <math.h>

Go to the source code of this file.

Defines

#define RE_DEFAULT_GAMMA   2.0
#define RE_GAMMA_TABLE_SIZE   400

Functions

float gammaCorrect (float c)
float invGammaCorrect (float col)
void makeGammaTables (float gamma)

Variables

static float gamma_range_table [RE_GAMMA_TABLE_SIZE+1]
static float gamfactor_table [RE_GAMMA_TABLE_SIZE]
static float inv_gamma_range_table [RE_GAMMA_TABLE_SIZE+1]
static float inv_gamfactor_table [RE_GAMMA_TABLE_SIZE]
static float color_domain_table [RE_GAMMA_TABLE_SIZE+1]
static float color_step
static float inv_color_step
static float valid_gamma
static float valid_inv_gamma

Detailed Description

Definition in file gammaCorrectionTables.c.


Define Documentation

#define RE_DEFAULT_GAMMA   2.0

Definition at line 44 of file gammaCorrectionTables.c.

#define RE_GAMMA_TABLE_SIZE   400

Definition at line 49 of file gammaCorrectionTables.c.

Referenced by gammaCorrect(), invGammaCorrect(), and makeGammaTables().


Function Documentation

float gammaCorrect ( float  col)

Apply gamma correction on col

Definition at line 65 of file gammaCorrectionTables.c.

References abs(), color_domain_table, gamfactor_table, gamma_range_table, i, inv_color_step, pow(), RE_GAMMA_TABLE_SIZE, and valid_gamma.

float invGammaCorrect ( float  col)

Apply inverse gamma correction on col

Definition at line 85 of file gammaCorrectionTables.c.

References abs(), color_domain_table, i, inv_color_step, inv_gamfactor_table, inv_gamma_range_table, pow(), RE_GAMMA_TABLE_SIZE, and valid_inv_gamma.

void makeGammaTables ( float  gamma)

Variable Documentation

float color_domain_table[RE_GAMMA_TABLE_SIZE+1] [static]

Definition at line 57 of file gammaCorrectionTables.c.

Referenced by gammaCorrect(), invGammaCorrect(), and makeGammaTables().

float color_step [static]

Definition at line 58 of file gammaCorrectionTables.c.

Referenced by makeGammaTables().

float gamfactor_table[RE_GAMMA_TABLE_SIZE] [static]

Definition at line 54 of file gammaCorrectionTables.c.

Referenced by gammaCorrect(), and makeGammaTables().

float gamma_range_table[RE_GAMMA_TABLE_SIZE+1] [static]

Definition at line 53 of file gammaCorrectionTables.c.

Referenced by gammaCorrect(), and makeGammaTables().

float inv_color_step [static]

Definition at line 59 of file gammaCorrectionTables.c.

Referenced by gammaCorrect(), invGammaCorrect(), and makeGammaTables().

float inv_gamfactor_table[RE_GAMMA_TABLE_SIZE] [static]

Definition at line 56 of file gammaCorrectionTables.c.

Referenced by invGammaCorrect(), and makeGammaTables().

float inv_gamma_range_table[RE_GAMMA_TABLE_SIZE+1] [static]

Definition at line 55 of file gammaCorrectionTables.c.

Referenced by invGammaCorrect(), and makeGammaTables().

float valid_gamma [static]

Definition at line 60 of file gammaCorrectionTables.c.

Referenced by gammaCorrect(), and makeGammaTables().

float valid_inv_gamma [static]

Definition at line 61 of file gammaCorrectionTables.c.

Referenced by invGammaCorrect(), and makeGammaTables().