Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
locallaplaciancl.h
Go to the documentation of this file.
1#pragma once
2/*
3 This file is part of darktable,
4 Copyright (C) 2016-2020 darktable developers.
5
6 darktable is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 darktable is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with darktable. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifdef HAVE_OPENCL
20typedef struct dt_local_laplacian_cl_global_t
21{
22 int kernel_pad_input;
23 int kernel_gauss_expand;
24 int kernel_gauss_reduce;
25 int kernel_laplacian_assemble;
26 int kernel_process_curve;
27 int kernel_write_back;
28}
29dt_local_laplacian_cl_global_t;
30
31typedef struct dt_local_laplacian_cl_t
32{
33 int devid;
34 dt_local_laplacian_cl_global_t *global;
35
36 int width, height;
37 int num_levels;
38 float sigma, highlights, shadows, clarity;
39 int blocksize, blockwd, blockht;
40 int max_supp;
41 size_t bwidth, bheight;
42
43 // pyramid of padded monochrome input buffer
44 cl_mem *dev_padded;
45 // pyramid of padded output buffer, monochrome, too:
46 cl_mem *dev_output;
47 // one pyramid of padded monochrome buffers for every value
48 // of gamma (curve parameter) that we process:
49 cl_mem **dev_processed;
50}
51dt_local_laplacian_cl_t;
52
53dt_local_laplacian_cl_global_t *dt_local_laplacian_init_cl_global();
54dt_local_laplacian_cl_t *dt_local_laplacian_init_cl(
55 const int devid,
56 const int width, // width of input image
57 const int height, // height of input image
58 const float sigma, // user param: separate shadows/mid-tones/highlights
59 const float shadows, // user param: lift shadows
60 const float highlights, // user param: compress highlights
61 const float clarity); // user param: increase clarity/local contrast
62void dt_local_laplacian_free_cl(dt_local_laplacian_cl_t *g);
63cl_int dt_local_laplacian_cl(dt_local_laplacian_cl_t *g, cl_mem input, cl_mem output);
64#endif
65// clang-format off
66// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
67// vim: shiftwidth=2 expandtab tabstop=2 cindent
68// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
69// clang-format on
70
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1