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#pragma once
29
30#include "develop/develop.h"
31#include "develop/imageop.h"
32#include "develop/pixelpipe.h"
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38typedef struct dt_develop_tiling_t
39{
41 float factor;
43 float factor_cl;
45 float maxbuf;
47 float maxbuf_cl;
49 unsigned overhead;
51 unsigned overlap;
55 unsigned xalign;
56 unsigned yalign;
58
59int default_process_tiling_cl(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
60 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
61 void *const ovoid, const int bpp);
62
63int process_tiling_cl(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
64 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
65 void *const ovoid, const int bpp);
66
67int default_process_tiling(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
68 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
69 void *const ovid, const int bpp);
70
71int process_tiling(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
72 const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid,
73 const int bpp);
74
75void default_tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
76 const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling);
77
78void tiling_callback_blendop(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
79 const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling);
80
81void tiling_callback(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe,
82 const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling);
83
84int dt_tiling_piece_fits_host_memory(const size_t width, const size_t height, const unsigned bpp,
85 const float factor, const size_t overhead);
86
87#ifdef __cplusplus
88}
89#endif
90
91// clang-format off
92// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
93// vim: shiftwidth=2 expandtab tabstop=2 cindent
94// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
95// clang-format on
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
int bpp
Definition imageio/format/pdf.c:88
Definition tiling.py:1
const float factor
Definition pdf.h:90
Definition pixelpipe_hb.h:95
Definition pixelpipe_hb.h:216
Definition tiling.h:39
float maxbuf_cl
Definition tiling.h:47
float factor
Definition tiling.h:41
float factor_cl
Definition tiling.h:43
unsigned overhead
Definition tiling.h:49
unsigned xalign
Definition tiling.h:55
unsigned yalign
Definition tiling.h:56
unsigned overlap
Definition tiling.h:51
float maxbuf
Definition tiling.h:45
Definition imageop.h:216
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:1974
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:1512
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:2016
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:674
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:1179
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:1958