Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
laplacian.c File Reference
#include "common/box_filters.h"
#include "common/bspline.h"
#include "common/darktable.h"
#include "common/dwt.h"
#include "common/fast_guided_filter.h"
#include "common/opencl.h"
#include "develop/imageop_math.h"
#include "develop/noise_generator.h"
#include "iop/highlights/gather.h"
#include "iop/highlights/laplacian.h"
#include <math.h>
#include <string.h>
+ Include dependency graph for laplacian.c:

Go to the source code of this file.

Functions

static __attribute__ ((always_inline))
 
static __DT_CLONE_TARGETS__ void guide_laplacians (const float *const restrict high_freq, const float *const restrict low_freq, const float *const restrict clipping_mask, float *const restrict output, const size_t width, const size_t height, const int mult, const float noise_level, const int salt, const uint8_t scale, const float radius_sq)
 
static __DT_CLONE_TARGETS__ void heat_PDE_diffusion (const float *const restrict high_freq, const float *const restrict low_freq, const float *const restrict clipping_mask, float *const restrict output, const size_t width, const size_t height, const int mult, const uint8_t scale, const float first_order_factor)
 
static int wavelets_process (const float *const restrict in, float *const restrict reconstructed, const float *const restrict clipping_mask, const size_t width, const size_t height, const int scales, float *const restrict HF, float *const restrict LF_odd, float *const restrict LF_even, const diffuse_reconstruct_variant_t variant, const float noise_level, const int salt, const float first_order_factor)
 
__DT_CLONE_TARGETS__ int process_laplacian_bayer (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid, void *const restrict ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const dt_aligned_pixel_t clips)
 
__DT_CLONE_TARGETS__ int process_laplacian_xtrans (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid, void *const restrict ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const dt_aligned_pixel_t clips)
 
static cl_int wavelets_process_cl (const int devid, cl_mem in, cl_mem reconstructed, cl_mem reconstructed_scratch, cl_mem clipping_mask, const size_t sizes[3], const int width, const int height, dt_iop_highlights_global_data_t *const gd, const int scales, cl_mem HF, cl_mem LF_odd, cl_mem LF_even, const diffuse_reconstruct_variant_t variant, const float noise_level, const int salt, const float solid_color)
 
cl_int process_laplacian_bayer_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 dt_aligned_pixel_t clips)
 
cl_int process_laplacian_xtrans_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 dt_aligned_pixel_t clips)
 

Function Documentation

◆ __attribute__()

static __attribute__ ( (always_inline)  )
inlinestatic

Definition at line 69 of file laplacian.c.

References ANY_SCALE, FIRST_SCALE, and LAST_SCALE.

◆ guide_laplacians()

static __DT_CLONE_TARGETS__ void guide_laplacians ( const float *const restrict  high_freq,
const float *const restrict  low_freq,
const float *const restrict  clipping_mask,
float *const restrict  output,
const size_t  width,
const size_t  height,
const int  mult,
const float  noise_level,
const int  salt,
const uint8_t  scale,
const float  radius_sq 
)
inlinestatic

◆ heat_PDE_diffusion()

static __DT_CLONE_TARGETS__ void heat_PDE_diffusion ( const float *const restrict  high_freq,
const float *const restrict  low_freq,
const float *const restrict  clipping_mask,
float *const restrict  output,
const size_t  width,
const size_t  height,
const int  mult,
const uint8_t  scale,
const float  first_order_factor 
)
inlinestatic

◆ process_laplacian_bayer()

◆ process_laplacian_bayer_cl()

cl_int process_laplacian_bayer_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 dt_aligned_pixel_t  clips 
)

Definition at line 806 of file laplacian.c.

References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, DIFFUSE_RECONSTRUCT_CHROMA, DIFFUSE_RECONSTRUCT_RGB, DS_FACTOR, dt_dev_pixelpipe_iop_t::dsc_in, DT_DEBUG_OPENCL, dt_dev_get_module_scale(), dt_dev_get_roi_filters(), dt_opencl_alloc_device(), dt_opencl_alloc_device_buffer(), dt_opencl_copy_host_to_device_constant(), 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_buffer_dsc_t::filters, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, i, IS_NULL_PTR, dt_iop_highlights_params_t::iterations, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask, dt_iop_highlights_global_data_t::kernel_highlights_box_blur, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_first, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_second, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace, dt_iop_highlights_global_data_t::kernel_interpolate_bilinear, MAX_NUM_SCALES, MIN, dt_iop_highlights_params_t::noise_level, REDUCESIZE, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_iop_highlights_params_t::scales, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, dt_iop_highlights_params_t::solid_color, swap(), TRUE, wavelets_process_cl(), 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().

◆ process_laplacian_xtrans()

◆ process_laplacian_xtrans_cl()

cl_int process_laplacian_xtrans_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 dt_aligned_pixel_t  clips 
)

Definition at line 1073 of file laplacian.c.

References _build_xtrans_bilinear_lookup(), dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::devid, DIFFUSE_RECONSTRUCT_CHROMA, DIFFUSE_RECONSTRUCT_RGB, DS_FACTOR, dt_dev_pixelpipe_iop_t::dsc_in, DT_DEBUG_OPENCL, dt_dev_get_module_scale(), dt_opencl_alloc_device(), dt_opencl_alloc_device_buffer(), dt_opencl_copy_host_to_device_constant(), 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, i, IS_NULL_PTR, dt_iop_highlights_params_t::iterations, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_box_blur, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_first_xtrans, dt_iop_highlights_global_data_t::kernel_highlights_normalize_reduce_second, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace_xtrans, dt_iop_highlights_global_data_t::kernel_interpolate_bilinear, lookup(), MAX_NUM_SCALES, MIN, dt_iop_highlights_params_t::noise_level, REDUCESIZE, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_iop_highlights_params_t::scales, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, dt_iop_highlights_params_t::solid_color, swap(), TRUE, wavelets_process_cl(), width, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_opencl_local_buffer_t::xoffset, dt_iop_buffer_dsc_t::xtrans, and dt_iop_roi_t::y.

Referenced by process_cl().

◆ wavelets_process()

static int wavelets_process ( const float *const restrict  in,
float *const restrict  reconstructed,
const float *const restrict  clipping_mask,
const size_t  width,
const size_t  height,
const int  scales,
float *const restrict  HF,
float *const restrict  LF_odd,
float *const restrict  LF_even,
const diffuse_reconstruct_variant_t  variant,
const float  noise_level,
const int  salt,
const float  first_order_factor 
)
inlinestatic

◆ wavelets_process_cl()