![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/exif.h"#include "common/chromatic_adaptation.h"#include "common/colorspaces_inline_conversions.h"#include "common/opencl.h"#include "control/control.h"#include "develop/blend.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "develop/openmp_maths.h"#include "develop/imageop_gui.h"#include "dtgtk/drawingarea.h"#include "dtgtk/gradientslider.h"#include "gui/draw.h"#include "gui/gtk.h"#include "gui/presets.h"#include "gui/color_picker_proxy.h"#include "iop/iop_api.h"#include <stdlib.h>
Include dependency graph for colorbalancergb.c:Data Structures | |
| struct | dt_iop_colorbalancergb_params_t |
| struct | dt_iop_colorbalancergb_gui_data_t |
| struct | dt_iop_colorbalancergb_data_t |
| struct | dt_iop_colorbalance_global_data_t |
Macros | |
| #define | LUT_ELEM 360 |
| #define | STEPS 92 |
| #define | ANGLE_SHIFT -30.f |
| #define | DEG_TO_RAD(x) ((x + ANGLE_SHIFT) * M_PI / 180.f) |
| #define | RAD_TO_DEG(x) (x * 180.f / M_PI - ANGLE_SHIFT) |
Typedefs | |
| typedef enum dt_iop_colorbalancrgb_saturation_t | dt_iop_colorbalancrgb_saturation_t |
| typedef struct dt_iop_colorbalancergb_params_t | dt_iop_colorbalancergb_params_t |
| typedef enum dt_iop_colorbalancergb_mask_data_t | dt_iop_colorbalancergb_mask_data_t |
| typedef struct dt_iop_colorbalancergb_gui_data_t | dt_iop_colorbalancergb_gui_data_t |
| typedef struct dt_iop_colorbalancergb_data_t | dt_iop_colorbalancergb_data_t |
| typedef struct dt_iop_colorbalance_global_data_t | dt_iop_colorbalancergb_global_data_t |
Enumerations | |
| enum | dt_iop_colorbalancrgb_saturation_t { DT_COLORBALANCE_SATURATION_JZAZBZ = 0 , DT_COLORBALANCE_SATURATION_DTUCS = 1 } |
| enum | dt_iop_colorbalancergb_mask_data_t { MASK_SHADOWS = 0 , MASK_MIDTONES = 1 , MASK_HIGHLIGHTS = 2 , MASK_NONE } |
Functions | |
| const char * | name () |
| const char * | aliases () |
| 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) |
| 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) |
| void | init_presets (dt_iop_module_so_t *self) |
| static void | opacity_masks (const float x, const float shadows_weight, const float highlights_weight, const float midtones_weight, const float mask_grey_fulcrum, dt_aligned_pixel_t output, dt_aligned_pixel_t output_comp) |
| static float | soft_clip (const float x, const float soft_threshold, const float hard_threshold) |
| static float | lookup_gamut (const float *const gamut_lut, const float x) |
| 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 float | Delta_H (const float h_1, const float h_2) |
| 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 (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | cleanup_pipe (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | pipe_RGB_to_Ych (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_aligned_pixel_t RGB, dt_aligned_pixel_t Ych) |
| void | color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static void | paint_chroma_slider (GtkWidget *w, const float hue) |
| static void | mask_callback (GtkWidget *togglebutton, dt_iop_module_t *self) |
| static gboolean | dt_iop_tonecurve_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data) |
| static void | checker_1_picker_callback (GtkColorButton *widget, dt_iop_module_t *self) |
| static void | checker_2_picker_callback (GtkColorButton *widget, dt_iop_module_t *self) |
| static void | checker_size_callback (GtkWidget *widget, dt_iop_module_t *self) |
| void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
| void | gui_update (dt_iop_module_t *self) |
| void | gui_reset (dt_iop_module_t *self) |
| static gboolean | area_scroll_callback (GtkWidget *widget, GdkEventScroll *event, gpointer user_data) |
| void | gui_init (dt_iop_module_t *self) |
| void | gui_cleanup (struct dt_iop_module_t *self) |
| #define ANGLE_SHIFT -30.f |
| #define DEG_TO_RAD | ( | x | ) | ((x + ANGLE_SHIFT) * M_PI / 180.f) |
| #define LUT_ELEM 360 |
| #define RAD_TO_DEG | ( | x | ) | (x * 180.f / M_PI - ANGLE_SHIFT) |
| #define STEPS 92 |
| typedef struct dt_iop_colorbalancergb_data_t dt_iop_colorbalancergb_data_t |
| typedef struct dt_iop_colorbalancergb_params_t dt_iop_colorbalancergb_params_t |
| const char * aliases | ( | ) |
|
static |
References dt_conf_get_int(), dt_conf_set_int(), dt_gui_get_scroll_unit_deltas(), dt_modifier_is(), dtgtk_drawing_area_set_aspect_ratio(), FALSE, and TRUE.
Referenced by gui_init().
|
static |
References darktable, dt_iop_module_t::dev, dt_conf_set_float(), dt_dev_pixelpipe_update_history_main, darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References darktable, dt_iop_module_t::dev, dt_conf_set_float(), dt_dev_pixelpipe_update_history_main, darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References darktable, dt_iop_module_t::dev, dt_bauhaus_slider_get(), dt_conf_set_int(), dt_dev_pixelpipe_update_history_main, darktable_t::gui, dt_gui_gtk_t::reset, and size.
Referenced by gui_init().
| void cleanup_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References d, 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 | ||
| ) |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, g, darktable_t::gui, gui_changed(), dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_iop_module_t::picked_color_max, pipe_RGB_to_Ych(), RAD_TO_DEG, dt_gui_gtk_t::reset, TRUE, and Ych.
| 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 b, c, d, dt_dev_pixelpipe_iop_t::data, DEG_TO_RAD, Delta_H(), dot_product(), dt_alloc_align_float(), DT_COLORBALANCE_SATURATION_DTUCS, DT_COLORBALANCE_SATURATION_JZAZBZ, dt_colormatrix_mul(), dt_conf_get_float(), dt_conf_get_int(), dt_fast_hypotf(), dt_free_align, dt_ioppr_get_pipe_current_profile_info(), dt_XYZ_to_xyY(), FALSE, g, H, i, LUT_ELEM, M_PI, M_PI_F, dt_iop_order_iccprofile_info_t::matrix_in, MAX, p, r, rgb, sqf(), STEPS, t, TRUE, UV_star_prime, xyY, xyY_to_dt_UCS_UV(), XYZ, and Ych.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_RGB.
| int default_group | ( | ) |
References IOP_GROUP_COLOR.
|
inlinestatic |
References M_PI_F.
Referenced by commit_params().
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
References darktable_t::bauhaus, c, darktable, dt_gui_gtk_t::dpi, dt_alloc_align_float(), dt_cairo_image_surface_create(), dt_cairo_perceptual_gradient(), dt_free, dt_free_align, DT_PIXEL_APPLY_DPI, dt_bauhaus_t::graph_bg, dt_bauhaus_t::graph_fg, darktable_t::gui, i, LUT_ELEM, opacity_masks(), p, dt_bauhaus_t::pango_font_desc, dt_iop_module_t::params, set_color(), sqf(), TRUE, and x.
Referenced by gui_init().
| int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
References darktable, g, darktable_t::gui, dt_iop_module_t::gui_data, p, paint_chroma_slider(), dt_iop_module_t::params, and dt_gui_gtk_t::reset.
Referenced by color_picker_apply(), and gui_update().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References IOP_GUI_FREE.
| void gui_init | ( | dt_iop_module_t * | self | ) |
References area_scroll_callback(), darktable_t::bauhaus, c, checker_1_picker_callback(), checker_2_picker_callback(), checker_size_callback(), darktable, DEG_TO_RAD, dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), DT_BAUHAUS_SLIDER_MAX_STOPS, dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_feedback(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_range(), dt_bauhaus_slider_set_stop(), dt_bauhaus_widget_set_label(), dt_bauhaus_widget_set_quad_paint(), dt_bauhaus_widget_set_quad_toggle(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), dt_conf_get_int(), dt_conf_key_exists(), dt_conf_set_float(), dt_conf_set_int(), DT_GUI_MODULE, dt_iop_tonecurve_draw(), dt_ui_label_new(), dt_ui_notebook_new(), dt_ui_notebook_page(), dt_ui_section_label_new(), dtgtk_cairo_paint_showmask(), dtgtk_drawing_area_new_with_aspect_ratio(), FALSE, g, darktable_t::gui, h, i, IOP_GUI_ALLOC, mask_callback(), RGB, row1, row2, dt_gui_gtk_t::scroll_mask, TRUE, dt_iop_module_t::widget, XYZ, and Ych.
| void gui_reset | ( | dt_iop_module_t * | self | ) |
References dt_iop_color_picker_reset(), and TRUE.
| void gui_update | ( | dt_iop_module_t * | self | ) |
References dt_bauhaus_combobox_set(), dt_bauhaus_slider_set(), dt_bauhaus_widget_set_quad_active(), dt_conf_get_float(), dt_conf_get_int(), dt_iop_color_picker_reset(), FALSE, g, gui_changed(), dt_iop_module_t::gui_data, MASK_NONE, p, dt_iop_module_t::params, and TRUE.
| void init_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
| 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 | ||
| ) |
|
inlinestatic |
|
static |
References darktable, dt_iop_module_t::dev, dt_bauhaus_widget_set_quad_active(), DT_DEV_PIXELPIPE_DISPLAY_NONE, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, dt_dev_pixelpipe_update_history_main, dt_iop_request_focus(), dt_iop_set_cache_bypass(), g, darktable_t::gui, dt_iop_module_t::gui_data, MASK_HIGHLIGHTS, MASK_MIDTONES, MASK_NONE, MASK_SHADOWS, dt_iop_module_t::off, dt_iop_module_t::request_mask_display, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
| const char * name | ( | ) |
|
inlinestatic |
Referenced by dt_iop_tonecurve_draw(), and process().
References c, DEG_TO_RAD, DT_BAUHAUS_SLIDER_MAX_STOPS, dt_bauhaus_slider_set_stop(), h, i, RGB, x, XYZ, and Ych.
Referenced by gui_changed().
| void pipe_RGB_to_Ych | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_aligned_pixel_t | RGB, | ||
| dt_aligned_pixel_t | Ych | ||
| ) |
References dt_ioppr_get_pipe_current_profile_info(), dt_ioppr_rgb_matrix_to_xyz(), dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, M_PI, dt_iop_order_iccprofile_info_t::matrix_in_transposed, dt_iop_order_iccprofile_info_t::nonlinearlut, RGB, XYZ_D50, XYZ_D50_to_D65(), XYZ_D65, and Ych.
Referenced by color_picker_apply().
| 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 | ||
| ) |
References a, AI, AI_transposed, b, d, d0, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, DT_ALIGNED_PIXEL, DT_COLORBALANCE_SATURATION_JZAZBZ, dt_colormatrix_mul(), DT_DEV_PIXELPIPE_FULL, dt_fast_hypotf(), dt_ioppr_get_pipe_current_profile_info(), dt_load_simd_aligned(), DT_M_PI_F, DT_PIXEL_APPLY_DPI, dt_store_simd_aligned(), g, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, h, dt_iop_roi_t::height, i, L_white, lookup_gamut(), M_PI_F, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::matrix_out, opacity_masks(), out, P, dt_dev_pixelpipe_iop_t::roi_out, scalar_product(), soft_clip(), sqf(), transpose_3xSSE(), dt_dev_pixelpipe_t::type, dt_iop_roi_t::width, XYZ_D65_to_D50_CAT16, XYZ_D65_to_LMS_2006_D65, and Y_to_dt_UCS_L_star().
|
inlinestatic |
References x.
Referenced by legacy_params(), and process().