kopia lustrzana https://gitlab.com/sane-project/backends
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
rodzic
95a3836f1a
commit
4df8872ab3
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue