![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"
#include "common/debug.h"
#include "common/eaw.h"
#include "common/imagebuf.h"
#include "common/opencl.h"
#include "control/conf.h"
#include "control/control.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "develop/imageop_math.h"
#include "develop/tiling.h"
#include "dtgtk/drawingarea.h"
#include "gui/draw.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include <math.h>
#include <memory.h>
#include <stdlib.h>
Data Structures | |
struct | dt_iop_atrous_params_t |
struct | dt_iop_atrous_gui_data_t |
struct | dt_iop_atrous_global_data_t |
struct | dt_iop_atrous_data_t |
Macros | |
#define | INSET DT_PIXEL_APPLY_DPI(5) |
#define | INFL .3f |
#define | BANDS 6 |
#define | MAX_NUM_SCALES 8 |
#define | RES 64 |
#define | dt_atrous_show_upper_label(cr, text, layout, ink) |
#define | dt_atrous_show_lower_label(cr, text, layout, ink) |
#define | GAUSS(x, sigma) expf( -(1.0f - x) * (1.0f - x) / (sigma * sigma)) / (2.0 * sigma * powf(M_PI, 0.5f)) |
Typedefs | |
typedef enum atrous_channel_t | atrous_channel_t |
typedef struct dt_iop_atrous_params_t | dt_iop_atrous_params_t |
typedef struct dt_iop_atrous_gui_data_t | dt_iop_atrous_gui_data_t |
typedef struct dt_iop_atrous_global_data_t | dt_iop_atrous_global_data_t |
typedef struct dt_iop_atrous_data_t | dt_iop_atrous_data_t |
Enumerations | |
enum | atrous_channel_t { atrous_L = 0 , atrous_c = 1 , atrous_s = 2 , atrous_Lt = 3 , atrous_ct = 4 , atrous_none = 5 } |
Functions | |
const char * | name () |
const char * | aliases () |
const char ** | description (struct dt_iop_module_t *self) |
int | default_group () |
int | flags () |
int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
int | legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version) |
static int | get_samples (float *t, const dt_iop_atrous_data_t *const d, const dt_iop_roi_t *roi_in, const dt_dev_pixelpipe_iop_t *const piece) |
static int | get_scales (float(*thrs)[4], float(*boost)[4], float *sharp, const dt_iop_atrous_data_t *const d, const dt_iop_roi_t *roi_in, const dt_dev_pixelpipe_iop_t *const piece) |
static void | process_wavelets (struct dt_iop_module_t *self, struct 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, const eaw_decompose_t decompose, const eaw_synthesize_t synthesize) |
void | process (struct dt_iop_module_t *self, struct 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) |
void | tiling_callback (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_in, const dt_iop_roi_t *roi_out, struct dt_develop_tiling_t *tiling) |
void | init (dt_iop_module_t *module) |
void | init_global (dt_iop_module_so_t *module) |
void | cleanup_global (dt_iop_module_so_t *module) |
static void | _apply_mix (dt_iop_module_t *self, const int ch, const int k, const float mix, const float px, const float py, float *x, float *y) |
void | commit_params (struct dt_iop_module_t *self, dt_iop_params_t *params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
void | init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
void | cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
void | init_presets (dt_iop_module_so_t *self) |
static void | reset_mix (dt_iop_module_t *self) |
void | gui_update (struct dt_iop_module_t *self) |
static gboolean | area_enter_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
static gboolean | area_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
static void | get_params (dt_iop_atrous_params_t *p, const int ch, const double mouse_x, const double mouse_y, const float rad) |
static gboolean | area_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data) |
static gboolean | area_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) |
static gboolean | area_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
static gboolean | area_button_release (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
static gboolean | area_scrolled (GtkWidget *widget, GdkEventScroll *event, gpointer user_data) |
static void | tab_switch (GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data) |
static void | mix_callback (GtkWidget *slider, gpointer user_data) |
void | gui_init (struct dt_iop_module_t *self) |
void | gui_cleanup (struct dt_iop_module_t *self) |
#define BANDS 6 |
#define dt_atrous_show_lower_label | ( | cr, | |
text, | |||
layout, | |||
ink | |||
) |
#define dt_atrous_show_upper_label | ( | cr, | |
text, | |||
layout, | |||
ink | |||
) |
#define GAUSS | ( | x, | |
sigma | |||
) | expf( -(1.0f - x) * (1.0f - x) / (sigma * sigma)) / (2.0 * sigma * powf(M_PI, 0.5f)) |
#define INFL .3f |
#define INSET DT_PIXEL_APPLY_DPI(5) |
#define MAX_NUM_SCALES 8 |
#define RES 64 |
typedef enum atrous_channel_t atrous_channel_t |
typedef struct dt_iop_atrous_data_t dt_iop_atrous_data_t |
typedef struct dt_iop_atrous_global_data_t dt_iop_atrous_global_data_t |
typedef struct dt_iop_atrous_gui_data_t dt_iop_atrous_gui_data_t |
typedef struct dt_iop_atrous_params_t dt_iop_atrous_params_t |
enum atrous_channel_t |
|
inlinestatic |
References dt_iop_module_t::default_params, mix(), dt_iop_atrous_params_t::x, and dt_iop_atrous_params_t::y.
Referenced by area_draw(), and commit_params().
const char * aliases | ( | ) |
|
static |
References BANDS, darktable, dt_iop_module_t::default_params, darktable_t::develop, dt_dev_add_history_item, dt_draw_curve_calc_value(), FALSE, dt_iop_module_t::gui_data, height, INSET, dt_iop_module_t::params, reset_mix(), TRUE, dt_iop_module_t::widget, width, dt_iop_atrous_params_t::x, and dt_iop_atrous_params_t::y.
Referenced by gui_init().
|
static |
References FALSE, dt_iop_module_t::gui_data, reset_mix(), and TRUE.
Referenced by gui_init().
|
static |
References _apply_mix(), atrous_c, atrous_ct, atrous_L, atrous_Lt, atrous_s, BANDS, darktable_t::bauhaus, darktable, dt_atrous_show_lower_label, dt_atrous_show_upper_label, dt_cairo_image_surface_create(), dt_draw_curve_calc_values(), dt_draw_curve_set_point(), dt_draw_grid(), DT_PIXEL_APPLY_DPI, dt_iop_module_t::expander, f(), get_params(), dt_iop_module_t::gui_data, height, INSET, M_PI, mix(), dt_bauhaus_t::pango_font_desc, dt_iop_module_t::params, RES, TRUE, and width.
Referenced by gui_init().
|
static |
References dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References FALSE, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References atrous_c, atrous_ct, atrous_L, atrous_Lt, BANDS, dist(), dt_iop_queue_history_update(), FALSE, get_params(), dt_iop_module_t::gui_data, height, INSET, dt_iop_module_t::params, TRUE, and width.
Referenced by gui_init().
|
static |
References BANDS, dt_conf_get_int(), dt_conf_set_int(), dt_gui_get_scroll_unit_deltas(), dt_modifier_is(), dtgtk_drawing_area_set_aspect_ratio(), dt_iop_module_t::gui_data, and TRUE.
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 | ||
) |
void commit_params | ( | struct dt_iop_module_t * | self, |
dt_iop_params_t * | params, | ||
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
int default_colorspace | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References IOP_CS_LAB.
int default_group | ( | ) |
References IOP_GROUP_SHARPNESS.
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.
|
static |
References BANDS, f(), MAX, and MIN.
Referenced by area_draw(), and area_motion_notify().
|
static |
References dt_dev_pixelpipe_iop_t::buf_in, dt_log2f(), dt_iop_roi_t::height, MAX, MAX_NUM_SCALES, MIN, dt_iop_roi_t::scale, and dt_iop_roi_t::width.
Referenced by process_wavelets().
|
static |
References atrous_c, atrous_ct, atrous_L, atrous_Lt, atrous_s, dt_dev_pixelpipe_iop_t::buf_in, dt_iop_atrous_data_t::curve, dt_draw_curve_calc_value(), dt_log2f(), dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::iscale, MAX, MAX_NUM_SCALES, MIN, dt_iop_roi_t::scale, thrs, and dt_iop_roi_t::width.
Referenced by process_wavelets(), and tiling_callback().
void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
void gui_init | ( | struct dt_iop_module_t * | self | ) |
References area_button_press(), area_button_release(), area_draw(), area_enter_notify(), area_leave_notify(), area_motion_notify(), area_scrolled(), BANDS, CATMULL_ROM, darktable, dt_iop_module_t::default_params, dt_bauhaus_slider_from_params(), DT_BAUHAUS_SPACE, dt_conf_get_int(), dt_draw_curve_add_point(), dt_draw_curve_new(), dt_ui_notebook_new(), dt_ui_notebook_page(), dtgtk_drawing_area_new_with_aspect_ratio(), FALSE, darktable_t::gui, IOP_GUI_ALLOC, mix_callback(), dt_gui_gtk_t::scroll_mask, tab_switch(), dt_iop_module_t::timeout_handle, TRUE, and dt_iop_module_t::widget.
void gui_update | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_cancel_history_update(), reset_mix(), and dt_iop_module_t::widget.
void init | ( | dt_iop_module_t * | module | ) |
References atrous_ct, atrous_L, atrous_Lt, BANDS, dt_iop_default_init(), dt_iop_atrous_params_t::x, and dt_iop_atrous_params_t::y.
void init_global | ( | dt_iop_module_so_t * | module | ) |
void init_pipe | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References atrous_none, BANDS, CATMULL_ROM, dt_iop_atrous_data_t::curve, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, dt_iop_module_t::default_params, dt_draw_curve_add_point(), dt_draw_curve_new(), dt_dev_pixelpipe_t::iheight, dt_dev_pixelpipe_t::iscale, dt_dev_pixelpipe_t::iwidth, MIN, dt_iop_atrous_data_t::octaves, dt_iop_atrous_params_t::x, and dt_iop_atrous_params_t::y.
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 atrous_none, BANDS, dt_iop_module_t::default_params, and dt_iop_atrous_params_t::mix.
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_get(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, and dt_iop_module_t::widget.
Referenced by gui_init().
const char * name | ( | ) |
void process | ( | struct dt_iop_module_t * | self, |
struct 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 | ||
) |
References eaw_decompose(), eaw_synthesize(), and process_wavelets().
|
static |
References dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, DT_DEV_PIXELPIPE_DISPLAY_MASK, DT_DEV_PIXELPIPE_FULL, dt_free_align, dt_iop_alloc_image_buffers(), dt_iop_alpha_copy(), dt_iop_copy_image_roi(), dt_iop_image_copy_by_size(), get_samples(), get_scales(), dt_develop_t::gui_attached, dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, MAX_NUM_SCALES, dt_dev_pixelpipe_iop_t::pipe, thrs, TRUE, width, and dt_iop_roi_t::width.
Referenced by process().
|
static |
References darktable, dt_bauhaus_slider_set(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, and dt_gui_gtk_t::reset.
Referenced by area_button_press(), area_button_release(), and gui_update().
|
static |
References darktable, darktable_t::gui, dt_iop_module_t::gui_data, dt_gui_gtk_t::reset, and dt_iop_module_t::widget.
Referenced by gui_init().
void tiling_callback | ( | struct dt_iop_module_t * | self, |
struct dt_dev_pixelpipe_iop_t * | piece, | ||
const dt_iop_roi_t * | roi_in, | ||
const dt_iop_roi_t * | roi_out, | ||
struct dt_develop_tiling_t * | tiling | ||
) |