![]() |
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 } |
| #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 |
| __OMP_DECLARE_SIMD__ | ( | aligned(output, output_comp:16) uniform(shadows_weight, midtones_weight, highlights_weight) | ) |
References x.
| 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, and TRUE.
| 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 __OMP_PARALLEL_FOR__, d, dt_dev_pixelpipe_iop_t::data, DEG_TO_RAD, Delta_H(), dt_alloc_align_float(), DT_COLORBALANCE_SATURATION_DTUCS, DT_COLORBALANCE_SATURATION_JZAZBZ, dt_colormatrix_mul(), dt_conf_get_float(), dt_conf_get_int(), dt_free_align, dt_ioppr_get_pipe_current_profile_info(), dt_XYZ_to_xyY(), FALSE, g, H, i, IS_NULL_PTR, k, LUT_ELEM, M_PI, M_PI_F, dt_iop_order_iccprofile_info_t::matrix_in, MAX, p, r, rgb, STEPS, t, TRUE, xyY, xyY_to_dt_UCS_UV(), and XYZ.
| 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 __OMP_PARALLEL_FOR__, __OMP_PARALLEL_FOR_SIMD__, darktable_t::bauhaus, 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, k, LUT_ELEM, p, dt_bauhaus_t::pango_font_desc, dt_iop_module_t::params, set_color(), 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, IS_NULL_PTR, 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, 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, i, IOP_GUI_ALLOC, mask_callback(), RGB, row1, row2, dt_gui_gtk_t::scroll_mask, TRUE, dt_iop_module_t::widget, and XYZ.
| 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 | ( | ) |
References DEG_TO_RAD, DT_BAUHAUS_SLIDER_MAX_STOPS, dt_bauhaus_slider_set_stop(), i, RGB, x, and XYZ.
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(), IS_NULL_PTR, 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(), and XYZ_D65.
Referenced by color_picker_apply().
| __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 | ivoid, | ||
| void *const | ovoid | ||
| ) |
References __OMP_PARALLEL_FOR__, AI, 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_ioppr_get_pipe_current_profile_info(), DT_M_PI_F, dt_omploop_sfence, DT_PIXEL_APPLY_DPI, g, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_iop_roi_t::height, i, IS_NULL_PTR, k, lookup_gamut(), dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::matrix_out, MAX, MIN, out, ovoid, P, dt_dev_pixelpipe_iop_t::roi_out, soft_clip(), transpose_3xSSE(), dt_dev_pixelpipe_t::type, dt_iop_roi_t::width, XYZ_D65_to_D50_CAT16, and Y_to_dt_UCS_L_star().
|
inlinestatic |
References x.
Referenced by legacy_params(), and process().