Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
pixelpipe.c
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2011 johannes hanika.
4 Copyright (C) 2012 Richard Wonka.
5 Copyright (C) 2016 Roman Lebedev.
6 Copyright (C) 2016, 2019 Tobias Ellinghaus.
7 Copyright (C) 2019 Edgardo Hoszowski.
8 Copyright (C) 2020 Pascal Obry.
9 Copyright (C) 2022 Martin Bařinka.
10 Copyright (C) 2025-2026 Aurélien PIERRE.
11 Copyright (C) 2026 Guillaume Stutin.
12
13 darktable is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 darktable is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with darktable. If not, see <http://www.gnu.org/licenses/>.
25*/
26#ifdef HAVE_CONFIG_H
27#include "config.h"
28#endif
29
31
33{
34 switch(pipe)
35 {
36 case DT_DEV_PIXELPIPE_NONE: return "NONE";
37 case DT_DEV_PIXELPIPE_EXPORT: return "EXPORT";
38 case DT_DEV_PIXELPIPE_FULL: return "FULL";
39 case DT_DEV_PIXELPIPE_PREVIEW: return "PREVIEW";
40 case DT_DEV_PIXELPIPE_THUMBNAIL: return "THUMBNAIL";
41 default: return "(unknown)";
42 }
43}
44
46{
47 static const char cache_tag[] = "detailmask:rawdetail";
50 return dt_hash(piece->global_hash, cache_tag, sizeof(cache_tag));
51}
52
54 const int raster_mask_id)
55{
56 static const char cache_tag[] = "raster-mask";
59
60 uint64_t hash = dt_hash(piece->global_mask_hash, cache_tag, sizeof(cache_tag));
61 return dt_hash(hash, (const char *)&raster_mask_id, sizeof(raster_mask_id));
62}
63
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
darktable_t darktable
Definition darktable.c:181
static uint64_t dt_hash(uint64_t hash, const char *str, size_t size)
Definition darktable.h:1043
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
Definition darktable.h:281
uint64_t dt_dev_pixelpipe_raster_mask_hash(const dt_dev_pixelpipe_iop_t *piece, const int raster_mask_id)
Definition pixelpipe.c:53
uint64_t dt_dev_pixelpipe_rawdetail_mask_hash(const dt_dev_pixelpipe_iop_t *piece)
Definition pixelpipe.c:45
const char * dt_pixelpipe_name(dt_dev_pixelpipe_type_t pipe)
Definition pixelpipe.c:32
void dt_dev_clear_rawdetail_mask(dt_dev_pixelpipe_t *pipe)
Release the side-band detail mask cache reference currently owned by the pipeline.
Definition pixelpipe.c:64
dt_dev_pixelpipe_type_t
Definition pixelpipe.h:36
@ DT_DEV_PIXELPIPE_THUMBNAIL
Definition pixelpipe.h:41
@ DT_DEV_PIXELPIPE_EXPORT
Definition pixelpipe.h:38
@ DT_DEV_PIXELPIPE_NONE
Definition pixelpipe.h:37
@ DT_DEV_PIXELPIPE_PREVIEW
Definition pixelpipe.h:40
@ DT_DEV_PIXELPIPE_FULL
Definition pixelpipe.h:39
void dt_dev_pixelpipe_cache_unref_hash(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash)
Find the entry matching hash, and decrease its ref_count if found.
#define DT_PIXELPIPE_CACHE_HASH_INVALID
unsigned __int64 uint64_t
Definition strptime.c:75
struct dt_dev_pixelpipe_cache_t * pixelpipe_cache
Definition darktable.h:790
uint64_t rawdetail_mask_hash
struct dt_iop_roi_t rawdetail_mask_roi