Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
format.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 johannes hanika.
5 Copyright (C) 2010 Pascal de Bruijn.
6 Copyright (C) 2012 Richard Wonka.
7 Copyright (C) 2013-2014 Jérémy Rosen.
8 Copyright (C) 2014-2015, 2020 Pascal Obry.
9 Copyright (C) 2015-2016 Tobias Ellinghaus.
10 Copyright (C) 2016 Roman Lebedev.
11 Copyright (C) 2018 Edgardo Hoszowski.
12 Copyright (C) 2020 Aurélien PIERRE.
13 Copyright (C) 2021 Ralf Brown.
14 Copyright (C) 2022 Martin Bařinka.
15
16 darktable is free software: you can redistribute it and/or modify
17 it under the terms of the GNU General Public License as published by
18 the Free Software Foundation, either version 3 of the License, or
19 (at your option) any later version.
20
21 darktable is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
25
26 You should have received a copy of the GNU General Public License
27 along with darktable. If not, see <http://www.gnu.org/licenses/>.
28*/
29
30#ifndef DT_PIXEL_FORMAT_H
31#define DT_PIXEL_FORMAT_H
32
33#include <stddef.h>
34#include <stdint.h>
35#include "system/simd.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41
48typedef struct dt_iop_roi_t
49{
50 int x, y, width, height;
51 double scale;
53
60
73
74/* Trivial predicate over the enum above; it lived in develop/imageop.h. */
75static inline gboolean dt_iop_colorspace_is_rgb(const dt_iop_colorspace_type_t cst)
76{
77 return cst == IOP_CS_RGB || cst == IOP_CS_RGB_DISPLAY;
78}
79
80typedef struct dt_iop_buffer_dsc_t
81{
83 unsigned int channels;
87 size_t bpp;
89 uint32_t filters;
99 uint8_t xtrans[6][6];
100
101 struct
102 {
106
107 struct
108 {
112
115
117 int cst;
118
120
122size_t dt_iop_buffer_dsc_to_bpp(const struct dt_iop_buffer_dsc_t *dsc);
123
124/* default_input_format(), default_output_format() and default_blend_colorspace() used to be
125 * declared here. They are IOP-module defaults, they take dt_iop_module_t and
126 * dt_dev_pixelpipe_t, and declaring them here is what forced this layer-2 header to
127 * forward-declare three develop/ types. They live in develop/imageop.h now, beside their
128 * definitions' layer and beside the module API every caller already includes. */
129
130#ifdef __cplusplus
131}
132#endif
133
134#endif // DT_PIXEL_FORMAT_H
135
136// clang-format off
137// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
138// vim: shiftwidth=2 expandtab tabstop=2 cindent
139// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
140// clang-format on
dt_iop_colorspace_type_t
void dt_iop_buffer_dsc_update_bpp(struct dt_iop_buffer_dsc_t *dsc)
static gboolean dt_iop_colorspace_is_rgb(const dt_iop_colorspace_type_t cst)
Definition format.h:75
size_t dt_iop_buffer_dsc_to_bpp(const struct dt_iop_buffer_dsc_t *dsc)
dt_iop_colorspace_type_t
Definition format.h:63
@ IOP_CS_RAW
Definition format.h:65
@ IOP_CS_LCH
Definition format.h:68
@ IOP_CS_RGB_DISPLAY
Definition format.h:71
@ IOP_CS_JZCZHZ
Definition format.h:70
@ IOP_CS_RGB
Definition format.h:67
@ IOP_CS_HSL
Definition format.h:69
@ IOP_CS_LAB
Definition format.h:66
@ IOP_CS_NONE
Definition format.h:64
dt_iop_buffer_type_t
Definition format.h:54
@ TYPE_FLOAT
Definition format.h:56
@ TYPE_UNKNOWN
Definition format.h:55
@ TYPE_UINT8
Definition format.h:58
@ TYPE_UINT16
Definition format.h:57
DT_ALIGNED_PIXEL float dt_aligned_pixel_t[4]
Definition simd.h:53
dt_aligned_pixel_t coeffs
Definition format.h:110
uint32_t filters
Definition format.h:89
uint16_t raw_black_level
Definition format.h:103
unsigned int channels
Definition format.h:83
uint8_t xtrans[6][6]
Definition format.h:99
struct dt_iop_buffer_dsc_t::@55 rawprepare
dt_iop_buffer_type_t datatype
Definition format.h:85
dt_aligned_pixel_t processed_maximum
Definition format.h:114
uint16_t raw_white_point
Definition format.h:104
struct dt_iop_buffer_dsc_t::@56 temperature
Region of interest passed through the pixelpipe.
Definition format.h:49
double scale
Definition format.h:51
int width
Definition format.h:50
int height
Definition format.h:50