![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"
#include "control/control.h"
#include "common/colorspaces_inline_conversions.h"
#include "common/math.h"
#include "common/rgb_norms.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "gui/color_picker_proxy.h"
#include "develop/tiling.h"
Data Structures | |
struct | dt_iop_basicadj_params_t |
struct | dt_iop_basicadj_gui_data_t |
struct | dt_iop_basicadj_data_t |
struct | dt_iop_basicadj_global_data_t |
Macros | |
#define | exposure2white(x) exp2f(-(x)) |
Typedefs | |
typedef struct dt_iop_basicadj_params_t | dt_iop_basicadj_params_t |
typedef struct dt_iop_basicadj_gui_data_t | dt_iop_basicadj_gui_data_t |
typedef struct dt_iop_basicadj_data_t | dt_iop_basicadj_data_t |
typedef struct dt_iop_basicadj_global_data_t | dt_iop_basicadj_global_data_t |
Functions | |
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 * | deprecated_msg () |
const char * | name () |
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) |
static void | _turn_select_region_off (struct dt_iop_module_t *self) |
static void | _turn_selregion_picker_off (struct dt_iop_module_t *self) |
void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
static void | _color_picker_callback (GtkWidget *button, dt_iop_module_t *self) |
static void | _auto_levels_callback (GtkButton *button, dt_iop_module_t *self) |
static void | _select_region_toggled_callback (GtkToggleButton *togglebutton, dt_iop_module_t *self) |
static void | _develop_ui_pipe_finished_callback (gpointer instance, gpointer user_data) |
static void | _signal_profile_user_changed (gpointer instance, uint8_t profile_type, gpointer user_data) |
int | mouse_moved (struct dt_iop_module_t *self, double x, double y, double pressure, int which) |
int | button_released (struct dt_iop_module_t *self, double x, double y, int which, uint32_t state) |
int | button_pressed (struct dt_iop_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state) |
void | gui_post_expose (struct dt_iop_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery) |
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 float | get_gamma (const float x, const float gamma) |
static float | get_lut_gamma (const float x, const float gamma, const float *const lut) |
static float | get_contrast (const float x, const float contrast, const float middle_grey, const float inv_middle_grey) |
static float | get_lut_contrast (const float x, const float contrast, const float middle_grey, const float inv_middle_grey, const float *const lut) |
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 *params, 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_update (struct dt_iop_module_t *self) |
void | gui_focus (struct dt_iop_module_t *self, gboolean in) |
void | change_image (struct dt_iop_module_t *self) |
void | gui_init (struct dt_iop_module_t *self) |
void | gui_cleanup (struct dt_iop_module_t *self) |
static int64_t | doubleToRawLongBits (double d) |
static double | longBitsToDouble (int64_t i) |
static int | ilogbp1 (double d) |
static double | ldexpk (double x, int32_t q) |
static double | xlog (double d) |
static double | gamma2 (double x) |
static double | igamma2 (double x) |
static void | _get_auto_exp_histogram (const float *const img, const int width, const int height, int *box_area, uint32_t **_histogram, unsigned int *_hist_size, int *_histcompr) |
static void | _get_sum_and_average (const uint32_t *const histogram, const int hist_size, float *_sum, float *_avg) |
static float | hlcurve (const float level, const float hlcomp, const float hlrange) |
static void | _get_auto_exp (const uint32_t *const histogram, const unsigned int hist_size, const int histcompr, const float defgain, const float clip, const float midgray, float *_expcomp, float *_bright, float *_contr, float *_black, float *_hlcompr, float *_hlcomprthresh) |
static void | _auto_exposure (const float *const img, const int width, const int height, int *box_area, const float clip, const float midgray, float *_expcomp, float *_bright, float *_contr, float *_black, float *_hlcompr, float *_hlcomprthresh) |
static void | _get_selected_area (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, dt_iop_basicadj_gui_data_t *g, const dt_iop_roi_t *const roi_in, int *box_out) |
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) |
#define exposure2white | ( | x | ) | exp2f(-(x)) |
typedef struct dt_iop_basicadj_data_t dt_iop_basicadj_data_t |
typedef struct dt_iop_basicadj_global_data_t dt_iop_basicadj_global_data_t |
typedef struct dt_iop_basicadj_gui_data_t dt_iop_basicadj_gui_data_t |
typedef struct dt_iop_basicadj_params_t dt_iop_basicadj_params_t |
|
static |
References _get_auto_exp(), _get_auto_exp_histogram(), dt_free_align, height, and width.
Referenced by process().
|
static |
References _turn_selregion_picker_off(), darktable, dt_iop_module_t::dev, darktable_t::develop, dt_dev_add_history_item, dt_dev_invalidate_all, dt_dev_refresh_ui_images, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_request_focus(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::off, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References _turn_select_region_off().
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), darktable_t::gui, dt_iop_module_t::gui_data, gui_update(), dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_cleanup(), and gui_init().
|
static |
|
static |
References cleanup(), dt_alloc_align, height, R, and width.
Referenced by _auto_exposure().
|
static |
References dt_iop_module_t::dev, dt_dev_distort_transform_plus(), DT_DEV_TRANSFORM_DIR_BACK_INCL, height, dt_iop_roi_t::height, dt_iop_module_t::iop_order, MAX, MIN, dt_dev_pixelpipe_iop_t::pipe, dt_iop_roi_t::scale, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process().
|
static |
Referenced by _get_auto_exp().
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_request_focus(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::off, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References darktable, dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_bauhaus_slider_set_default(), DT_COLORSPACES_PROFILE_TYPE_WORK, dt_ioppr_get_iop_work_profile_info(), dt_ioppr_get_profile_info_middle_grey(), dt_iop_module_t::enabled, darktable_t::gui, dt_iop_module_t::gui_data, dt_develop_t::iop, dt_iop_basicadj_params_t::middle_grey, and dt_gui_gtk_t::reset.
Referenced by gui_cleanup(), and gui_init().
|
static |
References dt_iop_module_t::gui_data.
Referenced by _color_picker_callback(), _turn_selregion_picker_off(), gui_changed(), and gui_focus().
|
static |
References _turn_select_region_off(), dt_iop_color_picker_reset(), and TRUE.
Referenced by _auto_levels_callback(), and button_pressed().
int button_pressed | ( | struct dt_iop_module_t * | self, |
double | x, | ||
double | y, | ||
double | pressure, | ||
int | which, | ||
int | type, | ||
uint32_t | state | ||
) |
int button_released | ( | struct dt_iop_module_t * | self, |
double | x, | ||
double | y, | ||
int | which, | ||
uint32_t | state | ||
) |
void change_image | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_module_t::gui_data.
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 | ||
) |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_camera_rgb_luminance(), dt_dev_add_history_item, dt_ioppr_get_pipe_current_profile_info(), dt_ioppr_get_rgb_matrix_luminance(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::nonlinearlut, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_dev_pixelpipe_iop_t::pipe, dt_gui_gtk_t::reset, and TRUE.
void commit_params | ( | struct dt_iop_module_t * | self, |
dt_iop_params_t * | params, | ||
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_RGB.
int default_group | ( | ) |
References IOP_GROUP_EFFECTS.
const char * deprecated_msg | ( | ) |
const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
inlinestatic |
int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_DEPRECATED, and IOP_FLAGS_SUPPORTS_BLENDING.
Referenced by _get_auto_exp().
|
inlinestatic |
Referenced by commit_params(), and get_lut_contrast().
|
inlinestatic |
Referenced by commit_params(), and get_lut_gamma().
|
inlinestatic |
References get_contrast().
Referenced by process().
|
inlinestatic |
References get_gamma().
Referenced by process().
void gui_changed | ( | dt_iop_module_t * | self, |
GtkWidget * | w, | ||
void * | previous | ||
) |
References _turn_select_region_off().
void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
void gui_focus | ( | struct dt_iop_module_t * | self, |
gboolean | in | ||
) |
References _turn_select_region_off().
void gui_init | ( | struct dt_iop_module_t * | self | ) |
References _auto_levels_callback(), _color_picker_callback(), _develop_ui_pipe_finished_callback(), _select_region_toggled_callback(), _signal_profile_user_changed(), change_image(), darktable, dt_action_button_new(), dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_range(), DT_BAUHAUS_SPACE, DT_COLOR_PICKER_AREA, dt_color_picker_new(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_gui_add_class(), DT_PIXEL_APPLY_DPI, DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, dtgtk_cairo_paint_colorpicker(), dtgtk_togglebutton_new(), IOP_GUI_ALLOC, darktable_t::signals, TRUE, and dt_iop_module_t::widget.
void gui_post_expose | ( | struct dt_iop_module_t * | self, |
cairo_t * | cr, | ||
int32_t | width, | ||
int32_t | height, | ||
int32_t | pointerx, | ||
int32_t | pointery | ||
) |
References dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_width, darktable, darktable_t::develop, dt_control_get_dev_closeup(), dt_control_get_dev_zoom(), dt_control_get_dev_zoom_x(), dt_control_get_dev_zoom_y(), dt_dev_get_zoom_scale(), dt_iop_module_t::enabled, dt_iop_module_t::gui_data, height, dt_develop_t::preview_pipe, and width.
void gui_update | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_module_t::gui_data.
Referenced by _develop_ui_pipe_finished_callback().
|
inlinestatic |
Referenced by _get_auto_exp().
|
inlinestatic |
References doubleToRawLongBits(), and m.
Referenced by xlog().
void init_global | ( | dt_iop_module_so_t * | module | ) |
References dt_opencl_create_kernel(), and dt_iop_basicadj_global_data_t::kernel_basicadj.
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.
References longBitsToDouble(), and m.
Referenced by xlog().
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_basicadj_params_t::black_point.
int mouse_moved | ( | struct dt_iop_module_t * | self, |
double | x, | ||
double | y, | ||
double | pressure, | ||
int | which | ||
) |
const char * name | ( | ) |
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 _auto_exposure(), _get_selected_area(), dt_dev_pixelpipe_iop_t::colors, darktable, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_camera_rgb_luminance(), DT_DEV_PIXELPIPE_PREVIEW, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_ioppr_get_iop_work_profile_info(), dt_ioppr_get_rgb_matrix_luminance(), dt_rgb_norm(), DT_RGB_NORM_NONE, exposure2white, get_lut_contrast(), get_lut_gamma(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_roi_t::height, hlcurve(), dt_develop_t::iop, dt_iop_basicadj_data_t::lut_contrast, dt_iop_basicadj_data_t::lut_gamma, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::nonlinearlut, P, dt_iop_basicadj_data_t::params, dt_dev_pixelpipe_iop_t::pipe, dt_gui_gtk_t::reset, 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 | ||
) |