Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
colorin.c File Reference
#include "widgets/bauhaus.h"
#include "common/paths.h"
#include "common/imagebuf.h"
#include "develop/iop_profile.h"
#include "colorprofiles/colormatrices.c"
#include "colorprofiles/colorspaces.h"
#include "colorprofiles/conversion.h"
#include "common/colorspaces_inline_conversions.h"
#include "common/file_location.h"
#include "caches/image_cache.h"
#include "common/opencl.h"
#include "control/user_message.h"
#include "develop/develop.h"
#include "develop/imageop_math.h"
#include "develop/imageop_gui.h"
#include "iop/iop_api.h"
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "imageio/imageio_profile.h"
#include "control/signal.h"
+ Include dependency graph for colorin.c:

Go to the source code of this file.

Data Structures

struct  dt_iop_colorin_params_t
 
struct  dt_iop_colorin_gui_data_t
 
struct  dt_iop_colorin_global_data_t
 
struct  dt_iop_colorin_data_t
 

Macros

#define DT_IOP_COLOR_ICC_LEN   512
 
#define DT_IOP_COLOR_ICC_LEN_V5   100
 

Typedefs

typedef enum dt_iop_color_normalize_t dt_iop_color_normalize_t
 
typedef struct dt_iop_colorin_params_t dt_iop_colorin_params_t
 
typedef struct dt_iop_colorin_gui_data_t dt_iop_colorin_gui_data_t
 
typedef struct dt_iop_colorin_global_data_t dt_iop_colorin_global_data_t
 
typedef struct dt_iop_colorin_data_t dt_iop_colorin_data_t
 

Enumerations

enum  dt_iop_color_normalize_t {
  DT_NORMALIZE_OFF ,
  DT_NORMALIZE_SRGB ,
  DT_NORMALIZE_ADOBE_RGB ,
  DT_NORMALIZE_LINEAR_REC709_RGB ,
  DT_NORMALIZE_LINEAR_REC2020_RGB
}
 

Functions

static void update_profile_list (dt_iop_module_t *self)
 
const char * name ()
 
const char ** description (struct dt_iop_module_t *self)
 
int default_group ()
 
int flags ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 
static dt_iop_colorspace_type_t _colorin_format_cst (dt_iop_module_t *self)
 
void input_format (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc)
 
void output_format (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc)
 
static void _resolve_work_profile (dt_colorspaces_color_profile_type_t *work_type, char *work_filename)
 
int legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
 
void init_global (dt_iop_module_so_t *module)
 
void cleanup_global (dt_iop_module_so_t *module)
 
static void profile_changed (GtkWidget *widget, gpointer user_data)
 
static void workicc_changed (GtkWidget *widget, gpointer user_data)
 
int process_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
 
static void apply_blue_mapping (const float *const in, float *const out)
 
int process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
 
static void _set_input_profile_metadata (dt_iop_colorin_data_t *d, const dt_iop_colorin_params_t *p, const dt_colorspaces_color_profile_type_t type)
 
static dt_colorspaces_color_profile_type_t _clipping_profile_type (const dt_iop_colorin_params_t *p)
 
static gboolean _is_image_derived (const dt_colorspaces_color_profile_type_t type)
 
void commit_params (struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void gui_update (struct dt_iop_module_t *self)
 
void reload_defaults (dt_iop_module_t *module)
 
void gui_init (struct dt_iop_module_t *self)
 
void gui_cleanup (struct dt_iop_module_t *self)
 

Macro Definition Documentation

◆ DT_IOP_COLOR_ICC_LEN

#define DT_IOP_COLOR_ICC_LEN   512

Definition at line 105 of file colorin.c.

◆ DT_IOP_COLOR_ICC_LEN_V5

#define DT_IOP_COLOR_ICC_LEN_V5   100

Typedef Documentation

◆ dt_iop_color_normalize_t

◆ dt_iop_colorin_data_t

◆ dt_iop_colorin_global_data_t

◆ dt_iop_colorin_gui_data_t

◆ dt_iop_colorin_params_t

Enumeration Type Documentation

◆ dt_iop_color_normalize_t

Enumerator
DT_NORMALIZE_OFF 
DT_NORMALIZE_SRGB 
DT_NORMALIZE_ADOBE_RGB 
DT_NORMALIZE_LINEAR_REC709_RGB 
DT_NORMALIZE_LINEAR_REC2020_RGB 

Definition at line 112 of file colorin.c.

Function Documentation

◆ _clipping_profile_type()

◆ _colorin_format_cst()

static dt_iop_colorspace_type_t _colorin_format_cst ( dt_iop_module_t self)
static

Definition at line 197 of file colorin.c.

References DT_COLORSPACE_LAB, IOP_CS_LAB, IOP_CS_RGB, p, and dt_iop_module_t::params.

Referenced by input_format(), and output_format().

◆ _is_image_derived()

◆ _resolve_work_profile()

static void _resolve_work_profile ( dt_colorspaces_color_profile_type_t work_type,
char *  work_filename 
)
static

◆ _set_input_profile_metadata()

static void _set_input_profile_metadata ( dt_iop_colorin_data_t d,
const dt_iop_colorin_params_t p,
const dt_colorspaces_color_profile_type_t  type 
)
static

Definition at line 737 of file colorin.c.

References d, DT_COLORSPACE_FILE, p, and type.

Referenced by commit_params().

◆ apply_blue_mapping()

static void apply_blue_mapping ( const float *const  in,
float *const  out 
)
static

Definition at line 691 of file colorin.c.

References out, and t.

Referenced by process().

◆ cleanup_global()

◆ cleanup_pipe()

void cleanup_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ commit_params()

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece 
)

Definition at line 192 of file colorin.c.

References IOP_CS_RGB.

◆ default_group()

int default_group ( )

Definition at line 182 of file colorin.c.

References IOP_GROUP_TECHNICAL.

◆ description()

const char ** description ( struct dt_iop_module_t self)

Definition at line 172 of file colorin.c.

References dt_iop_set_description().

◆ flags()

int flags ( )

Definition at line 187 of file colorin.c.

References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_ONE_INSTANCE, and IOP_FLAGS_UNSAFE_COPY.

Referenced by commit_params().

◆ gui_cleanup()

void gui_cleanup ( struct dt_iop_module_t self)

Definition at line 1185 of file colorin.c.

References dt_free, dt_iop_gui_data(), g, and IOP_GUI_FREE.

◆ gui_init()

◆ gui_update()

◆ init_global()

◆ init_pipe()

void init_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ input_format()

◆ legacy_params()

◆ name()

const char * name ( )

Definition at line 167 of file colorin.c.

◆ output_format()

◆ process()

◆ process_cl()

◆ profile_changed()

◆ reload_defaults()

◆ update_profile_list()

◆ workicc_changed()