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-2020 darktable developers.
4
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 "common/image.h"
22#include <glib.h>
23#include <json-glib/json-glib.h>
24
25typedef struct dt_noiseprofile_t
26{
27 char *name;
28 char *maker;
29 char *model;
30 int iso;
31 dt_aligned_pixel_t a; // poissonian part; use 4 aligned instead of 3 elements to aid vectorization
32 dt_aligned_pixel_t b; // gaussian part
33}
35
37
39JsonParser *dt_noiseprofile_init(const char *alternative);
40
41/*
42 * returns the noiseprofiles matching the image's exif data.
43 * free with g_list_free_full(..., dt_noiseprofile_free);
44 */
46
48void dt_noiseprofile_free(gpointer data);
49
50/*
51 * interpolate values from p1 and p2 into out.
52 */
54 const dt_noiseprofile_t *const p1, // the smaller iso
55 const dt_noiseprofile_t *const p2, // the larger iso (can't be == iso1)
56 dt_noiseprofile_t *out); // has iso initialized
57
58// clang-format off
59// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
60// vim: shiftwidth=2 expandtab tabstop=2 cindent
61// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
62// clang-format on
63
const dt_noiseprofile_t dt_noiseprofile_generic
Definition noiseprofiles.c:26
void dt_noiseprofile_interpolate(const dt_noiseprofile_t *const p1, const dt_noiseprofile_t *const p2, dt_noiseprofile_t *out)
Definition noiseprofiles.c:380
void dt_noiseprofile_free(gpointer data)
Definition noiseprofiles.c:371
JsonParser * dt_noiseprofile_init(const char *alternative)
Definition noiseprofiles.c:30
GList * dt_noiseprofile_get_matching(const dt_image_t *cimg)
Definition noiseprofiles.c:232
Definition common/image.h:195
Definition noiseprofiles.h:26
char * name
Definition noiseprofiles.h:27
dt_aligned_pixel_t a
Definition noiseprofiles.h:31
char * model
Definition noiseprofiles.h:29
char * maker
Definition noiseprofiles.h:28
int iso
Definition noiseprofiles.h:30
dt_aligned_pixel_t b
Definition noiseprofiles.h:32