genesys: Remove no longer used optical flags variables

merge-requests/120/head
Povilas Kanapickas 2019-08-04 10:52:58 +03:00
rodzic 306b160f00
commit b85a83f6af
5 zmienionych plików z 25 dodań i 41 usunięć

Wyświetl plik

@ -901,12 +901,11 @@ static void gl124_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
const ScanSession& session, int used_res, const ScanSession& session, int used_res,
unsigned int start, unsigned int pixels, unsigned int start, unsigned int pixels,
int channels, int depth, unsigned ccd_size_divisor, int channels, int depth, unsigned ccd_size_divisor,
ColorFilter color_filter, int flags) ColorFilter color_filter)
{ {
DBG_HELPER_ARGS(dbg, "exposure_time=%d, used_res=%d, start=%d, pixels=%d, channels=%d, depth=%d, " DBG_HELPER_ARGS(dbg, "exposure_time=%d, used_res=%d, start=%d, pixels=%d, channels=%d, depth=%d, "
"ccd_size_divisor=%d, flags=%x\n", "ccd_size_divisor=%d\n",
exposure_time, used_res, start, pixels, channels, depth, ccd_size_divisor, exposure_time, used_res, start, pixels, channels, depth, ccd_size_divisor);
flags);
unsigned int words_per_line, segcnt; unsigned int words_per_line, segcnt;
unsigned int startx, endx, segnb; unsigned int startx, endx, segnb;
unsigned int dpiset, dpihw, factor; unsigned int dpiset, dpihw, factor;
@ -1156,7 +1155,7 @@ static void gl124_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
int bytes_per_line; int bytes_per_line;
int move; int move;
unsigned int lincnt; unsigned int lincnt;
unsigned int oflags, mflags; /**> optical and motor flags */ unsigned int mflags;
int exposure_time; int exposure_time;
int stagger; int stagger;
@ -1248,12 +1247,11 @@ static void gl124_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
/* we enable true gray for cis scanners only, and just when doing /* we enable true gray for cis scanners only, and just when doing
* scan since color calibration is OK for this mode * scan since color calibration is OK for this mode
*/ */
oflags = 0;
// now _LOGICAL_ optical values used are known, setup registers // now _LOGICAL_ optical values used are known, setup registers
gl124_init_optical_regs_scan(dev, sensor, reg, exposure_time, session, used_res, start, gl124_init_optical_regs_scan(dev, sensor, reg, exposure_time, session, used_res, start,
used_pixels, session.params.channels, session.params.depth, used_pixels, session.params.channels, session.params.depth,
ccd_size_divisor, session.params.color_filter, oflags); ccd_size_divisor, session.params.color_filter);
/*** motor parameters ***/ /*** motor parameters ***/

Wyświetl plik

@ -1469,12 +1469,11 @@ static void gl841_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
unsigned int start, unsigned int start,
unsigned int pixels, int channels, unsigned int pixels, int channels,
int depth, unsigned ccd_size_divisor, int depth, unsigned ccd_size_divisor,
ColorFilter color_filter, int flags) ColorFilter color_filter)
{ {
DBG_HELPER_ARGS(dbg, "exposure_time=%d, used_res=%d, start=%d, pixels=%d, channels=%d, " DBG_HELPER_ARGS(dbg, "exposure_time=%d, used_res=%d, start=%d, pixels=%d, channels=%d, "
"depth=%d, ccd_size_divisor=%d, flags=%x", "depth=%d, ccd_size_divisor=%d",
exposure_time, used_res, start, pixels, channels, depth, ccd_size_divisor, exposure_time, used_res, start, pixels, channels, depth, ccd_size_divisor);
flags);
unsigned int words_per_line; unsigned int words_per_line;
unsigned int end; unsigned int end;
unsigned int dpiset; unsigned int dpiset;
@ -1799,7 +1798,6 @@ static void gl841_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
size_t requested_buffer_size, read_buffer_size; size_t requested_buffer_size, read_buffer_size;
int optical_res; int optical_res;
unsigned int oflags; /**> optical flags */
debug_dump(DBG_info, session.params); debug_dump(DBG_info, session.params);
@ -1959,8 +1957,6 @@ dummy \ scanned lines
session.params.depth = 8; session.params.depth = 8;
} }
oflags=0;
// no 16 bit gamma for this ASIC // no 16 bit gamma for this ASIC
if (session.params.depth == 16) { if (session.params.depth == 16) {
session.params.flags |= SCAN_FLAG_DISABLE_GAMMA; session.params.flags |= SCAN_FLAG_DISABLE_GAMMA;
@ -1968,7 +1964,7 @@ dummy \ scanned lines
gl841_init_optical_regs_scan(dev, sensor, reg, exposure_time, session, used_res, start, gl841_init_optical_regs_scan(dev, sensor, reg, exposure_time, session, used_res, start,
used_pixels, session.params.channels, session.params.depth, used_pixels, session.params.channels, session.params.depth,
ccd_size_divisor, session.params.color_filter, oflags); ccd_size_divisor, session.params.color_filter);
/*** motor parameters ***/ /*** motor parameters ***/

Wyświetl plik

@ -190,13 +190,11 @@ gl843_test_motor_flag_bit (SANE_Byte val)
} }
/** copy sensor specific settings */ /** copy sensor specific settings */
static void static void gl843_setup_sensor(Genesys_Device* dev, const Genesys_Sensor& sensor,
gl843_setup_sensor (Genesys_Device * dev, const Genesys_Sensor& sensor, Genesys_Register_Set* regs, int dpi)
Genesys_Register_Set * regs, int dpi,int flags)
{ {
DBG_HELPER(dbg); DBG_HELPER(dbg);
(void) dpi; (void) dpi;
(void) flags;
for (const auto& custom_reg : sensor.custom_regs) { for (const auto& custom_reg : sensor.custom_regs) {
regs->set8(custom_reg.address, custom_reg.value); regs->set8(custom_reg.address, custom_reg.value);
@ -1039,13 +1037,13 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
*/ */
static void gl843_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sensor& sensor, static void gl843_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sensor& sensor,
Genesys_Register_Set* reg, unsigned int exposure, Genesys_Register_Set* reg, unsigned int exposure,
const ScanSession& session, int flags) const ScanSession& session)
{ {
DBG_HELPER_ARGS(dbg, "exposure=%d, used_res=%d, start=%f, pixels=%d, channels=%d, depth=%d, " DBG_HELPER_ARGS(dbg, "exposure=%d, used_res=%d, start=%f, pixels=%d, channels=%d, depth=%d, "
"ccd_size_divisor=%d, flags=%x", "ccd_size_divisor=%d",
exposure, session.output_resolution, session.params.startx, exposure, session.output_resolution, session.params.startx,
session.optical_pixels, session.params.channels, session.params.depth, session.optical_pixels, session.params.channels, session.params.depth,
session.ccd_size_divisor, flags); session.ccd_size_divisor);
unsigned int words_per_line; unsigned int words_per_line;
unsigned int startx, endx; unsigned int startx, endx;
unsigned int dpiset, dpihw, factor; unsigned int dpiset, dpihw, factor;
@ -1064,7 +1062,7 @@ static void gl843_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
DBG(DBG_io2, "%s: dpihw=%d (factor=%d)\n", __func__, dpihw, factor); DBG(DBG_io2, "%s: dpihw=%d (factor=%d)\n", __func__, dpihw, factor);
/* sensor parameters */ /* sensor parameters */
gl843_setup_sensor (dev, sensor, reg, dpihw, flags); gl843_setup_sensor(dev, sensor, reg, dpihw);
// resolution is divided according to CKSEL // resolution is divided according to CKSEL
unsigned ccd_pixels_per_system_pixel = sensor.ccd_pixels_per_system_pixel(); unsigned ccd_pixels_per_system_pixel = sensor.ccd_pixels_per_system_pixel();
@ -1306,7 +1304,7 @@ static void gl843_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
DBG_HELPER(dbg); DBG_HELPER(dbg);
session.assert_computed(); session.assert_computed();
unsigned int oflags, mflags; /**> optical and motor flags */ unsigned int mflags;
int exposure; int exposure;
int slope_dpi = 0; int slope_dpi = 0;
@ -1322,7 +1320,6 @@ static void gl843_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
/* we enable true gray for cis scanners only, and just when doing /* we enable true gray for cis scanners only, and just when doing
* scan since color calibration is OK for this mode * scan since color calibration is OK for this mode
*/ */
oflags = 0;
dummy = 0; dummy = 0;
/* dummy = 1; XXX STEF XXX */ /* dummy = 1; XXX STEF XXX */
@ -1358,7 +1355,7 @@ static void gl843_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
} }
// now _LOGICAL_ optical values used are known, setup registers // now _LOGICAL_ optical values used are known, setup registers
gl843_init_optical_regs_scan(dev, sensor, reg, exposure, session, oflags); gl843_init_optical_regs_scan(dev, sensor, reg, exposure, session);
/*** motor parameters ***/ /*** motor parameters ***/

Wyświetl plik

@ -776,12 +776,10 @@ static void gl846_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
Genesys_Register_Set* reg, unsigned int exposure_time, Genesys_Register_Set* reg, unsigned int exposure_time,
const ScanSession& session, int used_res, const ScanSession& session, int used_res,
unsigned int start, unsigned int pixels, unsigned int start, unsigned int pixels,
int channels, int depth, int channels, int depth, ColorFilter color_filter)
ColorFilter color_filter, int flags)
{ {
DBG_HELPER_ARGS(dbg, "exposure_time=%d, used_res=%d, start=%d, pixels=%d, channels=%d, depth=%d, " DBG_HELPER_ARGS(dbg, "exposure_time=%d, used_res=%d, start=%d, pixels=%d, channels=%d, depth=%d",
"flags=%x", exposure_time, used_res, start, pixels, channels, depth);
exposure_time, used_res, start, pixels, channels, depth, flags);
unsigned int words_per_line; unsigned int words_per_line;
unsigned int dpiset, dpihw, segnb, factor; unsigned int dpiset, dpihw, segnb, factor;
unsigned int bytes; unsigned int bytes;
@ -1026,7 +1024,6 @@ static void gl846_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
int bytes_per_line; int bytes_per_line;
int move; int move;
unsigned int lincnt; unsigned int lincnt;
unsigned int oflags; /**> optical flags */
unsigned int mflags; /**> motor flags */ unsigned int mflags; /**> motor flags */
int exposure_time; int exposure_time;
int stagger; int stagger;
@ -1112,10 +1109,9 @@ static void gl846_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
/* we enable true gray for cis scanners only, and just when doing /* we enable true gray for cis scanners only, and just when doing
* scan since color calibration is OK for this mode * scan since color calibration is OK for this mode
*/ */
oflags = 0;
gl846_init_optical_regs_scan(dev, sensor, reg, exposure_time, session, used_res, start, gl846_init_optical_regs_scan(dev, sensor, reg, exposure_time, session, used_res, start,
used_pixels, session.params.channels, session.params.depth, used_pixels, session.params.channels, session.params.depth,
session.params.color_filter, oflags); session.params.color_filter);
/*** motor parameters ***/ /*** motor parameters ***/

Wyświetl plik

@ -794,11 +794,11 @@ static void gl847_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
const ScanSession& session, int used_res, const ScanSession& session, int used_res,
unsigned int start, unsigned int pixels, unsigned int start, unsigned int pixels,
int channels, int depth, int channels, int depth,
ColorFilter color_filter, int flags) ColorFilter color_filter)
{ {
DBG_HELPER_ARGS(dbg, "exposure_time=%d, used_res=%d, start=%d, pixels=%d, channels=%d, " DBG_HELPER_ARGS(dbg, "exposure_time=%d, used_res=%d, start=%d, pixels=%d, channels=%d, "
"depth=%d, flags=%x", "depth=%d",
exposure_time, used_res, start, pixels, channels, depth, flags); exposure_time, used_res, start, pixels, channels, depth);
unsigned int words_per_line; unsigned int words_per_line;
unsigned dpiset, dpihw, segnb, factor; unsigned dpiset, dpihw, segnb, factor;
unsigned int bytes; unsigned int bytes;
@ -1041,7 +1041,6 @@ static void gl847_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
int bytes_per_line; int bytes_per_line;
int move; int move;
unsigned int lincnt; unsigned int lincnt;
unsigned int oflags; /**> optical flags */
unsigned int mflags; /**> motor flags */ unsigned int mflags; /**> motor flags */
int exposure_time; int exposure_time;
int stagger; int stagger;
@ -1127,11 +1126,9 @@ static void gl847_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
/* we enable true gray for cis scanners only, and just when doing /* we enable true gray for cis scanners only, and just when doing
* scan since color calibration is OK for this mode * scan since color calibration is OK for this mode
*/ */
oflags = 0;
gl847_init_optical_regs_scan(dev, sensor, reg, exposure_time, session, used_res, start, gl847_init_optical_regs_scan(dev, sensor, reg, exposure_time, session, used_res, start,
used_pixels, session.params.channels, session.params.depth, used_pixels, session.params.channels, session.params.depth,
session.params.color_filter, oflags); session.params.color_filter);
/*** motor parameters ***/ /*** motor parameters ***/