Skip to content

Commit 8bbc048

Browse files
committed
bumped version of demosaic
1 parent 2397580 commit 8bbc048

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

src/iop/demosaic.c

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ typedef struct dt_iop_demosaic_gui_data_t
137137
GtkWidget *dual_thrs;
138138
GtkWidget *lmmse_refine;
139139
GtkWidget *pixelshift_enable;
140-
GtkWidget *pixelshift_select_frame;
141-
GtkWidget *pixelshift_motion_correction;
142-
GtkWidget *pixelshift_show_motion_mask;
140+
//GtkWidget *pixelshift_select_frame;
141+
//GtkWidget *pixelshift_motion_correction;
142+
//GtkWidget *pixelshift_show_motion_mask;
143143
gboolean visual_mask;
144144
} dt_iop_demosaic_gui_data_t;
145145

@@ -254,7 +254,18 @@ int default_colorspace(dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_p
254254
int legacy_params(dt_iop_module_t *self, const void *const old_params, const int old_version,
255255
void *new_params, const int new_version)
256256
{
257-
typedef struct dt_iop_demosaic_params_t dt_iop_demosaic_params_v4_t;
257+
typedef struct dt_iop_demosaic_params_t dt_iop_demosaic_params_v5_t;
258+
259+
typedef struct dt_iop_demosaic_params_v4_t
260+
{
261+
dt_iop_demosaic_greeneq_t green_eq;
262+
float median_thrs;
263+
dt_iop_demosaic_smooth_t color_smoothing;
264+
dt_iop_demosaic_method_t demosaicing_method;
265+
dt_iop_demosaic_lmmse_t lmmse_refine;
266+
float dual_thrs;
267+
} dt_iop_demosaic_params_v4_t;
268+
258269
typedef struct dt_iop_demosaic_params_v3_t
259270
{
260271
dt_iop_demosaic_greeneq_t green_eq;
@@ -264,6 +275,15 @@ int legacy_params(dt_iop_module_t *self, const void *const old_params, const int
264275
dt_iop_demosaic_lmmse_t lmmse_refine;
265276
} dt_iop_demosaic_params_v3_t;
266277

278+
if(old_version == 4 && new_version == 5)
279+
{
280+
dt_iop_demosaic_params_v4_t *o = (dt_iop_demosaic_params_v4_t *)old_params;
281+
dt_iop_demosaic_params_v5_t *n = (dt_iop_demosaic_params_v5_t *)new_params;
282+
memcpy(n, o, sizeof *o);
283+
n->pixelshift_enable = 0;
284+
return 0;
285+
}
286+
267287
if(old_version == 3 && new_version == 4)
268288
{
269289
dt_iop_demosaic_params_v3_t *o = (dt_iop_demosaic_params_v3_t *)old_params;
@@ -5730,6 +5750,12 @@ void commit_params(struct dt_iop_module_t *self, dt_iop_params_t *params, dt_dev
57305750
piece->process_cl_ready = 0;
57315751
}
57325752

5753+
///TODO make this better
5754+
if(d->pixelshift_enable)
5755+
{
5756+
piece->process_cl_ready = 0;
5757+
}
5758+
57335759
// green-equilibrate over full image excludes tiling
57345760
// The details mask is written inside process, this does not allow tiling.
57355761
if((d->green_eq == DT_IOP_GREEN_EQ_FULL

0 commit comments

Comments
 (0)