Project

General

Profile

0001-quick-hack-to-make-inverting-sort-of-work.patch

Daniel Laidig, 09/30/2018 11:35 PM

Download (1.37 KB)

View differences:

src/iop/invert.c
272 272
      for(int i = 0; i < roi_out->width; i++)
273 273
      {
274 274
        const size_t p = (size_t)j * roi_out->width + i;
275
        out[p] = CLAMP(film_rgb_f[FC(j + roi_out->y, i + roi_out->x, filters)] - in[p], 0.0f, 1.0f);
275
        out[p] = CLAMP((1 - in[p]/film_rgb_f[FC(j + roi_out->y, i + roi_out->x, filters)]), 0.0f, 1.0f);
276 276
      }
277 277
    }
278 278

  
......
302 302
void process_sse2(struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const ivoid,
303 303
                  void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
304 304
{
305
  process(self, piece, ivoid, ovoid, roi_in, roi_out);
306
  return;
307

  
305 308
  dt_iop_invert_data_t *d = (dt_iop_invert_data_t *)piece->data;
306 309

  
307 310
  const float *const m = piece->pipe->dsc.processed_maximum;
308
-