![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <assert.h>#include <math.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include "bauhaus/bauhaus.h"#include "common/colorspaces.h"#include "common/opencl.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "develop/imageop_gui.h"#include "develop/openmp_maths.h"#include "dtgtk/drawingarea.h"#include "gui/draw.h"#include "gui/gtk.h"#include "gui/presets.h"#include "iop/iop_api.h"#include "libs/colorpicker.h"
Include dependency graph for levels.c:Data Structures | |
| struct | dt_iop_levels_params_t |
| struct | dt_iop_levels_gui_data_t |
| struct | dt_iop_levels_data_t |
Macros | |
| #define | DT_GUI_CURVE_EDITOR_INSET DT_PIXEL_APPLY_DPI(5) |
| #define | DT_GUI_CURVE_INFL .3f |
Typedefs | |
| typedef enum dt_iop_levels_mode_t | dt_iop_levels_mode_t |
| typedef struct dt_iop_levels_params_t | dt_iop_levels_params_t |
| typedef struct dt_iop_levels_gui_data_t | dt_iop_levels_gui_data_t |
| typedef struct dt_iop_levels_data_t | dt_iop_levels_data_t |
Enumerations | |
| enum | dt_iop_levels_mode_t { LEVELS_MODE_MANUAL , LEVELS_MODE_AUTOMATIC } |
| #define DT_GUI_CURVE_EDITOR_INSET DT_PIXEL_APPLY_DPI(5) |
| #define DT_GUI_CURVE_INFL .3f |
| typedef struct dt_iop_levels_data_t dt_iop_levels_data_t |
| typedef struct dt_iop_levels_gui_data_t dt_iop_levels_gui_data_t |
| typedef enum dt_iop_levels_mode_t dt_iop_levels_mode_t |
| typedef struct dt_iop_levels_params_t dt_iop_levels_params_t |
| enum dt_iop_levels_mode_t |
| void cleanup_pipe | ( | 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_free_align.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
| void commit_params | ( | dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_histogram_collection_params_t::bins_count, compute_lut(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_has_preview_output(), DT_REQUEST_ON, DT_REQUEST_ONLY_IN_GUI, dt_develop_t::gui_attached, dt_dev_pixelpipe_iop_t::histogram_params, LEVELS_MODE_AUTOMATIC, LEVELS_MODE_MANUAL, p, dt_iop_module_t::request_histogram, and dt_dev_pixelpipe_iop_t::request_histogram.
|
static |
References compute_lut(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_control_log(), dt_dev_pixelpipe_has_preview_output(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_levels_compute_levels_automatic(), g, dt_dev_pixelpipe_iop_t::global_hash, dt_iop_module_t::gui_data, LEVELS_MODE_AUTOMATIC, and dt_dev_pixelpipe_iop_t::roi_out.
Referenced by process().
|
static |
References d, dt_dev_pixelpipe_iop_t::data, delta, and i.
Referenced by commit_params(), and commit_params_late().
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_LAB.
| int default_group | ( | ) |
References IOP_GROUP_TONES.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
References c, dt_cairo_image_surface_create(), dt_draw_histogram_8(), dt_draw_vertical_lines(), DT_GUI_CURVE_EDITOR_INSET, DT_PIXEL_APPLY_DPI, dt_iop_module_t::enabled, FALSE, dt_iop_module_t::gui_data, height, dt_iop_module_t::histogram, dt_iop_module_t::histogram_max, p, dt_iop_module_t::params, TRUE, and width.
Referenced by gui_init().
|
static |
References c, darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_levels_compute_levels_manual(), FALSE, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::histogram, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References c, darktable, dt_iop_module_t::default_params, dt_iop_module_t::dev, darktable_t::develop, dt_dev_add_history_item, dt_iop_request_focus(), FALSE, dt_iop_module_t::gui_data, dt_develop_t::gui_module, dt_iop_module_t::params, dt_iop_module_t::params_size, TRUE, and dt_iop_module_t::widget.
Referenced by gui_init().
|
static |
References c, FALSE, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References dt_dev_histogram_stats_t::bins_count, d, dt_dev_pixelpipe_iop_t::data, dt_alloc_align(), dt_free_align, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_module_t::histogram, dt_iop_module_t::histogram_stats, i, n, and dt_dev_histogram_stats_t::pixels.
Referenced by commit_params_late().
|
static |
References levels().
Referenced by dt_iop_levels_autoadjust_callback().
|
static |
References c, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References c, darktable, darktable_t::develop, dist(), dt_dev_add_history_item, DT_GUI_CURVE_EDITOR_INSET, dt_iop_levels_move_handle(), dt_iop_module_t::gui_data, height, p, dt_iop_module_t::params, TRUE, and width.
Referenced by gui_init().
|
static |
Move handler_move to new_pos, storing the value in handles, while keeping new_pos within a valid range and preserving the ratio between the three handles.
| self | Pointer to this module to be able to access gui_data |
| handle_move | Handle to move |
| new_pow | New position (0..1) |
| levels | Pointer to dt_iop_levels_params->levels. |
| drag_start_percentage | Ratio between handle 1, 2 and 3. |
References c, FALSE, dt_iop_module_t::gui_data, and levels().
Referenced by dt_iop_levels_motion_notify(), and dt_iop_levels_scroll().
|
static |
References c, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_conf_get_int(), dt_conf_set_int(), dt_dev_add_history_item, dt_gui_get_scroll_unit_deltas(), dt_iop_color_picker_reset(), dt_iop_levels_move_handle(), dt_iop_request_focus(), dt_modifier_is(), dtgtk_drawing_area_set_aspect_ratio(), FALSE, dt_iop_module_t::gui_data, dt_develop_t::gui_module, p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
| int flags | ( | ) |
References IOP_FLAGS_DEPRECATED, and IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
References g, dt_iop_module_t::gui_data, LEVELS_MODE_AUTOMATIC, p, and dt_iop_module_t::params.
Referenced by gui_update().
| void gui_cleanup | ( | dt_iop_module_t * | self | ) |
References g, dt_iop_module_t::gui_data, and IOP_GUI_FREE.
| void gui_init | ( | dt_iop_module_t * | self | ) |
References c, darktable, dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_format(), dt_color_picker_new(), DT_COLOR_PICKER_POINT, dt_conf_get_int(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_levels_area_draw(), dt_iop_levels_autoadjust_callback(), dt_iop_levels_button_press(), dt_iop_levels_button_release(), dt_iop_levels_leave_notify(), dt_iop_levels_motion_notify(), dt_iop_levels_scroll(), dtgtk_drawing_area_new_with_aspect_ratio(), FALSE, darktable_t::gui, IOP_GUI_ALLOC, levels(), dt_gui_gtk_t::scroll_mask, TRUE, and dt_iop_module_t::widget.
| void gui_update | ( | dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
References dt_bauhaus_combobox_set(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), g, gui_changed(), dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and dt_iop_module_t::widget.
| void init | ( | dt_iop_module_t * | module | ) |
References d, dt_iop_default_init(), and dt_iop_levels_params_t::levels.
| void init_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| 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 | ||
| ) |
References d, dt_iop_module_t::default_params, levels(), and n.
| const char * name | ( | ) |
| int process | ( | 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 | ||
| ) |