![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/logging.h"#include "system/macros.h"#include "system/openmp.h"#include "system/simd.h"#include "system/target_clones.h"#include "caches/pixelpipe_cache_alloc.h"#include "pixel/distance_transform.h"#include "math/sparse_cholesky_cl.h"#include "iop/highlights/blur.h"#include "iop/highlights/gather.h"#include "iop/highlights/knee.h"#include "iop/highlights/process.h"#include "iop/highlights/region.h"#include "iop/highlights/segmentation.h"#include "iop/highlights/selftests.h"#include <math.h>#include <stdlib.h>#include <string.h>
Include dependency graph for process.c:Go to the source code of this file.
Macros | |
| #define | HL_CL_RELEASE(mem_obj) |
Functions | |
| static __DT_CLONE_TARGETS__ int | _harmonic_reconstruct_regions (float *const interpolated, const float *const clipping_mask, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *const roi_in, const dt_aligned_pixel_t clips) |
| __DT_CLONE_TARGETS__ int | process_harmonic (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 __DT_CLONE_TARGETS__ int | _harmonic_reconstruct_host (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const float *const restrict input, float *const restrict interpolated, float *const restrict clipping_mask, const dt_iop_roi_t *const roi_in, const dt_aligned_pixel_t clips, const dt_aligned_pixel_t normalization, const float **remosaic_input_out, float **input_corr_out, const _hl_knee_curve_t knee_pre[3]) |
| static cl_int | _harmonic_cl_roundtrip (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) |
| static cl_int | _harmonic_reconstruct_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem raw_buf, cl_mem interp_buf, cl_mem mask_buf, cl_mem *corr_out, const dt_iop_roi_t *const roi_in, const dt_aligned_pixel_t clips, const dt_aligned_pixel_t norm, cl_mem dev_xtrans, const _hl_knee_curve_t knee_pre[3]) |
| cl_int | process_harmonic_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) |
| #define HL_CL_RELEASE | ( | mem_obj | ) |
|
static |
Definition at line 379 of file process.c.
References dt_dev_pixelpipe_t::devid, dt_opencl_copy_device_to_host(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_write_host_to_device(), dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, error(), dt_iop_roi_t::height, IS_NULL_PTR, piece, pipe, process_harmonic(), and dt_iop_roi_t::width.
Referenced by process_harmonic_cl().
|
static |
Definition at line 436 of file process.c.
References __OMP_PARALLEL_FOR__, _hl_floor_gate(), _hl_gauss_cache_flush(), _hl_knee_apply_cfa_cl(), _segment_clipped_regions(), _sp_cl_upload(), dt_dev_pixelpipe_t::devid, DT_DEBUG_OPENCL, dt_dev_get_module_scale(), dt_dev_pixelpipe_has_shutdown(), DT_DISTANCE_TRANSFORM_MAX, DT_DISTANCE_TRANSFORM_NONE, DT_HL_CL_CPU_REGION_PX, DT_HL_CL_REGION_FLOATS_PER_PX, DT_HL_KNEE_BINS, DT_HL_KNEE_DET, DT_HL_KNEE_LO, dt_image_distance_transform(), dt_opencl_alloc_device_buffer(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_kernel_2d(), dt_opencl_finish(), dt_opencl_image_fits_device(), dt_opencl_read_buffer_from_device(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_opencl_write_buffer_to_device(), dt_pixelpipe_cache_alloc_align, dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, dt_print(), _hl_knee_curve_t::engaged, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, i, dt_iop_highlights_params_t::iterations, kernel(), dt_iop_highlights_global_data_t::kernel_hl_knee_apply_interp, dt_iop_highlights_global_data_t::kernel_hl_mask_pack, dt_iop_highlights_params_t::noise_level, out, piece, pipe, ROUNDUPDHT, ROUNDUPDWD, _hl_region_t::rx0, _hl_region_t::rx1, _hl_region_t::ry0, _hl_region_t::ry1, dt_iop_highlights_params_t::solid_color, width, and dt_iop_roi_t::width.
Referenced by process_harmonic_cl().
|
static |
Definition at line 303 of file process.c.
References _harmonic_reconstruct_regions(), _hl_gauss_cache_flush(), _hl_knee_apply_cfa(), _hl_knee_apply_interpolated(), dt_dev_get_roi_filters(), DT_HL_KNEE_DET, dt_pixelpipe_cache_alloc_align_float, _hl_knee_curve_t::engaged, height, dt_iop_roi_t::height, IS_NULL_PTR, piece, pipe, size, width, and dt_iop_roi_t::width.
Referenced by process_harmonic_cl().
|
static |
Definition at line 55 of file process.c.
References __OMP_PARALLEL_FOR__, _hl_floor_gate(), _region_guided_filter(), _segment_clipped_regions(), dt_dev_get_module_scale(), dt_dev_pixelpipe_has_shutdown(), DT_DISTANCE_TRANSFORM_MAX, DT_DISTANCE_TRANSFORM_NONE, dt_image_distance_transform(), dt_pixelpipe_cache_alloc_align, dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, height, dt_iop_roi_t::height, i, IS_NULL_PTR, dt_iop_highlights_params_t::iterations, dt_iop_highlights_params_t::noise_level, piece, pipe, dt_iop_highlights_params_t::solid_color, width, and dt_iop_roi_t::width.
Referenced by _harmonic_reconstruct_host(), and process_harmonic().
| __DT_CLONE_TARGETS__ int process_harmonic | ( | 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 | ||
| ) |
Definition at line 111 of file process.c.
References _build_xtrans_bilinear_lookup(), _compute_laplacian_normalization(), _harmonic_reconstruct_regions(), _hl_cfa_strategy(), _hl_gauss_cache_flush(), _hl_knee_apply_cfa(), _hl_knee_apply_interpolated(), _hl_knee_estimate(), _interpolate_and_mask(), _interpolate_and_mask_passthrough(), _interpolate_and_mask_xtrans(), _remosaic_and_replace(), _remosaic_and_replace_passthrough(), _remosaic_and_replace_xtrans(), dt_dev_get_roi_filters(), DT_HL_BAND_OVR, DT_HL_KNEE_DET, dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, _hl_knee_curve_t::engaged, error(), for_four_channels, height, dt_iop_roi_t::height, HL_CFA_BAYER, HL_CFA_PASSTHROUGH, HL_CFA_XTRANS, IS_NULL_PTR, lookup(), ovoid, piece, pipe, size, TRUE, void(), width, and dt_iop_roi_t::width.
Referenced by _harmonic_cl_roundtrip(), and process().
| cl_int process_harmonic_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 635 of file process.c.
References _aniso_stage_cl_selftest(), _build_xtrans_bilinear_lookup(), _cf_harmonic_fill_cl_selftest(), _cf_joint_stage_cl_selftest(), _cf_stage_cl_selftest(), _chromaticity_gradient_stage_cl_selftest(), _compute_laplacian_normalization(), _harmonic_cl_roundtrip(), _harmonic_reconstruct_cl(), _harmonic_reconstruct_host(), _hf_stage_cl_selftest(), _hl_knee_estimate_cl(), _joint_core_stage_cl_selftest(), _knee_cl_selftest(), _region_blur_cl_selftest(), _region_guided_filter_cl_selftest(), _selfdome_stage_cl_selftest(), _sp_chol_cl_selftest(), dt_dev_pixelpipe_t::devid, double(), DT_DEBUG_OPENCL, dt_dev_get_roi_filters(), dt_dev_pixelpipe_has_shutdown(), DT_HL_BAND_OVR, DT_HL_KNEE_DET, dt_opencl_alloc_device(), dt_opencl_alloc_device_buffer(), dt_opencl_copy_device_to_host(), dt_opencl_copy_host_to_device_constant(), DT_OPENCL_DEFAULT_ERROR, dt_opencl_enqueue_copy_buffer_to_image(), dt_opencl_enqueue_copy_image_to_buffer(), dt_opencl_enqueue_kernel_2d(), dt_opencl_finish(), dt_opencl_read_buffer_from_device(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_opencl_write_host_to_device(), dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, dt_print(), for_four_channels, dt_iop_module_t::global_data, height, dt_iop_roi_t::height, HL_CL_RELEASE, i, IS_NULL_PTR, kernel(), dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask, dt_iop_highlights_global_data_t::kernel_highlights_bilinear_and_mask_passthrough, 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_remosaic_and_replace, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace_passthrough, dt_iop_highlights_global_data_t::kernel_highlights_remosaic_and_replace_xtrans, lookup(), piece, pipe, ROUNDUPDHT, ROUNDUPDWD, TRUE, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process_cl().