Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
iop_profile.h File Reference
+ Include dependency graph for iop_profile.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_iop_order_iccprofile_info_t
 

Typedefs

typedef struct dt_iop_order_iccprofile_info_t dt_iop_order_iccprofile_info_t
 

Functions

void dt_ioppr_init_profile_info (dt_iop_order_iccprofile_info_t *profile_info, const int lutsize)
 
void dt_ioppr_cleanup_profile_info (dt_iop_order_iccprofile_info_t *profile_info)
 
dt_iop_order_iccprofile_info_tdt_ioppr_get_profile_info_from_list (struct dt_develop_t *dev, dt_colorspaces_color_profile_type_t profile_type, const char *profile_filename)
 
dt_iop_order_iccprofile_info_tdt_ioppr_add_profile_info_to_list (struct dt_develop_t *dev, const dt_colorspaces_color_profile_type_t profile_type, const char *profile_filename, const int intent)
 
dt_iop_order_iccprofile_info_tdt_ioppr_get_iop_work_profile_info (struct dt_iop_module_t *module, GList *iop_list)
 
dt_iop_order_iccprofile_info_tdt_ioppr_get_iop_input_profile_info (struct dt_iop_module_t *module, GList *iop_list)
 
dt_iop_order_iccprofile_info_tdt_ioppr_set_pipe_work_profile_info (struct dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const dt_colorspaces_color_profile_type_t type, const char *filename, const int intent)
 
dt_iop_order_iccprofile_info_tdt_ioppr_set_pipe_input_profile_info (struct dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const dt_colorspaces_color_profile_type_t type, const char *filename, const int intent, const dt_colormatrix_t matrix_in)
 
dt_iop_order_iccprofile_info_tdt_ioppr_set_pipe_output_profile_info (struct dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const dt_colorspaces_color_profile_type_t type, const char *filename, const int intent)
 
dt_iop_order_iccprofile_info_tdt_ioppr_get_histogram_profile_info (struct dt_develop_t *dev)
 
dt_iop_order_iccprofile_info_tdt_ioppr_get_pipe_work_profile_info (struct dt_dev_pixelpipe_t *pipe)
 
dt_iop_order_iccprofile_info_tdt_ioppr_get_pipe_input_profile_info (struct dt_dev_pixelpipe_t *pipe)
 
dt_iop_order_iccprofile_info_tdt_ioppr_get_pipe_output_profile_info (struct dt_dev_pixelpipe_t *pipe)
 
dt_iop_order_iccprofile_info_tdt_ioppr_get_pipe_current_profile_info (struct dt_iop_module_t *module, struct dt_dev_pixelpipe_t *pipe)
 
void dt_ioppr_get_work_profile_type (struct dt_develop_t *dev, dt_colorspaces_color_profile_type_t *profile_type, const char **profile_filename)
 
void dt_ioppr_get_input_profile_type (struct dt_develop_t *dev, dt_colorspaces_color_profile_type_t *profile_type, const char **profile_filename)
 
void dt_ioppr_get_export_profile_type (struct dt_develop_t *dev, dt_colorspaces_color_profile_type_t *profile_type, const char **profile_filename)
 
void dt_ioppr_transform_image_colorspace (struct dt_iop_module_t *self, const float *const image_in, float *const image_out, const int width, const int height, const int cst_from, const int cst_to, int *converted_cst, const dt_iop_order_iccprofile_info_t *const profile_info)
 
void dt_ioppr_transform_image_colorspace_rgb (const float *const image_in, float *const image_out, const int width, const int height, const dt_iop_order_iccprofile_info_t *const profile_info_from, const dt_iop_order_iccprofile_info_t *const profile_info_to, const char *message)
 
static float extrapolate_lut (const float *const lut, const float v, const int lutsize)
 
static float eval_exp (const float coeff[3], const float x)
 
static void _apply_trc (const dt_aligned_pixel_t rgb_in, dt_aligned_pixel_t rgb_out, float *const lut[3], const float unbounded_coeffs[3][3], const int lutsize)
 
static float dt_ioppr_get_rgb_matrix_luminance (const dt_aligned_pixel_t rgb, const dt_colormatrix_t matrix_in, float *const lut_in[3], const float unbounded_coeffs_in[3][3], const int lutsize, const int nonlinearlut)
 
static void dt_ioppr_rgb_matrix_to_xyz (const dt_aligned_pixel_t rgb, dt_aligned_pixel_t xyz, const dt_colormatrix_t matrix_in_transposed, float *const lut_in[3], const float unbounded_coeffs_in[3][3], const int lutsize, const int nonlinearlut)
 
static void dt_ioppr_lab_to_rgb_matrix (const dt_aligned_pixel_t lab, dt_aligned_pixel_t rgb, const dt_colormatrix_t matrix_out_transposed, float *const lut_out[3], const float unbounded_coeffs_out[3][3], const int lutsize, const int nonlinearlut)
 
static void dt_ioppr_rgb_matrix_to_lab (const dt_aligned_pixel_t rgb, dt_aligned_pixel_t lab, const dt_colormatrix_t matrix_in_transposed, float *const lut_in[3], const float unbounded_coeffs_in[3][3], const int lutsize, const int nonlinearlut)
 
static float dt_ioppr_get_profile_info_middle_grey (const dt_iop_order_iccprofile_info_t *const profile_info)
 
static float dt_ioppr_compensate_middle_grey (const float x, const dt_iop_order_iccprofile_info_t *const profile_info)
 
static float dt_ioppr_uncompensate_middle_grey (const float x, const dt_iop_order_iccprofile_info_t *const profile_info)
 

Typedef Documentation

◆ dt_iop_order_iccprofile_info_t

Function Documentation

◆ _apply_trc()

static void _apply_trc ( const dt_aligned_pixel_t  rgb_in,
dt_aligned_pixel_t  rgb_out,
float *const  lut[3],
const float  unbounded_coeffs[3][3],
const int  lutsize 
)
inlinestatic

◆ dt_ioppr_add_profile_info_to_list()

dt_iop_order_iccprofile_info_t * dt_ioppr_add_profile_info_to_list ( struct dt_develop_t dev,
const dt_colorspaces_color_profile_type_t  profile_type,
const char *  profile_filename,
const int  intent 
)

◆ dt_ioppr_cleanup_profile_info()

void dt_ioppr_cleanup_profile_info ( dt_iop_order_iccprofile_info_t profile_info)

must be called when done with profile_info

References dt_free_align, dt_iop_order_iccprofile_info_t::lut_in, and dt_iop_order_iccprofile_info_t::lut_out.

Referenced by dt_dev_cleanup().

◆ dt_ioppr_compensate_middle_grey()

◆ dt_ioppr_get_export_profile_type()

void dt_ioppr_get_export_profile_type ( struct dt_develop_t dev,
dt_colorspaces_color_profile_type_t profile_type,
const char **  profile_filename 
)

returns the current setting of the export profile on colorout iop

References darktable, DT_COLORSPACE_NONE, darktable_t::iop, dt_develop_t::iop, dt_iop_module_so_t::op, and dt_iop_module_t::params.

◆ dt_ioppr_get_histogram_profile_info()

dt_iop_order_iccprofile_info_t * dt_ioppr_get_histogram_profile_info ( struct dt_develop_t dev)

returns a reference to the histogram profile info histogram profile must not be cleanup()

◆ dt_ioppr_get_input_profile_type()

void dt_ioppr_get_input_profile_type ( struct dt_develop_t dev,
dt_colorspaces_color_profile_type_t profile_type,
const char **  profile_filename 
)

returns the current setting of the input profile on colorin iop

◆ dt_ioppr_get_iop_input_profile_info()

dt_iop_order_iccprofile_info_t * dt_ioppr_get_iop_input_profile_info ( struct dt_iop_module_t module,
GList *  iop_list 
)

◆ dt_ioppr_get_iop_work_profile_info()

◆ dt_ioppr_get_pipe_current_profile_info()

◆ dt_ioppr_get_pipe_input_profile_info()

◆ dt_ioppr_get_pipe_output_profile_info()

◆ dt_ioppr_get_pipe_work_profile_info()

◆ dt_ioppr_get_profile_info_from_list()

dt_iop_order_iccprofile_info_t * dt_ioppr_get_profile_info_from_list ( struct dt_develop_t dev,
dt_colorspaces_color_profile_type_t  profile_type,
const char *  profile_filename 
)

returns the profile info from dev profiles info list that matches (profile_type, profile_filename) NULL if not found

References dt_develop_t::allprofile_info, dt_iop_order_iccprofile_info_t::filename, and dt_iop_order_iccprofile_info_t::type.

Referenced by dt_ioppr_add_profile_info_to_list().

◆ dt_ioppr_get_profile_info_middle_grey()

static float dt_ioppr_get_profile_info_middle_grey ( const dt_iop_order_iccprofile_info_t *const  profile_info)
inlinestatic

◆ dt_ioppr_get_rgb_matrix_luminance()

static float dt_ioppr_get_rgb_matrix_luminance ( const dt_aligned_pixel_t  rgb,
const dt_colormatrix_t  matrix_in,
float *const  lut_in[3],
const float  unbounded_coeffs_in[3][3],
const int  lutsize,
const int  nonlinearlut 
)
inlinestatic

◆ dt_ioppr_get_work_profile_type()

void dt_ioppr_get_work_profile_type ( struct dt_develop_t dev,
dt_colorspaces_color_profile_type_t profile_type,
const char **  profile_filename 
)

returns the current setting of the work profile on colorin iop

References darktable, DT_COLORSPACE_NONE, darktable_t::iop, dt_develop_t::iop, dt_iop_module_so_t::op, and dt_iop_module_t::params.

Referenced by dt_ioppr_get_iop_work_profile_info().

◆ dt_ioppr_init_profile_info()

◆ dt_ioppr_lab_to_rgb_matrix()

static void dt_ioppr_lab_to_rgb_matrix ( const dt_aligned_pixel_t  lab,
dt_aligned_pixel_t  rgb,
const dt_colormatrix_t  matrix_out_transposed,
float *const  lut_out[3],
const float  unbounded_coeffs_out[3][3],
const int  lutsize,
const int  nonlinearlut 
)
inlinestatic

◆ dt_ioppr_rgb_matrix_to_lab()

static void dt_ioppr_rgb_matrix_to_lab ( const dt_aligned_pixel_t  rgb,
dt_aligned_pixel_t  lab,
const dt_colormatrix_t  matrix_in_transposed,
float *const  lut_in[3],
const float  unbounded_coeffs_in[3][3],
const int  lutsize,
const int  nonlinearlut 
)
inlinestatic

◆ dt_ioppr_rgb_matrix_to_xyz()

static void dt_ioppr_rgb_matrix_to_xyz ( const dt_aligned_pixel_t  rgb,
dt_aligned_pixel_t  xyz,
const dt_colormatrix_t  matrix_in_transposed,
float *const  lut_in[3],
const float  unbounded_coeffs_in[3][3],
const int  lutsize,
const int  nonlinearlut 
)
inlinestatic

◆ dt_ioppr_set_pipe_input_profile_info()

◆ dt_ioppr_set_pipe_output_profile_info()

◆ dt_ioppr_set_pipe_work_profile_info()

dt_iop_order_iccprofile_info_t * dt_ioppr_set_pipe_work_profile_info ( struct dt_develop_t dev,
struct dt_dev_pixelpipe_t pipe,
const dt_colorspaces_color_profile_type_t  type,
const char *  filename,
const int  intent 
)

set the work profile (type, filename) on the pipe, should be called on process*() if matrix cannot be generated it default to linear rec 2020 returns the actual profile that has been set

References DT_COLORSPACE_LIN_REC2020, dt_ioppr_add_profile_info_to_list(), dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::matrix_out, type, and dt_dev_pixelpipe_t::work_profile_info.

Referenced by commit_params().

◆ dt_ioppr_transform_image_colorspace()

void dt_ioppr_transform_image_colorspace ( struct dt_iop_module_t self,
const float *const  image_in,
float *const  image_out,
const int  width,
const int  height,
const int  cst_from,
const int  cst_to,
int *  converted_cst,
const dt_iop_order_iccprofile_info_t *const  profile_info 
)

◆ dt_ioppr_transform_image_colorspace_rgb()

void dt_ioppr_transform_image_colorspace_rgb ( const float *const  image_in,
float *const  image_out,
const int  width,
const int  height,
const dt_iop_order_iccprofile_info_t *const  profile_info_from,
const dt_iop_order_iccprofile_info_t *const  profile_info_to,
const char *  message 
)

◆ dt_ioppr_uncompensate_middle_grey()

◆ eval_exp()

static float eval_exp ( const float  coeff[3],
const float  x 
)
inlinestatic

◆ extrapolate_lut()

static float extrapolate_lut ( const float *const  lut,
const float  v,
const int  lutsize 
)
inlinestatic

the following must have the matrix_in and matrix_out generated

Todo:
: check if optimization is worthwhile!

References CLAMPS, and f().

Referenced by _apply_tonecurves(), _apply_trc(), _init_unbounded_coeffs(), and _transform_matrix_rgb().