Skip to content

Commit

Permalink
Highlights fast mode
Browse files Browse the repository at this point in the history
Segmentation based highlights reconstruction is only CPU code which can be pretty heavy on large images as
is uses full image data as roi_in.
While in DT_DEV_PIXELPIPE_FAST mode we fall back to DT_IOP_HIGHLIGHTS_OPPOSED for performance.
  • Loading branch information
jenshannoschwalm authored and TurboGit committed May 29, 2024
1 parent 48dcbe1 commit 702f465
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/iop/highlights.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ void process(struct dt_iop_module_t *self,
dt_iop_highlights_gui_data_t *g = (dt_iop_highlights_gui_data_t *)self->gui_data;

const gboolean fullpipe = piece->pipe->type & DT_DEV_PIXELPIPE_FULL;
const gboolean fastmode = piece->pipe->type & DT_DEV_PIXELPIPE_FAST;
if(g && fullpipe)
{
if(g->hlr_mask_mode != DT_HIGHLIGHTS_MASK_OFF)
Expand Down Expand Up @@ -735,7 +736,9 @@ void process(struct dt_iop_module_t *self,
return;
}

switch(data->mode)
const dt_iop_highlights_mode_t dmode = fastmode && (data->mode == DT_IOP_HIGHLIGHTS_SEGMENTS)
? DT_IOP_HIGHLIGHTS_OPPOSED : data->mode;
switch(dmode)
{
case DT_IOP_HIGHLIGHTS_INPAINT: // a1ex's (magiclantern) idea of color inpainting:
{
Expand Down

0 comments on commit 702f465

Please sign in to comment.