![]() |
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/darktable.h"#include "common/histogram.h"#include "common/image_cache.h"#include "common/mipmap_cache.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/pixelpipe.h"#include "dtgtk/paint.h"#include "dtgtk/resetlabel.h"#include "gui/gtk.h"#include "gui/presets.h"#include "gui/color_picker_proxy.h"#include "iop/iop_api.h"
Include dependency graph for exposure.c:Data Structures | |
| struct | dt_iop_exposure_params_t |
| struct | dt_iop_exposure_gui_data_t |
| struct | dt_iop_exposure_data_t |
| struct | dt_iop_exposure_global_data_t |
Macros | |
| #define | exposure2white(x) exp2f(-(x)) |
| #define | white2exposure(x) -dt_log2f(fmaxf(1e-20f, x)) |
| #define | DEFLICKER_BINS_COUNT (UINT16_MAX + 1) |
Typedefs | |
| typedef enum dt_iop_exposure_mode_t | dt_iop_exposure_mode_t |
| typedef enum dt_spot_mode_t | dt_spot_mode_t |
| typedef struct dt_iop_exposure_params_t | dt_iop_exposure_params_t |
| typedef struct dt_iop_exposure_gui_data_t | dt_iop_exposure_gui_data_t |
| typedef struct dt_iop_exposure_data_t | dt_iop_exposure_data_t |
| typedef struct dt_iop_exposure_global_data_t | dt_iop_exposure_global_data_t |
Enumerations | |
| enum | dt_iop_exposure_mode_t { EXPOSURE_MODE_MANUAL , EXPOSURE_MODE_DEFLICKER } |
| enum | dt_spot_mode_t { DT_SPOT_MODE_CORRECT = 0 , DT_SPOT_MODE_MEASURE = 1 , DT_SPOT_MODE_LAST } |
| #define DEFLICKER_BINS_COUNT (UINT16_MAX + 1) |
| typedef struct dt_iop_exposure_data_t dt_iop_exposure_data_t |
| typedef struct dt_iop_exposure_global_data_t dt_iop_exposure_global_data_t |
| typedef struct dt_iop_exposure_gui_data_t dt_iop_exposure_gui_data_t |
| typedef enum dt_iop_exposure_mode_t dt_iop_exposure_mode_t |
| typedef struct dt_iop_exposure_params_t dt_iop_exposure_params_t |
| typedef enum dt_spot_mode_t dt_spot_mode_t |
| enum dt_spot_mode_t |
|
static |
References _exposure_set_white(), _get_exposure_bias(), _paint_hue(), c, darktable, dot_product(), dt_bauhaus_combobox_get(), dt_bauhaus_slider_get(), dt_bauhaus_slider_set(), dt_conf_set_float(), DT_DEBUG_DEV, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_ioppr_get_pipe_input_profile_info(), dt_Lab_to_XYZ(), dt_print(), DT_SPOT_MODE_CORRECT, DT_SPOT_MODE_MEASURE, dt_XYZ_to_Lab(), dt_XYZ_to_sRGB(), exposure2white, g, darktable_t::gui, dt_iop_module_t::gui_data, Lab, Lch, dt_iop_order_iccprofile_info_t::matrix_in, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, dt_gui_gtk_t::reset, RGB, white2exposure, and XYZ.
Referenced by _spot_settings_changed_callback(), and color_picker_apply().
|
static |
References dt_iop_color_picker_reset(), and TRUE.
Referenced by gui_changed(), and gui_update().
|
static |
References _raw_to_ev(), dt_dev_histogram_stats_t::bins_count, dt_dev_histogram_stats_t::ch, dt_dev_pixelpipe_iop_t::dsc_in, i, n, p, dt_dev_histogram_stats_t::pixels, dt_iop_buffer_dsc_t::raw_black_level, dt_iop_buffer_dsc_t::raw_white_point, and dt_iop_buffer_dsc_t::rawprepare.
Referenced by _process_common_setup().
|
static |
References dt_dev_histogram_collection_params_t::bins_count, dt_mipmap_buffer_t::buf, dt_dev_histogram_stats_t::ch, dt_iop_buffer_dsc_t::channels, dt_image_t::crop_height, dt_image_t::crop_width, dt_image_t::crop_x, dt_image_t::crop_y, darktable, dt_iop_buffer_dsc_t::datatype, DEFLICKER_BINS_COUNT, dt_iop_module_t::dev, dt_image_t::dsc, dt_control_log(), dt_histogram_helper_cs_RAW_uint16(), dt_histogram_worker(), dt_image_cache_get(), dt_image_cache_read_release(), DT_MIPMAP_BLOCKING, dt_mipmap_cache_get, dt_mipmap_cache_release, DT_MIPMAP_FULL, dt_image_t::filename, dt_image_t::height, dt_image_t::id, darktable_t::image_cache, dt_develop_t::image_storage, darktable_t::mipmap_cache, dt_dev_histogram_collection_params_t::roi, TYPE_UINT16, dt_histogram_roi_t::width, and dt_image_t::width.
Referenced by _process_common_setup(), gui_changed(), and gui_update().
|
static |
References darktable, dt_free, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References _exposure_set_white(), darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, exposure2white, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by _exposure_set_white(), and gui_changed().
|
static |
References _exposure_set_black(), darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, and white2exposure.
Referenced by _auto_set_exposure(), _exposure_set_black(), and gui_changed().
|
static |
References dt_iop_module_t::dev, dt_image_t::exif_exposure_bias, and dt_develop_t::image_storage.
Referenced by _auto_set_exposure(), commit_params(), and gui_update().
|
static |
References dt_cairo_image_surface_create(), DT_PIXEL_APPLY_DPI, g, dt_iop_module_t::gui_data, height, INNER_PADDING, INTERNAL_PADDING, TRUE, and width.
Referenced by gui_init().
|
static |
References dt_bauhaus_slider_get_hard_max(), dt_bauhaus_slider_get_hard_min(), DT_BAUHAUS_SLIDER_MAX_STOPS, dt_bauhaus_slider_set_stop(), dt_Lab_to_XYZ(), dt_XYZ_to_sRGB(), g, dt_iop_module_t::gui_data, i, Lab, Lch, RGB, x, and XYZ.
Referenced by _auto_set_exposure(), and _spot_settings_changed_callback().
|
static |
References _compute_correction(), _deflicker_prepare_histogram(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_has_preview_output(), dt_free, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), exposure2white, g, dt_iop_module_t::gui_data, and dt_iop_module_t::params.
Referenced by commit_params().
|
static |
References MAX.
Referenced by _compute_correction().
|
static |
References _auto_set_exposure(), _paint_hue(), darktable, dt_iop_module_t::dev, dt_bauhaus_combobox_get(), dt_bauhaus_slider_get(), dt_conf_set_float(), dt_iop_color_picker_is_active_module(), DT_SPOT_MODE_CORRECT, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_develop_t::pipe, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References dt_bauhaus_slider_get(), dt_cairo_image_surface_create(), dt_Lab_to_XYZ(), DT_PIXEL_APPLY_DPI, dt_XYZ_to_sRGB(), g, dt_iop_module_t::gui_data, height, INNER_PADDING, INTERNAL_PADDING, Lab, Lch, RGB, TRUE, width, and XYZ.
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, 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 _auto_set_exposure(), darktable, DT_DEBUG_DEV, dt_print(), darktable_t::gui, dt_gui_gtk_t::reset, and void().
| 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 _get_exposure_bias(), _process_common_setup(), dt_iop_buffer_dsc_t::channels, d, dt_dev_pixelpipe_iop_t::data, dt_iop_buffer_dsc_t::datatype, dt_iop_module_t::dev, dt_image_t::dsc, dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_pixelpipe_iop_t::dsc_out, dt_image_is_raw(), EXPOSURE_MODE_DEFLICKER, dt_develop_t::image_storage, p, dt_iop_buffer_dsc_t::processed_maximum, and TYPE_UINT16.
| 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_TONES.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
| int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, and IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
References _autoexp_disable(), _deflicker_prepare_histogram(), _exposure_set_black(), _exposure_set_white(), dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, dt_iop_module_t::dev, dt_image_t::dsc, dt_bauhaus_combobox_set(), dt_free, dt_image_is_raw(), exposure2white, EXPOSURE_MODE_DEFLICKER, EXPOSURE_MODE_MANUAL, FALSE, g, dt_iop_module_t::gui_data, dt_develop_t::image_storage, p, dt_iop_module_t::params, and TYPE_UINT16.
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References dt_free, g, dt_iop_module_t::gui_data, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References _draw(), _origin_color_draw(), _spot_settings_changed_callback(), _target_color_draw(), darktable_t::bauhaus, darktable, dt_bauhaus_combobox_from_params(), DT_BAUHAUS_COMBOBOX_NEW_FULL, dt_bauhaus_slider_from_params(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_default(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_range(), DT_BAUHAUS_SPACE, dt_bauhaus_toggle_from_params(), dt_bauhaus_widget_set_label(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), DT_GUI_MODULE, dt_gui_new_collapsible_section(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXEL_APPLY_DPI, dt_ui_label_new(), dt_ui_section_label_new(), FALSE, g, IOP_GUI_ALLOC, dt_bauhaus_t::quad_width, TRUE, and dt_iop_module_t::widget.
| void gui_reset | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_color_picker_reset(), and TRUE.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
References _autoexp_disable(), _deflicker_prepare_histogram(), _get_exposure_bias(), dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, dt_iop_module_t::dev, dt_image_t::dsc, dt_bauhaus_slider_set(), dt_conf_get_float(), dt_free, dt_gui_update_collapsible_section(), dt_image_is_raw(), dt_iop_color_picker_reset(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), EXPOSURE_MODE_DEFLICKER, EXPOSURE_MODE_MANUAL, FALSE, g, dt_iop_module_t::gui_data, dt_develop_t::image_storage, p, dt_iop_module_t::params, TRUE, and TYPE_UINT16.
| void init_global | ( | dt_iop_module_so_t * | module | ) |
References dt_opencl_create_kernel(), and dt_iop_exposure_global_data_t::kernel_exposure.
| 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, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| 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 d, dt_iop_module_t::default_params, EXPOSURE_MODE_DEFLICKER, EXPOSURE_MODE_MANUAL, FALSE, and n.
| const char * name | ( | ) |
| void output_format | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_buffer_dsc_t * | dsc | ||
| ) |
References default_output_format().
| int process | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | i, | ||
| void *const | o | ||
| ) |
References dt_iop_buffer_dsc_t::channels, d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::dsc_in, DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_iop_alpha_copy(), dt_load_simd_aligned(), dt_simd_set1(), dt_store_simd_aligned(), dt_iop_roi_t::height, i, dt_dev_pixelpipe_t::mask_display, out, p, dt_dev_pixelpipe_iop_t::roi_out, and dt_iop_roi_t::width.