Skip to content

Commit

Permalink
Bugfix both overexposed indicators (#12465)
Browse files Browse the repository at this point in the history
* Fix commit parameters in overexposed
- must do a proper test for full pipe
  • Loading branch information
jenshannoschwalm authored and TurboGit committed Sep 11, 2022
1 parent c30e201 commit 3949790
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/iop/overexposed.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ void cleanup_global(dt_iop_module_so_t *module)
void commit_params(struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe,
dt_dev_pixelpipe_iop_t *piece)
{
if(pipe->type != DT_DEV_PIXELPIPE_FULL || !self->dev->overexposed.enabled || !self->dev->gui_attached)
piece->enabled = 0;
const gboolean fullpipe = piece->pipe->type & DT_DEV_PIXELPIPE_FULL;
piece->enabled = self->dev->overexposed.enabled && fullpipe && self->dev->gui_attached;
}

void init_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
Expand Down
8 changes: 4 additions & 4 deletions src/iop/rawoverexposed.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,11 @@ void commit_params(dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_
{
dt_develop_t *dev = self->dev;

if(pipe->type != DT_DEV_PIXELPIPE_FULL || !dev->rawoverexposed.enabled || !dev->gui_attached) piece->enabled = 0;

const dt_image_t *const image = &(dev->image_storage);

if(image->flags & DT_IMAGE_4BAYER) piece->enabled = 0;
const gboolean fullpipe = piece->pipe->type & DT_DEV_PIXELPIPE_FULL;
const gboolean sensorok = (image->flags & DT_IMAGE_4BAYER) == 0;

piece->enabled = dev->rawoverexposed.enabled && fullpipe && dev->gui_attached && sensorok;

if(image->buf_dsc.datatype != TYPE_UINT16 || !image->buf_dsc.filters) piece->enabled = 0;
}
Expand Down

0 comments on commit 3949790

Please sign in to comment.