enable shading calibration for XP300

- add the needed flags to XP300
- tune shading line number
- setup shading calibration computing parameters
merge-requests/1/head
Stphane Voltz 2009-10-06 06:44:18 +02:00
rodzic 8b571bc2ee
commit 2ffe52857b
2 zmienionych plików z 24 dodań i 3 usunięć

Wyświetl plik

@ -1310,6 +1310,7 @@ genesys_send_offset_and_shading (Genesys_Device * dev, uint8_t * data,
/* many scanners send coefficient for lineart/gray like in color mode */
if (dev->settings.scan_mode < 2
&& dev->model->ccd_type != CCD_DSMOBILE600
&& dev->model->ccd_type != CCD_XP300
&& dev->model->ccd_type != CCD_HP2300
&& dev->model->ccd_type != CCD_HP2400
&& dev->model->ccd_type != CCD_HP3670
@ -3020,6 +3021,8 @@ genesys_send_shading_coefficient (Genesys_Device * dev)
* sets REG01_FASTMOD.
*/
/* at some point me may thought of a setup struct in genesys_devices that
* will handle these settings instead of having this switch growing up */
switch (dev->model->ccd_type)
{
case CCD_DSMOBILE600:
@ -3040,6 +3043,24 @@ genesys_send_shading_coefficient (Genesys_Device * dev)
coeff,
target_code);
break;
case CCD_XP300:
words_per_color = 0x5500;
target_code = 0xdc00;
o = 4;
cmat[0] = 0;
cmat[1] = 1;
cmat[2] = 2;
compute_planar_coefficients (dev,
shading_data,
dev->sensor.optical_res/dev->settings.xres,
pixels_per_line,
words_per_color,
channels,
cmat,
o,
coeff,
target_code);
break;
case CIS_XP200:
target_code = 0xdc00;
o = 2;

Wyświetl plik

@ -1275,9 +1275,9 @@ static Genesys_Model visioneer_xp300_model = {
MOTOR_XP300,
GENESYS_FLAG_LAZY_INIT /* Which flags are needed for this scanner? */
| GENESYS_FLAG_SKIP_WARMUP
| GENESYS_FLAG_NO_CALIBRATION,
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW,
300,
| GENESYS_FLAG_DARK_CALIBRATION,
GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE,
100,
400
};