![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/bilateral.h"#include "common/bilateralcl.h"#include "common/colorspaces.h"#include "common/math.h"#include "common/opencl.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "develop/tiling.h"#include "dtgtk/drawingarea.h"#include "gui/color_picker_proxy.h"#include "gui/gtk.h"#include "gui/presets.h"#include "iop/iop_api.h"#include <assert.h>#include <stdlib.h>#include <string.h>
Include dependency graph for monochrome.c: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 float | color_filter (const float ai, const float bi, const float a, const float b, const float size) |
| static float | envelope (const float L) |
| 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) |
| #define DT_COLORCORRECTION_MAX 40. |
| #define PANEL_WIDTH 256.0f |
| 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 |
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
|
static |
References a, b, CLAMPS, dt_fast_expf(), and size.
Referenced by dt_iop_monochrome_draw(), and process().
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
| 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 | ||
| ) |
References d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, 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 | ||
| ) |
References IOP_CS_LAB.
| int default_group | ( | ) |
References IOP_GROUP_EFFECTS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
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(), FALSE, g, dt_iop_module_t::gui_data, height, p, PANEL_WIDTH, dt_iop_module_t::params, dt_iop_monochrome_params_t::size, TRUE, dt_iop_module_t::widget, and width.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_color_picker_reset(), FALSE, g, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References color_filter(), darktable, dt_cairo_image_surface_create(), DT_COLORCORRECTION_INSET, DT_PIXEL_APPLY_DPI, f, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, height, i, Lab, M_PI, p, PANEL_WIDTH, dt_iop_module_t::params, dt_gui_gtk_t::reset, rgb, TRUE, width, and x.
Referenced by gui_init().
|
static |
References g, dt_iop_module_t::gui_data, TRUE, and dt_iop_module_t::widget.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, DT_COLORCORRECTION_INSET, dt_dev_add_history_item, g, dt_iop_module_t::gui_data, height, p, PANEL_WIDTH, dt_iop_module_t::params, TRUE, dt_iop_module_t::widget, and width.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, 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 | ( | ) |
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References g, dt_iop_module_t::gui_data, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References darktable, dt_bauhaus_slider_from_params(), DT_BAUHAUS_SPACE, DT_COLOR_PICKER_AREA, dt_color_picker_new(), DT_COLORSPACE_LAB, DT_COLORSPACE_SRGB, dt_colorspaces_get_profile(), 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_DIRECTION_ANY, DT_PROFILE_DIRECTION_IN, dtgtk_drawing_area_new_with_aspect_ratio(), g, darktable_t::gui, IOP_GUI_ALLOC, dt_colorspaces_color_profile_t::profile, dt_gui_gtk_t::scroll_mask, TRUE, and dt_iop_module_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
References FALSE, g, and dt_iop_module_t::gui_data.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
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 | ) |
| 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 | ||
| ) |
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
References dt_iop_monochrome_params_t::highlights.
| const char * name | ( | ) |
| 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 | ||
| ) |
References b, color_filter(), d, dt_dev_pixelpipe_iop_t::data, dt_bilateral_blur(), dt_bilateral_free(), dt_bilateral_init(), dt_bilateral_slice(), dt_bilateral_splat(), envelope(), dt_iop_roi_t::height, i, out, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::scale, 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 | ||
| ) |
References dt_bilateral_memory_use(), dt_bilateral_singlebuffer_size(), height, dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::roi_in, dt_iop_roi_t::scale, sigma_r, sigma_s, width, and dt_iop_roi_t::width.