Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
tiling.h
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) 2011-2013 Ulrich Pegelow.
5 Copyright (C) 2012 Richard Wonka.
6 Copyright (C) 2012, 2014, 2016 Tobias Ellinghaus.
7 Copyright (C) 2016 Roman Lebedev.
8 Copyright (C) 2020 Pascal Obry.
9 Copyright (C) 2020 Ralf Brown.
10 Copyright (C) 2022 Martin Bařinka.
11 Copyright (C) 2025 Alynx Zhou.
12 Copyright (C) 2026 Aurélien PIERRE.
13 Copyright (C) 2026 Guillaume Stutin.
14
15 darktable is free software: you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19
20 darktable is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with darktable. If not, see <http://www.gnu.org/licenses/>.
27*/
28
29#ifndef DT_DEVELOP_TILING_H
30#define DT_DEVELOP_TILING_H
31
32#include "develop/develop.h"
33#include "develop/imageop.h"
34#include "develop/pixelpipe.h"
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40typedef struct dt_develop_tiling_t
41{
43 float factor;
45 float factor_cl;
47 float maxbuf;
49 float maxbuf_cl;
51 unsigned overhead;
53 unsigned overlap;
57 unsigned xalign;
58 unsigned yalign;
60
62 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
63 void *const ovoid, const int bpp);
64
66 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
67 void *const ovoid, const int bpp);
68
70 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
71 void *const ovid, const int bpp);
72
73int process_tiling(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
74 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid,
75 const int bpp);
76
77void default_tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
79
80void tiling_callback_blendop(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
82
83void tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
85
96 const struct dt_dev_pixelpipe_iop_t *piece, const int in_bpp);
97
98int dt_tiling_piece_fits_host_memory(const size_t width, const size_t height, const unsigned bpp,
99 const float factor, const size_t overhead);
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif // DT_DEVELOP_TILING_H
106
107// clang-format off
108// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
109// vim: shiftwidth=2 expandtab tabstop=2 cindent
110// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
111// clang-format on
int bpp
void *const ovoid
static const dt_dev_pixelpipe_t * pipe
Definition layers.h:49
static const dt_dev_pixelpipe_t const dt_dev_pixelpipe_iop_t * piece
Definition layers.h:50
uint32_t width
Definition mipmap_cache.c:0
uint32_t height
Definition mipmap_cache.c:1
const float factor
Definition pdf.h:91
unsigned overhead
Definition tiling.h:51
unsigned xalign
Definition tiling.h:57
unsigned yalign
Definition tiling.h:58
unsigned overlap
Definition tiling.h:53
gboolean dt_tiling_piece_can_save_memory(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const int in_bpp)
Whether process_tiling() can run this piece in less memory than process() would.
Definition tiling.c:1456
int process_tiling(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const int bpp)
void default_tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)
Definition tiling.c:1414
void tiling_callback_blendop(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)
Definition blend.c:1730
int process_tiling_cl(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const int bpp)
int dt_tiling_piece_fits_host_memory(const size_t width, const size_t height, const unsigned bpp, const float factor, const size_t overhead)
Definition tiling.c:1469
void tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)
Definition atrous.c:673
int default_process_tiling(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovid, const int bpp)
Definition tiling.c:817
int default_process_tiling_cl(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const int bpp)
Definition tiling.c:1385