18 gboolean *
const cache_output,
24 float *process_input_temp = NULL;
25 float *blend_input_temp = NULL;
26 float *blend_output_temp = NULL;
27 const float *process_input = input;
28 const float *blend_input = input;
29 void *blend_output = output;
34 gboolean input_locked =
FALSE;
38 fprintf(stdout,
"[dev_pixelpipe] %s got a NULL input, report that to developers\n", module->name());
46 fprintf(stdout,
"[dev_pixelpipe] %s got a NULL output, report that to developers\n", module->name());
55 const int cst_before = process_input_dsc.
cst;
68 &process_input_dsc.
cst, work_profile);
71 process_input = process_input_temp;
90 const int cst_after = process_input_dsc.
cst;
94 process_input_dsc.
bpp, piece->
dsc_out.
bpp, cst_before, cst_after);
100 float *
out = (
float *)output;
102 for(
size_t k = 0;
k < count;
k++)
114 err =
module->process_tiling(module, pipe, piece, process_input, output, process_input_dsc.bpp);
120 err =
module->process(module, pipe, piece, process_input, output);
127 fprintf(stdout,
"[pixelpipe] %s process on CPU returned with an error\n", module->name());
136 blend_input = process_input;
137 blend_input_dsc = process_input_dsc;
138 blend_output = output;
139 blend_output_dsc = piece->
dsc_out;
141 = (
module->dev->gui_attached && (module == module->dev->gui_module) && (pipe == module->dev->pipe))
142 ? module->request_mask_display
143 : DT_DEV_PIXELPIPE_DISPLAY_NONE;
150 const int blend_in_before = blend_input_dsc.
cst;
165 &blend_input_dsc.
cst, work_profile);
166 blend_input = blend_input_temp;
170 input_locked =
FALSE;
173 const int blend_in_after = blend_input_dsc.
cst;
177 process_input_dsc.
bpp, blend_input_dsc.
bpp,
178 blend_in_before, blend_in_after);
180 const int blend_out_before = blend_output_dsc.
cst;
196 &blend_output_dsc.
cst, work_profile);
197 blend_output = blend_output_temp;
199 const int blend_out_after = blend_output_dsc.
cst;
204 blend_out_before, blend_out_after);
215 memcpy(output, blend_output,
222 &blend_output_dsc.
cst, work_profile);
dt_iop_colorspace_type_t dt_develop_blend_colorspace(const dt_dev_pixelpipe_iop_t *const piece, dt_iop_colorspace_type_t cst)
int dt_develop_blend_process(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
const dt_colormatrix_t dt_aligned_pixel_t out
#define dt_pixelpipe_cache_free_align(mem)
#define dt_pixelpipe_cache_alloc_align_float(pixels, pipe)
#define __OMP_PARALLEL_FOR_SIMD__(...)
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
dt_dev_pixelpipe_display_mask_t
@ DT_DEV_PIXELPIPE_DISPLAY_ANY
static gboolean dt_iop_colorspace_is_rgb(const dt_iop_colorspace_type_t cst)
@ IOP_FLAGS_SUPPORTS_BLENDING
@ IOP_FLAGS_TAKE_NO_INPUT
void dt_ioppr_transform_image_colorspace(struct dt_iop_module_t *self, const float *const image_in, float *const image_out, const int width, const int height, const int cst_from, const int cst_to, int *converted_cst, const dt_iop_order_iccprofile_info_t *const profile_info)
dt_iop_order_iccprofile_info_t * dt_ioppr_get_pipe_work_profile_info(const struct dt_dev_pixelpipe_t *pipe)
float *const restrict const size_t k
float *const restrict const size_t const size_t ch
void * dt_pixel_cache_entry_get_data(dt_pixel_cache_entry_t *entry)
void * dt_pixel_cache_alloc(dt_dev_pixelpipe_cache_t *cache, dt_pixel_cache_entry_t *cache_entry)
Actually allocate the memory buffer attached to the cache entry once you create it with dt_dev_pixelp...
void dt_dev_pixelpipe_cache_rdlock_entry(dt_dev_pixelpipe_cache_t *cache, gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Lock or release the read lock on the entry.
int pixelpipe_process_on_CPU(dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const dt_dev_pixelpipe_iop_t *previous_piece, dt_develop_tiling_t *tiling, dt_pixelpipe_flow_t *pixelpipe_flow, gboolean *const cache_output, dt_pixel_cache_entry_t *input_entry, dt_pixel_cache_entry_t *output_entry)
dt_pixelpipe_blend_transform_t dt_dev_pixelpipe_transform_for_blend(const dt_iop_module_t *const self, const dt_dev_pixelpipe_iop_t *const piece, const dt_iop_buffer_dsc_t *const output_dsc)
void dt_dev_pixelpipe_debug_dump_module_io(dt_dev_pixelpipe_t *pipe, dt_iop_module_t *module, const char *stage, const gboolean is_cl, const dt_iop_buffer_dsc_t *in_dsc, const dt_iop_buffer_dsc_t *out_dsc, const dt_iop_roi_t *roi_in, const dt_iop_roi_t *roi_out, const size_t in_bpp, const size_t out_bpp, const int cst_before, const int cst_after)
@ PIXELPIPE_FLOW_PROCESSED_ON_CPU
@ PIXELPIPE_FLOW_PROCESSED_WITH_TILING
@ PIXELPIPE_FLOW_PROCESSED_ON_GPU
@ PIXELPIPE_FLOW_BLENDED_ON_CPU
@ PIXELPIPE_FLOW_BLENDED_ON_GPU
dt_pixelpipe_blend_transform_t
@ DT_DEV_PIXELPIPE_BLEND_TRANSFORM_INPUT
@ DT_DEV_PIXELPIPE_BLEND_TRANSFORM_NONE
@ DT_DEV_PIXELPIPE_BLEND_TRANSFORM_OUTPUT
struct dt_dev_pixelpipe_cache_t * pixelpipe_cache
dt_iop_buffer_dsc_t dsc_out
dt_iop_buffer_dsc_t dsc_in
struct dt_develop_t * dev
dt_iop_buffer_type_t datatype
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)