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-2020 darktable developers.
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include <stddef.h> // for size_t
22
23typedef struct dt_bilateral_t
24{
27 int numslices, sliceheight, slicerows; //height--in input image, rows--in grid
29 float *buf __attribute__((aligned(64)));
31
32size_t dt_bilateral_memory_use(const int width, // width of input image
33 const int height, // height of input image
34 const float sigma_s, // spatial sigma (blur pixel coords)
35 const float sigma_r); // range sigma (blur luma values)
36
37size_t dt_bilateral_memory_use2(const int width, // width of input image
38 const int height, // height of input image
39 const float sigma_s, // spatial sigma (blur pixel coords)
40 const float sigma_r); // range sigma (blur luma values)
41
42size_t dt_bilateral_singlebuffer_size(const int width, // width of input image
43 const int height, // height of input image
44 const float sigma_s, // spatial sigma (blur pixel coords)
45 const float sigma_r); // range sigma (blur luma values)
46
47size_t dt_bilateral_singlebuffer_size2(const int width, // width of input image
48 const int height, // height of input image
49 const float sigma_s, // spatial sigma (blur pixel coords)
50 const float sigma_r); // range sigma (blur luma values)
51
52void dt_bilateral_grid_size(dt_bilateral_t *b, const int width, const int height, const float L_range,
53 float sigma_s, const float sigma_r);
54
55dt_bilateral_t *dt_bilateral_init(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_splat(const dt_bilateral_t *b, const float *const in);
61
63
64void dt_bilateral_slice(const dt_bilateral_t *const b, const float *const in, float *out, const float detail);
65
66void dt_bilateral_slice_to_output(const dt_bilateral_t *const b, const float *const in, float *out,
67 const float detail);
68
70
71// clang-format off
72// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
73// vim: shiftwidth=2 expandtab tabstop=2 cindent
74// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
75// clang-format on
76
int width
Definition bilateral.h:1
void dt_bilateral_free(dt_bilateral_t *b)
Definition bilateral.c:452
void dt_bilateral_slice(const dt_bilateral_t *const b, const float *const in, float *out, const float detail)
Definition bilateral.c:365
size_t dt_bilateral_memory_use2(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:81
struct dt_bilateral_t __attribute__((packed)) dt_bilateral_t
void dt_bilateral_splat(const dt_bilateral_t *b, const float *const in)
Definition bilateral.c:167
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:33
size_t dt_bilateral_singlebuffer_size2(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:104
size_t dt_bilateral_memory_use(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:62
dt_bilateral_t * dt_bilateral_init(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:139
size_t dt_bilateral_singlebuffer_size(const int width, const int height, const float sigma_s, const float sigma_r)
Definition bilateral.c:90
void dt_bilateral_slice_to_output(const dt_bilateral_t *const b, const float *const in, float *out, const float detail)
Definition bilateral.c:412
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:346
Definition bilateral.h:24
size_t size_y
Definition bilateral.h:25
int sliceheight
Definition bilateral.h:27
size_t size_z
Definition bilateral.h:25
int width
Definition bilateral.h:26
float sigma_s
Definition bilateral.h:28
float sigma_r
Definition bilateral.h:28
int height
Definition bilateral.h:26
float *buf __attribute__((aligned(64)))
size_t size_x
Definition bilateral.h:25
int numslices
Definition bilateral.h:27
int slicerows
Definition bilateral.h:27