![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"
#include "common/colorspaces_inline_conversions.h"
#include "common/math.h"
#include "common/opencl.h"
#include "common/exif.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_math.h"
#include "develop/openmp_maths.h"
#include "develop/tiling.h"
#include "dtgtk/drawingarea.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include "iop/gaussian_elimination.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <inttypes.h>
Data Structures | |
struct | dt_iop_colorchecker_params_t |
struct | dt_iop_colorchecker_gui_data_t |
struct | dt_iop_colorchecker_data_t |
struct | dt_iop_colorchecker_global_data_t |
Macros | |
#define | MAX_PATCHES 49 |
Typedefs | |
typedef struct dt_iop_colorchecker_params_t | dt_iop_colorchecker_params_t |
typedef struct dt_iop_colorchecker_gui_data_t | dt_iop_colorchecker_gui_data_t |
typedef struct dt_iop_colorchecker_data_t | dt_iop_colorchecker_data_t |
typedef struct dt_iop_colorchecker_global_data_t | dt_iop_colorchecker_global_data_t |
Functions | |
const char * | name () |
const char * | aliases () |
const char ** | description (struct dt_iop_module_t *self) |
int | default_group () |
int | flags () |
int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, 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) |
void | init_presets (dt_iop_module_so_t *self) |
static float | kernel (const float *x, const float *y) |
void | process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
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_reset (struct dt_iop_module_t *self) |
void | _colorchecker_rebuild_patch_list (struct dt_iop_module_t *self) |
void | _colorchecker_update_sliders (struct dt_iop_module_t *self) |
void | gui_update (struct dt_iop_module_t *self) |
void | init (dt_iop_module_t *module) |
void | init_global (dt_iop_module_so_t *module) |
void | cleanup_global (dt_iop_module_so_t *module) |
void | color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_iop_t *piece) |
static void | target_L_callback (GtkWidget *slider, gpointer user_data) |
static void | target_a_callback (GtkWidget *slider, gpointer user_data) |
static void | target_b_callback (GtkWidget *slider, gpointer user_data) |
static void | target_C_callback (GtkWidget *slider, gpointer user_data) |
static void | target_callback (GtkWidget *combo, gpointer user_data) |
static void | patch_callback (GtkWidget *combo, gpointer user_data) |
static gboolean | checker_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data) |
static gboolean | checker_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) |
static gboolean | checker_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
static gboolean | checker_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
void | gui_init (struct dt_iop_module_t *self) |
Variables | |
static const int | colorchecker_patches = 24 |
static const float | colorchecker_Lab [] |
#define MAX_PATCHES 49 |
typedef struct dt_iop_colorchecker_data_t dt_iop_colorchecker_data_t |
typedef struct dt_iop_colorchecker_gui_data_t dt_iop_colorchecker_gui_data_t |
typedef struct dt_iop_colorchecker_params_t dt_iop_colorchecker_params_t |
void _colorchecker_rebuild_patch_list | ( | struct dt_iop_module_t * | self | ) |
References dt_bauhaus_combobox_add(), dt_bauhaus_combobox_clear(), dt_bauhaus_combobox_get(), dt_bauhaus_combobox_length(), dtgtk_drawing_area_set_aspect_ratio(), dt_iop_module_t::gui_data, and dt_iop_module_t::params.
Referenced by checker_button_press(), and gui_update().
void _colorchecker_update_sliders | ( | struct dt_iop_module_t * | self | ) |
References dt_bauhaus_slider_set(), dt_iop_module_t::gui_data, and dt_iop_module_t::params.
Referenced by checker_button_press(), color_picker_apply(), gui_update(), patch_callback(), and target_callback().
const char * aliases | ( | ) |
|
static |
References _colorchecker_rebuild_patch_list(), _colorchecker_update_sliders(), darktable, darktable_t::develop, dt_bauhaus_combobox_set(), dt_dev_add_history_item, dt_modifier_is(), DT_REQUEST_COLORPICK_MODULE, FALSE, darktable_t::gui, dt_iop_module_t::gui_data, height, MAX_PATCHES, MIN, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_iop_module_t::request_color_pick, dt_gui_gtk_t::reset, TRUE, and width.
Referenced by gui_init().
|
static |
References dt_cairo_image_surface_create(), dt_Lab_to_XYZ(), DT_PIXEL_APPLY_DPI, dt_XYZ_to_sRGB(), dt_iop_module_t::gui_data, height, Lab(), dt_iop_module_t::params, TRUE, and width.
Referenced by gui_init().
|
static |
References FALSE.
Referenced by gui_init().
|
static |
References FALSE, dt_iop_module_t::gui_data, height, dt_iop_module_t::params, tooltip, TRUE, and width.
Referenced by gui_init().
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.
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 | ||
) |
References A, dt_iop_colorchecker_data_t::coeff_a, dt_iop_colorchecker_data_t::coeff_b, dt_iop_colorchecker_data_t::coeff_L, dt_dev_pixelpipe_iop_t::data, gauss_make_triangular(), gauss_solve(), gauss_solve_triangular(), kernel(), MAX_PATCHES, MIN, N, dt_iop_colorchecker_data_t::num_patches, and dt_iop_colorchecker_data_t::source_Lab.
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_COLOR.
const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, and IOP_FLAGS_SUPPORTS_BLENDING.
void gui_init | ( | struct dt_iop_module_t * | self | ) |
References darktable_t::bauhaus, checker_button_press(), checker_draw(), checker_leave_notify(), checker_motion_notify(), darktable, dt_iop_module_t::default_params, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_stop(), DT_BAUHAUS_SPACE, dt_bauhaus_widget_set_label(), dt_color_picker_new(), DT_COLOR_PICKER_POINT_AREA, DT_GUI_MODULE, dtgtk_drawing_area_new_with_aspect_ratio(), IOP_GUI_ALLOC, patch_callback(), target_a_callback(), target_b_callback(), target_C_callback(), target_callback(), target_L_callback(), TRUE, and dt_iop_module_t::widget.
void gui_reset | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_color_picker_reset(), and TRUE.
void gui_update | ( | struct dt_iop_module_t * | self | ) |
void init | ( | dt_iop_module_t * | module | ) |
References colorchecker_Lab, colorchecker_patches, dt_iop_colorchecker_params_t::num_patches, dt_iop_colorchecker_params_t::source_a, dt_iop_colorchecker_params_t::source_b, dt_iop_colorchecker_params_t::source_L, dt_iop_colorchecker_params_t::target_a, dt_iop_colorchecker_params_t::target_b, and dt_iop_colorchecker_params_t::target_L.
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 | ) |
The following are based on Jo's Fuji film emulations, without tonecurve which is let to user choice https://jo.dreggn.org/blog/ansel-fuji-styles.tar.xz
References DEVELOP_BLEND_CS_RGB_DISPLAY, dt_exif_xmp_decode(), dt_gui_presets_add_generic(), and dt_iop_module_so_t::op.
|
inlinestatic |
References fastlog(), and MAX.
Referenced by _compute_downsampling_kernel(), _compute_upsampling_kernel(), _masks_blur_13x13_coeff(), _masks_blur_5x5_coeff(), _prepare_resampling_plan(), build_matrix(), commit_params(), compute_kernel(), dt_focuspeaking(), dt_masks_blur_9x9_coeff(), edge_enhance_1d(), gaussian_kernel(), gaussian_sampler(), isotrope_laplacian(), process(), and process().
int legacy_params | ( | dt_iop_module_t * | self, |
const void *const | old_params, | ||
const int | old_version, | ||
void * | new_params, | ||
const int | new_version | ||
) |
const char * name | ( | ) |
|
static |
References _colorchecker_update_sliders(), darktable, dt_bauhaus_combobox_get(), dt_iop_color_picker_reset(), darktable_t::gui, dt_iop_module_t::gui_data, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
void process | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
const void *const | ivoid, | ||
void *const | ovoid, | ||
const dt_iop_roi_t *const | roi_in, | ||
const dt_iop_roi_t *const | roi_out | ||
) |
References dt_iop_colorchecker_data_t::coeff_a, dt_iop_colorchecker_data_t::coeff_b, dt_iop_colorchecker_data_t::coeff_L, dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_iop_alpha_copy(), dt_iop_roi_t::height, kernel(), dt_iop_colorchecker_data_t::num_patches, dt_dev_pixelpipe_iop_t::pipe, dt_iop_colorchecker_data_t::source_Lab, and dt_iop_roi_t::width.
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_get(), dt_bauhaus_slider_set(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_get(), dt_bauhaus_slider_set(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_get(), dt_bauhaus_slider_set(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, MAX, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References _colorchecker_update_sliders(), darktable, dt_bauhaus_combobox_get(), dt_iop_color_picker_reset(), darktable_t::gui, dt_iop_module_t::gui_data, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_get(), dt_dev_add_history_item, dt_iop_module_t::gui_data, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
|
static |
Referenced by add_hdr_patches(), add_patches_to_array(), init(), main_csv(), process_button_clicked_callback(), and process_data().
|
static |
Referenced by init().