Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
color_conversion.h File Reference
#include "common.h"
#include "colorspace.h"
+ Include dependency graph for color_conversion.h:

Go to the source code of this file.

Data Structures

struct  dt_colorspaces_iccprofile_info_cl_t
 

Typedefs

typedef enum dt_iop_colorspace_type_t dt_iop_colorspace_type_t
 
typedef struct dt_colorspaces_iccprofile_info_cl_t dt_colorspaces_iccprofile_info_cl_t
 

Enumerations

enum  dt_iop_colorspace_type_t {
  IOP_CS_NONE = -1 ,
  IOP_CS_RAW = 0 ,
  IOP_CS_LAB = 1 ,
  IOP_CS_RGB = 2 ,
  IOP_CS_LCH = 3 ,
  IOP_CS_HSL = 4 ,
  IOP_CS_JZCZHZ = 5
}
 

Functions

static float lerp_lookup_unbounded (const float x, read_only image2d_t lut, constant const float *const unbounded_coeffs, const int n_lut, const int lutsize)
 
static float lookup (read_only image2d_t lut, const float x)
 
static float lookup_unbounded (read_only image2d_t lut, const float x, constant const float *const a)
 
static float4 apply_trc_in (const float4 rgb_in, constant const dt_colorspaces_iccprofile_info_cl_t *const profile_info, read_only image2d_t lut)
 
static float4 apply_trc_out (const float4 rgb_in, constant const dt_colorspaces_iccprofile_info_cl_t *const profile_info, read_only image2d_t lut)
 
static float get_rgb_matrix_luminance (const float4 rgb, constant const dt_colorspaces_iccprofile_info_cl_t *const profile_info, constant const float *const matrix, read_only image2d_t lut)
 
static float4 rgb_matrix_to_xyz (const float4 rgb, constant const dt_colorspaces_iccprofile_info_cl_t *const profile_info, constant const float *const matrix, read_only image2d_t lut)
 
static float dt_camera_rgb_luminance (const float4 rgb)
 

Typedef Documentation

◆ dt_colorspaces_iccprofile_info_cl_t

◆ dt_iop_colorspace_type_t

Enumeration Type Documentation

◆ dt_iop_colorspace_type_t

Enumerator
IOP_CS_NONE 
IOP_CS_RAW 
IOP_CS_LAB 
IOP_CS_RGB 
IOP_CS_LCH 
IOP_CS_HSL 
IOP_CS_JZCZHZ 

Function Documentation

◆ apply_trc_in()

static float4 apply_trc_in ( const float4  rgb_in,
constant const dt_colorspaces_iccprofile_info_cl_t *const  profile_info,
read_only image2d_t  lut 
)
inlinestatic

◆ apply_trc_out()

static float4 apply_trc_out ( const float4  rgb_in,
constant const dt_colorspaces_iccprofile_info_cl_t *const  profile_info,
read_only image2d_t  lut 
)
inlinestatic

References B, lerp_lookup_unbounded(), and R.

◆ dt_camera_rgb_luminance()

static float dt_camera_rgb_luminance ( const float4  rgb)
inlinestatic

◆ get_rgb_matrix_luminance()

static float get_rgb_matrix_luminance ( const float4  rgb,
constant const dt_colorspaces_iccprofile_info_cl_t *const  profile_info,
constant const float *const  matrix,
read_only image2d_t  lut 
)
inlinestatic

References apply_trc_in().

Referenced by dt_rgb_norm().

◆ lerp_lookup_unbounded()

static float lerp_lookup_unbounded ( const float  x,
read_only image2d_t  lut,
constant const float *const  unbounded_coeffs,
const int  n_lut,
const int  lutsize 
)
inlinestatic

References clamp(), f(), and sampleri.

Referenced by apply_trc_in(), and apply_trc_out().

◆ lookup()

static float lookup ( read_only image2d_t  lut,
const float  x 
)
inlinestatic

References clamp(), and sampleri.

Referenced by build_lookup_table(), and lin_interpolate().

◆ lookup_unbounded()

static float lookup_unbounded ( read_only image2d_t  lut,
const float  x,
constant const float *const  a 
)
inlinestatic

References clamp(), and sampleri.

◆ rgb_matrix_to_xyz()

static float4 rgb_matrix_to_xyz ( const float4  rgb,
constant const dt_colorspaces_iccprofile_info_cl_t *const  profile_info,
constant const float *const  matrix,
read_only image2d_t  lut 
)
inlinestatic

References apply_trc_in(), and matrix_product().