Commit 3130d385 authored by johannes hanika's avatar johannes hanika

local laplacian: try to explain some code to stupid compilers

parent 4c834228
......@@ -320,9 +320,13 @@ void process_sse2(struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, c
// 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.
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(lockit) dt_pthread_mutex_unlock(&g->lock);
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);
dt_pthread_mutex_unlock(&g->lock);
}
else local_laplacian_sse2(i, o, roi_in->width, roi_in->height, d->midtone, d->sigma_s, d->sigma_r, d->detail, &b);
// 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