![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "develop/imageop_gui.h"#include "widgets/bauhaus.h"#include "colorprofiles/colorspaces.h"#include "develop/develop.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "system/simd.h"#include "common/module_versioning.h"#include "database/database.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "math/openmp_maths.h"#include "gui/presets.h"#include "iop/iop_api.h"#include <assert.h>#include <gtk/gtk.h>#include <inttypes.h>#include <math.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 enum _channelmixer_algorithm_t _channelmixer_algorithm_t |
| typedef enum _channelmixer_output_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
| typedef struct dt_iop_channelmixer_data_t dt_iop_channelmixer_data_t |
| typedef struct dt_iop_channelmixer_gui_data_t dt_iop_channelmixer_gui_data_t |
| typedef struct dt_iop_channelmixer_params_t dt_iop_channelmixer_params_t |
| Enumerator | |
|---|---|
| CHANNEL_MIXER_VERSION_1 | |
| CHANNEL_MIXER_VERSION_2 | |
Definition at line 115 of file channelmixer.c.
| Enumerator | |
|---|---|
| OPERATION_MODE_RGB | |
| OPERATION_MODE_GRAY | |
| OPERATION_MODE_HSL_V1 | |
| OPERATION_MODE_HSL_V2 | |
Definition at line 140 of file channelmixer.c.
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
Definition at line 95 of file channelmixer.c.
Definition at line 430 of file channelmixer.c.
References dt_iop_module_t::dev, dt_bauhaus_combobox_get(), dt_bauhaus_slider_get(), dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, p, dt_iop_module_t::params, TRUE, and value.
Referenced by gui_init().
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 535 of file channelmixer.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| 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 | ||
| ) |
Definition at line 464 of file channelmixer.c.
References CHANNEL_BLUE, CHANNEL_GRAY, CHANNEL_HUE, CHANNEL_LIGHTNESS, CHANNEL_MIXER_VERSION_1, CHANNEL_RED, d, dt_dev_pixelpipe_iop_t::data, FALSE, i, k, OPERATION_MODE_GRAY, OPERATION_MODE_HSL_V1, OPERATION_MODE_HSL_V2, OPERATION_MODE_RGB, p, and TRUE.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 187 of file channelmixer.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 182 of file channelmixer.c.
References IOP_GROUP_COLOR.
| const char * deprecated_msg | ( | ) |
Definition at line 160 of file channelmixer.c.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 165 of file channelmixer.c.
References dt_iop_set_description().
| int flags | ( | ) |
Definition at line 177 of file channelmixer.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_DEPRECATED, IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
Definition at line 415 of file channelmixer.c.
References dt_iop_module_t::dev, dt_bauhaus_combobox_get(), dt_bauhaus_slider_get(), dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, p, dt_iop_module_t::params, TRUE, and value.
Referenced by gui_init().
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 565 of file channelmixer.c.
References blue_callback(), CHANNEL_RED, dt_iop_module_t::default_params, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_set(), dt_bauhaus_get_global(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_widget_set_label(), DT_GUI_BOX_SPACING, DT_GUI_MODULE, g, green_callback(), dt_iop_module_t::gui, IOP_GUI_ALLOC, output_callback(), p, red_callback(), TRUE, and dt_iop_module_gui_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Definition at line 541 of file channelmixer.c.
References dt_bauhaus_combobox_get(), dt_bauhaus_slider_set(), dt_iop_gui_data(), g, p, and dt_iop_module_t::params.
| void init | ( | dt_iop_module_t * | module | ) |
Definition at line 555 of file channelmixer.c.
References dt_iop_channelmixer_params_t::algorithm_version, CHANNEL_BLUE, CHANNEL_GREEN, CHANNEL_MIXER_VERSION_2, CHANNEL_RED, d, and dt_iop_default_init().
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 529 of file channelmixer.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| void init_presets | ( | dt_iop_module_so_t * | self | ) |
Definition at line 611 of file channelmixer.c.
References CHANNEL_MIXER_VERSION_2, dt_database_start_transaction, dt_gui_presets_add_generic(), and dt_iop_module_so_t::op.
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
Definition at line 192 of file channelmixer.c.
References dt_iop_channelmixer_params_t::algorithm_version, CHANNEL_GRAY, CHANNEL_MIXER_VERSION_1, CHANNEL_RED, dt_iop_module_t::default_params, and i.
| const char * name | ( | ) |
Definition at line 155 of file channelmixer.c.
|
static |
Definition at line 445 of file channelmixer.c.
References CHANNEL_BLUE, CHANNEL_GREEN, CHANNEL_RED, dt_bauhaus_combobox_get(), dt_bauhaus_slider_set(), dt_bauhaus_slider_set_default(), dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, p, and dt_iop_module_t::params.
Referenced by gui_init().
| 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 | ||
| ) |
Definition at line 374 of file channelmixer.c.
References dt_dev_pixelpipe_iop_t::data, DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_iop_roi_t::height, dt_dev_pixelpipe_t::mask_display, dt_iop_channelmixer_data_t::operation_mode, OPERATION_MODE_GRAY, OPERATION_MODE_HSL_V1, OPERATION_MODE_HSL_V2, OPERATION_MODE_RGB, ovoid, process_gray(), process_hsl_v1(), process_hsl_v2(), process_rgb(), dt_dev_pixelpipe_iop_t::roi_out, and dt_iop_roi_t::width.
|
static |
Definition at line 355 of file channelmixer.c.
References __OMP_PARALLEL_FOR__, ch, dt_iop_buffer_dsc_t::channels, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::dsc_in, dt_iop_roi_t::height, k, out, dt_iop_channelmixer_data_t::rgb_matrix, and dt_iop_roi_t::width.
Referenced by process().
|
static |
Definition at line 240 of file channelmixer.c.
References __OMP_PARALLEL_FOR__, ch, dt_iop_buffer_dsc_t::channels, clamp_simd(), dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::dsc_in, for_each_channel, dt_iop_roi_t::height, hsl2rgb(), dt_iop_channelmixer_data_t::hsl_matrix, i, k, out, rgb, rgb2hsl(), dt_iop_channelmixer_data_t::rgb_matrix, and dt_iop_roi_t::width.
Referenced by process().
|
static |
Definition at line 285 of file channelmixer.c.
References __OMP_PARALLEL_FOR__, ch, dt_iop_buffer_dsc_t::channels, clamp_simd(), dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::dsc_in, for_each_channel, dt_iop_roi_t::height, hsl2rgb(), dt_iop_channelmixer_data_t::hsl_matrix, i, k, out, rgb, rgb2hsl(), dt_iop_channelmixer_data_t::rgb_matrix, and dt_iop_roi_t::width.
Referenced by process().
|
static |
Definition at line 335 of file channelmixer.c.
References __OMP_PARALLEL_FOR__, ch, dt_iop_buffer_dsc_t::channels, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::dsc_in, dt_iop_roi_t::height, i, k, out, dt_iop_channelmixer_data_t::rgb_matrix, and dt_iop_roi_t::width.
Referenced by process().
Definition at line 400 of file channelmixer.c.
References dt_iop_module_t::dev, dt_bauhaus_combobox_get(), dt_bauhaus_slider_get(), dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, p, dt_iop_module_t::params, TRUE, and value.
Referenced by gui_init().