![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <assert.h>#include "system/macros.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "common/logging.h"#include "common/module_versioning.h"#include "database/database.h"#include <stdlib.h>#include <string.h>#include "widgets/bauhaus.h"#include "widgets/accelerators.h"#include "math/math.h"#include "common/opencl.h"#include "pixel/tea.h"#include "control/input.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "gui/presets.h"#include "widgets/draw.h"#include "iop/iop_api.h"#include <gtk/gtk.h>#include <inttypes.h>#include "widgets/label.h"
Include dependency graph for vignette.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_dvector_2d_t |
| struct | dt_iop_fvector_2d_t |
| struct | dt_iop_vignette_params1_t |
| struct | dt_iop_vignette_params2_t |
| struct | dt_iop_vignette_params3_t |
| struct | dt_iop_vignette_params_t |
| struct | dt_iop_vignette_gui_data_t |
| struct | dt_iop_vignette_data_t |
| struct | dt_iop_vignette_global_data_t |
| struct | dt_iop_vignette_geometry_t |
Macros | |
| #define | VIGNETTE_OUTLINE_SAMPLES 128 |
Typedefs | |
| typedef enum dt_iop_dither_t | dt_iop_dither_t |
| typedef struct dt_iop_dvector_2d_t | dt_iop_dvector_2d_t |
| typedef struct dt_iop_fvector_2d_t | dt_iop_vector_2d_t |
| typedef struct dt_iop_vignette_params1_t | dt_iop_vignette_params1_t |
| typedef struct dt_iop_vignette_params2_t | dt_iop_vignette_params2_t |
| typedef struct dt_iop_vignette_params3_t | dt_iop_vignette_params3_t |
| typedef struct dt_iop_vignette_params_t | dt_iop_vignette_params_t |
| typedef struct dt_iop_vignette_gui_data_t | dt_iop_vignette_gui_data_t |
| typedef struct dt_iop_vignette_data_t | dt_iop_vignette_data_t |
| typedef struct dt_iop_vignette_global_data_t | dt_iop_vignette_global_data_t |
| typedef struct dt_iop_vignette_geometry_t | dt_iop_vignette_geometry_t |
Enumerations | |
| enum | dt_iop_dither_t { DITHER_OFF = 0 , DITHER_8BIT = 1 , DITHER_16BIT = 2 } |
| #define VIGNETTE_OUTLINE_SAMPLES 128 |
Definition at line 298 of file vignette.c.
| typedef enum dt_iop_dither_t dt_iop_dither_t |
| typedef struct dt_iop_dvector_2d_t dt_iop_dvector_2d_t |
| typedef struct dt_iop_fvector_2d_t dt_iop_vector_2d_t |
| typedef struct dt_iop_vignette_data_t dt_iop_vignette_data_t |
| typedef struct dt_iop_vignette_geometry_t dt_iop_vignette_geometry_t |
| typedef struct dt_iop_vignette_global_data_t dt_iop_vignette_global_data_t |
| typedef struct dt_iop_vignette_gui_data_t dt_iop_vignette_gui_data_t |
| typedef struct dt_iop_vignette_params1_t dt_iop_vignette_params1_t |
| typedef struct dt_iop_vignette_params2_t dt_iop_vignette_params2_t |
| typedef struct dt_iop_vignette_params3_t dt_iop_vignette_params3_t |
| typedef struct dt_iop_vignette_params_t dt_iop_vignette_params_t |
| enum dt_iop_dither_t |
| Enumerator | |
|---|---|
| DITHER_OFF | |
| DITHER_8BIT | |
| DITHER_16BIT | |
Definition at line 84 of file vignette.c.
|
static |
|
static |
Definition at line 419 of file vignette.c.
References _draw_closed_path(), DT_PIXEL_APPLY_DPI, i, M_PI, and VIGNETTE_OUTLINE_SAMPLES.
Referenced by gui_post_expose().
|
static |
Definition at line 372 of file vignette.c.
References _module_to_image_abs(), _vignette_handles(), dt_iop_module_t::dev, dt_dev_coordinates_image_norm_to_image_abs(), dt_dev_coordinates_widget_to_image_norm(), DT_GUI_MOUSE_EFFECT_RADIUS, i, k, and x.
Referenced by gui_post_expose(), and mouse_moved().
|
static |
Definition at line 344 of file vignette.c.
References dt_iop_module_t::dev, dt_dev_distort_transform_gui(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, and dt_iop_module_t::iop_order.
Referenced by _get_grab(), and gui_post_expose().
|
static |
Definition at line 398 of file vignette.c.
References dt_iop_vignette_geometry_t::cx, dt_iop_vignette_geometry_t::cy, i, M_PI, dt_iop_vignette_geometry_t::shape, t, and VIGNETTE_OUTLINE_SAMPLES.
Referenced by gui_post_expose().
|
static |
Definition at line 300 of file vignette.c.
References dt_iop_vignette_geometry_t::cx, dt_iop_vignette_geometry_t::cy, dt_iop_module_t::dev, dt_dev_module_geometry_gui(), FALSE, dt_iop_vignette_geometry_t::frx, dt_iop_vignette_geometry_t::fry, dt_iop_vignette_geometry_t::height, dt_iop_roi_t::height, dt_iop_vignette_geometry_t::longest, MAX, MIN, p, dt_iop_vignette_geometry_t::rx, dt_iop_vignette_geometry_t::ry, dt_iop_vignette_geometry_t::shape, TRUE, dt_iop_vignette_geometry_t::width, and dt_iop_roi_t::width.
Referenced by gui_post_expose(), and mouse_moved().
|
static |
Definition at line 361 of file vignette.c.
References dt_iop_vignette_geometry_t::cx, dt_iop_vignette_geometry_t::cy, dt_iop_vignette_geometry_t::frx, dt_iop_vignette_geometry_t::fry, dt_iop_vignette_geometry_t::rx, and dt_iop_vignette_geometry_t::ry.
Referenced by _get_grab(), and gui_post_expose().
|
static |
Definition at line 350 of file vignette.c.
References dt_iop_module_t::dev, dt_dev_coordinates_image_norm_to_image_abs(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_backtransform_gui(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_iop_module_t::iop_order, and x.
Referenced by mouse_moved().
| int button_pressed | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which, | ||
| int | type, | ||
| uint32_t | state | ||
| ) |
Definition at line 596 of file vignette.c.
| int button_released | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | which, | ||
| uint32_t | state | ||
| ) |
Definition at line 603 of file vignette.c.
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 876 of file vignette.c.
References dt_iop_module_so_t::data, dt_free, dt_opencl_free_kernel(), and dt_iop_vignette_global_data_t::kernel_vignette.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 936 of file vignette.c.
References dt_free_align, 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 893 of file vignette.c.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 215 of file vignette.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 210 of file vignette.c.
References IOP_GROUP_EFFECTS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 195 of file vignette.c.
References dt_iop_set_description().
| int flags | ( | ) |
Definition at line 204 of file vignette.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_INCLUDE_IN_STYLES, IOP_FLAGS_SUPPORTS_BLENDING, and IOP_FLAGS_TILING_FULL_ROI.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 884 of file vignette.c.
References dt_iop_gui_data(), g, IS_NULL_PTR, p, and dt_iop_module_t::params.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 951 of file vignette.c.
References dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_toggle_from_params(), dt_ui_section_label_new(), FALSE, g, dt_iop_module_t::gui, IOP_GUI_ALLOC, and dt_iop_module_gui_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 | ||
| ) |
Definition at line 444 of file vignette.c.
References _draw_overlay(), _get_grab(), _module_to_image_abs(), _outline_sample(), _vignette_geometry(), _vignette_handles(), dt_iop_module_t::dev, dt_dev_coordinates_image_abs_to_image_norm(), dt_dev_coordinates_image_norm_to_preview_abs(), dt_dev_get_overlay_scale(), dt_dev_rescale_roi(), dt_draw_set_color_overlay(), dt_iop_gui_data(), DT_PIXEL_APPLY_DPI, FALSE, dt_iop_vignette_geometry_t::frx, dt_iop_vignette_geometry_t::fry, g, height, IS_NULL_PTR, p, dt_iop_module_t::params, dt_iop_vignette_geometry_t::rx, dt_iop_vignette_geometry_t::ry, TRUE, VIGNETTE_OUTLINE_SAMPLES, and width.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
gui callbacks, these are needed.
gui setup and update, these are needed.
Definition at line 942 of file vignette.c.
References dt_iop_gui_data(), g, IS_NULL_PTR, p, and dt_iop_module_t::params.
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 866 of file vignette.c.
References dt_opencl_create_kernel(), and dt_iop_vignette_global_data_t::kernel_vignette.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 930 of file vignette.c.
References dt_calloc_align(), and piece.
| void init_presets | ( | dt_iop_module_so_t * | self | ) |
Definition at line 910 of file vignette.c.
References dt_database_release_transaction, dt_database_start_transaction, dt_gui_presets_add_generic(), FALSE, dt_iop_module_so_t::op, p, dt_iop_vignette_params_t::scale, 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 220 of file vignette.c.
References dt_iop_vignette_params2_t::autoratio, dt_iop_vignette_params3_t::autoratio, dt_iop_vignette_params2_t::brightness, dt_iop_vignette_params3_t::brightness, dt_iop_vignette_params1_t::bsratio, dt_iop_vignette_params1_t::center, dt_iop_vignette_params2_t::center, dt_iop_vignette_params3_t::center, DITHER_OFF, dt_iop_vignette_params3_t::dithering, dt_iop_vignette_params1_t::falloff_scale, dt_iop_vignette_params2_t::falloff_scale, dt_iop_vignette_params3_t::falloff_scale, FALSE, dt_iop_vignette_params1_t::invert_falloff, dt_iop_vignette_params1_t::invert_saturation, MAX, MIN, dt_iop_vignette_params2_t::saturation, dt_iop_vignette_params3_t::saturation, dt_iop_vignette_params_t::scale, dt_iop_vignette_params1_t::scale, dt_iop_vignette_params2_t::scale, dt_iop_vignette_params3_t::scale, dt_iop_vignette_params2_t::shape, dt_iop_vignette_params3_t::shape, dt_iop_vignette_params1_t::strength, TRUE, dt_iop_vignette_params2_t::whratio, dt_iop_vignette_params3_t::whratio, dt_iop_fvector_2d_t::x, dt_iop_dvector_2d_t::x, dt_iop_fvector_2d_t::y, and dt_iop_dvector_2d_t::y.
| int mouse_moved | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
Definition at line 484 of file vignette.c.
References _get_grab(), _vignette_geometry(), _widget_to_module(), dt_iop_vignette_geometry_t::cx, dt_iop_vignette_geometry_t::cy, dt_bauhaus_slider_set(), dt_control_button_down(), dt_control_queue_cursor, dt_control_queue_redraw_center(), dt_iop_gui_data(), dt_modifier_is(), DT_PRIMARY_MASK, g, dt_iop_vignette_geometry_t::height, IS_NULL_PTR, dt_iop_vignette_geometry_t::longest, max, MAX, MIN, p, dt_iop_module_t::params, dt_iop_vignette_geometry_t::rx, dt_iop_vignette_geometry_t::ry, dt_iop_vignette_geometry_t::width, and x.
| const char * name | ( | ) |
Definition at line 190 of file vignette.c.
| __DT_CLONE_TARGETS__ 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 610 of file vignette.c.
References __OMP_PARALLEL_FOR__, alloc_tea_states(), dt_iop_vignette_data_t::autoratio, dt_iop_vignette_data_t::brightness, dt_iop_vignette_data_t::center, ch, CLIP, DITHER_16BIT, DITHER_8BIT, DITHER_OFF, dt_iop_vignette_data_t::dithering, dt_get_num_openmp_threads(), dt_get_thread_num(), encrypt_tea(), dt_iop_vignette_data_t::falloff_scale, free_tea_states(), get_tea_state(), dt_iop_roi_t::height, i, k, M_PI, MAX, MIN, out, ovoid, piece, dt_iop_vignette_data_t::saturation, dt_iop_vignette_data_t::scale, dt_iop_roi_t::scale, dt_iop_vignette_data_t::shape, tpdf(), dt_iop_vignette_data_t::unbound, weight(), dt_iop_vignette_data_t::whratio, dt_iop_roi_t::width, dt_iop_fvector_2d_t::x, dt_iop_vector_2d_t::x, dt_iop_roi_t::x, dt_iop_fvector_2d_t::y, dt_iop_vector_2d_t::y, and dt_iop_roi_t::y.
| int process_cl | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| cl_mem | dev_in, | ||
| cl_mem | dev_out | ||
| ) |
Definition at line 759 of file vignette.c.
References dt_iop_vignette_data_t::autoratio, dt_iop_vignette_data_t::brightness, dt_iop_vignette_data_t::center, dt_dev_pixelpipe_t::devid, DITHER_16BIT, DITHER_8BIT, DITHER_OFF, dt_iop_vignette_data_t::dithering, DT_DEBUG_OPENCL, dt_opencl_enqueue_kernel_2d(), dt_opencl_set_kernel_arg(), dt_print(), error(), dt_iop_vignette_data_t::falloff_scale, FALSE, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, dt_iop_vignette_global_data_t::kernel_vignette, MAX, MIN, piece, pipe, ROUNDUPDHT, ROUNDUPDWD, dt_iop_vignette_data_t::saturation, dt_iop_vignette_data_t::scale, dt_iop_roi_t::scale, dt_iop_vignette_data_t::shape, TRUE, dt_iop_vignette_data_t::unbound, dt_iop_vignette_data_t::whratio, width, dt_iop_roi_t::width, dt_iop_fvector_2d_t::x, dt_iop_vector_2d_t::x, dt_iop_roi_t::x, dt_iop_fvector_2d_t::y, dt_iop_vector_2d_t::y, and dt_iop_roi_t::y.