![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include "common/imagebuf.h"#include "common/image_cache.h"#include "common/interpolation.h"#include "common/math.h"#include "common/opencl.h"#include "control/control.h"#include "develop/blend.h"#include "develop/develop.h"#include "develop/format.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "develop/imageop_gui.h"#include "develop/masks.h"#include "develop/openmp_maths.h"#include "develop/tiling.h"#include "bauhaus/bauhaus.h"#include "common/colorspaces.h"#include "control/conf.h"#include "common/colorspaces_inline_conversions.h"#include "common/bspline.h"#include "gui/gtk.h"#include "iop/iop_api.h"#include <memory.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <complex.h>#include <glib.h>#include "demosaic/basic.c"#include "demosaic/passthrough.c"#include "demosaic/rcd.c"#include "demosaic/lmmse.c"#include "demosaic/ppg.c"#include "demosaic/vng.c"#include "demosaic/markesteijn.c"#include "demosaic/dual.c"
Include dependency graph for demosaic.c:Data Structures | |
| struct | dt_iop_demosaic_global_data_t |
| struct | dt_iop_demosaic_data_t |
| struct | dt_iop_demosaic_params_t |
| struct | dt_iop_demosaic_gui_data_t |
Macros | |
| #define | INLINE inline |
| #define | DEMOSAIC_XTRANS 1024 |
| #define | DEMOSAIC_DUAL 2048 |
| #define | REDUCESIZE 64 |
| #define | XTRANS_SNAPPER 3 |
| #define | BAYER_SNAPPER 2 |
| #define | DOWNSAMPLE_GUIDED_SCALES 1 |
Typedefs | |
| typedef enum dt_iop_demosaic_method_t | dt_iop_demosaic_method_t |
| typedef enum dt_iop_demosaic_greeneq_t | dt_iop_demosaic_greeneq_t |
| typedef enum dt_iop_demosaic_smooth_t | dt_iop_demosaic_smooth_t |
| typedef enum dt_iop_demosaic_lmmse_t | dt_iop_demosaic_lmmse_t |
| typedef struct dt_iop_demosaic_global_data_t | dt_iop_demosaic_global_data_t |
| typedef struct dt_iop_demosaic_data_t | dt_iop_demosaic_data_t |
| typedef enum dt_iop_demosaic_quality_t | dt_iop_demosaic_quality_t |
| typedef struct dt_iop_demosaic_params_t | dt_iop_demosaic_params_t |
| typedef struct dt_iop_demosaic_gui_data_t | dt_iop_demosaic_gui_data_t |
Functions | |
| static | __attribute__ ((always_inline)) |
| void | amaze_demosaic_RT (const dt_dev_pixelpipe_iop_t *piece, const float *const in, float *out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const uint32_t filters) |
| const char * | name () |
| 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, const 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) |
| void | input_format (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc) |
| 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) |
| static gboolean | _is_downsample_method (const dt_iop_demosaic_method_t method) |
| static __DT_CLONE_TARGETS__ void | _downsample_bayer_half_size (float *const out, const float *const in, const dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in, const uint32_t filters, const gboolean is_4bayer, const double CAM_to_RGB[3][4]) |
| Build one half-size RGB pixel from the 2x2 CFA block backing it. | |
| static __DT_CLONE_TARGETS__ float | _downsample_xtrans_missing_colour (const float *const in, const dt_iop_roi_t *const roi_in, const int px, const int py, const uint8_t(*const xtrans)[6], const int colour) |
| Reconstruct one missing X-Trans colour from the nearest surrounding photosites. | |
| static __DT_CLONE_TARGETS__ void | _downsample_xtrans_half_size (float *const out, const float *const in, const dt_iop_roi_t *const roi_out, const dt_iop_roi_t *const roi_in, const uint8_t(*const xtrans)[6]) |
| Build one half-size RGB pixel from a 2x2 X-Trans block. | |
| static __DT_CLONE_TARGETS__ void | _downsample_guided_laplacian_fit (const float *const restrict HF, float *const restrict coeff, float *const restrict bias, const size_t width, const size_t height) |
| Fit one local affine RGB model for the current high-frequency scale. | |
| static __DT_CLONE_TARGETS__ void | _downsample_guided_laplacian_apply (const float *const restrict HF, const float *const restrict coeff, const float *const restrict bias, const float *const restrict LF, float *const restrict reconstructed, const size_t width, const size_t height, const gboolean reset) |
| Apply the locally averaged affine RGB model to one high-frequency layer. | |
| static __DT_CLONE_TARGETS__ int | _downsample_guided_laplacian_postfilter (float *const out, const size_t width, const size_t height, const int iterations) |
| Denoise the half-size demosaic result by filtering its wavelet details. | |
| void | distort_mask (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const float *const in, float *const out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
| void | modify_roi_out (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, dt_iop_roi_t *roi_out, const dt_iop_roi_t *const roi_in) |
| void | modify_roi_in (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_out, dt_iop_roi_t *roi_in) |
| __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 i, void *const o) |
| static int | process_default_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, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const int demosaicing_method) |
| static gboolean | _downsample_guided_laplacian_postfilter_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, cl_mem dev_out, const dt_iop_roi_t *const roi_out, const int iterations) |
| 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) |
| 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) |
| void | init_global (dt_iop_module_so_t *module) |
| void | cleanup_global (dt_iop_module_so_t *module) |
| gboolean | force_enable (struct dt_iop_module_t *self, const gboolean current_state) |
| 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 | reload_defaults (dt_iop_module_t *module) |
| void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
| void | gui_update (struct dt_iop_module_t *self) |
| static void | _visualize_callback (GtkWidget *quad, gpointer user_data) |
| void | gui_focus (struct dt_iop_module_t *self, gboolean in) |
| void | gui_init (struct dt_iop_module_t *self) |
| #define BAYER_SNAPPER 2 |
| #define DEMOSAIC_DUAL 2048 |
| #define DEMOSAIC_XTRANS 1024 |
| #define DOWNSAMPLE_GUIDED_SCALES 1 |
| #define INLINE inline |
| #define REDUCESIZE 64 |
| #define XTRANS_SNAPPER 3 |
| typedef struct dt_iop_demosaic_data_t dt_iop_demosaic_data_t |
| typedef struct dt_iop_demosaic_global_data_t dt_iop_demosaic_global_data_t |
| typedef enum dt_iop_demosaic_greeneq_t dt_iop_demosaic_greeneq_t |
| typedef struct dt_iop_demosaic_gui_data_t dt_iop_demosaic_gui_data_t |
| typedef enum dt_iop_demosaic_lmmse_t dt_iop_demosaic_lmmse_t |
| typedef enum dt_iop_demosaic_method_t dt_iop_demosaic_method_t |
| typedef struct dt_iop_demosaic_params_t dt_iop_demosaic_params_t |
| typedef enum dt_iop_demosaic_quality_t dt_iop_demosaic_quality_t |
| typedef enum dt_iop_demosaic_smooth_t dt_iop_demosaic_smooth_t |
|
inlinestatic |
|
static |
Build one half-size RGB pixel from the 2x2 CFA block backing it.
The loop walks the sensor block that maps to the output pixel and keeps only the real photosites that actually exist there. Bayer gets one red, one blue and two greens. 4Bayer keeps the four camera primaries, which are converted to RGB right away so the caller stays in the regular RGB pipe.
References __OMP_PARALLEL_FOR__, BLUE, FC(), GREEN, dt_iop_roi_t::height, i, k, MIN, out, RED, dt_iop_roi_t::width, and x.
Referenced by process().
|
static |
Apply the locally averaged affine RGB model to one high-frequency layer.
The coefficients and intercept have already been smoothed with the same a-trous kernel as the wavelet scale, so we simply predict each channel from the local RGB HF vector, add the channel-wise intercept, and accumulate the filtered detail bands for later resynthesis.
References __OMP_PARALLEL_FOR__, ALPHA, BLUE, coeff, dt_simd_set1(), dt_store_simd_aligned(), GREEN, height, RED, reset(), row, and width.
Referenced by _downsample_guided_laplacian_postfilter().
|
static |
Fit one local affine RGB model for the current high-frequency scale.
For each pixel we collect a dense immediate 5x5 patch and accumulate its raw RGB and guide moments. We then recover the channel-wise means plus the variance of the shared RGB-average guide from those fixed-size sums, which keeps the hot loop free from running-mean updates and per-sample divisions. The three target-channel slopes are stored as one RGB pixel so the apply stage can evaluate them from the same scalar guide with minimal scratch memory. The intercept is kept in a separate RGB image so its three channel-wise components can be blurred just like the slopes before we reconstruct the filtered detail.
References __OMP_PARALLEL_FOR__, ALPHA, BLUE, BSPLINE_FSIZE, coeff, dt_simd_set1(), dt_store_simd_aligned(), eps, GREEN, height, RED, row, row0, row1, row2, and width.
Referenced by _downsample_guided_laplacian_postfilter().
|
static |
Denoise the half-size demosaic result by filtering its wavelet details.
We decompose the half-size RGB image over three a-trous B-spline scales. At each scale we normalize the high-frequency layer by the blur that produced it, fit a local affine RGB model on that relative detail, blur one RGB slope field plus one RGB intercept field over the immediate neighbourhood, then reconstruct a filtered relative detail layer and rescale it back by the current blur. Repeating the full three-scale pass lets the module gradually even out chroma details over several user-selected iterations. The output is the sum of all filtered high frequencies plus the final low-frequency residual.
References __OMP_PARALLEL_FOR__, _downsample_guided_laplacian_apply(), _downsample_guided_laplacian_fit(), ALPHA, BLUE, blur_2D_Bspline(), cleanup(), coeff, decompose_2D_Bspline(), DOWNSAMPLE_GUIDED_SCALES, dt_iop_image_copy_by_size(), dt_omploop_sfence, dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_alloc_perthread_float, dt_pixelpipe_cache_free_align, dt_store_simd_aligned(), FALSE, GREEN, height, IS_NULL_PTR, out, RED, row, and width.
Referenced by process().
|
static |
References coeff, dt_dev_pixelpipe_t::devid, DOWNSAMPLE_GUIDED_SCALES, DT_DEBUG_OPENCL, dt_opencl_alloc_device(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_local_buffer_opt(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), error(), FALSE, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, IS_NULL_PTR, dt_iop_demosaic_global_data_t::kernel_bspline_horizontal, dt_iop_demosaic_global_data_t::kernel_bspline_horizontal_local, dt_iop_demosaic_global_data_t::kernel_bspline_vertical, dt_iop_demosaic_global_data_t::kernel_bspline_vertical_local, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_apply, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_coefficients, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_finalize, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_normalize, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, TRUE, width, dt_iop_roi_t::width, and dt_opencl_local_buffer_t::xoffset.
Referenced by process_cl().
|
static |
Build one half-size RGB pixel from a 2x2 X-Trans block.
We first reuse any real photosites that fall inside the 2x2 block mapped to the output pixel. When a colour is absent from that block, we reconstruct it from the nearest surrounding same-colour samples so the half-size image keeps all channels.
References __OMP_PARALLEL_FOR__, _downsample_xtrans_missing_colour(), FCxtrans(), dt_iop_roi_t::height, i, MIN, out, rgb, dt_iop_roi_t::width, and x.
Referenced by process().
|
static |
Reconstruct one missing X-Trans colour from the nearest surrounding photosites.
We first look for the closest sample in each quadrant around the half-size pixel centre. When the CFA leaves a 2-pixel chroma gap, these four neighbours define the smallest local rectangle of same-colour samples and we bilinearly interpolate inside it. If the search hits an image edge, we fall back to averaging the available neighbours instead of extrapolating.
References FALSE, FCxtrans(), dt_iop_roi_t::height, MAX, MIN, top, TRUE, and dt_iop_roi_t::width.
Referenced by _downsample_xtrans_half_size().
|
inlinestatic |
References DT_IOP_DEMOSAIC_DOWNSAMPLE.
Referenced by commit_params(), gui_changed(), modify_roi_in(), modify_roi_out(), process(), and process_cl().
References darktable, dt_iop_module_t::dev, dt_bauhaus_widget_get_quad_active(), dt_dev_pixelpipe_update_history_main, g, darktable_t::gui, dt_iop_module_t::gui_data, and dt_gui_gtk_t::reset.
Referenced by gui_init().
| void amaze_demosaic_RT | ( | const dt_dev_pixelpipe_iop_t * | piece, |
| const float *const | in, | ||
| float * | out, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const dt_iop_roi_t *const | roi_out, | ||
| const uint32_t | filters | ||
| ) |
Referenced by process().
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
References dt_iop_module_so_t::data, dt_free, dt_opencl_free_kernel(), dt_pixelpipe_cache_free_align, dt_iop_demosaic_global_data_t::kernel_border_interpolate, dt_iop_demosaic_global_data_t::kernel_bspline_horizontal, dt_iop_demosaic_global_data_t::kernel_bspline_horizontal_local, dt_iop_demosaic_global_data_t::kernel_bspline_vertical, dt_iop_demosaic_global_data_t::kernel_bspline_vertical_local, dt_iop_demosaic_global_data_t::kernel_color_smoothing, dt_iop_demosaic_global_data_t::kernel_downsample, dt_iop_demosaic_global_data_t::kernel_green_eq_favg_apply, dt_iop_demosaic_global_data_t::kernel_green_eq_favg_reduce_first, dt_iop_demosaic_global_data_t::kernel_green_eq_favg_reduce_second, dt_iop_demosaic_global_data_t::kernel_green_eq_lavg, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_apply, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_coefficients, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_finalize, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_normalize, dt_iop_demosaic_global_data_t::kernel_markesteijn_accu, dt_iop_demosaic_global_data_t::kernel_markesteijn_convert_yuv, dt_iop_demosaic_global_data_t::kernel_markesteijn_differentiate, dt_iop_demosaic_global_data_t::kernel_markesteijn_final, dt_iop_demosaic_global_data_t::kernel_markesteijn_green_minmax, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_max, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_max_corr, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_quench, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_set, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_sum, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_threshold, dt_iop_demosaic_global_data_t::kernel_markesteijn_initial_copy, dt_iop_demosaic_global_data_t::kernel_markesteijn_interpolate_green, dt_iop_demosaic_global_data_t::kernel_markesteijn_interpolate_twoxtwo, dt_iop_demosaic_global_data_t::kernel_markesteijn_recalculate_green, dt_iop_demosaic_global_data_t::kernel_markesteijn_red_and_blue, dt_iop_demosaic_global_data_t::kernel_markesteijn_solitary_green, dt_iop_demosaic_global_data_t::kernel_markesteijn_zero, dt_iop_demosaic_global_data_t::kernel_passthrough_color, dt_iop_demosaic_global_data_t::kernel_passthrough_monochrome, dt_iop_demosaic_global_data_t::kernel_ppg_green, dt_iop_demosaic_global_data_t::kernel_ppg_redblue, dt_iop_demosaic_global_data_t::kernel_pre_median, dt_iop_demosaic_global_data_t::kernel_rcd_border_green, dt_iop_demosaic_global_data_t::kernel_rcd_border_redblue, dt_iop_demosaic_global_data_t::kernel_rcd_populate, dt_iop_demosaic_global_data_t::kernel_rcd_step_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_2_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_3_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_4_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_4_2, dt_iop_demosaic_global_data_t::kernel_rcd_step_5_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_5_2, dt_iop_demosaic_global_data_t::kernel_rcd_write_output, dt_iop_demosaic_global_data_t::kernel_vng_border_interpolate, dt_iop_demosaic_global_data_t::kernel_vng_green_equilibrate, dt_iop_demosaic_global_data_t::kernel_vng_interpolate, dt_iop_demosaic_global_data_t::kernel_vng_lin_interpolate, dt_iop_demosaic_global_data_t::kernel_write_blended_dual, dt_iop_demosaic_global_data_t::kernel_zoom_half_size, dt_iop_demosaic_global_data_t::kernel_zoom_half_size_xtrans, dt_iop_demosaic_global_data_t::kernel_zoom_passthrough_monochrome, dt_iop_demosaic_global_data_t::kernel_zoom_third_size, dt_iop_demosaic_global_data_t::lmmse_gamma_in, and dt_iop_demosaic_global_data_t::lmmse_gamma_out.
| 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 commit_params | ( | struct dt_iop_module_t * | self, |
| dt_iop_params_t * | params, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References _is_downsample_method(), dt_image_t::adobe_XYZ_to_CAM, dt_image_t::camera_makermodel, d, dt_image_t::d65_color_matrix, dt_dev_pixelpipe_iop_t::data, DEMOSAIC_DUAL, DEMOSAIC_XTRANS, dt_iop_module_t::dev, dt_image_t::dsc, dt_colorspaces_conversion_matrices_rgb(), dt_control_log(), DT_IMAGE_4BAYER, DT_IOP_DEMOSAIC_AMAZE, DT_IOP_DEMOSAIC_AMAZE_VNG, DT_IOP_DEMOSAIC_DOWNSAMPLE, DT_IOP_DEMOSAIC_FDC, DT_IOP_DEMOSAIC_LMMSE, DT_IOP_DEMOSAIC_MARKEST3_VNG, DT_IOP_DEMOSAIC_MARKESTEIJN, DT_IOP_DEMOSAIC_MARKESTEIJN_3, DT_IOP_DEMOSAIC_PASSTHR_COLORX, DT_IOP_DEMOSAIC_PASSTHR_MONOX, DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR, DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, DT_IOP_DEMOSAIC_PPG, DT_IOP_DEMOSAIC_RCD, DT_IOP_DEMOSAIC_RCD_VNG, DT_IOP_DEMOSAIC_VNG, DT_IOP_DEMOSAIC_VNG4, DT_IOP_GREEN_EQ_BOTH, DT_IOP_GREEN_EQ_FULL, DT_IOP_GREEN_EQ_NO, dt_iop_buffer_dsc_t::filters, dt_image_t::flags, dt_develop_t::image_storage, p, dt_dev_pixelpipe_iop_t::process_cl_ready, and dt_dev_pixelpipe_iop_t::process_tiling_ready.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_RAW.
| int default_group | ( | ) |
References IOP_GROUP_TECHNICAL.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
| void distort_mask | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const float *const | in, | ||
| float *const | out, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const dt_iop_roi_t *const | roi_out | ||
| ) |
References dt_interpolation_new(), dt_interpolation_resample_roi_1c(), DT_INTERPOLATION_USERPREF, out, and void().
| int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, and IOP_FLAGS_ONE_INSTANCE.
| gboolean force_enable | ( | struct dt_iop_module_t * | self, |
| const gboolean | current_state | ||
| ) |
References dt_iop_module_t::dev, dt_image_is_raw(), and dt_develop_t::image_storage.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
References _is_downsample_method(), darktable, DEMOSAIC_DUAL, DEMOSAIC_XTRANS, dt_iop_module_t::dev, dt_image_t::dsc, dt_bauhaus_combobox_set_from_value(), dt_image_cache_get(), DT_IMAGE_CACHE_RELAXED, dt_image_cache_write_release(), DT_IMAGE_MONOCHROME_BAYER, DT_IOP_DEMOSAIC_LMMSE, DT_IOP_DEMOSAIC_MARKESTEIJN, DT_IOP_DEMOSAIC_PASSTHR_COLORX, DT_IOP_DEMOSAIC_PASSTHR_MONOX, DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR, DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, DT_IOP_DEMOSAIC_PPG, DT_IOP_DEMOSAIC_RCD, dt_iop_buffer_dsc_t::filters, dt_image_t::flags, g, dt_iop_module_t::gui_data, dt_image_t::id, darktable_t::image_cache, dt_develop_t::image_storage, p, and dt_iop_module_t::params.
Referenced by gui_update().
| void gui_focus | ( | struct dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References _visualize_callback(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_remove_at(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), DT_BAUHAUS_SPACE, dt_bauhaus_widget_set_quad_active(), dt_bauhaus_widget_set_quad_paint(), dt_bauhaus_widget_set_quad_toggle(), dt_ui_label_new(), dtgtk_cairo_paint_showmask(), FALSE, g, i, IOP_GUI_ALLOC, TRUE, and dt_iop_module_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_module_t::default_enabled, dt_bauhaus_widget_set_quad_active(), FALSE, g, gui_changed(), dt_iop_module_t::gui_data, and dt_iop_module_t::widget.
| void init_global | ( | dt_iop_module_so_t * | module | ) |
References dt_opencl_create_kernel(), dt_iop_demosaic_global_data_t::kernel_border_interpolate, dt_iop_demosaic_global_data_t::kernel_bspline_horizontal, dt_iop_demosaic_global_data_t::kernel_bspline_horizontal_local, dt_iop_demosaic_global_data_t::kernel_bspline_vertical, dt_iop_demosaic_global_data_t::kernel_bspline_vertical_local, dt_iop_demosaic_global_data_t::kernel_color_smoothing, dt_iop_demosaic_global_data_t::kernel_downsample, dt_iop_demosaic_global_data_t::kernel_green_eq_favg_apply, dt_iop_demosaic_global_data_t::kernel_green_eq_favg_reduce_first, dt_iop_demosaic_global_data_t::kernel_green_eq_favg_reduce_second, dt_iop_demosaic_global_data_t::kernel_green_eq_lavg, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_apply, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_coefficients, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_finalize, dt_iop_demosaic_global_data_t::kernel_guided_laplacian_normalize, dt_iop_demosaic_global_data_t::kernel_markesteijn_accu, dt_iop_demosaic_global_data_t::kernel_markesteijn_convert_yuv, dt_iop_demosaic_global_data_t::kernel_markesteijn_differentiate, dt_iop_demosaic_global_data_t::kernel_markesteijn_final, dt_iop_demosaic_global_data_t::kernel_markesteijn_green_minmax, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_max, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_max_corr, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_quench, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_set, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_sum, dt_iop_demosaic_global_data_t::kernel_markesteijn_homo_threshold, dt_iop_demosaic_global_data_t::kernel_markesteijn_initial_copy, dt_iop_demosaic_global_data_t::kernel_markesteijn_interpolate_green, dt_iop_demosaic_global_data_t::kernel_markesteijn_interpolate_twoxtwo, dt_iop_demosaic_global_data_t::kernel_markesteijn_recalculate_green, dt_iop_demosaic_global_data_t::kernel_markesteijn_red_and_blue, dt_iop_demosaic_global_data_t::kernel_markesteijn_solitary_green, dt_iop_demosaic_global_data_t::kernel_markesteijn_zero, dt_iop_demosaic_global_data_t::kernel_passthrough_color, dt_iop_demosaic_global_data_t::kernel_passthrough_monochrome, dt_iop_demosaic_global_data_t::kernel_ppg_green, dt_iop_demosaic_global_data_t::kernel_ppg_redblue, dt_iop_demosaic_global_data_t::kernel_pre_median, dt_iop_demosaic_global_data_t::kernel_rcd_border_green, dt_iop_demosaic_global_data_t::kernel_rcd_border_redblue, dt_iop_demosaic_global_data_t::kernel_rcd_populate, dt_iop_demosaic_global_data_t::kernel_rcd_step_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_2_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_3_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_4_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_4_2, dt_iop_demosaic_global_data_t::kernel_rcd_step_5_1, dt_iop_demosaic_global_data_t::kernel_rcd_step_5_2, dt_iop_demosaic_global_data_t::kernel_rcd_write_output, dt_iop_demosaic_global_data_t::kernel_vng_border_interpolate, dt_iop_demosaic_global_data_t::kernel_vng_green_equilibrate, dt_iop_demosaic_global_data_t::kernel_vng_interpolate, dt_iop_demosaic_global_data_t::kernel_vng_lin_interpolate, dt_iop_demosaic_global_data_t::kernel_write_blended_dual, dt_iop_demosaic_global_data_t::kernel_zoom_half_size, dt_iop_demosaic_global_data_t::kernel_zoom_half_size_xtrans, dt_iop_demosaic_global_data_t::kernel_zoom_passthrough_monochrome, dt_iop_demosaic_global_data_t::kernel_zoom_third_size, dt_iop_demosaic_global_data_t::lmmse_gamma_in, and dt_iop_demosaic_global_data_t::lmmse_gamma_out.
| 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 input_format | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_buffer_dsc_t * | dsc | ||
| ) |
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
| void modify_roi_in | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const dt_iop_roi_t * | roi_out, | ||
| dt_iop_roi_t * | roi_in | ||
| ) |
References _is_downsample_method(), BAYER_SNAPPER, dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::data, dt_iop_demosaic_data_t::demosaicing_method, DT_IOP_DEMOSAIC_PASSTHR_MONOX, DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, dt_iop_roi_t::height, MAX, dt_iop_roi_t::width, dt_iop_roi_t::x, XTRANS_SNAPPER, and dt_iop_roi_t::y.
| void modify_roi_out | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_roi_t * | roi_out, | ||
| const dt_iop_roi_t *const | roi_in | ||
| ) |
| 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 | ||
| ) |
| __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 | i, | ||
| void *const | o | ||
| ) |
References _downsample_bayer_half_size(), _downsample_guided_laplacian_postfilter(), _downsample_xtrans_half_size(), _is_downsample_method(), amaze_demosaic_RT(), dt_iop_demosaic_data_t::CAM_to_RGB, dt_times_t::clock, dt_iop_demosaic_data_t::color_smoothing, color_smoothing(), darktable, dt_dev_pixelpipe_iop_t::data, DEMOSAIC_DUAL, demosaic_ppg(), dt_iop_demosaic_data_t::demosaicing_method, dt_iop_module_t::dev, double(), dt_dev_pixelpipe_iop_t::dsc_in, dt_colorspaces_cygm_to_rgb(), DT_DEBUG_DEMOSAIC, DT_DEBUG_PERF, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU_MONO, DT_DEV_PIXELPIPE_FULL, dt_get_times(), DT_IMAGE_4BAYER, DT_IOP_DEMOSAIC_AMAZE, DT_IOP_DEMOSAIC_FDC, DT_IOP_DEMOSAIC_LMMSE, DT_IOP_DEMOSAIC_MARKEST3_VNG, DT_IOP_DEMOSAIC_MARKESTEIJN, DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR, DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, DT_IOP_DEMOSAIC_RCD, DT_IOP_DEMOSAIC_VNG4, DT_IOP_GREEN_EQ_BOTH, DT_IOP_GREEN_EQ_FULL, DT_IOP_GREEN_EQ_LOCAL, DT_IOP_GREEN_EQ_NO, dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_free_align, dual_demosaic(), dt_iop_demosaic_data_t::dual_thrs, dt_image_t::exif_iso, FALSE, dt_iop_buffer_dsc_t::filters, dt_image_t::flags, g, dt_iop_module_t::global_data, dt_iop_demosaic_data_t::green_eq, green_equilibration_favg(), green_equilibration_lavg(), dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_iop_roi_t::height, i, dt_develop_t::image_storage, IS_NULL_PTR, lmmse_demosaic(), dt_iop_demosaic_global_data_t::lmmse_gamma_in, dt_iop_demosaic_global_data_t::lmmse_gamma_out, dt_iop_demosaic_data_t::lmmse_refine, dt_dev_pixelpipe_t::mask_display, dt_iop_demosaic_data_t::median_thrs, passthrough_color(), passthrough_monochrome(), dt_iop_buffer_dsc_t::processed_maximum, rcd_demosaic(), dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, threshold, dt_dev_pixelpipe_t::type, darktable_t::unmuted, dt_times_t::user, vng_interpolate(), dt_iop_roi_t::width, x, dt_iop_roi_t::x, dt_iop_buffer_dsc_t::xtrans, xtrans_fdc_interpolate(), xtrans_markesteijn_interpolate(), 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 | ||
| ) |
References _downsample_guided_laplacian_postfilter_cl(), _is_downsample_method(), dt_iop_demosaic_data_t::CAM_to_RGB, dt_times_t::clock, dt_iop_demosaic_data_t::color_smoothing, color_smoothing_cl(), darktable, dt_dev_pixelpipe_iop_t::data, DEMOSAIC_DUAL, dt_iop_demosaic_data_t::demosaicing_method, dt_iop_module_t::dev, dt_dev_pixelpipe_t::devid, dt_dev_pixelpipe_iop_t::dsc_in, dt_control_log(), DT_DEBUG_DEMOSAIC, DT_DEBUG_OPENCL, DT_DEBUG_PERF, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU_MONO, DT_DEV_PIXELPIPE_FULL, dt_get_times(), DT_IMAGE_4BAYER, dt_iop_clip_and_zoom_roi_cl(), DT_IOP_DEMOSAIC_MARKESTEIJN, DT_IOP_DEMOSAIC_MARKESTEIJN_3, DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR, DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, DT_IOP_DEMOSAIC_PPG, DT_IOP_DEMOSAIC_RCD, DT_IOP_DEMOSAIC_VNG, DT_IOP_DEMOSAIC_VNG4, dt_opencl_alloc_device(), dt_opencl_alloc_device_buffer(), dt_opencl_copy_host_to_device_constant(), dt_opencl_enqueue_kernel_2d(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), dual_demosaic_cl(), dt_iop_demosaic_data_t::dual_thrs, FALSE, dt_iop_buffer_dsc_t::filters, dt_image_t::flags, g, dt_iop_module_t::global_data, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, dt_develop_t::image_storage, IS_NULL_PTR, dt_iop_demosaic_global_data_t::kernel_zoom_half_size, dt_iop_demosaic_global_data_t::kernel_zoom_half_size_xtrans, dt_dev_pixelpipe_t::mask_display, process_default_cl(), process_markesteijn_cl(), process_rcd_cl(), process_vng_cl(), dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, ROUNDUPDHT, ROUNDUPDWD, dt_iop_roi_t::scale, TRUE, dt_dev_pixelpipe_t::type, darktable_t::unmuted, dt_times_t::user, width, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_iop_buffer_dsc_t::xtrans, and dt_iop_roi_t::y.
|
static |
References dt_iop_demosaic_data_t::color_smoothing, color_smoothing_cl(), dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, dt_dev_pixelpipe_iop_t::dsc_in, DT_DEBUG_OPENCL, DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR, DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, DT_IOP_DEMOSAIC_PPG, DT_IOP_GREEN_EQ_NO, dt_opencl_alloc_device(), dt_opencl_enqueue_kernel_2d(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_local_buffer_opt(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), error(), FALSE, dt_iop_buffer_dsc_t::filters, dt_iop_module_t::global_data, dt_iop_demosaic_data_t::green_eq, green_equilibration_cl(), height, dt_iop_roi_t::height, IS_NULL_PTR, dt_iop_demosaic_global_data_t::kernel_border_interpolate, dt_iop_demosaic_global_data_t::kernel_passthrough_color, dt_iop_demosaic_global_data_t::kernel_passthrough_monochrome, dt_iop_demosaic_global_data_t::kernel_ppg_green, dt_iop_demosaic_global_data_t::kernel_ppg_redblue, dt_iop_demosaic_global_data_t::kernel_pre_median, dt_iop_demosaic_data_t::median_thrs, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, TRUE, width, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_opencl_local_buffer_t::xoffset, and dt_iop_roi_t::y.
Referenced by process_cl().
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
References d, dt_iop_module_t::default_enabled, dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_image_t::dsc, dt_image_is_monochrome(), DT_IOP_DEMOSAIC_MARKESTEIJN, DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, DT_IOP_DEMOSAIC_RCD, dt_iop_buffer_dsc_t::filters, dt_develop_t::image_storage, and dt_iop_module_t::widget.
| 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 | ||
| ) |
References dt_iop_demosaic_data_t::color_smoothing, darktable, dt_dev_pixelpipe_iop_t::data, DEMOSAIC_DUAL, dt_iop_demosaic_data_t::demosaicing_method, dt_dev_pixelpipe_iop_t::dsc_in, DT_IOP_DEMOSAIC_AMAZE, DT_IOP_DEMOSAIC_DOWNSAMPLE, DT_IOP_DEMOSAIC_FDC, DT_IOP_DEMOSAIC_LMMSE, DT_IOP_DEMOSAIC_MARKESTEIJN, DT_IOP_DEMOSAIC_MARKESTEIJN_3, DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR, DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, DT_IOP_DEMOSAIC_PPG, DT_IOP_DEMOSAIC_RCD, DT_IOP_GREEN_EQ_NO, dt_iop_buffer_dsc_t::filters, dt_iop_demosaic_data_t::green_eq, dt_iop_roi_t::height, LMMSE_GRP, MAX, darktable_t::num_openmp_threads, RCD_TILESIZE, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::width, and XTRANS_SNAPPER.