File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ int legacy_params(dt_iop_module_t *self,
383383 dt_iop_demosaic_params_v5_t * n = malloc (sizeof (dt_iop_demosaic_params_v5_t ));
384384 memcpy (n , o , sizeof * o );
385385 n -> cs_radius = 0.0f ;
386- n -> cs_thrs = _get_variance_threshold ( self ) ;
386+ n -> cs_thrs = 0.4f ;
387387 n -> cs_boost = 0.0f ;
388388 n -> cs_iter = 0 ;
389389 n -> cs_center = 0.0f ;
Original file line number Diff line number Diff line change @@ -56,10 +56,10 @@ static float _get_variance_threshold(const dt_iop_module_t *self)
5656
5757 */
5858 float threshold = 0.4f ;
59- const dt_image_t * img = & self -> dev -> image_storage ;
60- if (img -> raw_white_point > 4096 ) threshold -= 0.07f ;
61- if (img -> exif_iso < 400 ) threshold -= 0.03f ;
62- if (img -> exif_iso <= 100 ) threshold -= 0.03f ;
59+ const dt_image_t * img = self -> dev ? & self -> dev -> image_storage : NULL ;
60+ if (img && img -> raw_white_point > 4096 ) threshold -= 0.07f ;
61+ if (img && img -> exif_iso < 400 ) threshold -= 0.03f ;
62+ if (img && img -> exif_iso <= 100 ) threshold -= 0.03f ;
6363 return threshold ;
6464}
6565
You can’t perform that action at this time.
0 commit comments