Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
bilateral.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2012-2013 johannes hanika.
4 Copyright (C) 2012 Moritz Lipp.
5 Copyright (C) 2012-2014, 2016 Tobias Ellinghaus.
6 Copyright (C) 2012, 2014, 2016 Ulrich Pegelow.
7 Copyright (C) 2015-2016 Roman Lebedev.
8 Copyright (C) 2019 Aurélien PIERRE.
9 Copyright (C) 2020 Pascal Obry.
10 Copyright (C) 2020 Ralf Brown.
11 Copyright (C) 2022 Martin Bařinka.
12
13 darktable is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 darktable is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with darktable. If not, see <http://www.gnu.org/licenses/>.
25*/
26
27#pragma once
28
29#include <stddef.h> // for size_t
30
31typedef struct dt_bilateral_t
32{
35 int numslices, sliceheight, slicerows; //height--in input image, rows--in grid
37 float *buf __attribute__((aligned(64)));
39
40size_t dt_bilateral_memory_use(const int width, // width of input image
41 const int height, // height of input image
42 const float sigma_s, // spatial sigma (blur pixel coords)
43 const float sigma_r); // range sigma (blur luma values)
44
45size_t dt_bilateral_memory_use2(const int width, // width of input image
46 const int height, // height of input image
47 const float sigma_s, // spatial sigma (blur pixel coords)
48 const float sigma_r); // range sigma (blur luma values)
49
50size_t dt_bilateral_singlebuffer_size(const int width, // width of input image
51 const int height, // height of input image
52 const float sigma_s, // spatial sigma (blur pixel coords)
53 const float sigma_r); // range sigma (blur luma values)
54
55size_t dt_bilateral_singlebuffer_size2(const int width, // width of input image
56 const int height, // height of input image
57 const float sigma_s, // spatial sigma (blur pixel coords)
58 const float sigma_r); // range sigma (blur luma values)
59
60void dt_bilateral_grid_size(dt_bilateral_t *b, const int width, const int height, const float L_range,
61 float sigma_s, const float sigma_r);
62
63dt_bilateral_t *dt_bilateral_init(const int width, // width of input image
64 const int height, // height of input image
65 const float sigma_s, // spatial sigma (blur pixel coords)
66 const float sigma_r); // range sigma (blur luma values)
67
68void dt_bilateral_splat(const dt_bilateral_t *b, const float *const in);
69
71
72void dt_bilateral_slice(const dt_bilateral_t *const b, const float *const in, float *out, const float detail);
73
74void dt_bilateral_slice_to_output(const dt_bilateral_t *const b, const float *const in, float *out,
75 const float detail);
76
78
79// clang-format off
80// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
81// vim: shiftwidth=2 expandtab tabstop=2 cindent
82// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
83// clang-format on
84
int width
Definition bilateral.h:1
void dt_bilateral_free(dt_bilateral_t *b)
Definition bilateral.c:465
void dt_bilateral_slice(const dt_bilateral_t *const b, const float *const in, float *out, const float detail)
Definition bilateral.c:378
size_t dt_bilateral_memory_use2(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:93
void dt_bilateral_splat(const dt_bilateral_t *b, const float *const in)
Definition bilateral.c:180
float sigma_s
Definition bilateral.h:3
void dt_bilateral_grid_size(dt_bilateral_t *b, const int width, const int height, const float L_range, float sigma_s, const float sigma_r)
Definition bilateral.c:45
size_t dt_bilateral_singlebuffer_size2(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:116
size_t dt_bilateral_memory_use(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:74
dt_bilateral_t * dt_bilateral_init(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:151
size_t dt_bilateral_singlebuffer_size(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:102
void dt_bilateral_slice_to_output(const dt_bilateral_t *const b, const float *const in, float *out, const float detail)
Definition bilateral.c:425
int height
Definition bilateral.h:1
float sigma_r
Definition bilateral.h:3
void dt_bilateral_blur(const dt_bilateral_t *b)
Definition bilateral.c:359
const float b
Definition colorspaces_inline_conversions.h:1326
static const dt_colormatrix_t dt_aligned_pixel_t out
Definition colorspaces_inline_conversions.h:184
float dt_aligned_pixel_simd_t __attribute__((vector_size(16), aligned(16)))
Multi-tap smudge source sample with directional jitter.
Definition darktable.h:448
Definition bilateral.h:32
size_t size_y
Definition bilateral.h:33
int sliceheight
Definition bilateral.h:35
size_t size_z
Definition bilateral.h:33
int width
Definition bilateral.h:34
float sigma_s
Definition bilateral.h:36
float sigma_r
Definition bilateral.h:36
int height
Definition bilateral.h:34
float *buf __attribute__((aligned(64)))
size_t size_x
Definition bilateral.h:33
int numslices
Definition bilateral.h:35
int slicerows
Definition bilateral.h:35