pixma: several updates for MP830, MP990, memmove bug fix, and 64 bits image size.

modified:   ChangeLog
	modified:   backend/pixma.c
	modified:   backend/pixma.h
	modified:   backend/pixma_common.c
	modified:   backend/pixma_common.h
	modified:   backend/pixma_mp150.c
merge-requests/1/head
Nicolas Martin 2011-01-04 22:19:52 +01:00
rodzic 529673f220
commit 68c15af1b2
6 zmienionych plików z 20 dodań i 11 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2011-01-04 Nicolas Martin <nicols-guest at users.alioth.debian.org>
* backend/pixma_mp150.c, backend/pixma.c, backend/pixma.h
backend/pixma_common.c, backend/pixma_common.h:
pixma: several updates for MP830, MP990, memmove bug fix, and 64 bits image size.
2011-01-04 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys.c backend/genesys_devices.c
backend/genesys_gl124.c: fix 1200 dpi lineart issues for gl124,

Wyświetl plik

@ -108,7 +108,7 @@ typedef struct pixma_sane_t
pixma_paper_source_t source_map[4];
unsigned byte_pos_in_line, output_line_size;
unsigned image_bytes_read;
uint64_t image_bytes_read;
unsigned page_count; /* valid for ADF */
SANE_Pid reader_taskid;
@ -556,7 +556,7 @@ static void
print_scan_param (int level, const pixma_scan_param_t * sp)
{
pixma_dbg (level, "Scan parameters\n");
pixma_dbg (level, " line_size=%u image_size=%u channels=%u depth=%u\n",
pixma_dbg (level, " line_size=%u image_size=%"PRIu64" channels=%u depth=%u\n",
sp->line_size, sp->image_size, sp->channels, sp->depth);
pixma_dbg (level, " dpi=%ux%u offset=(%u,%u) dimension=%ux%u\n",
sp->xdpi, sp->ydpi, sp->x, sp->y, sp->w, sp->h);
@ -994,8 +994,8 @@ read_image (pixma_sane_t * ss, void *buf, unsigned size, int *readlen)
}
else if (count == 0)
{
PDBG (pixma_dbg (3, "read_image():reader task closed the pipe:"
"%u bytes received, %u bytes expected\n",
PDBG (pixma_dbg (3, "read_image():reader task closed the pipe:%"
PRIu64" bytes received, %"PRIu64" bytes expected\n",
ss->image_bytes_read, ss->sp.image_size));
close (ss->rpipe);
ss->rpipe = -1;

Wyświetl plik

@ -103,6 +103,10 @@ typedef uint16_t uint16_t;
typedef uint32_t uint32_t;
#endif /* HAVE_STDINT_H */
#ifdef HAVE_INTTYPES_H
# include <inttypes.h> /* available in ISO C99 */
#endif /* HAVE_INTTYPES_H */
/** \addtogroup API
* @{ */
/** \name Version of the driver */
@ -245,7 +249,7 @@ struct pixma_scan_param_t
/** Size in bytes of the whole image.
* image_size = line_size * h <br>
* This field will be set by pixma_check_scan_param(). */
unsigned image_size;
uint64_t image_size;
/** Channels per pixel. 1 = grayscale, 3 = color */
unsigned channels;

Wyświetl plik

@ -567,7 +567,7 @@ pixma_scan (pixma_t * s, pixma_scan_param_t * sp)
#ifndef NDEBUG
pixma_dbg (3, "\n");
pixma_dbg (3, "pixma_scan(): start\n");
pixma_dbg (3, " line_size=%u image_size=%u channels=%u depth=%u\n",
pixma_dbg (3, " line_size=%u image_size=%"PRIu64" channels=%u depth=%u\n",
sp->line_size, sp->image_size, sp->channels, sp->depth);
pixma_dbg (3, " dpi=%ux%u offset=(%u,%u) dimension=%ux%u\n",
sp->xdpi, sp->ydpi, sp->x, sp->y, sp->w, sp->h);
@ -659,10 +659,10 @@ pixma_read_image (pixma_t * s, void *buf, unsigned len)
{
pixma_dbg (1, "WARNING:image size mismatches\n");
pixma_dbg (1,
" %u expected (%d lines) but %u received (%d lines)\n",
" %"PRIu64" expected (%d lines) but %"PRIu64" received (%d lines)\n",
s->param->image_size, s->param->h,
s->cur_image_size,
s->cur_image_size / s->param->line_size);
(int) s->cur_image_size / s->param->line_size);
if ((s->cur_image_size % s->param->line_size) != 0)
{
pixma_dbg (1,

Wyświetl plik

@ -119,7 +119,7 @@ struct pixma_t
void *subdriver; /* can be used by model driver. */
/* private */
unsigned cur_image_size;
uint64_t cur_image_size;
pixma_imagebuf_t imagebuf;
unsigned scanning:1;
unsigned underrun:1;

Wyświetl plik

@ -680,7 +680,7 @@ send_scan_param (pixma_t * s)
pixma_set_be16 (s->param->xdpi | 0x8000, data + 0x04);
pixma_set_be16 (s->param->ydpi | 0x8000, data + 0x06);
pixma_set_be32 (s->param->x, data + 0x08);
if (s->cfg->pid == MP460_PID || s->cfg->pid == MP510_PID)
if (mp->generation == 2)
pixma_set_be32 (s->param->x - s->param->xs, data + 0x08);
pixma_set_be32 (s->param->y, data + 0x0c);
pixma_set_be32 (raw_width, data + 0x10);
@ -1104,7 +1104,7 @@ post_process_image_data (pixma_t * s, pixma_imagebuf_t * ib)
mp970_reorder_pixels (mp->linebuf, sptr, c, s->param->wx, line_size);
/* Crop line to selected borders */
memcpy(cptr, sptr + cx, cw);
memmove(cptr, sptr + cx, cw);
/* Color to Grayscale convert for CCD sensor */
if (is_ccd_grayscale (s))