heya, for modules that work on raw data, the full pipeline is unscaled (hence your constant scale factors). all we do here is provide input cropped to the region of interest your module requested during the modify_roi_in() pass that is run before process() is called (there is a default implementation of modify_roi_in).
we have some experimental/working code that downsizes raw data so that the preview pipeline can be run on raw/mosaic input, yet downscaled buffers. look for functions like dt_iop_clip_and_zoom_mosaic_half_size_f(). i'm guessing you want to detect whether you are running a DT_DEV_PIXELPIPE_FULL pipe in darkroom mode (as opposed to DT_DEV_PIXELPIPE_PREVIEW or _EXPORT) and then do this downscaling yourself before running your algorithm on reduced resolution. note that there are some problems with this when it comes to aliasing or the treatment of filtered colours, some of which may be above the raw clipping threshold. let me know how you go with this, sounds very interesting! cheers, jo On Tue, May 8, 2018 at 8:28 AM, rawfiner <rawfi...@gmail.com> wrote: > Dear all, > > I am currently working on a module for denoising at raw level. > The first results are very promising in term of denoising quality, but the > speed of the module is not as fast as it should be (processing the full > image takes about 20 seconds, which is decent for export but too slow for > the processing in darkroom). > > The denoising modules that work on the image after demosaic can display > previews in darkroom fastly as they work on a downscaled version of the > image. > > I would like to investigate if simple methods of downscaling could work > decently at raw level, so that raw denoising could compute a fast preview on > the downscaled image. > > My question is, how (if it is possible) can I get the zoom factor of the > darkroom within the raw denoise module ? > I tried to look into the data available in "piece", but did not find > anything that could give me the zoom factor. > (piece->iscale is constantly equal to 1, no matter the zoom level, and the > same holds for piece->buf_in.scale) > > Thank you ! > > Regards, > > rawfiner > > ___________________________________________________________________________ > darktable developer mailing list to unsubscribe send a mail to > darktable-dev+unsubscr...@lists.darktable.org ___________________________________________________________________________ darktable developer mailing list to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org