Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
noiseprofiles.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2013 Ben Robbins.
4 Copyright (C) 2013 Christian Tellefsen.
5 Copyright (C) 2013 Dennis Gnad.
6 Copyright (C) 2013 Florian Franzmann.
7 Copyright (C) 2013 Jean-Sébastien Pédron.
8 Copyright (C) 2013-2014 johannes hanika.
9 Copyright (C) 2013 Jon Leighton.
10 Copyright (C) 2013 parafin.
11 Copyright (C) 2013-2014 Pascal de Bruijn.
12 Copyright (C) 2013, 2020 Pascal Obry.
13 Copyright (C) 2013 Richard Tollerton.
14 Copyright (C) 2013-2016 Tobias Ellinghaus.
15 Copyright (C) 2014 Dan Torop.
16 Copyright (C) 2014 Daniel Kraus (bovender).
17 Copyright (C) 2014 Erik Gustavsson.
18 Copyright (C) 2014 Messie1.
19 Copyright (C) 2014 Roman Lebedev.
20 Copyright (C) 2014 Ulrich Pegelow.
21 Copyright (C) 2021 Ralf Brown.
22 Copyright (C) 2022 Martin Bařinka.
23
24 darktable is free software: you can redistribute it and/or modify
25 it under the terms of the GNU General Public License as published by
26 the Free Software Foundation, either version 3 of the License, or
27 (at your option) any later version.
28
29 darktable is distributed in the hope that it will be useful,
30 but WITHOUT ANY WARRANTY; without even the implied warranty of
31 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 GNU General Public License for more details.
33
34 You should have received a copy of the GNU General Public License
35 along with darktable. If not, see <http://www.gnu.org/licenses/>.
36*/
37
38#pragma once
39
40#include "common/image.h"
41#include <glib.h>
42#include <json-glib/json-glib.h>
43
44typedef struct dt_noiseprofile_t
45{
46 char *name;
47 char *maker;
48 char *model;
49 int iso;
50 dt_aligned_pixel_t a; // poissonian part; use 4 aligned instead of 3 elements to aid vectorization
51 dt_aligned_pixel_t b; // gaussian part
52}
54
56
58JsonParser *dt_noiseprofile_init(const char *alternative);
59
60/*
61 * returns the noiseprofiles matching the image's exif data.
62 * free with g_list_free_full(..., dt_noiseprofile_free);
63 */
65
67void dt_noiseprofile_free(gpointer data);
68
69/*
70 * interpolate values from p1 and p2 into out.
71 */
73 const dt_noiseprofile_t *const p1, // the smaller iso
74 const dt_noiseprofile_t *const p2, // the larger iso (can't be == iso1)
75 dt_noiseprofile_t *out); // has iso initialized
76
77// clang-format off
78// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
79// vim: shiftwidth=2 expandtab tabstop=2 cindent
80// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
81// clang-format on
82
static const dt_colormatrix_t dt_aligned_pixel_t out
Definition colorspaces_inline_conversions.h:184
const dt_noiseprofile_t dt_noiseprofile_generic
Definition noiseprofiles.c:35
void dt_noiseprofile_interpolate(const dt_noiseprofile_t *const p1, const dt_noiseprofile_t *const p2, dt_noiseprofile_t *out)
Definition noiseprofiles.c:373
void dt_noiseprofile_free(gpointer data)
Definition noiseprofiles.c:364
JsonParser * dt_noiseprofile_init(const char *alternative)
Definition noiseprofiles.c:39
GList * dt_noiseprofile_get_matching(const dt_image_t *cimg)
Definition noiseprofiles.c:232
Definition common/image.h:247
Definition noiseprofiles.h:45
char * name
Definition noiseprofiles.h:46
dt_aligned_pixel_t a
Definition noiseprofiles.h:50
char * model
Definition noiseprofiles.h:48
char * maker
Definition noiseprofiles.h:47
int iso
Definition noiseprofiles.h:49
dt_aligned_pixel_t b
Definition noiseprofiles.h:51