diff --git a/backend/genesys_gl124.cc b/backend/genesys_gl124.cc index 8cfc6593d..459456aea 100644 --- a/backend/genesys_gl124.cc +++ b/backend/genesys_gl124.cc @@ -1247,8 +1247,6 @@ static void gl124_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens oflags |= OPTICAL_FLAG_DISABLE_GAMMA; if (params.flags & SCAN_FLAG_DISABLE_LAMP) oflags |= OPTICAL_FLAG_DISABLE_LAMP; - if (params.flags & SCAN_FLAG_CALIBRATION) - oflags |= OPTICAL_FLAG_DISABLE_DOUBLE; if (dev->model->is_cis && dev->settings.true_gray) { diff --git a/backend/genesys_gl843.cc b/backend/genesys_gl843.cc index 53084b446..4d8d60ab0 100644 --- a/backend/genesys_gl843.cc +++ b/backend/genesys_gl843.cc @@ -1307,16 +1307,12 @@ static void gl843_compute_session(Genesys_Device* dev, ScanSession& s, s.optical_resolution = sensor.optical_res / s.ccd_size_divisor; - if (s.params.flags & SCAN_FLAG_USE_OPTICAL_RES) { + // resolution is choosen from a fixed list and can be used directly + // unless we have ydpi higher than sensor's maximum one + if (s.params.xres > s.optical_resolution) s.output_resolution = s.optical_resolution; - } else { - // resolution is choosen from a fixed list and can be used directly - // unless we have ydpi higher than sensor's maximum one - if (s.params.xres > s.optical_resolution) - s.output_resolution = s.optical_resolution; - else - s.output_resolution = s.params.xres; - } + else + s.output_resolution = s.params.xres; // compute rounded up number of optical pixels s.optical_pixels = (s.params.pixels * s.optical_resolution) / s.params.xres; @@ -1382,8 +1378,6 @@ static void gl843_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens oflags |= OPTICAL_FLAG_DISABLE_GAMMA; if (session.params.flags & SCAN_FLAG_DISABLE_LAMP) oflags |= OPTICAL_FLAG_DISABLE_LAMP; - if (session.params.flags & SCAN_FLAG_CALIBRATION) - oflags |= OPTICAL_FLAG_DISABLE_DOUBLE; if (session.num_staggered_lines) oflags |= OPTICAL_FLAG_STAGGER; if (session.params.flags & SCAN_FLAG_USE_XPA) diff --git a/backend/genesys_gl843.h b/backend/genesys_gl843.h index 1f936a20b..8306fc1ae 100644 --- a/backend/genesys_gl843.h +++ b/backend/genesys_gl843.h @@ -378,7 +378,6 @@ #define SCAN_FLAG_DISABLE_GAMMA 0x004 #define SCAN_FLAG_DISABLE_BUFFER_FULL_MOVE 0x008 #define SCAN_FLAG_IGNORE_LINE_DISTANCE 0x010 -#define SCAN_FLAG_USE_OPTICAL_RES 0x020 #define SCAN_FLAG_DISABLE_LAMP 0x040 #define SCAN_FLAG_DYNAMIC_LINEART 0x080 diff --git a/backend/genesys_gl846.cc b/backend/genesys_gl846.cc index c9701d02b..6f86eb75f 100644 --- a/backend/genesys_gl846.cc +++ b/backend/genesys_gl846.cc @@ -218,8 +218,6 @@ static void gl846_setup_sensor(Genesys_Device * dev, const Genesys_Sensor& senso int dpihw; uint16_t exp; - dpihw = sensor.get_register_hwdpi(dpi); - for (uint16_t addr = 0x16; addr < 0x1e; addr++) { regs->set8(addr, sensor.custom_regs.get_value(addr)); } diff --git a/backend/genesys_low.h b/backend/genesys_low.h index 3708e7ed6..7d5a8ac0c 100644 --- a/backend/genesys_low.h +++ b/backend/genesys_low.h @@ -395,7 +395,6 @@ typedef struct { #define OPTICAL_FLAG_DISABLE_SHADING 0x02 /**< disable shading correction */ #define OPTICAL_FLAG_DISABLE_LAMP 0x04 /**< turn off lamp */ #define OPTICAL_FLAG_ENABLE_LEDADD 0x08 /**< enable true CIS gray by enabling LED addition */ -#define OPTICAL_FLAG_DISABLE_DOUBLE 0x10 /**< disable automatic x-direction double data expansion */ #define OPTICAL_FLAG_STAGGER 0x20 /**< disable stagger correction */ #define OPTICAL_FLAG_USE_XPA 0x40 /**< use XPA lamp rather than regular one */