![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/bauhaus.h"#include "system/macros.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "common/module_versioning.h"#include "database/database.h"#include "math/math.h"#include "pixel/rgb_norms.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "develop/imageop_gui.h"#include "develop/tiling.h"#include "widgets/draw.h"#include "gui/presets.h"#include "iop/iop_api.h"#include <assert.h>#include <gtk/gtk.h>#include <inttypes.h>#include <stdlib.h>#include <string.h>#include "widgets/scroll_wrap.h"#include "gui/screen_metrics.h"
Include dependency graph for basecurve.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_basecurve_node_t |
| struct | dt_iop_basecurve_params_t |
| struct | dt_iop_basecurve_params5_t |
| struct | dt_iop_basecurve_params3_t |
| struct | dt_iop_basecurve_params2_t |
| struct | dt_iop_basecurve_params1_t |
| struct | dt_iop_basecurve_gui_data_t |
| struct | basecurve_preset_t |
| struct | dt_iop_basecurve_data_t |
Macros | |
| #define | DT_GUI_CURVE_EDITOR_INSET DT_PIXEL_APPLY_DPI(5) |
| #define | DT_GUI_CURVE_INFL .3f |
| #define | DT_IOP_TONECURVE_RES 256 |
| #define | MAXNODES 20 |
| #define | m MONOTONE_HERMITE |
| #define | BASECURVE_DEFAULT_STEP (0.001f) |
| #define BASECURVE_DEFAULT_STEP (0.001f) |
Definition at line 1457 of file basecurve.c.
| #define DT_GUI_CURVE_EDITOR_INSET DT_PIXEL_APPLY_DPI(5) |
Definition at line 98 of file basecurve.c.
| #define DT_GUI_CURVE_INFL .3f |
Definition at line 99 of file basecurve.c.
| #define DT_IOP_TONECURVE_RES 256 |
Definition at line 100 of file basecurve.c.
| const float m MONOTONE_HERMITE |
Definition at line 283 of file basecurve.c.
Referenced by _a_shared_group_is_cloned_before_its_opacity_changes(), _apply_matrix(), _apply_preferences(), _bind_match(), _dfs_visit(), _display_default(), _display_offset(), _event_matches(), _extract_event(), _focus_next_control(), _focus_previous_control(), _free_metadata_queue(), _get_current_configuration(), _get_custom_model(), _get_member_reads_a_row_by_identity(), _get_metadata_per_index(), _get_model(), _hex_contains(), _image_update_group_tooltip(), _iop_dim_all_but(), _lens_corrections_available(), _lens_ids_for_camera(), _lib_metadata_init_queue(), _lib_metadata_refill_grid(), _lib_metadata_setup_grid(), _ls_find_lens(), _menuitem_preferences(), _metadata_add_metadata_to_list(), _metadata_remove_metadata_from_list(), _metadata_update_markup(), _metadata_update_tooltip(), _metadata_update_value(), _outline_window(), _path_interior(), _picker_max_chroma_for_m_hue(), _picker_project_opponent_to_display_rgb(), _polygon_get_mask_roi(), _rebuild_memory(), _refresh_owning_modules(), _remove_outliers(), _retouch_fill(), _scratch_per_px(), _set_opacity_clamps_and_reports_what_it_stored(), _set_operation_replaces_the_combine_op(), _set_printer(), _shed(), _shed_too_soon(), _studio_dev_teardown(), _toggle_expanded(), _tree_format_form_usage_label(), _tree_row_assign_to_modules(), _unet_forward_cl(), _weights_cl(), _window_share(), alloc_move_to(), backtransform(), box_max_1d(), box_max_vert_16wide(), box_min_1d(), box_min_vert_16wide(), catmull_rom_set(), clamp(), clampnan(), commit_params(), create_lens_kernel(), create_motion_kernel(), dark_channel(), demosaic_ppg(), dsvd(), dt_bauhaus_update_module(), dt_bauhaus_widget_set_label(), dt_control_merge_hdr_process(), dt_dev_next_multi_priority_for_op(), dt_drawlayer_widgets_draw_picker(), dt_exif_xmp_attach_export(), dt_get_medium(), dt_grouping_add_grouped_images(), dt_grouping_change_representative(), dt_grouping_get_group_images(), dt_hash(), dt_imageio_dng_write_tiff_header(), dt_imageio_open_exr(), dt_imageio_open_rgbe(), dt_iop_colorreconstruct_bilateral_splat(), dt_iop_colorzones_get_params(), dt_iop_commit_blend_params(), dt_iop_get_module_by_instance_name(), dt_iop_get_module_by_op_priority(), dt_iop_gui_cleanup_module(), dt_iop_gui_data(), dt_iop_gui_set_expanded(), dt_iop_is_first_instance(), dt_lib_init_module(), dt_lib_unload_module(), dt_nn_model_alignment(), dt_nn_model_anchor(), dt_nn_model_bin(), dt_nn_model_coarse_in_channels(), dt_nn_model_coarse_out_channels(), dt_nn_model_free(), dt_nn_model_free_cl(), dt_nn_model_in_channels(), dt_nn_model_load(), dt_nn_model_out_channels(), dt_nn_unet_apply(), dt_nn_unet_apply_stage(), dt_nn_unet_apply_stage_cl(), dt_nn_unet_scratch_bytes(), dt_nn_unet_scratch_maxblock_per_px(), dt_nn_unet_scratch_per_px(), dt_nn_unet_scratch_per_px_cl(), dt_pixelpipe_cache_pressure_monitor_init(), dt_pixelpipe_cache_pressure_react(), dt_pixelpipe_cache_pressure_triggered(), dt_pixelpipe_cache_pressure_watch_start(), dt_pixelpipe_cache_pressure_watch_stop(), easter(), fit_curve(), gauss_make_triangular(), gauss_solve_triangular(), gui_reset(), ilogbp1(), inv_matrix(), Kahan_sum(), kth_smallest(), ldexpk(), leave(), LinEqSolve(), load_update_max_16wide(), load_update_min_16wide(), monotone_hermite_set(), mul_mat_vec_2(), polar_decomposition(), process(), process(), process(), process_cl(), process_wavelets_cl(), pseudo_solve(), pseudo_solve_gaussian(), ptr_array_find_sorted(), ptr_array_insert_sorted(), rcd_ppg_border(), rt_copy_image_masked(), rt_copy_mask_to_alpha(), rt_fill_scaled_mask(), simplex(), smooth_path_linsys(), stampa_matrice(), swap_cols(), swap_rows(), transform(), transition_map(), transpose_dot_matrix(), transpose_dot_matrix(), transpose_dot_vector(), transpose_dot_vector(), update_max_16wide(), update_min_16wide(), window_max(), window_min(), and xlog().
| #define MAXNODES 20 |
Definition at line 101 of file basecurve.c.
Definition at line 152 of file basecurve.c.
|
inlinestatic |
Definition at line 439 of file basecurve.c.
References L.
|
inlinestatic |
Definition at line 1185 of file basecurve.c.
References i, k, selected, x, dt_iop_basecurve_node_t::x, and dt_iop_basecurve_node_t::y.
Referenced by dt_iop_basecurve_button_press(), and dt_iop_basecurve_motion_notify().
|
static |
Definition at line 1439 of file basecurve.c.
References ch, dt_iop_module_t::dev, dt_dev_add_history_item, dt_iop_basecurve_sanity_check(), dt_iop_gui_data(), L, p, dt_iop_module_t::params, TRUE, dt_iop_basecurve_node_t::x, and dt_iop_basecurve_node_t::y.
Referenced by _scrolled(), dt_iop_basecurve_key_press(), and dt_iop_basecurve_motion_notify().
|
static |
Definition at line 1459 of file basecurve.c.
References _move_point_internal(), BASECURVE_DEFAULT_STEP, dt_gui_get_scroll_delta(), dt_iop_gui_data(), L, and TRUE.
Referenced by gui_init().
|
inlinestatic |
Definition at line 502 of file basecurve.c.
References __OMP_PARALLEL_FOR__, dt_iop_eval_exp(), dt_rgb_norm(), height, k, L, out, unbounded_coeffs, and width.
Referenced by process_fusion(), and process_lut().
|
inlinestatic |
Definition at line 474 of file basecurve.c.
References __OMP_PARALLEL_FOR__, dt_iop_eval_exp(), f, height, i, k, L, out, unbounded_coeffs, and width.
Referenced by process_fusion(), and process_lut().
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 952 of file basecurve.c.
References d, dt_draw_curve_destroy(), dt_free_align, IS_NULL_PTR, L, and piece.
| 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 | ||
| ) |
Definition at line 901 of file basecurve.c.
References ch, d, dt_draw_curve_add_point(), dt_draw_curve_calc_values(), dt_draw_curve_destroy(), dt_draw_curve_new(), dt_draw_curve_set_point(), dt_iop_estimate_exp(), dt_iop_basecurve_params_t::exposure_fusion, k, L, p, piece, void(), and x.
|
inlinestatic |
Definition at line 537 of file basecurve.c.
References __OMP_PARALLEL_FOR__, L, max, MAX, min, MIN, v, and x.
Referenced by process_fusion().
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 387 of file basecurve.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 377 of file basecurve.c.
References IOP_GROUP_TONES.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 367 of file basecurve.c.
References dt_iop_set_description(), and L.
|
static |
Definition at line 1314 of file basecurve.c.
References _add_node(), ch, d, dt_iop_module_t::default_params, dt_iop_module_t::dev, dist(), dt_dev_add_history_item, dt_draw_curve_calc_value(), DT_GUI_CURVE_EDITOR_INSET, dt_iop_gui_data(), dt_modifier_is(), DT_PRIMARY_MASK, FALSE, dt_iop_module_t::gui, k, L, MAXNODES, min, p, dt_iop_module_t::params, selected, to_lin(), to_log(), TRUE, dt_iop_module_gui_t::widget, width, x, dt_iop_basecurve_node_t::x, and dt_iop_basecurve_node_t::y.
Referenced by gui_init().
|
static |
Definition at line 1018 of file basecurve.c.
References dt_bauhaus_get_global(), dt_cairo_image_surface_create(), dt_draw_curve_add_point(), dt_draw_curve_calc_values(), dt_draw_curve_destroy(), dt_draw_curve_new(), dt_draw_curve_set_point(), dt_draw_grid(), dt_draw_loglog_grid(), DT_GUI_CURVE_EDITOR_INSET, dt_iop_estimate_exp(), dt_iop_eval_exp(), dt_iop_gui_data(), DT_IOP_TONECURVE_RES, DT_PIXEL_APPLY_DPI, height, k, L, M_PI, p, dt_iop_module_t::params, to_log(), TRUE, unbounded_coeffs, width, x, dt_iop_basecurve_node_t::x, and dt_iop_basecurve_node_t::y.
Referenced by gui_init().
|
static |
|
static |
Definition at line 1476 of file basecurve.c.
References _move_point_internal(), BASECURVE_DEFAULT_STEP, dt_iop_gui_data(), dt_keys_mainpad_alternatives(), FALSE, key, L, and TRUE.
Referenced by gui_init().
|
static |
|
static |
Definition at line 1245 of file basecurve.c.
References _add_node(), _move_point_internal(), ch, dt_iop_module_t::dev, dist(), dt_dev_add_history_item, DT_GUI_CURVE_EDITOR_INSET, dt_iop_gui_data(), height, k, L, min, p, dt_iop_module_t::params, selected, to_lin(), to_log(), TRUE, width, x, dt_iop_basecurve_node_t::x, and dt_iop_basecurve_node_t::y.
Referenced by gui_init().
|
static |
Definition at line 1214 of file basecurve.c.
References ch, dt_iop_gui_data(), k, L, p, dt_iop_module_t::params, dt_iop_basecurve_node_t::x, and dt_iop_basecurve_node_t::y.
Referenced by _move_point_internal().
|
static |
| int flags | ( | ) |
Definition at line 382 of file basecurve.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_DEPRECATED, and IOP_FLAGS_SUPPORTS_BLENDING.
|
inlinestatic |
Definition at line 565 of file basecurve.c.
References __OMP_PARALLEL_FOR__, dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_free_align, i, IS_NULL_PTR, L, MAX, and MIN.
Referenced by gauss_expand(), and gauss_reduce().
|
inlinestatic |
Definition at line 611 of file basecurve.c.
References __OMP_PARALLEL_FOR__, gauss_blur(), i, and L.
Referenced by gauss_reduce(), and process_fusion().
|
inlinestatic |
: we'll need to pad up the image to get a good boundary condition!
: downsampling will not result in an energy conserving pattern (every 4 pixels one sample)
: neither will a mirror boundary condition (mirrors in subsampled values at random density)
: copy laplacian code from local laplacian filters, it's faster.
Definition at line 635 of file basecurve.c.
References ch, dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_free_align, gauss_blur(), gauss_expand(), i, IS_NULL_PTR, k, and L.
Referenced by process_fusion().
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 1514 of file basecurve.c.
References dt_iop_gui_data(), FALSE, g, L, p, dt_iop_module_t::params, and TRUE.
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1612 of file basecurve.c.
References dt_draw_curve_destroy(), dt_iop_gui_data(), and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1543 of file basecurve.c.
References _scrolled(), area_resized(), dt_iop_module_t::default_params, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_from_params(), dt_bauhaus_get_global(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_default(), dt_bauhaus_slider_set_digits(), dt_bauhaus_widget_set_label(), dt_draw_curve_add_point(), dt_draw_curve_new(), DT_GUI_BOX_SPACING, DT_GUI_MODULE, dt_iop_basecurve_button_press(), dt_iop_basecurve_draw(), dt_iop_basecurve_enter_notify(), dt_iop_basecurve_key_press(), dt_iop_basecurve_leave_notify(), dt_iop_basecurve_motion_notify(), dt_ui_resizable_drawing_area(), dt_widget_scroll_mask(), FALSE, dt_iop_module_t::gui, IOP_GUI_ALLOC, k, L, logbase_callback(), p, dt_iop_module_gui_t::timeout_handle, TRUE, and dt_iop_module_gui_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Definition at line 963 of file basecurve.c.
References dt_iop_gui_data(), g, dt_iop_module_t::gui, L, p, dt_iop_module_t::params, and dt_iop_module_gui_t::widget.
| void init | ( | dt_iop_module_t * | module | ) |
Definition at line 982 of file basecurve.c.
References dt_iop_basecurve_params_t::basecurve, d, dt_iop_default_init(), L, and dt_iop_basecurve_node_t::x.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 945 of file basecurve.c.
References dt_calloc_align(), and piece.
| void init_presets | ( | dt_iop_module_so_t * | self | ) |
Definition at line 427 of file basecurve.c.
References basecurve_camera_presets, basecurve_camera_presets_cnt, basecurve_presets, basecurve_presets_cnt, dt_database_release_transaction, dt_database_start_transaction, FALSE, set_presets(), and TRUE.
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
Definition at line 169 of file basecurve.c.
References dt_iop_basecurve_params_t::basecurve, CUBIC_SPLINE, DT_RGB_NORM_NONE, dt_iop_basecurve_params3_t::exposure_fusion, dt_iop_basecurve_params3_t::exposure_stops, k, L, MONOTONE_HERMITE, n, dt_iop_basecurve_params1_t::tonecurve_x, dt_iop_basecurve_params1_t::tonecurve_y, and dt_iop_basecurve_node_t::x.
Definition at line 1535 of file basecurve.c.
References dt_bauhaus_slider_get(), dt_iop_gui_data(), eval_grey(), g, and L.
Referenced by gui_init().
| const char * name | ( | ) |
| int process | ( | struct 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 | ||
| ) |
Definition at line 886 of file basecurve.c.
References d, L, ovoid, piece, process_fusion(), and process_lut().
| __DT_CLONE_TARGETS__ int process_fusion | ( | struct dt_iop_module_t * | self, |
| const 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 | ||
| ) |
Definition at line 669 of file basecurve.c.
References __OMP_PARALLEL_FOR__, apply_curve(), apply_legacy_curve(), compute_features(), d, dt_dev_pixelpipe_t::dev, dt_free, dt_ioppr_get_iop_work_profile_info(), dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_free_align, DT_RGB_NORM_NONE, error(), gauss_expand(), gauss_reduce(), dt_iop_roi_t::height, i, dt_develop_t::iop, IS_NULL_PTR, k, L, MIN, out, ovoid, piece, dt_iop_roi_t::scale, dt_iop_roi_t::width, and x.
Referenced by process().
| void process_lut | ( | struct dt_iop_module_t * | self, |
| const 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 | ||
| ) |
Definition at line 864 of file basecurve.c.
References apply_curve(), apply_legacy_curve(), d, dt_dev_pixelpipe_t::dev, dt_ioppr_get_iop_work_profile_info(), DT_RGB_NORM_NONE, dt_iop_roi_t::height, dt_develop_t::iop, L, out, ovoid, piece, and dt_iop_roi_t::width.
Referenced by process().
|
static |
Definition at line 392 of file basecurve.c.
References basecurve_preset_t::autoapply, dt_gui_presets_add_generic(), dt_gui_presets_update_autoapply(), dt_gui_presets_update_filter(), dt_gui_presets_update_iso(), dt_gui_presets_update_ldr(), dt_gui_presets_update_mml(), dt_iop_basecurve_params_t::exposure_fusion, FALSE, basecurve_preset_t::filter, FOR_RAW, basecurve_preset_t::iso_max, basecurve_preset_t::iso_min, k, L, basecurve_preset_t::maker, basecurve_preset_t::model, name(), dt_iop_module_so_t::op, and basecurve_preset_t::params.
Referenced by init_presets().
| void tiling_callback | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| struct dt_develop_tiling_t * | tiling | ||
| ) |
Definition at line 445 of file basecurve.c.
References d, L, MIN, piece, dt_iop_roi_t::scale, and dt_iop_roi_t::width.
Definition at line 1010 of file basecurve.c.
Referenced by dt_iop_basecurve_button_press(), and dt_iop_basecurve_motion_notify().
Definition at line 1002 of file basecurve.c.
Referenced by dt_iop_basecurve_button_press(), dt_iop_basecurve_draw(), and dt_iop_basecurve_motion_notify().
|
static |
Definition at line 285 of file basecurve.c.
Referenced by init_presets().
|
static |
Definition at line 320 of file basecurve.c.
Referenced by init_presets().
|
static |
Definition at line 322 of file basecurve.c.
Referenced by init_presets().
|
static |
Definition at line 346 of file basecurve.c.
Referenced by init_presets().
|
static |
Definition at line 255 of file basecurve.c.
Definition at line 268 of file basecurve.c.
Definition at line 265 of file basecurve.c.
Definition at line 266 of file basecurve.c.
Definition at line 264 of file basecurve.c.
Definition at line 253 of file basecurve.c.
Referenced by _refresh_preview_cursor_sample(), color_picker_apply(), and dt_dev_viewport_reset().
Definition at line 256 of file basecurve.c.
|
static |
Definition at line 257 of file basecurve.c.
Definition at line 269 of file basecurve.c.
Definition at line 261 of file basecurve.c.
|
static |
Definition at line 262 of file basecurve.c.
Definition at line 263 of file basecurve.c.
Definition at line 259 of file basecurve.c.
Definition at line 260 of file basecurve.c.
Definition at line 267 of file basecurve.c.
Definition at line 258 of file basecurve.c.