kopia lustrzana https://gitlab.com/sane-project/backends
Doc update, CCD sensors white lines padding fix, enhance scan area adjustments.
rodzic
a2cb00cdc3
commit
286dbd885d
|
@ -1,3 +1,11 @@
|
|||
2008-09-07 Nicolas Martin <nicols-guest at users.alioth.debian.org>
|
||||
* backend/pixma_mp150.c backend/pixma_imageclass.c backend/pixma_common.h
|
||||
doc/sane-pixma.man doc/descriptions/pixma.desc:
|
||||
- Updated doc for MF4140, MF4150 and MP810
|
||||
- Remove white lines previously padded to image bottom for CCD sensors
|
||||
- Modified scan area adjustments to enhance frontend area selection fit
|
||||
but to be confirmed that it does not bring backward compatibility issues.
|
||||
|
||||
2008-08-21 Stéphane Voltz <stef.dev@free.fr>
|
||||
* backend/rts8891.c backend/rts8891_low.c backend/rts8891_low.h
|
||||
backend/rts88xx_lib.c: minor changes for hp4400 support
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
#define MIN(x,y) (((x) < (y)) ? (x):(y))
|
||||
#define MAX(x,y) (((x) < (y)) ? (y):(x))
|
||||
#define ALIGN(x,n) (((x) + (n) - 1) / (n) * (n))
|
||||
#define ALIGN_INF(x,n) (((x) / (n)) * (n))
|
||||
|
||||
struct pixma_io_t;
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
#define CMDBUF_SIZE 512
|
||||
|
||||
#define MF4200_PID 0x26b5
|
||||
#define MF4100_PID 0x26a3
|
||||
/* the following are all untested */
|
||||
#define MF5630_PID 0x264e
|
||||
#define MF5650_PID 0x264f
|
||||
|
@ -78,7 +79,6 @@
|
|||
#define MF3110_PID 0x2660
|
||||
#define MF3200_PID 0x2684
|
||||
#define MF6500_PID 0x2686
|
||||
#define MF4100_PID 0x26a3
|
||||
#define MF4600_PID 0x26b0
|
||||
#define MF4010_PID 0x26b4
|
||||
|
||||
|
@ -602,6 +602,7 @@ static const pixma_scan_ops_t pixma_iclass_ops = {
|
|||
}
|
||||
const pixma_config_t pixma_iclass_devices[] = {
|
||||
DEV ("Canon imageCLASS MF4270", MF4200_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
DEV ("Canon imageCLASS MF4150", MF4100_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
/* FIXME: the following capabilities all need updating/verifying */
|
||||
DEV ("Canon imageCLASS MF5630", MF5630_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
DEV ("Canon laserBase MF5650", MF5650_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
|
@ -612,7 +613,6 @@ const pixma_config_t pixma_iclass_devices[] = {
|
|||
DEV ("Canon imageCLASS MF3110", MF3110_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
DEV ("Canon imageCLASS MF3240", MF3200_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
DEV ("Canon MF6500 Series", MF6500_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
DEV ("Canon imageCLASS MF4150", MF4100_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
DEV ("Canon imageCLASS MF4690", MF4600_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
DEV ("Canon imageCLASS MF4010", MF4010_PID, 600, 640, 877, PIXMA_CAP_ADF),
|
||||
DEV (NULL, 0, 0, 0, 0, 0)
|
||||
|
|
|
@ -420,12 +420,60 @@ is_scanning_from_adf (pixma_t * s)
|
|||
return (s->param->source == PIXMA_SOURCE_ADF
|
||||
|| s->param->source == PIXMA_SOURCE_ADFDUP);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
calc_shifting (pixma_t * s)
|
||||
{
|
||||
mp150_t *mp = (mp150_t *) s->subdriver;
|
||||
unsigned base_shift;
|
||||
|
||||
/* If color plane shift (CCD devices), how many pixels shift */
|
||||
switch (s->cfg->pid)
|
||||
{
|
||||
case MP800_PID:
|
||||
case MP810_PID:
|
||||
case MP830_PID:
|
||||
case MP960_PID:
|
||||
case MP970_PID:
|
||||
mp->lines_shift = 0;
|
||||
if (s->param->ydpi > 75)
|
||||
mp->lines_shift = s->param->ydpi / 50;
|
||||
break;
|
||||
|
||||
default: /* all CIS devices */
|
||||
mp->lines_shift = 0;
|
||||
}
|
||||
base_shift = get_cis_ccd_line_size (s) * mp->lines_shift;
|
||||
|
||||
/* If color plane shift, how to apply the shift */
|
||||
switch (s->cfg->pid)
|
||||
{
|
||||
case MP970_PID:
|
||||
mp->shift[0] = 0;
|
||||
mp->shift[1] = base_shift;
|
||||
mp->shift[2] = 2 * base_shift;
|
||||
break;
|
||||
|
||||
case MP800_PID:
|
||||
case MP810_PID:
|
||||
case MP830_PID:
|
||||
case MP960_PID:
|
||||
default:
|
||||
mp->shift[0] = 2 * base_shift;
|
||||
mp->shift[1] = base_shift;
|
||||
mp->shift[2] = 0;
|
||||
}
|
||||
return mp->lines_shift;
|
||||
}
|
||||
|
||||
static int
|
||||
send_scan_param (pixma_t * s)
|
||||
{
|
||||
mp150_t *mp = (mp150_t *) s->subdriver;
|
||||
uint8_t *data;
|
||||
unsigned raw_width = calc_raw_width (mp, s->param);
|
||||
unsigned h = MIN (s->param->h + 2 * calc_shifting (s),
|
||||
s->cfg->height * s->param->ydpi / 75);
|
||||
|
||||
if (mp->generation <= 2)
|
||||
{
|
||||
|
@ -435,7 +483,7 @@ send_scan_param (pixma_t * s)
|
|||
pixma_set_be32 (s->param->x, data + 0x08);
|
||||
pixma_set_be32 (s->param->y, data + 0x0c);
|
||||
pixma_set_be32 (raw_width, data + 0x10);
|
||||
pixma_set_be32 (s->param->h, data + 0x14);
|
||||
pixma_set_be32 (h, data + 0x14);
|
||||
data[0x18] = ((s->param->channels != 1) || is_ccd_grayscale (s)) ? 0x08 : 0x04;
|
||||
data[0x19] = s->param->depth * ((is_ccd_grayscale (s)) ? 3 : s->param->channels); /* bits per pixel */
|
||||
data[0x20] = 0xff;
|
||||
|
@ -455,7 +503,7 @@ send_scan_param (pixma_t * s)
|
|||
pixma_set_be32 (s->param->x, data + 0x0c);
|
||||
pixma_set_be32 (s->param->y, data + 0x10);
|
||||
pixma_set_be32 (raw_width, data + 0x14);
|
||||
pixma_set_be32 (s->param->h, data + 0x18);
|
||||
pixma_set_be32 (h, data + 0x18);
|
||||
data[0x1c] = ((s->param->channels != 1) || is_ccd_grayscale (s)) ? 0x08 : 0x04;
|
||||
data[0x1d] = s->param->depth * ((is_ccd_grayscale (s)) ? 3 : s->param->channels); /* bits per pixel */
|
||||
data[0x1f] = 0x01;
|
||||
|
@ -752,9 +800,14 @@ mp150_check_param (pixma_t * s, pixma_scan_param_t * sp)
|
|||
sp->depth = 8; /* MP150 only supports 8 bit per channel. */
|
||||
if (mp->generation >= 2)
|
||||
{
|
||||
sp->x = ALIGN (sp->x, 32);
|
||||
sp->y = ALIGN (sp->y, 32);
|
||||
/* mod 32 and expansion of the X scan limits */
|
||||
sp->w += (sp->x) % 32;
|
||||
sp->w = calc_raw_width (mp, sp);
|
||||
sp->x = ALIGN_INF (sp->x, 32);
|
||||
/* FIXME: TBC, if all gen2 and gen3 devices do not need
|
||||
* modulo 32 alignment on Y axis. If needed, uncomment next 2 lines */
|
||||
/* sp->h += (sp->y) % 32;
|
||||
sp->y = ALIGN_INF (sp->y, 32);*/
|
||||
}
|
||||
sp->line_size = calc_raw_width (mp, sp) * sp->channels;
|
||||
return 0;
|
||||
|
@ -965,51 +1018,6 @@ post_process_image_data (pixma_t * s, pixma_imagebuf_t * ib)
|
|||
return mp->data_left_ofs - sptr; /* # of non processed bytes */
|
||||
}
|
||||
|
||||
static unsigned
|
||||
calc_shifting (pixma_t * s)
|
||||
{
|
||||
mp150_t *mp = (mp150_t *) s->subdriver;
|
||||
unsigned base_shift;
|
||||
|
||||
/* If color plane shift (CCD devices), how many pixels shift */
|
||||
switch (s->cfg->pid)
|
||||
{
|
||||
case MP800_PID:
|
||||
case MP810_PID:
|
||||
case MP830_PID:
|
||||
case MP960_PID:
|
||||
case MP970_PID:
|
||||
mp->lines_shift = 0;
|
||||
if (s->param->ydpi > 75)
|
||||
mp->lines_shift = s->param->ydpi / 50;
|
||||
break;
|
||||
|
||||
default: /* all CIS devices */
|
||||
mp->lines_shift = 0;
|
||||
}
|
||||
base_shift = get_cis_ccd_line_size (s) * mp->lines_shift;
|
||||
|
||||
/* If color plane shift, how to apply the shift */
|
||||
switch (s->cfg->pid)
|
||||
{
|
||||
case MP970_PID:
|
||||
mp->shift[0] = 0;
|
||||
mp->shift[1] = base_shift;
|
||||
mp->shift[2] = 2 * base_shift;
|
||||
break;
|
||||
|
||||
case MP800_PID:
|
||||
case MP810_PID:
|
||||
case MP830_PID:
|
||||
case MP960_PID:
|
||||
default:
|
||||
mp->shift[0] = 2 * base_shift;
|
||||
mp->shift[1] = base_shift;
|
||||
mp->shift[2] = 0;
|
||||
}
|
||||
return mp->lines_shift;
|
||||
}
|
||||
|
||||
static int
|
||||
mp150_fill_buffer (pixma_t * s, pixma_imagebuf_t * ib)
|
||||
{
|
||||
|
|
|
@ -151,8 +151,8 @@
|
|||
:model "PIXMA MP810"
|
||||
:interface "USB"
|
||||
:usbid "0x04a9" "0x171a"
|
||||
:status :untested
|
||||
:comment "Testers needed!"
|
||||
:status :good
|
||||
:comment "All resolutions supported up to 1200 dpi. Vertical lines issue at 2400 and 4800 dpi, can these modes be handled? USB Snoops needed for TPU film scan."
|
||||
|
||||
:model "PIXMA MP830"
|
||||
:interface "USB"
|
||||
|
@ -285,11 +285,17 @@
|
|||
:status :untested
|
||||
:comment "Testers needed!"
|
||||
|
||||
:model "imageCLASS MF4140"
|
||||
:interface "USB"
|
||||
:usbid "0x04a9" "0x26a3"
|
||||
:status :good
|
||||
:comment "Flatbed and ADF scan. All resolutions supported (up to 600DPI)"
|
||||
|
||||
:model "imageCLASS MF4150"
|
||||
:interface "USB"
|
||||
:usbid "0x04a9" "0x26a3"
|
||||
:status :untested
|
||||
:comment "Same protocol as imageCLASS MF4270? Testers needed!"
|
||||
:status :good
|
||||
:comment "Flatbed and ADF scan. All resolutions supported (up to 600DPI)"
|
||||
|
||||
:model "imageCLASS MF4270"
|
||||
:interface "USB"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.TH "sane\-pixma" "5" "14 Jul 2008" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
||||
.TH "sane\-pixma" "5" "7 Sep 2008" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
||||
.IX sane\-pixma
|
||||
.SH NAME
|
||||
sane\-pixma \- SANE backend for Canon PIXMA MP series
|
||||
|
@ -22,7 +22,7 @@ PIXMA MX300, MX310, MX700
|
|||
.br
|
||||
MultiPASS MP700, PIXMA MP750 (no grayscale)
|
||||
.br
|
||||
ImageCLASS MF4270
|
||||
ImageCLASS MF4140, MF4150, MF4270
|
||||
.RE
|
||||
.PP
|
||||
The following models are not well tested and/or the scanner sometimes hangs
|
||||
|
@ -42,7 +42,7 @@ Feedback in the Sane-dev mailing list welcome.
|
|||
.RS
|
||||
PIXMA MP740
|
||||
.br
|
||||
ImageCLASS MF3110, MF3240, MF4150
|
||||
ImageCLASS MF3110, MF3240
|
||||
.br
|
||||
ImageCLASS MF5630, MF5650, MF5730, MF5750, MF5770, MF8170c
|
||||
.RE
|
||||
|
|
Ładowanie…
Reference in New Issue