![]() |
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>
Data Structures | |
struct | dt_iop_monochrome_params_t |
struct | dt_iop_monochrome_data_t |
struct | dt_iop_monochrome_gui_data_t |
struct | dt_iop_monochrome_global_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 |
typedef struct dt_iop_monochrome_global_data_t | dt_iop_monochrome_global_data_t |
Functions | |
const char * | name () |
int | default_group () |
int | flags () |
int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
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) |
void | process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
void | tiling_callback (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_in, const dt_iop_roi_t *roi_out, 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 | init_global (dt_iop_module_so_t *module) |
void | cleanup_global (dt_iop_module_so_t *module) |
void | gui_update (struct dt_iop_module_t *self) |
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_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_global_data_t dt_iop_monochrome_global_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_global | ( | dt_iop_module_so_t * | module | ) |
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.
|
static |
References 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_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 | ||
) |
int default_colorspace | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
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, dt_iop_module_t::gui_data, height, 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, 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, darktable_t::gui, dt_iop_module_t::gui_data, height, Lab(), M_PI, PANEL_WIDTH, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, and width.
Referenced by gui_init().
|
static |
References 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, dt_iop_module_t::gui_data, height, 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(), dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
int flags | ( | ) |
void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References 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(), 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 | ) |
References FALSE, and dt_iop_module_t::gui_data.
void init_global | ( | dt_iop_module_so_t * | module | ) |
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, and dt_dev_pixelpipe_iop_t::data_size.
void init_presets | ( | dt_iop_module_so_t * | self | ) |
References DEVELOP_BLEND_CS_RGB_DISPLAY, 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 | ||
) |
References dt_iop_monochrome_params_t::highlights.
const char * name | ( | ) |
void process | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
const void *const | i, | ||
void *const | o, | ||
const dt_iop_roi_t *const | roi_in, | ||
const dt_iop_roi_t *const | roi_out | ||
) |
References dt_iop_monochrome_data_t::a, dt_iop_monochrome_data_t::b, color_filter(), 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, dt_iop_monochrome_data_t::highlights, dt_dev_pixelpipe_iop_t::iscale, dt_iop_roi_t::scale, sigma_r, sigma_s, dt_iop_monochrome_data_t::size, and dt_iop_roi_t::width.
void tiling_callback | ( | struct dt_iop_module_t * | self, |
struct dt_dev_pixelpipe_iop_t * | piece, | ||
const dt_iop_roi_t * | roi_in, | ||
const dt_iop_roi_t * | roi_out, | ||
struct dt_develop_tiling_t * | tiling | ||
) |
References dt_dev_pixelpipe_iop_t::colors, dt_bilateral_memory_use(), dt_bilateral_singlebuffer_size(), height, dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::iscale, dt_iop_roi_t::scale, sigma_r, sigma_s, width, and dt_iop_roi_t::width.