kopia lustrzana https://gitlab.com/sane-project/backends
enable shading calibration for XP300
- add the needed flags to XP300 - tune shading line number - setup shading calibration computing parametersmerge-requests/1/head
rodzic
8b571bc2ee
commit
2ffe52857b
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue