Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
histogram.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2010-2011 Henrik Andersson.
4 Copyright (C) 2010, 2012-2013 johannes hanika.
5 Copyright (C) 2012 Richard Wonka.
6 Copyright (C) 2013, 2020 Pascal Obry.
7 Copyright (C) 2014-2015 Roman Lebedev.
8 Copyright (C) 2014, 2016 Tobias Ellinghaus.
9 Copyright (C) 2018-2019 Edgardo Hoszowski.
10 Copyright (C) 2022 Martin Baƙinka.
11
12 darktable is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 darktable is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with darktable. If not, see <http://www.gnu.org/licenses/>.
24*/
25
26#ifndef DT_COMMON_HISTOGRAM_H
27#define DT_COMMON_HISTOGRAM_H
28
29#include <stdint.h>
30
31#include "develop/imageop.h"
32#include "develop/pixelpipe.h"
34
35/*
36 * histogram region of interest
37 *
38 * image is located in (0, 0) .. (width, height)
39 * but only (crop_x,crop_y) .. (width-crop_width,height-crop_height)
40 * will be sampled
41 */
46
48 const void *pixel, uint32_t *histogram, int j,
49 const dt_iop_order_iccprofile_info_t *const profile_info);
50
51typedef void((*dt_worker)(const dt_dev_histogram_collection_params_t *const histogram_params,
52 const void *pixel, uint32_t *histogram, int j,
53 const dt_iop_order_iccprofile_info_t *const profile_info));
54
56 dt_dev_histogram_stats_t *histogram_stats, const void *const pixel,
57 uint32_t **histogram, const dt_worker Worker,
58 const dt_iop_order_iccprofile_info_t *const profile_info);
59
61 dt_dev_histogram_stats_t *histogram_stats, const dt_iop_colorspace_type_t cst,
62 const dt_iop_colorspace_type_t cst_to, const void *pixel, uint32_t **histogram,
63 const int compensate_middle_grey, const dt_iop_order_iccprofile_info_t *const profile_info);
64
65void dt_histogram_max_helper(const dt_dev_histogram_stats_t *const histogram_stats,
67 uint32_t **histogram, uint32_t *histogram_max);
68
69#endif // DT_COMMON_HISTOGRAM_H
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
dt_iop_colorspace_type_t
The colour-profile struct and the maths over it: the derived matrix/LUT engine.
void dt_histogram_max_helper(const dt_dev_histogram_stats_t *const histogram_stats, const dt_iop_colorspace_type_t cst, const dt_iop_colorspace_type_t cst_to, uint32_t **histogram, uint32_t *histogram_max)
void dt_histogram_worker(dt_dev_histogram_collection_params_t *const histogram_params, dt_dev_histogram_stats_t *histogram_stats, const void *const pixel, uint32_t **histogram, const dt_worker Worker, const dt_iop_order_iccprofile_info_t *const profile_info)
void dt_histogram_helper(dt_dev_histogram_collection_params_t *histogram_params, dt_dev_histogram_stats_t *histogram_stats, const dt_iop_colorspace_type_t cst, const dt_iop_colorspace_type_t cst_to, const void *pixel, uint32_t **histogram, const int compensate_middle_grey, const dt_iop_order_iccprofile_info_t *const profile_info)
void dt_histogram_helper_cs_RAW_uint16(const dt_dev_histogram_collection_params_t *histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info)
typedef void((*dt_worker)(const dt_dev_histogram_collection_params_t *const histogram_params, const void *pixel, uint32_t *histogram, int j, const dt_iop_order_iccprofile_info_t *const profile_info))
A profile reduced to the arithmetic the pixel loop can run: two matrices and six tone-curve LUTs,...