![]() |
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>
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, 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 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) |
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) |
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_iop_t *piece, 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_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_conf_set_float(), dt_iop_refresh_center(), darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References darktable, dt_conf_set_float(), dt_iop_refresh_center(), darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References darktable, dt_bauhaus_slider_get(), dt_conf_set_int(), dt_iop_refresh_center(), 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 | ||
) |
void color_picker_apply | ( | dt_iop_module_t * | self, |
GtkWidget * | picker, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, darktable_t::gui, gui_changed(), dt_iop_module_t::gui_data, 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 dt_iop_colorbalancergb_data_t::brilliance, dt_iop_colorbalancergb_data_t::brilliance_global, dt_iop_colorbalancergb_data_t::checker_color_1, dt_iop_colorbalancergb_data_t::checker_color_2, dt_iop_colorbalancergb_data_t::checker_size, dt_iop_colorbalancergb_data_t::chroma, dt_iop_colorbalancergb_data_t::chroma_global, dt_iop_colorbalancergb_data_t::contrast, 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_2_JzAzBz(), dt_XYZ_to_xyY(), FALSE, dt_iop_colorbalancergb_data_t::gamut_LUT, dt_iop_colorbalancergb_data_t::global, dt_iop_colorbalancergb_data_t::grey_fulcrum, H, dt_iop_colorbalancergb_data_t::highlights, dt_iop_colorbalancergb_data_t::highlights_weight, dt_iop_colorbalancergb_data_t::hue_angle, LUT_ELEM, dt_iop_colorbalancergb_data_t::lut_inited, M_PI, M_PI_F, dt_iop_colorbalancergb_data_t::mask_grey_fulcrum, dt_iop_order_iccprofile_info_t::matrix_in, MAX, dt_iop_colorbalancergb_data_t::midtones, dt_iop_colorbalancergb_data_t::midtones_weight, dt_iop_colorbalancergb_data_t::midtones_Y, dt_dev_pixelpipe_iop_t::pipe, dt_iop_colorbalancergb_data_t::saturation, dt_iop_colorbalancergb_data_t::saturation_formula, dt_iop_colorbalancergb_data_t::saturation_global, dt_iop_colorbalancergb_data_t::shadows, dt_iop_colorbalancergb_data_t::shadows_weight, sqf(), STEPS, TRUE, dt_iop_colorbalancergb_data_t::vibrance, dt_iop_colorbalancergb_data_t::white_fulcrum, dt_iop_colorbalancergb_data_t::work_profile, xyY_to_dt_UCS_UV(), XYZ_D50_to_D65_CAT16, and Ych_to_gradingRGB().
int default_colorspace | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
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, darktable, dt_gui_gtk_t::dpi, dt_alloc_align_float(), dt_cairo_image_surface_create(), dt_cairo_perceptual_gradient(), dt_free_align, DT_PIXEL_APPLY_DPI, dt_bauhaus_t::graph_bg, dt_bauhaus_t::graph_fg, darktable_t::gui, LUT_ELEM, opacity_masks(), dt_bauhaus_t::pango_font_desc, dt_iop_module_t::params, set_color(), sqf(), and TRUE.
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, darktable_t::gui, dt_iop_module_t::gui_data, 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(), dt_XYZ_to_Rec709_D65(), dtgtk_cairo_paint_showmask(), dtgtk_drawing_area_new_with_aspect_ratio(), FALSE, darktable_t::gui, IOP_GUI_ALLOC, mask_callback(), dt_gui_gtk_t::scroll_mask, TRUE, dt_iop_module_t::widget, and Ych_to_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 | ) |
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 | ) |
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_colorbalancergb_params_t::contrast, dt_iop_module_t::default_params, DT_COLORBALANCE_SATURATION_JZAZBZ, dt_iop_colorbalancergb_params_t::grey_fulcrum, M_PI, dt_iop_colorbalancergb_params_t::mask_grey_fulcrum, dt_iop_colorbalancergb_params_t::saturation_formula, dt_iop_colorbalancergb_params_t::saturation_global, and dt_iop_colorbalancergb_params_t::vibrance.
|
inlinestatic |
|
static |
References darktable, dt_iop_module_t::dev, dt_bauhaus_widget_set_quad_active(), dt_dev_invalidate, DT_DEV_PIXELPIPE_DISPLAY_NONE, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, dt_dev_refresh_ui_images, dt_iop_request_focus(), dt_iop_set_cache_bypass(), 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 |
References sqf().
Referenced by dt_iop_tonecurve_draw(), and process().
|
static |
References DEG_TO_RAD, DT_BAUHAUS_SLIDER_MAX_STOPS, dt_bauhaus_slider_set_stop(), dt_XYZ_to_Rec709_D65(), and Ych_to_XYZ().
Referenced by gui_changed().
void pipe_RGB_to_Ych | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
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, dt_dev_pixelpipe_iop_t::pipe, XYZ_D50_to_D65(), and XYZ_to_Ych().
Referenced by color_picker_apply().
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_colorbalancergb_data_t::brilliance, dt_iop_colorbalancergb_data_t::brilliance_global, dt_iop_colorbalancergb_data_t::checker_color_1, dt_iop_colorbalancergb_data_t::checker_color_2, dt_iop_colorbalancergb_data_t::checker_size, dt_iop_colorbalancergb_data_t::chroma, dt_iop_colorbalancergb_data_t::chroma_global, dt_iop_colorbalancergb_data_t::contrast, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dot_product(), 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_JzAzBz_2_XYZ(), DT_M_PI_F, DT_PIXEL_APPLY_DPI, dt_UCS_HCB_to_JCH(), dt_UCS_HSB_to_JCH(), dt_UCS_JCH_to_HCB(), dt_UCS_JCH_to_HSB(), dt_UCS_JCH_to_xyY(), dt_xyY_to_XYZ(), dt_XYZ_2_JzAzBz(), dt_XYZ_to_xyY(), for_four_channels, gamut_check_Yrg(), dt_iop_colorbalancergb_data_t::gamut_LUT, dt_iop_colorbalancergb_data_t::global, gradingRGB_to_LMS(), dt_iop_colorbalancergb_data_t::grey_fulcrum, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_iop_roi_t::height, dt_iop_colorbalancergb_data_t::highlights, dt_iop_colorbalancergb_data_t::highlights_weight, dt_iop_colorbalancergb_data_t::hue_angle, LMS_to_gradingRGB(), LMS_to_XYZ(), LMS_to_Yrg(), lookup_gamut(), M_PI_F, dt_iop_colorbalancergb_data_t::mask_grey_fulcrum, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::matrix_out, dt_iop_colorbalancergb_data_t::midtones, dt_iop_colorbalancergb_data_t::midtones_weight, dt_iop_colorbalancergb_data_t::midtones_Y, opacity_masks(), P, dt_dev_pixelpipe_iop_t::pipe, dt_iop_colorbalancergb_data_t::saturation, dt_iop_colorbalancergb_data_t::saturation_formula, dt_iop_colorbalancergb_data_t::saturation_global, scalar_product(), dt_iop_colorbalancergb_data_t::shadows, dt_iop_colorbalancergb_data_t::shadows_weight, sign(), soft_clip(), sqf(), dt_iop_colorbalancergb_data_t::vibrance, dt_iop_colorbalancergb_data_t::white_fulcrum, dt_iop_roi_t::width, xyY_to_dt_UCS_JCH(), XYZ_D50_to_D65_CAT16, XYZ_D65_to_D50_CAT16, XYZ_D65_to_LMS_2006_D65, Y_to_dt_UCS_L_star(), Ych_to_Yrg(), Yrg_to_LMS(), and Yrg_to_Ych().
|
inlinestatic |
Referenced by legacy_params(), and process().