Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
channelmixer.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/colorspaces.h"
#include "common/debug.h"
#include "common/math.h"
#include "common/opencl.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_math.h"
#include "develop/openmp_maths.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include <assert.h>
#include <gtk/gtk.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
+ Include dependency graph for channelmixer.c:

Go to the source code of this file.

Data Structures

struct  dt_iop_channelmixer_params_t
 
struct  dt_iop_channelmixer_gui_data_t
 
struct  dt_iop_channelmixer_data_t
 

Typedefs

typedef enum _channelmixer_output_t _channelmixer_output_t
 
typedef enum _channelmixer_algorithm_t _channelmixer_algorithm_t
 
typedef struct dt_iop_channelmixer_params_t dt_iop_channelmixer_params_t
 
typedef struct dt_iop_channelmixer_gui_data_t dt_iop_channelmixer_gui_data_t
 
typedef enum _channelmixer_operation_mode_t _channelmixer_operation_mode_t
 
typedef struct dt_iop_channelmixer_data_t dt_iop_channelmixer_data_t
 

Enumerations

enum  _channelmixer_output_t {
  CHANNEL_HUE = 0 ,
  CHANNEL_SATURATION ,
  CHANNEL_LIGHTNESS ,
  CHANNEL_RED ,
  CHANNEL_GREEN ,
  CHANNEL_BLUE ,
  CHANNEL_GRAY ,
  CHANNEL_SIZE
}
 
enum  _channelmixer_algorithm_t {
  CHANNEL_MIXER_VERSION_1 = 0 ,
  CHANNEL_MIXER_VERSION_2 = 1
}
 
enum  _channelmixer_operation_mode_t {
  OPERATION_MODE_RGB = 0 ,
  OPERATION_MODE_GRAY = 1 ,
  OPERATION_MODE_HSL_V1 = 2 ,
  OPERATION_MODE_HSL_V2 = 3
}
 

Functions

const char * name ()
 
const char * deprecated_msg ()
 
const char ** description (struct dt_iop_module_t *self)
 
int flags ()
 
int default_group ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 
int legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
 
static __DT_CLONE_TARGETS__ void process_hsl_v1 (const dt_dev_pixelpipe_iop_t *piece, const float *const restrict in, float *const restrict out, const dt_iop_roi_t *const roi_out)
 
static __DT_CLONE_TARGETS__ void process_hsl_v2 (const dt_dev_pixelpipe_iop_t *piece, const float *const restrict in, float *const restrict out, const dt_iop_roi_t *const roi_out)
 
static __DT_CLONE_TARGETS__ void process_rgb (const dt_dev_pixelpipe_iop_t *piece, const float *const restrict in, float *const restrict out, const dt_iop_roi_t *const roi_out)
 
static __DT_CLONE_TARGETS__ void process_gray (const dt_dev_pixelpipe_iop_t *piece, const float *const restrict in, float *const restrict out, const dt_iop_roi_t *const roi_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 red_callback (GtkWidget *slider, gpointer user_data)
 
static void green_callback (GtkWidget *slider, gpointer user_data)
 
static void blue_callback (GtkWidget *slider, gpointer user_data)
 
static void output_callback (GtkComboBox *combo, gpointer user_data)
 
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 init (dt_iop_module_t *module)
 
void gui_init (struct dt_iop_module_t *self)
 
void init_presets (dt_iop_module_so_t *self)
 

Typedef Documentation

◆ _channelmixer_algorithm_t

◆ _channelmixer_operation_mode_t

◆ _channelmixer_output_t

Crazy presets b&w ... Film Type R G B R G B AGFA 200X 18 41 41 Ilford Pan F 33 36 31 Agfapan 25 25 39 36 Ilford SFX 36 31 33 Agfapan 100 21 40 39 Ilford XP2 Super 21 42 37 Agfapan 400 20 41 39 Kodak T-Max 100 24 37 39 Ilford Delta 100 21 42 37 Kodak T-Max 400 27 36 37 Ilford Delta 400 22 42 36 Kodak Tri-X 400 25 35 40 Ilford Delta 3200 31 36 33 Normal Contrast 43 33 30 Ilford FP4 28 41 31 High Contrast 40 34 60 Ilford HP5 23 37 40 Generic B/W 24 68 8

◆ dt_iop_channelmixer_data_t

◆ dt_iop_channelmixer_gui_data_t

◆ dt_iop_channelmixer_params_t

Enumeration Type Documentation

◆ _channelmixer_algorithm_t

Enumerator
CHANNEL_MIXER_VERSION_1 
CHANNEL_MIXER_VERSION_2 

Definition at line 113 of file channelmixer.c.

◆ _channelmixer_operation_mode_t

Enumerator
OPERATION_MODE_RGB 
OPERATION_MODE_GRAY 
OPERATION_MODE_HSL_V1 
OPERATION_MODE_HSL_V2 

Definition at line 138 of file channelmixer.c.

◆ _channelmixer_output_t

Crazy presets b&w ... Film Type R G B R G B AGFA 200X 18 41 41 Ilford Pan F 33 36 31 Agfapan 25 25 39 36 Ilford SFX 36 31 33 Agfapan 100 21 40 39 Ilford XP2 Super 21 42 37 Agfapan 400 20 41 39 Kodak T-Max 100 24 37 39 Ilford Delta 100 21 42 37 Kodak T-Max 400 27 36 37 Ilford Delta 400 22 42 36 Kodak Tri-X 400 25 35 40 Ilford Delta 3200 31 36 33 Normal Contrast 43 33 30 Ilford FP4 28 41 31 High Contrast 40 34 60 Ilford HP5 23 37 40 Generic B/W 24 68 8

Enumerator
CHANNEL_HUE 

mixes into hue channel

CHANNEL_SATURATION 

mixes into lightness channel

CHANNEL_LIGHTNESS 

mixes into lightness channel

CHANNEL_RED 

mixes into red channel of image

CHANNEL_GREEN 

mixes into green channel of image

CHANNEL_BLUE 

mixes into blue channel of image

CHANNEL_GRAY 

mixes into gray channel of image = monochrome

CHANNEL_SIZE 

Definition at line 93 of file channelmixer.c.

Function Documentation

◆ blue_callback()

static void blue_callback ( GtkWidget slider,
gpointer  user_data 
)
static

◆ cleanup_pipe()

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

Definition at line 533 of file channelmixer.c.

References dt_dev_pixelpipe_iop_t::data, and dt_free_align.

◆ 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 185 of file channelmixer.c.

References IOP_CS_RGB.

◆ default_group()

int default_group ( )

Definition at line 180 of file channelmixer.c.

References IOP_GROUP_COLOR.

◆ deprecated_msg()

const char * deprecated_msg ( )

Definition at line 158 of file channelmixer.c.

◆ description()

const char ** description ( struct dt_iop_module_t self)

Definition at line 163 of file channelmixer.c.

References dt_iop_set_description().

◆ flags()

◆ green_callback()

static void green_callback ( GtkWidget slider,
gpointer  user_data 
)
static

◆ gui_init()

◆ gui_update()

void gui_update ( struct dt_iop_module_t self)

◆ init()

◆ init_pipe()

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

◆ init_presets()

◆ legacy_params()

int legacy_params ( dt_iop_module_t self,
const void *const  old_params,
const int  old_version,
void new_params,
const int  new_version 
)

◆ name()

const char * name ( )

Definition at line 153 of file channelmixer.c.

◆ output_callback()

static void output_callback ( GtkComboBox *  combo,
gpointer  user_data 
)
static

◆ process()

◆ process_gray()

static __DT_CLONE_TARGETS__ void process_gray ( const dt_dev_pixelpipe_iop_t piece,
const float *const restrict  in,
float *const restrict  out,
const dt_iop_roi_t *const  roi_out 
)
static

◆ process_hsl_v1()

◆ process_hsl_v2()

◆ process_rgb()

static __DT_CLONE_TARGETS__ void process_rgb ( const dt_dev_pixelpipe_iop_t piece,
const float *const restrict  in,
float *const restrict  out,
const dt_iop_roi_t *const  roi_out 
)
static

◆ red_callback()

static void red_callback ( GtkWidget slider,
gpointer  user_data 
)
static