kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Simplify physical pixel count computation on gl846
rodzic
a1f10bf2bc
commit
5807e5d298
|
@ -885,9 +885,7 @@ void compute_session_pixel_offsets(const Genesys_Device* dev, ScanSession& s,
|
|||
s.pixel_startx += sensor.ccd_start_xoffset * ccd_pixels_per_system_pixel;
|
||||
s.pixel_endx = s.pixel_startx + s.optical_pixels_raw;
|
||||
|
||||
if (dev->model->asic_type == AsicType::GL845 ||
|
||||
dev->model->asic_type == AsicType::GL846)
|
||||
{
|
||||
if (dev->model->asic_type == AsicType::GL845) {
|
||||
s.pixel_startx /= s.hwdpi_divisor * s.segment_count * ccd_pixels_per_system_pixel;
|
||||
s.pixel_endx /= s.hwdpi_divisor * s.segment_count * ccd_pixels_per_system_pixel;
|
||||
}
|
||||
|
|
|
@ -2717,7 +2717,25 @@ void genesys_init_sensor_tables()
|
|||
sensor.get_register_hwdpi_fun = default_get_register_hwdpi;
|
||||
sensor.get_hwdpi_divisor_fun = default_get_hwdpi_divisor_for_dpi;
|
||||
sensor.get_ccd_size_divisor_fun = default_get_ccd_size_divisor_for_dpi;
|
||||
s_sensors->push_back(sensor);
|
||||
{
|
||||
struct CustomSensorSettings
|
||||
{
|
||||
ValueFilterAny<unsigned> resolutions;
|
||||
Ratio pixel_count_ratio;
|
||||
};
|
||||
|
||||
CustomSensorSettings custom_settings[] = {
|
||||
{ { 75, 100, 150, 300, 600 }, Ratio{1, 4} },
|
||||
{ { 1200 }, Ratio{1, 2} },
|
||||
};
|
||||
|
||||
for (const CustomSensorSettings& setting : custom_settings) {
|
||||
sensor.resolutions = setting.resolutions;
|
||||
sensor.pixel_count_ratio = setting.pixel_count_ratio;
|
||||
s_sensors->push_back(sensor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sensor = Genesys_Sensor();
|
||||
sensor.sensor_id = SensorId::CCD_PLUSTEK_OPTICBOOK_3800;
|
||||
|
|
Ładowanie…
Reference in New Issue