kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Remove uses of calib_resolution
rodzic
10fb42cd68
commit
9ddc64826c
|
@ -241,7 +241,6 @@ std::ostream& operator<<(std::ostream& out, const Genesys_Device& dev)
|
|||
<< " average_size: " << dev.average_size << '\n'
|
||||
<< " calib_lines: " << dev.calib_lines << '\n'
|
||||
<< " calib_channels: " << dev.calib_channels << '\n'
|
||||
<< " calib_resolution: " << dev.calib_resolution << '\n'
|
||||
<< " calib_total_bytes_to_read: " << dev.calib_total_bytes_to_read << '\n'
|
||||
<< " calib_session: " << format_indent_braced_list(4, dev.calib_session) << '\n'
|
||||
<< " gamma_override_tables[0].size(): " << dev.gamma_override_tables[0].size() << '\n'
|
||||
|
|
|
@ -272,7 +272,6 @@ struct Genesys_Device
|
|||
// number of lines used during shading calibration
|
||||
size_t calib_lines = 0;
|
||||
size_t calib_channels = 0;
|
||||
size_t calib_resolution = 0;
|
||||
// bytes to read from USB when calibrating. If 0, this is not set
|
||||
size_t calib_total_bytes_to_read = 0;
|
||||
|
||||
|
|
|
@ -1195,7 +1195,6 @@ void CommandSetGl124::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
const auto& calib_sensor = sanei_genesys_find_sensor(dev, resolution,
|
||||
dev->calib_channels,
|
||||
dev->settings.scan_method);
|
||||
dev->calib_resolution = resolution;
|
||||
dev->calib_total_bytes_to_read = 0;
|
||||
factor = calib_sensor.optical_res / resolution;
|
||||
|
||||
|
|
|
@ -1734,8 +1734,6 @@ void CommandSetGl843::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
calib_pixels = calib_sensor.sensor_pixels / factor;
|
||||
}
|
||||
|
||||
dev->calib_resolution = resolution;
|
||||
|
||||
ScanFlag flags = ScanFlag::DISABLE_SHADING |
|
||||
ScanFlag::DISABLE_GAMMA |
|
||||
ScanFlag::DISABLE_BUFFER_FULL_MOVE |
|
||||
|
|
|
@ -960,17 +960,17 @@ void CommandSetGl846::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
|
||||
dev->calib_channels = 3;
|
||||
|
||||
dev->calib_resolution = sensor.get_register_hwdpi(dev->settings.xres);
|
||||
unsigned resolution = sensor.get_register_hwdpi(dev->settings.xres);
|
||||
|
||||
const auto& calib_sensor = sanei_genesys_find_sensor(dev, dev->calib_resolution,
|
||||
const auto& calib_sensor = sanei_genesys_find_sensor(dev, resolution,
|
||||
dev->calib_channels,
|
||||
dev->settings.scan_method);
|
||||
dev->calib_total_bytes_to_read = 0;
|
||||
dev->calib_lines = dev->model->shading_lines;
|
||||
if (dev->calib_resolution==4800) {
|
||||
if (resolution == 4800) {
|
||||
dev->calib_lines *= 2;
|
||||
}
|
||||
unsigned calib_pixels = (calib_sensor.sensor_pixels * dev->calib_resolution) /
|
||||
unsigned calib_pixels = (calib_sensor.sensor_pixels * resolution) /
|
||||
calib_sensor.optical_res;
|
||||
|
||||
DBG(DBG_io, "%s: calib_lines = %zu\n", __func__, dev->calib_lines);
|
||||
|
@ -979,14 +979,13 @@ void CommandSetGl846::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
/* this is aworkaround insufficent distance for slope
|
||||
* motor acceleration TODO special motor slope for shading */
|
||||
move=1;
|
||||
if(dev->calib_resolution<1200)
|
||||
{
|
||||
if (resolution < 1200) {
|
||||
move=40;
|
||||
}
|
||||
|
||||
ScanSession session;
|
||||
session.params.xres = dev->calib_resolution;
|
||||
session.params.yres = dev->calib_resolution;
|
||||
session.params.xres = resolution;
|
||||
session.params.yres = resolution;
|
||||
session.params.startx = 0;
|
||||
session.params.starty = static_cast<unsigned>(move);
|
||||
session.params.pixels = calib_pixels;
|
||||
|
|
|
@ -967,25 +967,25 @@ void CommandSetGl847::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
|
||||
dev->calib_channels = 3;
|
||||
|
||||
dev->calib_resolution = sensor.get_register_hwdpi(dev->settings.xres);
|
||||
unsigned resolution = sensor.get_register_hwdpi(dev->settings.xres);
|
||||
|
||||
const auto& calib_sensor = sanei_genesys_find_sensor(dev, dev->calib_resolution,
|
||||
const auto& calib_sensor = sanei_genesys_find_sensor(dev, resolution,
|
||||
dev->calib_channels,
|
||||
dev->settings.scan_method);
|
||||
|
||||
dev->calib_total_bytes_to_read = 0;
|
||||
dev->calib_lines = dev->model->shading_lines;
|
||||
if (dev->calib_resolution == 4800) {
|
||||
if (resolution == 4800) {
|
||||
dev->calib_lines *= 2;
|
||||
}
|
||||
unsigned calib_pixels = (calib_sensor.sensor_pixels * dev->calib_resolution) /
|
||||
unsigned calib_pixels = (calib_sensor.sensor_pixels * resolution) /
|
||||
calib_sensor.optical_res;
|
||||
|
||||
DBG(DBG_io, "%s: calib_lines = %zu\n", __func__, dev->calib_lines);
|
||||
DBG(DBG_io, "%s: calib_pixels = %u\n", __func__, calib_pixels);
|
||||
|
||||
ScanSession session;
|
||||
session.params.xres = dev->calib_resolution;
|
||||
session.params.xres = resolution;
|
||||
session.params.yres = dev->motor.base_ydpi;
|
||||
session.params.startx = 0;
|
||||
session.params.starty = 20;
|
||||
|
|
Ładowanie…
Reference in New Issue