Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
laplacian.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2010 Bruce Guenter.
4 Copyright (C) 2010-2011 Henrik Andersson.
5 Copyright (C) 2010-2014, 2016 johannes hanika.
6 Copyright (C) 2010 Stuart Henderson.
7 Copyright (C) 2011 Antony Dovgal.
8 Copyright (C) 2011 Robert Bieber.
9 Copyright (C) 2011-2014, 2016, 2019 Tobias Ellinghaus.
10 Copyright (C) 2011-2012, 2014, 2016-2017 Ulrich Pegelow.
11 Copyright (C) 2012, 2015 Edouard Gomez.
12 Copyright (C) 2012 Jérémy Rosen.
13 Copyright (C) 2012 Richard Wonka.
14 Copyright (C) 2013, 2020 Aldric Renaudin.
15 Copyright (C) 2014, 2016 Dan Torop.
16 Copyright (C) 2014-2016 Roman Lebedev.
17 Copyright (C) 2015-2016 Pedro Côrte-Real.
18 Copyright (C) 2017 Heiko Bauke.
19 Copyright (C) 2017 luzpaz.
20 Copyright (C) 2018, 2020-2026 Aurélien PIERRE.
21 Copyright (C) 2018 Edgardo Hoszowski.
22 Copyright (C) 2018 Maurizio Paglia.
23 Copyright (C) 2018-2020, 2022 Pascal Obry.
24 Copyright (C) 2018 rawfiner.
25 Copyright (C) 2019 Andreas Schneider.
26 Copyright (C) 2019 Diederik ter Rahe.
27 Copyright (C) 2019-2020, 2022 Hanno Schwalm.
28 Copyright (C) 2020 Chris Elston.
29 Copyright (C) 2020, 2022 Diederik Ter Rahe.
30 Copyright (C) 2020-2021 Ralf Brown.
31 Copyright (C) 2021 Hubert Kowalski.
32 Copyright (C) 2022 Martin Bařinka.
33 Copyright (C) 2022 Philipp Lutz.
34 Copyright (C) 2022 Victor Forsiuk.
35 Copyright (C) 2023 Alynx Zhou.
36 Copyright (C) 2023 Guillaume Stutin.
37 Copyright (C) 2023 Luca Zulberti.
38
39 darktable is free software: you can redistribute it and/or modify
40 it under the terms of the GNU General Public License as published by
41 the Free Software Foundation, either version 3 of the License, or
42 (at your option) any later version.
43
44 darktable is distributed in the hope that it will be useful,
45 but WITHOUT ANY WARRANTY; without even the implied warranty of
46 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 GNU General Public License for more details.
48
49 You should have received a copy of the GNU General Public License
50 along with darktable. If not, see <http://www.gnu.org/licenses/>.
51 */
52
53#ifndef DT_IOP_HIGHLIGHTS_LAPLACIAN_H
54#define DT_IOP_HIGHLIGHTS_LAPLACIAN_H
55
56// Guided-laplacian (2021 a-trous) highlight reconstruction, CPU + OpenCL.
57// Public API of this highlights mode (a compiled TU); internals are static in the .c.
58
59#include "develop/imageop.h"
60
61// Single CPU driver for guided-laplacian reconstruction, for Bayer, X-Trans and already-demosaiced
62// (non-raw / sRAW) input alike. The wavelet reconstruction is CFA-agnostic; only the disposable-demosaic
63// gather and the remosaic scatter branch on the sensor layout, selected internally via _hl_cfa_strategy().
64int process_laplacian(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe,
65 const dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid,
66 void *const restrict ovoid, const dt_iop_roi_t *const roi_in,
67 const dt_iop_roi_t *const roi_out, const dt_aligned_pixel_t clips);
68
69#ifdef HAVE_OPENCL
71 const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out,
72 const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out,
73 const dt_aligned_pixel_t clips);
74
76 const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out,
77 const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out,
78 const dt_aligned_pixel_t clips);
79
80// Non-raw / sRAW guided-laplacian on the GPU: the disposable-demosaic gather is a device plane copy
81// (already-RGB input) and the remosaic a per-channel device composite; the wavelet reconstruction in
82// between is the same CFA-agnostic device path as the Bayer/X-Trans drivers. Runs fully on-device.
84 const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out,
85 const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out,
86 const dt_aligned_pixel_t clips);
87#endif // HAVE_OPENCL
88#endif // DT_IOP_HIGHLIGHTS_LAPLACIAN_H
void *const ovoid
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 laplacian.c:764
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 laplacian.c:1031
cl_int process_laplacian_passthrough_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 laplacian.c:1309
int process_laplacian(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 laplacian.c:433
DT_ALIGNED_PIXEL float dt_aligned_pixel_t[4]
Definition simd.h:53
Region of interest passed through the pixelpipe.
Definition format.h:49