kopia lustrzana https://gitlab.com/sane-project/backends
Merge branch 'genesys-canoscan-8600f' into 'master'
genesys: Add basic support for CanoScan 8600F See merge request sane-project/backends!79merge-requests/80/head
commit
26b3d8aaa0
|
@ -917,6 +917,7 @@ genesys_send_offset_and_shading (Genesys_Device * dev, uint8_t * data,
|
|||
&& dev->model->ccd_type != CCD_G4050
|
||||
&& dev->model->ccd_type != CCD_CS4400F
|
||||
&& dev->model->ccd_type != CCD_CS8400F
|
||||
&& dev->model->ccd_type != CCD_CS8600F
|
||||
&& dev->model->ccd_type != CCD_DSMOBILE600
|
||||
&& dev->model->ccd_type != CCD_XP300
|
||||
&& dev->model->ccd_type != CCD_DP665
|
||||
|
@ -1715,7 +1716,9 @@ genesys_dark_shading_calibration (Genesys_Device * dev)
|
|||
|
||||
// FIXME: the current calculation is likely incorrect on non-GENESYS_GL843 implementations,
|
||||
// but this needs checking
|
||||
if (dev->model->asic_type == GENESYS_GL843) {
|
||||
if (dev->calib_total_bytes_to_read > 0) {
|
||||
size = dev->calib_total_bytes_to_read;
|
||||
} else if (dev->model->asic_type == GENESYS_GL843) {
|
||||
size = channels * 2 * pixels_per_line * dev->calib_lines;
|
||||
} else {
|
||||
size = channels * 2 * pixels_per_line * (dev->calib_lines + 1);
|
||||
|
@ -1904,7 +1907,9 @@ genesys_white_shading_calibration (Genesys_Device * dev)
|
|||
|
||||
// FIXME: the current calculation is likely incorrect on non-GENESYS_GL843 implementations,
|
||||
// but this needs checking
|
||||
if (dev->model->asic_type == GENESYS_GL843) {
|
||||
if (dev->calib_total_bytes_to_read > 0) {
|
||||
size = dev->calib_total_bytes_to_read;
|
||||
} else if (dev->model->asic_type == GENESYS_GL843) {
|
||||
size = channels * 2 * pixels_per_line * dev->calib_lines;
|
||||
} else {
|
||||
size = channels * 2 * pixels_per_line * (dev->calib_lines + 1);
|
||||
|
@ -1931,6 +1936,10 @@ genesys_white_shading_calibration (Genesys_Device * dev)
|
|||
status = (dev->model->cmd_set->rewind
|
||||
? dev->model->cmd_set->rewind (dev)
|
||||
: dev->model->cmd_set->slow_back_home (dev, SANE_TRUE));
|
||||
if (dev->settings.scan_method == SCAN_METHOD_TRANSPARENCY)
|
||||
{
|
||||
dev->model->cmd_set->move_to_ta(dev);
|
||||
}
|
||||
}
|
||||
|
||||
status =
|
||||
|
@ -2032,7 +2041,10 @@ genesys_dark_white_shading_calibration (Genesys_Device * dev)
|
|||
dev->dark_average_data.clear();
|
||||
dev->dark_average_data.resize(channels * 2 * pixels_per_line);
|
||||
|
||||
size = channels * 2 * pixels_per_line * dev->calib_lines;
|
||||
if (dev->calib_total_bytes_to_read > 0)
|
||||
size = dev->calib_total_bytes_to_read;
|
||||
else
|
||||
size = channels * 2 * pixels_per_line * dev->calib_lines;
|
||||
|
||||
std::vector<uint8_t> calibration_data(size);
|
||||
|
||||
|
@ -2829,6 +2841,7 @@ genesys_send_shading_coefficient (Genesys_Device * dev)
|
|||
case CCD_G4050:
|
||||
case CCD_CS4400F:
|
||||
case CCD_CS8400F:
|
||||
case CCD_CS8600F:
|
||||
target_code = 0xe000;
|
||||
o = 0;
|
||||
compute_coefficients (dev,
|
||||
|
@ -3085,6 +3098,9 @@ genesys_flatbed_calibration (Genesys_Device * dev)
|
|||
if (dev->settings.yres <= dev->sensor.optical_res / 2)
|
||||
yres /= 2;
|
||||
|
||||
if (dev->model->model_id == MODEL_CANON_CANOSCAN_8600F)
|
||||
yres = 1200;
|
||||
|
||||
/* do offset calibration if needed */
|
||||
if (dev->model->flags & GENESYS_FLAG_OFFSET_CALIBRATION)
|
||||
{
|
||||
|
|
|
@ -69,6 +69,9 @@ usb 0x04a9 0x190f
|
|||
# Canon 5600f
|
||||
usb 0x04a9 0x1906
|
||||
|
||||
# Canon 8600F
|
||||
usb 0x04a9 0x2229
|
||||
|
||||
# Visioneer Strobe XP200
|
||||
usb 0x04a7 0x0426
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
Copyright (C) 2007 Luke <iceyfor@gmail.com>
|
||||
Copyright (C) 2010 Jack McGill <jmcgill85258@yahoo.com>
|
||||
Copyright (C) 2010 Andrey Loginov <avloginov@gmail.com>,
|
||||
xerox travelscan device entry
|
||||
xerox travelscan device entry
|
||||
Copyright (C) 2010 Chris Berry <s0457957@sms.ed.ac.uk> and Michael Rickmann <mrickma@gwdg.de>
|
||||
for Plustek Opticbook 3600 support
|
||||
|
||||
|
@ -213,8 +213,15 @@ static Genesys_Frontend Wolfson[] = {
|
|||
, {0x60, 0x5c, 0x6c} /* 0x20, 0x21, 0x22 */
|
||||
, {0x8a, 0x9f, 0xc2} /* 0x28, 0x29, 0x2a */
|
||||
, {0x00, 0x00, 0x00}
|
||||
}
|
||||
,
|
||||
},
|
||||
{
|
||||
DAC_CS8600F,
|
||||
{ 0x00, 0x23, 0x24, 0x2f },
|
||||
{ 0x00, 0x00, 0x00 },
|
||||
{ 0x67, 0x69, 0x68 }, // 0x20, 0x21, 0x22
|
||||
{ 0xdb, 0xda, 0xd7 }, // 0x28, 0x29, 0x2a
|
||||
{ 0x00, 0x00, 0x00 },
|
||||
},
|
||||
{DAC_IMG101,
|
||||
{0x78, 0xf0, 0x00, 0x00}
|
||||
, {0x00, 0x00, 0x00}
|
||||
|
@ -724,6 +731,29 @@ void genesys_init_sensor_tables()
|
|||
s_sensors->push_back(sensor);
|
||||
|
||||
|
||||
sensor = Genesys_Sensor();
|
||||
sensor.sensor_id = CCD_CS8600F;
|
||||
sensor.optical_res = 4800;
|
||||
sensor.black_pixels = 31;
|
||||
sensor.dummy_pixel = 20;
|
||||
sensor.CCD_start_xoffset = 0; // not used at the moment
|
||||
// 11372 pixels at 1200 dpi
|
||||
sensor.sensor_pixels = 11372*4;
|
||||
sensor.fau_gain_white_ref = 160;
|
||||
sensor.gain_white_ref = 160;
|
||||
sensor.regs_0x08_0x0b = { 0x00, 0x00, 0x00, 0x00 }; // not used
|
||||
// 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d
|
||||
sensor.regs_0x10_0x1d = {
|
||||
0x9c, 0x40, 0x9c, 0x40, 0x9c, 0x40, 0x13, 0x15, 0x10, 0x2a, 0x30, 0x00, 0x20, 0x75
|
||||
};
|
||||
// 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e
|
||||
sensor.regs_0x52_0x5e = {
|
||||
0x0c, 0x0f, 0x00, 0x03, 0x06, 0x09, 0x6b, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1f
|
||||
};
|
||||
sensor.gamma = {1.0, 1.0, 1.0};
|
||||
s_sensors->push_back(sensor);
|
||||
|
||||
|
||||
sensor = Genesys_Sensor();
|
||||
sensor.sensor_id = CCD_HP_N6310;
|
||||
sensor.optical_res = 2400;
|
||||
|
@ -1083,6 +1113,12 @@ static Genesys_Gpo Gpo[] = {
|
|||
{0x9a, 0xdf},
|
||||
{0xfe, 0x60},
|
||||
}
|
||||
/* CanoScan 8600F */
|
||||
,
|
||||
{ GPO_CS8600F,
|
||||
{ 0x20, 0x7c },
|
||||
{ 0xff, 0x00 },
|
||||
}
|
||||
/* Canon Image formula 101 */
|
||||
,
|
||||
{GPO_IMG101,
|
||||
|
@ -1098,8 +1134,8 @@ static Genesys_Gpo Gpo[] = {
|
|||
/* Canon LiDE 80 */
|
||||
{
|
||||
GPO_CANONLIDE80,
|
||||
{0x28, 0x90}, /* 6c, 6d */
|
||||
{0x75, 0x80}, /* 6e, 6f */
|
||||
{0x28, 0x90},
|
||||
{0x75, 0x80},
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1389,6 +1425,20 @@ static Genesys_Motor Motor[] = {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
MOTOR_CS8600F,
|
||||
2400,
|
||||
9600,
|
||||
2,
|
||||
1,
|
||||
{ /* motor slopes */
|
||||
{ /* power mode 0 */
|
||||
{ 3961, 240, 246, 0.8 }, /* full step */
|
||||
{ 3961, 240, 246, 0.8 }, /* half step */
|
||||
{ 3961, 240, 246, 0.8 }, /* quarter step */
|
||||
},
|
||||
},
|
||||
},
|
||||
{MOTOR_CANONLIDE110, /* Canon LiDE 110 */
|
||||
4800,
|
||||
9600,
|
||||
|
@ -1521,6 +1571,7 @@ static Genesys_Model umax_astra_4500_model = {
|
|||
/* untested, values set by hmg */
|
||||
GENESYS_HAS_NO_BUTTONS, /* no buttons supported */
|
||||
20,
|
||||
0, // shading_ta_lines
|
||||
200
|
||||
};
|
||||
|
||||
|
@ -1578,6 +1629,7 @@ static Genesys_Model canon_lide_50_model = {
|
|||
GENESYS_HAS_EMAIL_SW |
|
||||
GENESYS_HAS_COPY_SW,
|
||||
280,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -1630,6 +1682,7 @@ static Genesys_Model panasonic_kvss080_model = {
|
|||
GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW ,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
@ -1686,6 +1739,7 @@ static Genesys_Model hp4850c_model = {
|
|||
GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
@ -1742,6 +1796,7 @@ static Genesys_Model hpg4010_model = {
|
|||
GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
@ -1798,6 +1853,7 @@ static Genesys_Model hpg4050_model = {
|
|||
GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
@ -1858,6 +1914,7 @@ static Genesys_Model canon_4400f_model = {
|
|||
GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
@ -1917,10 +1974,70 @@ static Genesys_Model canon_8400f_model = {
|
|||
GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
||||
static Genesys_Model canon_8600f_model = {
|
||||
"canon-canoscan-8600f", // name
|
||||
"Canon", // Device vendor string
|
||||
"Canoscan 8600f", // Device model name
|
||||
MODEL_CANON_CANOSCAN_8600F,
|
||||
GENESYS_GL843, // ASIC type
|
||||
NULL,
|
||||
|
||||
{ 4800, 2400, 1200, 600, 400, 300, 0}, // TODO: resolutions for non-XPA mode
|
||||
{ 4800, 2400, 1200, 600, 400, 300, 0}, // TODO: resolutions for non-XPA mode
|
||||
{ 16, 8, 0 }, // possible depths in gray mode
|
||||
{ 16, 8, 0 }, // possible depths in color mode
|
||||
|
||||
SANE_FIX(24.0), // Start of scan area in mm (x)
|
||||
SANE_FIX(10.0), // Start of scan area in mm (y)
|
||||
SANE_FIX(216.0), // Size of scan area in mm (x)
|
||||
SANE_FIX(297.0), // Size of scan area in mm (y)
|
||||
|
||||
SANE_FIX(0.0), // Start of white strip in mm (y)
|
||||
SANE_FIX(8.0), // Start of black mark in mm (x)
|
||||
|
||||
SANE_FIX(95.0), // x_offset_ta
|
||||
SANE_FIX(26.0), // y_offset_ta
|
||||
SANE_FIX(70.0), // x_size_ta
|
||||
SANE_FIX(230.0), // y_size_ta
|
||||
|
||||
SANE_FIX(12.5), // y_offset_calib
|
||||
|
||||
SANE_FIX(0.0), // Size of scan area after paper sensor stops
|
||||
// sensing document in mm
|
||||
SANE_FIX(0.0), // Amount of feeding needed to eject document
|
||||
// after finishing scanning in mm
|
||||
|
||||
0, 48, 96, // RGB CCD Line-distance correction in line number
|
||||
|
||||
COLOR_ORDER_RGB, // Order of the CCD/CIS colors
|
||||
|
||||
SANE_FALSE, // Is this a CIS scanner?
|
||||
SANE_FALSE, // Is this a sheetfed scanner?
|
||||
CCD_CS8600F,
|
||||
DAC_CS8600F,
|
||||
GPO_CS8600F,
|
||||
MOTOR_CS8600F,
|
||||
GENESYS_FLAG_HAS_UTA |
|
||||
GENESYS_FLAG_LAZY_INIT |
|
||||
GENESYS_FLAG_OFFSET_CALIBRATION |
|
||||
GENESYS_FLAG_STAGGERED_LINE |
|
||||
GENESYS_FLAG_SKIP_WARMUP |
|
||||
GENESYS_FLAG_DARK_CALIBRATION |
|
||||
GENESYS_FLAG_FULL_HWDPI_MODE |
|
||||
GENESYS_FLAG_CUSTOM_GAMMA |
|
||||
GENESYS_FLAG_SHADING_REPARK |
|
||||
GENESYS_FLAG_HALF_CCD_MODE,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW,
|
||||
50, // shading_lines
|
||||
50, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
||||
static Genesys_Model canon_lide_100_model = {
|
||||
"canon-lide-100", /* Name */
|
||||
|
@ -1974,6 +2091,7 @@ static Genesys_Model canon_lide_100_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW,
|
||||
50,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2028,6 +2146,7 @@ static Genesys_Model canon_lide_110_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW,
|
||||
50,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2082,6 +2201,7 @@ static Genesys_Model canon_lide_120_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW,
|
||||
50,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2137,6 +2257,7 @@ static Genesys_Model canon_lide_210_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_EXTRA_SW,
|
||||
60,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2191,6 +2312,7 @@ static Genesys_Model canon_lide_220_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_EXTRA_SW,
|
||||
60,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2245,6 +2367,7 @@ static Genesys_Model canon_5600f_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW,
|
||||
50,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2299,6 +2422,7 @@ static Genesys_Model canon_lide_700f_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW,
|
||||
70,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2355,6 +2479,7 @@ static Genesys_Model canon_lide_200_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW,
|
||||
50,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2414,6 +2539,7 @@ static Genesys_Model canon_lide_60_model = {
|
|||
| GENESYS_HAS_FILE_SW
|
||||
| GENESYS_HAS_EMAIL_SW,
|
||||
300,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
}; /* this is completely untested -- hmg */
|
||||
|
||||
|
@ -2470,6 +2596,7 @@ static Genesys_Model canon_lide_80_model = {
|
|||
GENESYS_HAS_EMAIL_SW |
|
||||
GENESYS_HAS_COPY_SW,
|
||||
160, /* 280 @2400 */
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2527,6 +2654,7 @@ static Genesys_Model hp2300c_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW,
|
||||
40,
|
||||
0, // shading_ta_lines
|
||||
132
|
||||
};
|
||||
|
||||
|
@ -2583,6 +2711,7 @@ Genesys_Model hp2400c_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_SCAN_SW,
|
||||
20,
|
||||
0, // shading_ta_lines
|
||||
132
|
||||
};
|
||||
|
||||
|
@ -2638,6 +2767,7 @@ Genesys_Model visioneer_xp200_model = {
|
|||
| GENESYS_FLAG_OFFSET_CALIBRATION,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
120,
|
||||
0, // shading_ta_lines
|
||||
132
|
||||
};
|
||||
|
||||
|
@ -2693,6 +2823,7 @@ static Genesys_Model hp3670c_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_SCAN_SW,
|
||||
20,
|
||||
0, // shading_ta_lines
|
||||
200
|
||||
};
|
||||
|
||||
|
@ -2742,6 +2873,7 @@ static Genesys_Model plustek_st12_model = {
|
|||
GENESYS_FLAG_UNTESTED | GENESYS_FLAG_14BIT_GAMMA, /* Which flags are needed for this scanner? */
|
||||
GENESYS_HAS_NO_BUTTONS, /* no buttons supported */
|
||||
20,
|
||||
0, // shading_ta_lines
|
||||
200
|
||||
};
|
||||
|
||||
|
@ -2796,6 +2928,7 @@ static Genesys_Model plustek_st24_model = {
|
|||
| GENESYS_FLAG_OFFSET_CALIBRATION,
|
||||
GENESYS_HAS_NO_BUTTONS, /* no buttons supported */
|
||||
20,
|
||||
0, // shading_ta_lines
|
||||
200
|
||||
};
|
||||
|
||||
|
@ -2852,6 +2985,7 @@ static Genesys_Model medion_md5345_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_POWER_SW | GENESYS_HAS_OCR_SW | GENESYS_HAS_SCAN_SW,
|
||||
40,
|
||||
0, // shading_ta_lines
|
||||
200
|
||||
};
|
||||
|
||||
|
@ -2906,6 +3040,7 @@ static Genesys_Model visioneer_xp300_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -2959,6 +3094,7 @@ static Genesys_Model syscan_docketport_665_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3012,6 +3148,7 @@ static Genesys_Model visioneer_roadwarrior_model = {
|
|||
| GENESYS_FLAG_DARK_CALIBRATION,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3065,6 +3202,7 @@ static Genesys_Model syscan_docketport_465_model = {
|
|||
| GENESYS_FLAG_UNTESTED,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW,
|
||||
300,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3118,6 +3256,7 @@ static Genesys_Model visioneer_xp100_r3_model = {
|
|||
| GENESYS_FLAG_DARK_CALIBRATION,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3171,6 +3310,7 @@ static Genesys_Model pentax_dsmobile_600_model = {
|
|||
| GENESYS_FLAG_DARK_CALIBRATION,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3224,6 +3364,7 @@ static Genesys_Model syscan_docketport_467_model = {
|
|||
| GENESYS_FLAG_DARK_CALIBRATION,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3278,6 +3419,7 @@ static Genesys_Model syscan_docketport_685_model = {
|
|||
| GENESYS_FLAG_DARK_CALIBRATION,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3332,6 +3474,7 @@ static Genesys_Model syscan_docketport_485_model = {
|
|||
| GENESYS_FLAG_DARK_CALIBRATION,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3387,6 +3530,7 @@ static Genesys_Model dct_docketport_487_model = {
|
|||
| GENESYS_FLAG_UNTESTED,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3443,6 +3587,7 @@ static Genesys_Model visioneer_7100_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_POWER_SW | GENESYS_HAS_OCR_SW | GENESYS_HAS_SCAN_SW,
|
||||
40,
|
||||
0, // shading_ta_lines
|
||||
200
|
||||
};
|
||||
|
||||
|
@ -3499,6 +3644,7 @@ static Genesys_Model xerox_2400_model = {
|
|||
| GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_POWER_SW | GENESYS_HAS_OCR_SW | GENESYS_HAS_SCAN_SW,
|
||||
40,
|
||||
0, // shading_ta_lines
|
||||
200
|
||||
};
|
||||
|
||||
|
@ -3553,6 +3699,7 @@ static Genesys_Model xerox_travelscanner_model = {
|
|||
| GENESYS_FLAG_DARK_CALIBRATION,
|
||||
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
400
|
||||
};
|
||||
|
||||
|
@ -3608,6 +3755,7 @@ static Genesys_Model plustek_3600_model = {
|
|||
| GENESYS_FLAG_NO_CALIBRATION,*/
|
||||
GENESYS_HAS_NO_BUTTONS,
|
||||
7,
|
||||
0, // shading_ta_lines
|
||||
200
|
||||
};
|
||||
|
||||
|
@ -3667,6 +3815,7 @@ static Genesys_Model hpn6310_model = {
|
|||
|
||||
GENESYS_HAS_NO_BUTTONS,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
@ -3720,6 +3869,7 @@ static Genesys_Model plustek_3800_model = {
|
|||
GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_NO_BUTTONS, /* TODO there are 4 buttons to support */
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
@ -3773,6 +3923,7 @@ static Genesys_Model canon_formula101_model = {
|
|||
GENESYS_FLAG_CUSTOM_GAMMA,
|
||||
GENESYS_HAS_NO_BUTTONS ,
|
||||
100,
|
||||
0, // shading_ta_lines
|
||||
100
|
||||
};
|
||||
|
||||
|
@ -3813,6 +3964,7 @@ static Genesys_USB_Device_Entry genesys_usb_device_list[] = {
|
|||
{0x03f0, 0x4605, &hpg4050_model},
|
||||
{0x04a9, 0x2228, &canon_4400f_model},
|
||||
{0x04a9, 0x221e, &canon_8400f_model},
|
||||
{0x04a9, 0x2229, &canon_8600f_model},
|
||||
/* GL845 devices */
|
||||
{0x07b3, 0x1300, &plustek_3800_model},
|
||||
/* GL846 devices */
|
||||
|
|
|
@ -2488,6 +2488,7 @@ gl124_init_regs_for_shading (Genesys_Device * dev)
|
|||
dev->calib_lines /= 2;
|
||||
}
|
||||
dev->calib_resolution = resolution;
|
||||
dev->calib_total_bytes_to_read = 0;
|
||||
factor=dev->sensor.optical_res/resolution;
|
||||
dev->calib_pixels = dev->sensor.sensor_pixels/factor;
|
||||
|
||||
|
|
Plik diff jest za duży
Load Diff
File diff suppressed because one or more lines are too long
|
@ -2114,6 +2114,7 @@ gl846_init_regs_for_shading (Genesys_Device * dev)
|
|||
memcpy (dev->calib_reg, dev->reg, GENESYS_GL846_MAX_REGS * sizeof (Genesys_Register_Set));
|
||||
|
||||
dev->calib_resolution = sanei_genesys_compute_dpihw(dev,dev->settings.xres);
|
||||
dev->calib_total_bytes_to_read = 0;
|
||||
dev->calib_lines = dev->model->shading_lines;
|
||||
if(dev->calib_resolution==4800)
|
||||
dev->calib_lines *= 2;
|
||||
|
|
|
@ -2178,6 +2178,7 @@ gl847_init_regs_for_shading (Genesys_Device * dev)
|
|||
memcpy (dev->calib_reg, dev->reg, GENESYS_GL847_MAX_REGS * sizeof (Genesys_Register_Set));
|
||||
|
||||
dev->calib_resolution = sanei_genesys_compute_dpihw(dev,dev->settings.xres);
|
||||
dev->calib_total_bytes_to_read = 0;
|
||||
dev->calib_lines = dev->model->shading_lines;
|
||||
if(dev->calib_resolution==4800)
|
||||
dev->calib_lines *= 2;
|
||||
|
|
|
@ -1765,7 +1765,7 @@ sanei_genesys_wait_for_home (Genesys_Device * dev)
|
|||
*/
|
||||
int sanei_genesys_compute_dpihw(Genesys_Device *dev, int xres)
|
||||
{
|
||||
/* some scanners use alxways hardware dpi for sensor */
|
||||
/* some scanners use always hardware dpi for sensor */
|
||||
if (dev->model->flags & GENESYS_FLAG_FULL_HWDPI_MODE)
|
||||
{
|
||||
return dev->sensor.optical_res;
|
||||
|
@ -1787,6 +1787,29 @@ int sanei_genesys_compute_dpihw(Genesys_Device *dev, int xres)
|
|||
return dev->sensor.optical_res;
|
||||
}
|
||||
|
||||
// sanei_genesys_compute_dpihw returns the dpihw that is written to register.
|
||||
// However the number of pixels depends on half_ccd mode
|
||||
int sanei_genesys_compute_dpihw_calibration(Genesys_Device *dev, int xres)
|
||||
{
|
||||
if (dev->model->model_id == MODEL_CANON_CANOSCAN_8600F)
|
||||
{
|
||||
// real resolution is half of the "official" resolution - half_ccd mode
|
||||
int hwres = dev->sensor.optical_res / 4;
|
||||
|
||||
if (xres <= hwres / 4)
|
||||
{
|
||||
return hwres / 4;
|
||||
}
|
||||
if (xres <= hwres / 2)
|
||||
{
|
||||
return hwres / 2;
|
||||
}
|
||||
return hwres;
|
||||
}
|
||||
|
||||
return sanei_genesys_compute_dpihw(dev, xres);
|
||||
}
|
||||
|
||||
/** @brief motor profile
|
||||
* search for the database of motor profiles and get the best one. Each
|
||||
* profile is at full step and at a reference exposure. Use first entry
|
||||
|
@ -1954,7 +1977,7 @@ Motor_Profile *profile;
|
|||
i++;
|
||||
}
|
||||
|
||||
/* return used steps and acceleration sum */
|
||||
// return used steps and taken time
|
||||
*steps=i/factor;
|
||||
return sum;
|
||||
}
|
||||
|
|
|
@ -325,8 +325,14 @@ struct Genesys_Sensor {
|
|||
typedef struct
|
||||
{
|
||||
uint8_t gpo_id; /**< id of the gpo description */
|
||||
uint8_t value[2]; /**< registers 0x6c and 0x6d on gl843 */
|
||||
uint8_t enable[2]; /**< registers 0x6e and 0x6F on gl843 */
|
||||
|
||||
// registers 0x6c and 0x6d on GL841, GL842, GL843, GL846, GL848 and possibly
|
||||
// others
|
||||
uint8_t value[2];
|
||||
|
||||
// registers 0x6e and 0x6f on GL841, GL842, GL843, GL846, GL848 and possibly
|
||||
// others
|
||||
uint8_t enable[2];
|
||||
} Genesys_Gpo;
|
||||
|
||||
typedef struct
|
||||
|
@ -384,6 +390,7 @@ enum Genesys_Model_Type
|
|||
MODEL_HP_SCANJET_G4050,
|
||||
MODEL_CANON_CANOSCAN_4400F,
|
||||
MODEL_CANON_CANOSCAN_8400F,
|
||||
MODEL_CANON_CANOSCAN_8600F,
|
||||
MODEL_CANON_LIDE_100,
|
||||
MODEL_CANON_LIDE_110,
|
||||
MODEL_CANON_LIDE_120,
|
||||
|
@ -440,6 +447,7 @@ enum Genesys_Dac_Type
|
|||
DAC_PLUSTEK_3600,
|
||||
DAC_CANONLIDE700,
|
||||
DAC_CS8400F,
|
||||
DAC_CS8600F,
|
||||
DAC_IMG101,
|
||||
DAC_PLUSTEK3800,
|
||||
DAC_CANONLIDE80,
|
||||
|
@ -472,6 +480,7 @@ enum Genesys_Sensor_Type
|
|||
CIS_CANONLIDE700,
|
||||
CCD_CS4400F,
|
||||
CCD_CS8400F,
|
||||
CCD_CS8600F,
|
||||
CCD_IMG101,
|
||||
CCD_PLUSTEK3800,
|
||||
CIS_CANONLIDE210,
|
||||
|
@ -504,6 +513,7 @@ enum Genesys_Gpo_Type
|
|||
GPO_CANONLIDE700,
|
||||
GPO_CS4400F,
|
||||
GPO_CS8400F,
|
||||
GPO_CS8600F,
|
||||
GPO_IMG101,
|
||||
GPO_PLUSTEK3800,
|
||||
GPO_CANONLIDE80,
|
||||
|
@ -532,6 +542,7 @@ enum Genesys_Motor_Type
|
|||
MOTOR_PLUSTEK_3600,
|
||||
MOTOR_CANONLIDE700,
|
||||
MOTOR_CS8400F,
|
||||
MOTOR_CS8600F,
|
||||
MOTOR_IMG101,
|
||||
MOTOR_PLUSTEK3800,
|
||||
MOTOR_CANONLIDE210,
|
||||
|
@ -753,6 +764,7 @@ typedef struct Genesys_Model
|
|||
SANE_Word buttons; /* Button flags, described existing buttons for the model */
|
||||
/*@} */
|
||||
SANE_Int shading_lines; /* how many lines are used for shading calibration */
|
||||
SANE_Int shading_ta_lines; // how many lines are used for shading calibration in TA mode
|
||||
SANE_Int search_lines; /* how many lines are used to search start position */
|
||||
} Genesys_Model;
|
||||
|
||||
|
@ -928,6 +940,8 @@ struct Genesys_Device
|
|||
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;
|
||||
|
||||
std::vector<uint8_t> white_average_data;
|
||||
std::vector<uint8_t> dark_average_data;
|
||||
|
@ -944,6 +958,8 @@ struct Genesys_Device
|
|||
// for sheetfed scanner's, is TRUE when there is a document in the scanner
|
||||
SANE_Bool document = 0;
|
||||
|
||||
SANE_Bool needs_home_ta = 0;
|
||||
|
||||
Genesys_Buffer read_buffer;
|
||||
Genesys_Buffer lines_buffer;
|
||||
Genesys_Buffer shrink_buffer;
|
||||
|
@ -1025,7 +1041,7 @@ typedef struct {
|
|||
int motor_type; /**< motor id */
|
||||
int exposure; /**< exposure for the slope table */
|
||||
int step_type; /**< default step type for given exposure */
|
||||
uint32_t *table; /**< 0 terminated slope table at full step */
|
||||
uint32_t *table; // 0-terminated slope table at full step (i.e. step_type == 0)
|
||||
} Motor_Profile;
|
||||
|
||||
#define FULL_STEP 0
|
||||
|
@ -1251,6 +1267,9 @@ sanei_genesys_asic_init(Genesys_Device *dev, SANE_Bool cold);
|
|||
extern
|
||||
int sanei_genesys_compute_dpihw(Genesys_Device *dev, int xres);
|
||||
|
||||
extern
|
||||
int sanei_genesys_compute_dpihw_calibration(Genesys_Device *dev, int xres);
|
||||
|
||||
extern
|
||||
Motor_Profile *sanei_genesys_get_motor_profile(Motor_Profile *motors, int motor_type, int exposure);
|
||||
|
||||
|
|
|
@ -181,6 +181,13 @@
|
|||
:status :unsupported
|
||||
:comment "GL847 based, to be added to the genesys backend"
|
||||
|
||||
:model "CanoScan 8600F"
|
||||
:url "unsupported/canon-8600.html"
|
||||
:interface "USB"
|
||||
:usbid "0x04a9" "0x2229"
|
||||
:status :basic
|
||||
:comment "normal and transparency scans work up to 1200 dpi resolution"
|
||||
|
||||
:model "CanoScan 700F"
|
||||
:interface "USB"
|
||||
:usbid "0x04a9" "0x1907"
|
||||
|
|
|
@ -340,14 +340,6 @@
|
|||
:status :unsupported
|
||||
:comment "GL841 based, to be added to genesys backend"
|
||||
|
||||
:model "CanoScan 8600F"
|
||||
:url "unsupported/canon-8600.html"
|
||||
:interface "USB"
|
||||
:usbid "0x04a9" "0x2229"
|
||||
:status :unsupported
|
||||
:comment "GL841 based, to be added to genesys backend"
|
||||
|
||||
|
||||
:model "CanoScan 9900F"
|
||||
:url "unsupported/canon-9900f.html"
|
||||
:interface "USB"
|
||||
|
|
Ładowanie…
Reference in New Issue