Skip to content

Commit 84d8adb

Browse files
jenshannoschwalmTurboGit
authored andcommitted
Ensure DT_DEMOSAIC_FULL_SCALE for second window
1. Ensure high quality demosaicing for the second window for quality 2. While doing so we support details blending and dual demosaicers 3. Redefine `dt_dev_pixelpipe_usedetails()` using `dt_dev_pixelpipe_iop_t *piece` as the parameter to allow log reports who is requesting the details.
1 parent 631b6fd commit 84d8adb

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/develop/pixelpipe_hb.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@ static void _dev_pixelpipe_synch(dt_dev_pixelpipe_t *pipe,
569569
const dt_develop_blend_params_t *const bp = piece->blendop_data;
570570
const gboolean valid_mask = bp->mask_mode > DEVELOP_MASK_ENABLED;
571571

572-
if((!feqf(bp->details, 0.0f, 1e-6)) && valid_mask)
573-
dt_dev_pixelpipe_usedetails(pipe);
572+
if(!feqf(bp->details, 0.0f, 1e-6) && valid_mask)
573+
dt_dev_pixelpipe_usedetails(piece);
574574
}
575575
}
576576
}
@@ -690,13 +690,15 @@ void dt_dev_pixelpipe_change(dt_dev_pixelpipe_t *pipe, dt_develop_t *dev)
690690
&pipe->processed_height);
691691
}
692692

693-
void dt_dev_pixelpipe_usedetails(dt_dev_pixelpipe_t *pipe)
693+
void dt_dev_pixelpipe_usedetails(dt_dev_pixelpipe_iop_t *piece)
694694
{
695+
dt_dev_pixelpipe_t *pipe = piece->pipe;
695696
if(!pipe->want_detail_mask)
696697
{
698+
dt_print_pipe(DT_DEBUG_PIPE, "details requested", pipe, piece->module, DT_DEVICE_NONE, NULL, NULL);
697699
dt_dev_pixelpipe_cache_invalidate_later(pipe, 0);
700+
pipe->want_detail_mask = TRUE;
698701
}
699-
pipe->want_detail_mask = TRUE;
700702
}
701703

702704
static void _dump_pipe_pfm_diff(const char *mod,

src/develop/pixelpipe_hb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ void dt_dev_pixelpipe_synch_top(dt_dev_pixelpipe_t *pipe, struct dt_develop_t *d
285285
void dt_dev_pixelpipe_rebuild(struct dt_develop_t *dev);
286286

287287
// switch on details mask processing
288-
void dt_dev_pixelpipe_usedetails(dt_dev_pixelpipe_t *pipe);
288+
void dt_dev_pixelpipe_usedetails(dt_dev_pixelpipe_iop_t *piece);
289289
// process region of interest of pixels. returns TRUE if pipe was altered during processing.
290290
gboolean dt_dev_pixelpipe_process(dt_dev_pixelpipe_t *pipe,
291291
struct dt_develop_t *dev,

src/iop/demosaic.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ static dt_iop_demosaic_qual_flags_t demosaic_qual_flags(const dt_dev_pixelpipe_i
228228
dt_iop_demosaic_qual_flags_t flags = DT_DEMOSAIC_DEFAULT;
229229
switch(piece->pipe->type & DT_DEV_PIXELPIPE_ANY)
230230
{
231+
case DT_DEV_PIXELPIPE_PREVIEW2:
232+
flags |= DT_DEMOSAIC_FULL_SCALE;
233+
break;
231234
case DT_DEV_PIXELPIPE_FULL:
232235
flags |= DT_DEMOSAIC_FULL_SCALE;
233236
break;
@@ -1085,7 +1088,7 @@ void commit_params(dt_iop_module_t *self,
10851088

10861089
if(use_method & DT_DEMOSAIC_DUAL)
10871090
{
1088-
dt_dev_pixelpipe_usedetails(piece->pipe);
1091+
dt_dev_pixelpipe_usedetails(piece);
10891092
d->color_smoothing = DT_DEMOSAIC_SMOOTH_OFF;
10901093
}
10911094
d->demosaicing_method = use_method;

0 commit comments

Comments
 (0)