genesys: Simplify raw_channel_bytes computation more

On the chipsets in question, session.hwdpi_divisor == sensor.optical_res
/ sensor.get_register_hwdpi(...), so the divisor cancels out with the
rest of the expression.
merge-requests/169/head
Povilas Kanapickas 2019-09-12 22:21:53 +03:00
rodzic 95a3836f1a
commit 4df8872ab3
2 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -813,8 +813,7 @@ static void gl846_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
/* words(16bit) before gamma, conversion to 8 bit or lineart*/
words_per_line = (session.optical_pixels_raw * session.params.xres) /
session.hwdpi_divisor / session.segment_count /
sensor.get_register_hwdpi(session.params.xres * ccd_pixels_per_system_pixel);
sensor.optical_res / session.segment_count;
dev->deseg.raw_channel_bytes = multiply_by_depth_ceil(words_per_line, session.params.depth);
dev->deseg.pixel_groups = multiply_by_depth_ceil(dev->deseg.pixel_groups, session.params.depth);

Wyświetl plik

@ -829,8 +829,7 @@ static void gl847_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
/* words(16bit) before gamma, conversion to 8 bit or lineart*/
dev->deseg.raw_channel_bytes = multiply_by_depth_ceil(
(session.optical_pixels_raw * session.params.xres) / session.hwdpi_divisor /
session.segment_count / sensor.get_register_hwdpi(session.params.xres * ccd_pixels_per_system_pixel),
(session.optical_pixels_raw * session.params.xres) / sensor.optical_res / session.segment_count,
session.params.depth);
dev->deseg.pixel_groups = multiply_by_depth_ceil(dev->deseg.pixel_groups, session.params.depth);