Skip to content

Commit

Permalink
Fix pixelpipe extensive work while exporting
Browse files Browse the repository at this point in the history
This is how it should be done depending on "high-quality" (HQ) and "upscale" UP

HQ=OFF  UP=OFF
  the final size is achieved by down-scaling in demosaic, we never upscale. (was good)
HQ=ON   UP=OFF
  the pixelpipe processes all avaible data, the output size is achieved in the finalscale
  module and is never upscaled (was good)
HQ=ON   UP=ON
  the pixelpipe	processes all avaible data, the	output size is achieved	in the finalscale
  module and may be increased by upscaling (was good)

HQ=OFF  UP=ON
  as uscaling is allowed this should behave exactly as HQ=ON/UP=ON
  Until now we **upscaled** in the demosaicer to full size leading to excessive cpu/gpu load
  possibly with heavy tiling achieving nothing or even likely reducing quality.

If we export with "high quality"=ON and "upscale=OFF the pixelpipe should process all data and finally down/upscale
in finalscale.

If we toggle on "upscale"
  • Loading branch information
jenshannoschwalm authored and TurboGit committed May 21, 2024
1 parent 98c7c91 commit aba8696
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/imageio/imageio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,12 +1003,12 @@ gboolean dt_imageio_export_with_flags(const dt_imgid_t imgid,
pipe.processed_width, pipe.processed_height,
processed_width, processed_height, scale, max_scale,
upscale ? "yes" : "no",
high_quality_processing ? "yes" : "no");
high_quality_processing || scale > 1.0f ? "yes" : "no");

const int bpp = format->bpp(format_params);

dt_get_perf_times(&start);
if(high_quality_processing)
if(high_quality_processing || scale > 1.0f)
{
/*
* if high quality processing was requested, downsampling will be done
Expand Down

0 comments on commit aba8696

Please sign in to comment.