![]() |
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/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) |
| #define exposure2white | ( | x | ) | exp2f(-(x)) |
| #define white2exposure | ( | x | ) | -dt_log2f(fmaxf(1e-20f, x)) |
| 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(), darktable, dot_product(), dt_bauhaus_combobox_get(), dt_bauhaus_slider_get(), dt_bauhaus_slider_set(), dt_conf_set_float(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_ioppr_get_pipe_input_profile_info(), dt_Lab_2_LCH(), dt_Lab_to_XYZ(), dt_LCH_2_Lab(), DT_SPOT_MODE_CORRECT, DT_SPOT_MODE_MEASURE, dt_XYZ_to_Lab(), dt_XYZ_to_sRGB(), exposure2white, darktable_t::gui, dt_iop_module_t::gui_data, Lab(), dt_iop_order_iccprofile_info_t::matrix_in, 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, and white2exposure.
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_t::dsc, 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_image_t::buf_dsc, 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_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_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), FALSE, darktable_t::gui, dt_iop_module_t::gui_data, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References dt_iop_module_t::params.
Referenced by gui_init().
|
static |
References EXPOSURE_MODE_DEFLICKER, and dt_iop_module_t::params.
Referenced by gui_init().
|
static |
References _exposure_set_white(), darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, exposure2white, darktable_t::gui, dt_iop_module_t::gui_data, 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, darktable_t::gui, dt_iop_module_t::gui_data, 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, 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_LCH_2_Lab(), dt_XYZ_to_sRGB(), dt_iop_module_t::gui_data, and Lab().
Referenced by _auto_set_exposure(), and _spot_settings_changed_callback().
|
static |
References _compute_correction(), _deflicker_prepare_histogram(), dt_iop_exposure_params_t::black, dt_iop_exposure_data_t::black, dt_dev_pixelpipe_iop_t::data, dt_iop_exposure_data_t::deflicker, DT_DEV_PIXELPIPE_PREVIEW, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_exposure_params_t::exposure, exposure2white, dt_iop_module_t::gui_data, dt_iop_exposure_data_t::params, dt_dev_pixelpipe_iop_t::pipe, and dt_iop_exposure_data_t::scale.
Referenced by process().
|
static |
References MAX.
Referenced by _compute_correction().
|
static |
|
static |
References dt_bauhaus_slider_get(), dt_cairo_image_surface_create(), dt_Lab_to_XYZ(), dt_LCH_2_Lab(), DT_PIXEL_APPLY_DPI, dt_XYZ_to_sRGB(), dt_iop_module_t::gui_data, height, INNER_PADDING, INTERNAL_PADDING, Lab(), TRUE, and width.
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 _auto_set_exposure(), darktable, darktable_t::gui, dt_dev_pixelpipe_iop_t::pipe, and dt_gui_gtk_t::reset.
| 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(), dt_iop_exposure_params_t::black, dt_image_t::buf_dsc, dt_iop_buffer_dsc_t::channels, dt_dev_pixelpipe_iop_t::data, dt_iop_buffer_dsc_t::datatype, dt_iop_exposure_data_t::deflicker, dt_iop_exposure_params_t::deflicker_percentile, dt_iop_exposure_params_t::deflicker_target_level, dt_iop_module_t::dev, dt_image_is_raw(), dt_iop_exposure_params_t::exposure, EXPOSURE_MODE_DEFLICKER, dt_develop_t::image_storage, dt_iop_exposure_data_t::params, and TYPE_UINT16.
| 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_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_image_t::buf_dsc, dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, dt_iop_module_t::dev, dt_bauhaus_combobox_set(), dt_image_is_raw(), exposure2white, EXPOSURE_MODE_DEFLICKER, EXPOSURE_MODE_MANUAL, FALSE, dt_iop_module_t::gui_data, dt_develop_t::image_storage, dt_iop_module_t::params, and TYPE_UINT16.
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References _draw(), _exposure_proxy_get_black(), _exposure_proxy_get_exposure(), _origin_color_draw(), _spot_settings_changed_callback(), _target_color_draw(), darktable_t::bauhaus, darktable, darktable_t::develop, 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(), dt_develop_t::exposure, FALSE, dt_dev_proxy_exposure_t::get_black, dt_dev_proxy_exposure_t::get_exposure, IOP_GUI_ALLOC, dt_develop_t::proxy, 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 | ) |
References _autoexp_disable(), _deflicker_prepare_histogram(), _get_exposure_bias(), dt_image_t::buf_dsc, dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, dt_iop_module_t::dev, dt_bauhaus_slider_set(), dt_conf_get_float(), 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, dt_iop_module_t::gui_data, dt_develop_t::image_storage, 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, and dt_dev_pixelpipe_iop_t::data_size.
| 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_exposure_params_t::black, dt_iop_exposure_params_t::compensate_exposure_bias, dt_iop_module_t::default_params, dt_iop_exposure_params_t::deflicker_percentile, dt_iop_exposure_params_t::deflicker_target_level, dt_iop_exposure_params_t::exposure, EXPOSURE_MODE_DEFLICKER, EXPOSURE_MODE_MANUAL, FALSE, and dt_iop_exposure_params_t::mode.
| const char * name | ( | ) |
| void process | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | i, | ||
| void *const | o, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const dt_iop_roi_t *const | roi_out | ||
| ) |