21 gboolean *
const cache_output,
27 float *process_input_temp = NULL;
28 float *blend_input_temp = NULL;
29 float *blend_output_temp = NULL;
30 const float *process_input = input;
31 const float *blend_input = input;
32 void *blend_output = output;
37 gboolean input_locked =
FALSE;
41 fprintf(stdout,
"[dev_pixelpipe] %s got a NULL input, report that to developers\n", module->name());
49 fprintf(stdout,
"[dev_pixelpipe] %s got a NULL output, report that to developers\n", module->name());
58 const int cst_before = process_input_dsc.
cst;
71 &process_input_dsc.
cst, work_profile);
74 process_input = process_input_temp;
93 const int cst_after = process_input_dsc.
cst;
97 process_input_dsc.
bpp, piece->
dsc_out.
bpp, cst_before, cst_after);
103 float *
out = (
float *)output;
105 for(
size_t k = 0;
k < count;
k++)
116 const gboolean fitting
126 err =
module->process_tiling(module, pipe, piece, process_input, output, process_input_dsc.bpp);
132 err =
module->process(module, pipe, piece, process_input, output);
139 fprintf(stdout,
"[pixelpipe] %s process on CPU returned with an error\n", module->name());
148 blend_input = process_input;
149 blend_input_dsc = process_input_dsc;
150 blend_output = output;
151 blend_output_dsc = piece->
dsc_out;
158 const int blend_in_before = blend_input_dsc.
cst;
173 &blend_input_dsc.
cst, work_profile);
174 blend_input = blend_input_temp;
178 input_locked =
FALSE;
181 const int blend_in_after = blend_input_dsc.
cst;
185 process_input_dsc.
bpp, blend_input_dsc.
bpp,
186 blend_in_before, blend_in_after);
188 const int blend_out_before = blend_output_dsc.
cst;
204 &blend_output_dsc.
cst, work_profile);
205 blend_output = blend_output_temp;
207 const int blend_out_after = blend_output_dsc.
cst;
212 blend_out_before, blend_out_after);
225 &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)
void dt_colorspaces_apply_profile(const char *const op_name, const char *const instance_name, 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)
Convert a 4-channel float buffer between RGB and Lab through one profile.
const dt_colormatrix_t dt_aligned_pixel_t out
dt_iop_order_iccprofile_info_t * dt_ioppr_get_pipe_work_profile_info(const struct dt_dev_pixelpipe_t *pipe)
@ IOP_FLAGS_SUPPORTS_BLENDING
@ IOP_FLAGS_TAKE_NO_INPUT
int32_t dt_get_debug_flags(void)
float *const restrict const size_t k
float *const restrict const size_t const size_t ch
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
#define __OMP_PARALLEL_FOR_SIMD__(...)
void * dt_pixel_cache_entry_get_data(dt_pixel_cache_entry_t *entry)
void dt_dev_pixelpipe_cache_rdlock_entry(gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Lock or release the read lock on the entry.
void * dt_pixel_cache_alloc(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...
#define dt_pixelpipe_cache_free_align(mem)
#define dt_pixelpipe_cache_alloc_align_float(pixels, pipe)
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
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
A profile reduced to the arithmetic the pixel loop can run: two matrices and six tone-curve LUTs,...
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)