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
14 darktable is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 darktable is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with darktable. If not, see <http://www.gnu.org/licenses/>.
26*/
27
28#ifndef DT_DEVELOP_TILING_H
29#define DT_DEVELOP_TILING_H
30
31#include "develop/develop.h"
32#include "develop/imageop.h"
33#include "develop/pixelpipe.h"
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39typedef struct dt_develop_tiling_t
40{
42 float factor;
44 float factor_cl;
46 float maxbuf;
48 float maxbuf_cl;
50 unsigned overhead;
52 unsigned overlap;
56 unsigned xalign;
57 unsigned yalign;
59
60int default_process_tiling_cl(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
61 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
62 void *const ovoid, const int bpp);
63
64int process_tiling_cl(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
65 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
66 void *const ovoid, const int bpp);
67
68int default_process_tiling(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
69 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
70 void *const ovid, const int bpp);
71
72int process_tiling(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
73 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid,
74 const int bpp);
75
76void default_tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
77 const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling);
78
79void tiling_callback_blendop(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
80 const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling);
81
82void tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
83 const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling);
84
85int dt_tiling_piece_fits_host_memory(const size_t width, const size_t height, const unsigned bpp,
86 const float factor, const size_t overhead);
87
88#ifdef __cplusplus
89}
90#endif
91
92#endif // DT_DEVELOP_TILING_H
93
94// clang-format off
95// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
96// vim: shiftwidth=2 expandtab tabstop=2 cindent
97// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
98// clang-format on
int bpp
void *const ovoid
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:50
unsigned xalign
Definition tiling.h:56
unsigned yalign
Definition tiling.h:57
unsigned overlap
Definition tiling.h:52
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:1423
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:1720
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:1465
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:664
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:826
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:1394