Commit 4c834228 authored by johannes hanika's avatar johannes hanika

local laplacian: make code look safer.

parent 494b90b3
......@@ -319,11 +319,10 @@ void process_sse2(struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, c
b.buf = &piece->buf_in;
// also lock the ll_boundary in case we're using it.
// could get away without this if the preview pipe didn't also free the data below.
if(self->dev->gui_attached && g && piece->pipe->type == DT_DEV_PIXELPIPE_FULL)
const int lockit = self->dev->gui_attached && g && piece->pipe->type == DT_DEV_PIXELPIPE_FULL;
if(lockit) dt_pthread_mutex_lock(&g->lock);
local_laplacian_sse2(i, o, roi_in->width, roi_in->height, d->midtone, d->sigma_s, d->sigma_r, d->detail, &b);
if(self->dev->gui_attached && g && piece->pipe->type == DT_DEV_PIXELPIPE_FULL)
if(lockit) dt_pthread_mutex_unlock(&g->lock);
// preview pixelpipe stores values.
if(self->dev->gui_attached && g && piece->pipe->type == DT_DEV_PIXELPIPE_PREVIEW)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment