kopia lustrzana https://gitlab.com/sane-project/backends
fix shading calibration for CCD GL646 scanners
- for CCD scanners, shading calibration is always done in color modemerge-requests/1/head
rodzic
0972ca1193
commit
260c917e6d
|
@ -3112,7 +3112,11 @@ genesys_send_shading_coefficient (Genesys_Device * dev)
|
|||
compute_coefficients (dev,
|
||||
shading_data,
|
||||
pixels_per_line,
|
||||
3, cmat, o, coeff, target_code);
|
||||
3,
|
||||
cmat,
|
||||
o,
|
||||
coeff,
|
||||
target_code);
|
||||
break;
|
||||
case CCD_5345:
|
||||
case CCD_HP2400:
|
||||
|
@ -3129,7 +3133,11 @@ genesys_send_shading_coefficient (Genesys_Device * dev)
|
|||
compute_coefficients (dev,
|
||||
shading_data,
|
||||
pixels_per_line,
|
||||
3, cmat, o, coeff, target_code);
|
||||
3,
|
||||
cmat,
|
||||
o,
|
||||
coeff,
|
||||
target_code);
|
||||
break;
|
||||
case CCD_CANONLIDE35:
|
||||
target_bright = 0xfa00;
|
||||
|
|
|
@ -903,7 +903,8 @@ gl646_setup_registers (Genesys_Device * dev,
|
|||
regs[reg_0x05].value &= ~REG05_GMMENB;
|
||||
|
||||
/* true CIS gray if needed */
|
||||
if (dev->model->is_cis == SANE_TRUE && color == SANE_TRUE && dev->settings.true_gray)
|
||||
if (dev->model->is_cis == SANE_TRUE && color == SANE_TRUE
|
||||
&& dev->settings.true_gray)
|
||||
{
|
||||
regs[reg_0x05].value |= REG05_LEDADD;
|
||||
}
|
||||
|
@ -994,7 +995,9 @@ gl646_setup_registers (Genesys_Device * dev,
|
|||
|
||||
/* wpl must be computed according to the scan's resolution */
|
||||
/* in fact, wpl _gives_ the actual scan resolution */
|
||||
wpl = (((endx - startx) * sensor->xdpi) / dev->sensor.optical_res)*sensor->cksel;
|
||||
wpl =
|
||||
(((endx -
|
||||
startx) * sensor->xdpi) / dev->sensor.optical_res) * sensor->cksel;
|
||||
if (depth == 16)
|
||||
wpl *= 2;
|
||||
if (dev->model->is_cis == SANE_FALSE)
|
||||
|
@ -2940,6 +2943,10 @@ gl646_init_regs_for_shading (Genesys_Device * dev)
|
|||
/* fill settings for scan : always a color scan */
|
||||
settings.scan_method = SCAN_METHOD_FLATBED;
|
||||
settings.scan_mode = dev->settings.scan_mode;
|
||||
if (dev->model->is_cis == SANE_FALSE)
|
||||
{
|
||||
settings.scan_mode = SCAN_MODE_COLOR;
|
||||
}
|
||||
settings.xres = dev->sensor.optical_res / half_ccd;
|
||||
settings.yres = dev->sensor.optical_res / half_ccd;
|
||||
settings.tl_x = 0;
|
||||
|
@ -2964,6 +2971,10 @@ gl646_init_regs_for_shading (Genesys_Device * dev)
|
|||
/* used when sending shading calibration data */
|
||||
dev->calib_pixels = settings.pixels;
|
||||
dev->calib_channels = dev->current_setup.channels;
|
||||
if (dev->model->is_cis == SANE_FALSE)
|
||||
{
|
||||
dev->calib_channels = 3;
|
||||
}
|
||||
|
||||
/* no shading */
|
||||
dev->reg[reg_0x01].value &= ~REG01_DVDSET;
|
||||
|
|
Ładowanie…
Reference in New Issue