![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "pixel/bilateral.h"#include "colorprofiles/colorspaces.h"#include "math/math.h"#include "common/opencl.h"#include "control/control.h"#include "develop/develop.h"#include "system/macros.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "common/module_versioning.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "develop/tiling.h"#include "widgets/drawingarea.h"#include "gui/color_picker_proxy.h"#include "gui/presets.h"#include "iop/iop_api.h"#include <assert.h>#include <stdlib.h>#include <string.h>#include "gui/screen_metrics.h"
Include dependency graph for monochrome.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_monochrome_params_t |
| struct | dt_iop_monochrome_data_t |
| struct | dt_iop_monochrome_gui_data_t |
Macros | |
| #define | DT_COLORCORRECTION_INSET DT_PIXEL_APPLY_DPI(5) |
| #define | DT_COLORCORRECTION_MAX 40. |
| #define | PANEL_WIDTH 256.0f |
Typedefs | |
| typedef struct dt_iop_monochrome_params_t | dt_iop_monochrome_params_t |
| typedef struct dt_iop_monochrome_data_t | dt_iop_monochrome_data_t |
| typedef struct dt_iop_monochrome_gui_data_t | dt_iop_monochrome_gui_data_t |
Functions | |
| const char * | name () |
| 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) |
| 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) |
| const char ** | description (struct dt_iop_module_t *self) |
| 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_presets (dt_iop_module_so_t *self) |
| static | __attribute__ ((always_inline)) |
| __DT_CLONE_TARGETS__ int | process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o) |
| void | tiling_callback (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling) |
| 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 | gui_update (struct dt_iop_module_t *self) |
| Refresh GUI controls from current params and configuration. | |
| 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) |
| static gboolean | dt_iop_monochrome_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data) |
| void | color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static gboolean | dt_iop_monochrome_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) |
| static gboolean | dt_iop_monochrome_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static gboolean | dt_iop_monochrome_button_release (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static gboolean | dt_iop_monochrome_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
| static gboolean | dt_iop_monochrome_scrolled (GtkWidget *widget, GdkEventScroll *event, gpointer user_data) |
| void | gui_init (struct dt_iop_module_t *self) |
| void | gui_cleanup (struct dt_iop_module_t *self) |
| #define DT_COLORCORRECTION_INSET DT_PIXEL_APPLY_DPI(5) |
Definition at line 81 of file monochrome.c.
| #define DT_COLORCORRECTION_MAX 40. |
Definition at line 82 of file monochrome.c.
| #define PANEL_WIDTH 256.0f |
Definition at line 83 of file monochrome.c.
| typedef struct dt_iop_monochrome_data_t dt_iop_monochrome_data_t |
| typedef struct dt_iop_monochrome_gui_data_t dt_iop_monochrome_gui_data_t |
| typedef struct dt_iop_monochrome_params_t dt_iop_monochrome_params_t |
|
inlinestatic |
Definition at line 182 of file monochrome.c.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 306 of file monochrome.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 373 of file monochrome.c.
References dt_iop_module_t::dev, dt_control_queue_redraw_widget(), dt_dev_add_history_item, dt_iop_module_t::gui, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, TRUE, and dt_iop_module_gui_t::widget.
| 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 279 of file monochrome.c.
References d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, dt_opencl_avoid_atomics(), p, and dt_dev_pixelpipe_iop_t::process_cl_ready.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 121 of file monochrome.c.
References IOP_CS_LAB.
| int default_group | ( | ) |
Definition at line 111 of file monochrome.c.
References IOP_GROUP_EFFECTS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 134 of file monochrome.c.
References dt_iop_set_description().
|
static |
Definition at line 417 of file monochrome.c.
References dt_iop_monochrome_params_t::a, dt_iop_monochrome_params_t::b, dt_iop_module_t::default_params, DT_COLORCORRECTION_INSET, dt_iop_color_picker_reset(), dt_iop_gui_data(), FALSE, g, dt_iop_module_t::gui, height, p, PANEL_WIDTH, dt_iop_module_t::params, dt_iop_monochrome_params_t::size, TRUE, dt_iop_module_gui_t::widget, and width.
Referenced by gui_init().
|
static |
Definition at line 452 of file monochrome.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_gui_data(), FALSE, g, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 312 of file monochrome.c.
References dt_cairo_image_surface_create(), DT_COLORCORRECTION_INSET, dt_gui_widgets_suppressed(), dt_iop_gui_data(), DT_PIXEL_APPLY_DPI, f, FALSE, g, height, i, Lab, M_PI, p, PANEL_WIDTH, dt_iop_module_t::params, rgb, TRUE, width, and x.
Referenced by gui_init().
|
static |
Definition at line 467 of file monochrome.c.
References dt_iop_gui_data(), g, dt_iop_module_t::gui, TRUE, and dt_iop_module_gui_t::widget.
Referenced by gui_init().
|
static |
Definition at line 394 of file monochrome.c.
References dt_iop_module_t::dev, DT_COLORCORRECTION_INSET, dt_dev_add_history_item, dt_iop_gui_data(), g, dt_iop_module_t::gui, height, p, PANEL_WIDTH, dt_iop_module_t::params, TRUE, dt_iop_module_gui_t::widget, and width.
Referenced by gui_init().
|
static |
Definition at line 476 of file monochrome.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_gui_get_scroll_unit_deltas(), dt_iop_color_picker_reset(), p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
| int flags | ( | ) |
Definition at line 116 of file monochrome.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_DEPRECATED, IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
Definition at line 529 of file monochrome.c.
References dt_iop_gui_data(), g, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 495 of file monochrome.c.
References dt_bauhaus_slider_from_params(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), DT_COLORSPACE_LAB, DT_COLORSPACE_SRGB, dt_colorspaces_get_profile(), DT_GUI_BOX_SPACING, dt_iop_monochrome_button_press(), dt_iop_monochrome_button_release(), dt_iop_monochrome_draw(), dt_iop_monochrome_leave_notify(), dt_iop_monochrome_motion_notify(), dt_iop_monochrome_scrolled(), DT_PROFILE_ROLE_ANY, DT_PROFILE_ROLE_INPUT, dt_widget_scroll_mask(), dtgtk_drawing_area_new_with_aspect_ratio(), g, dt_iop_module_t::gui, IOP_GUI_ALLOC, dt_colorspaces_color_profile_t::profile, TRUE, and dt_iop_module_gui_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
Definition at line 294 of file monochrome.c.
References dt_iop_gui_data(), FALSE, and g.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 300 of file monochrome.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 157 of file monochrome.c.
References dt_gui_presets_add_generic(), dt_iop_module_so_t::op, p, and dt_iop_monochrome_params_t::size.
| 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 | ||
| ) |
Definition at line 126 of file monochrome.c.
References dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, default_input_format(), and TYPE_FLOAT.
| 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 143 of file monochrome.c.
References dt_iop_monochrome_params_t::highlights.
| const char * name | ( | ) |
Definition at line 106 of file monochrome.c.
| __DT_CLONE_TARGETS__ int process | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | i, | ||
| void *const | o | ||
| ) |
Definition at line 208 of file monochrome.c.
References __OMP_PARALLEL_FOR__, d, dt_dev_pixelpipe_iop_t::data, dt_bilateral_blur(), dt_bilateral_free(), dt_bilateral_init(), dt_bilateral_slice(), dt_bilateral_splat(), dt_dev_get_module_scale(), envelope(), dt_iop_roi_t::height, i, IS_NULL_PTR, k, out, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, sigma_r, sigma_s, t, and dt_iop_roi_t::width.
| void tiling_callback | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| struct dt_develop_tiling_t * | tiling | ||
| ) |
Definition at line 253 of file monochrome.c.
References dt_bilateral_memory_use(), dt_bilateral_singlebuffer_size(), dt_dev_get_module_scale(), height, dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::roi_in, sigma_r, sigma_s, width, and dt_iop_roi_t::width.