Merge branch 'master' of ssh://kitno-guest@git.debian.org/git/sane/sane-backends

merge-requests/1/head
m. allan noah 2009-06-22 23:10:35 -04:00
commit 4a91ba9e8f
73 zmienionych plików z 2422 dodań i 1752 usunięć

Wyświetl plik

@ -1,3 +1,26 @@
2009-06-22 Nicolas Martin <nicols-guest at users.alioth.debian.org>
* backend/pixma_imageclass.c, backend/pixma_mp730.c, doc/descriptions/pixma.desc:
- Added duplex ADF scan for Canon ImageCLASS D480.
- Fixed ImageCLASS MF5770 grayscale scanning.
- Moved ImageCLASS MF5730 and MF5750 to pixma_mp730.c (similarity with MF5770).
- Updated documentation.
2009-06-20 Mattias Ellert <mattias.ellert@fysast.uu.se>
* po/sane-backends.sv.po: Updated Swedish translations.
* backend/hp5400_internal.h, backend/hp5590_cmds.c,
backend/hp5590_low.c, backend/net.c: Add missing includes.
2009-06-20 Nicolas Martin <nicols-guest at users.alioth.debian.org>
* backend/pixma_imageclass.c, doc/descriptions/pixma.desc, doc/sane-pixma.man:
Added Canon imageCLASS D480 support to the pixma backend.
2009-06-17 Stéphane Voltz <stef.dev at free.fr>
* backend/lexmark_low.c: f3/f4 registers assignement cleanup
2009-06-18 Nicolas Martin <nicols-guest at users.alioth.debian.org>
* backend/pixma_mp150.c:
Fixed typo in pixma backend for MX320 declaration.
2009-06-17 m. allan noah <kitno455 at gmail dot com> 2009-06-17 m. allan noah <kitno455 at gmail dot com>
* backend/canon_dr.[ch], backend/canon_dr-cmd.h: backend v30 * backend/canon_dr.[ch], backend/canon_dr-cmd.h: backend v30
- add fine cal support for machines with internal buffer (2050/2080) - add fine cal support for machines with internal buffer (2050/2080)

Wyświetl plik

@ -456,13 +456,13 @@ libsane_epson_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
libsane_epson_la_LIBADD = $(COMMON_LIBS) libepson.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo $(SCSI_LIBS) $(USB_LIBS) libsane_epson_la_LIBADD = $(COMMON_LIBS) libepson.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo $(SCSI_LIBS) $(USB_LIBS)
EXTRA_DIST += epson.conf.in EXTRA_DIST += epson.conf.in
libepson2_la_SOURCES = epson2.c epson2.h epson2_scsi.c epson2_scsi.h epson_usb.c epson2_net.c epson2_net.h epson2-io.c epson2-io.h epson2-commands.c epson2-commands.h epson2-ops.c epson2-ops.h libepson2_la_SOURCES = epson2.c epson2.h epson2_scsi.c epson2_scsi.h epson_usb.c epson2_net.c epson2_net.h epson2-io.c epson2-io.h epson2-commands.c epson2-commands.h epson2-ops.c epson2-ops.h epson2-cct.c
libepson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2 libepson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2
nodist_libsane_epson2_la_SOURCES = epson2-s.c nodist_libsane_epson2_la_SOURCES = epson2-s.c
libsane_epson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2 libsane_epson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2
libsane_epson2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS) libsane_epson2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
libsane_epson2_la_LIBADD = $(COMMON_LIBS) libepson2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS) libsane_epson2_la_LIBADD = $(COMMON_LIBS) libepson2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS) $(MATH_LIB)
EXTRA_DIST += epson2.conf.in EXTRA_DIST += epson2.conf.in
libfujitsu_la_SOURCES = fujitsu.c fujitsu.h fujitsu-scsi.h libfujitsu_la_SOURCES = fujitsu.c fujitsu.h fujitsu-scsi.h

Wyświetl plik

@ -148,7 +148,8 @@ libepson2_la_LIBADD =
am_libepson2_la_OBJECTS = libepson2_la-epson2.lo \ am_libepson2_la_OBJECTS = libepson2_la-epson2.lo \
libepson2_la-epson2_scsi.lo libepson2_la-epson_usb.lo \ libepson2_la-epson2_scsi.lo libepson2_la-epson_usb.lo \
libepson2_la-epson2_net.lo libepson2_la-epson2-io.lo \ libepson2_la-epson2_net.lo libepson2_la-epson2-io.lo \
libepson2_la-epson2-commands.lo libepson2_la-epson2-ops.lo libepson2_la-epson2-commands.lo libepson2_la-epson2-ops.lo \
libepson2_la-epson2-cct.lo
libepson2_la_OBJECTS = $(am_libepson2_la_OBJECTS) libepson2_la_OBJECTS = $(am_libepson2_la_OBJECTS)
libfujitsu_la_LIBADD = libfujitsu_la_LIBADD =
am_libfujitsu_la_OBJECTS = libfujitsu_la-fujitsu.lo am_libfujitsu_la_OBJECTS = libfujitsu_la-fujitsu.lo
@ -529,7 +530,8 @@ libsane_epson2_la_DEPENDENCIES = $(COMMON_LIBS) libepson2.la \
sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo \ sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo \
../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo \ ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo \
../sanei/sanei_udp.lo $(am__DEPENDENCIES_1) \ ../sanei/sanei_udp.lo $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
nodist_libsane_epson2_la_OBJECTS = libsane_epson2_la-epson2-s.lo nodist_libsane_epson2_la_OBJECTS = libsane_epson2_la-epson2-s.lo
libsane_epson2_la_OBJECTS = $(nodist_libsane_epson2_la_OBJECTS) libsane_epson2_la_OBJECTS = $(nodist_libsane_epson2_la_OBJECTS)
libsane_epson2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ libsane_epson2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@ -1883,12 +1885,12 @@ nodist_libsane_epson_la_SOURCES = epson-s.c
libsane_epson_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson libsane_epson_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson
libsane_epson_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS) libsane_epson_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
libsane_epson_la_LIBADD = $(COMMON_LIBS) libepson.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo $(SCSI_LIBS) $(USB_LIBS) libsane_epson_la_LIBADD = $(COMMON_LIBS) libepson.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo $(SCSI_LIBS) $(USB_LIBS)
libepson2_la_SOURCES = epson2.c epson2.h epson2_scsi.c epson2_scsi.h epson_usb.c epson2_net.c epson2_net.h epson2-io.c epson2-io.h epson2-commands.c epson2-commands.h epson2-ops.c epson2-ops.h libepson2_la_SOURCES = epson2.c epson2.h epson2_scsi.c epson2_scsi.h epson_usb.c epson2_net.c epson2_net.h epson2-io.c epson2-io.h epson2-commands.c epson2-commands.h epson2-ops.c epson2-ops.h epson2-cct.c
libepson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2 libepson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2
nodist_libsane_epson2_la_SOURCES = epson2-s.c nodist_libsane_epson2_la_SOURCES = epson2-s.c
libsane_epson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2 libsane_epson2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=epson2
libsane_epson2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS) libsane_epson2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
libsane_epson2_la_LIBADD = $(COMMON_LIBS) libepson2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS) libsane_epson2_la_LIBADD = $(COMMON_LIBS) libepson2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS) $(MATH_LIB)
libfujitsu_la_SOURCES = fujitsu.c fujitsu.h fujitsu-scsi.h libfujitsu_la_SOURCES = fujitsu.c fujitsu.h fujitsu-scsi.h
libfujitsu_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=fujitsu libfujitsu_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=fujitsu
nodist_libsane_fujitsu_la_SOURCES = fujitsu-s.c nodist_libsane_fujitsu_la_SOURCES = fujitsu-s.c
@ -2724,6 +2726,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdll_la-dll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdll_la-dll.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmc_la-dmc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdmc_la-dmc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepjitsu_la-epjitsu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepjitsu_la-epjitsu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-cct.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-commands.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-commands.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-io.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-ops.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libepson2_la-epson2-ops.Plo@am__quote@
@ -3160,6 +3163,13 @@ libepson2_la-epson2-ops.lo: epson2-ops.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libepson2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libepson2_la-epson2-ops.lo `test -f 'epson2-ops.c' || echo '$(srcdir)/'`epson2-ops.c @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libepson2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libepson2_la-epson2-ops.lo `test -f 'epson2-ops.c' || echo '$(srcdir)/'`epson2-ops.c
libepson2_la-epson2-cct.lo: epson2-cct.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libepson2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libepson2_la-epson2-cct.lo -MD -MP -MF $(DEPDIR)/libepson2_la-epson2-cct.Tpo -c -o libepson2_la-epson2-cct.lo `test -f 'epson2-cct.c' || echo '$(srcdir)/'`epson2-cct.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libepson2_la-epson2-cct.Tpo $(DEPDIR)/libepson2_la-epson2-cct.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epson2-cct.c' object='libepson2_la-epson2-cct.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libepson2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libepson2_la-epson2-cct.lo `test -f 'epson2-cct.c' || echo '$(srcdir)/'`epson2-cct.c
libfujitsu_la-fujitsu.lo: fujitsu.c libfujitsu_la-fujitsu.lo: fujitsu.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfujitsu_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfujitsu_la-fujitsu.lo -MD -MP -MF $(DEPDIR)/libfujitsu_la-fujitsu.Tpo -c -o libfujitsu_la-fujitsu.lo `test -f 'fujitsu.c' || echo '$(srcdir)/'`fujitsu.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfujitsu_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfujitsu_la-fujitsu.lo -MD -MP -MF $(DEPDIR)/libfujitsu_la-fujitsu.Tpo -c -o libfujitsu_la-fujitsu.lo `test -f 'fujitsu.c' || echo '$(srcdir)/'`fujitsu.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libfujitsu_la-fujitsu.Tpo $(DEPDIR)/libfujitsu_la-fujitsu.Plo @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libfujitsu_la-fujitsu.Tpo $(DEPDIR)/libfujitsu_la-fujitsu.Plo

Wyświetl plik

@ -81,7 +81,6 @@
#include "abaton.h" #include "abaton.h"
#define MM_PER_INCH 25.4
static int num_devices; static int num_devices;
static Abaton_Device *first_dev; static Abaton_Device *first_dev;

Wyświetl plik

@ -47,7 +47,6 @@
# define PATH_MAX 1024 # define PATH_MAX 1024
#endif #endif
#define MM_PER_INCH 25.4
#undef Byte #undef Byte
#define Byte SANE_Byte #define Byte SANE_Byte

Wyświetl plik

@ -135,7 +135,6 @@
#include "apple.h" #include "apple.h"
#define MM_PER_INCH 25.4
static int num_devices; static int num_devices;
static Apple_Device *first_dev; static Apple_Device *first_dev;

Wyświetl plik

@ -85,7 +85,6 @@
#define ARTEC_SUB 16 #define ARTEC_SUB 16
#define ARTEC_LAST_MOD "05/26/2001 17:28 EST" #define ARTEC_LAST_MOD "05/26/2001 17:28 EST"
#define MM_PER_INCH 25.4
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX 1024 #define PATH_MAX 1024

Wyświetl plik

@ -36,7 +36,6 @@ typedef SANE_Byte Artec48U_Packet[ARTEC48U_PACKET_SIZE];
#define HIBYTE(w) ((SANE_Byte)(((SANE_Word)(w) >> 8) & 0xFF)) #define HIBYTE(w) ((SANE_Byte)(((SANE_Word)(w) >> 8) & 0xFF))
#define LOBYTE(w) ((SANE_Byte)(w)) #define LOBYTE(w) ((SANE_Byte)(w))
#define MM_PER_INCH 25.4
#define CHECK_DEV_NOT_NULL(dev, func_name) \ #define CHECK_DEV_NOT_NULL(dev, func_name) \
do { \ do { \

Wyświetl plik

@ -118,7 +118,6 @@ typedef struct AS6E_Scan
#define READPIPE 0 #define READPIPE 0
#define WRITEPIPE 1 #define WRITEPIPE 1
#define MM_PER_INCH 25.4
#define SCAN_BUF_SIZE 32768 #define SCAN_BUF_SIZE 32768

Wyświetl plik

@ -1182,7 +1182,6 @@ Lexmark X4500 MFP
#define AVISION_INQUIRY_SIZE_V2 0x88 #define AVISION_INQUIRY_SIZE_V2 0x88
#define AVISION_INQUIRY_SIZE_MAX AVISION_INQUIRY_SIZE_V2 #define AVISION_INQUIRY_SIZE_MAX AVISION_INQUIRY_SIZE_V2
#define MM_PER_INCH 25.4
#define AVISION_BASE_RES 300 #define AVISION_BASE_RES 300

Wyświetl plik

@ -206,7 +206,6 @@ typedef enum
} BH_Option; } BH_Option;
/* macros for accessing the value for an option within a scanning context */ /* macros for accessing the value for an option within a scanning context */
#define MM_PER_INCH 25.4
#define _OPT_VAL_WORD(s, o) ((s)->val[(o)].w) #define _OPT_VAL_WORD(s, o) ((s)->val[(o)].w)
#define _OPT_VAL_WORD_THOUSANDTHS(s, o) \ #define _OPT_VAL_WORD_THOUSANDTHS(s, o) \
(SANE_UNFIX(_OPT_VAL_WORD((s), (o))) * 1000.0 / MM_PER_INCH) (SANE_UNFIX(_OPT_VAL_WORD((s), (o))) * 1000.0 / MM_PER_INCH)

Wyświetl plik

@ -127,7 +127,6 @@
#define SANE_I18N(text) text #define SANE_I18N(text) text
#endif #endif
#define MM_PER_INCH 25.4
static SANE_Byte primaryHigh[256], primaryLow[256], secondaryHigh[256], static SANE_Byte primaryHigh[256], primaryLow[256], secondaryHigh[256],
secondaryLow[256]; /* modification for FB1200S */ secondaryLow[256]; /* modification for FB1200S */

Wyświetl plik

@ -397,7 +397,6 @@ enum {
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#define MM_PER_INCH 25.4
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)) #define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
#define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))) #define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)))

Wyświetl plik

@ -117,7 +117,6 @@ struct scanner
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#define MM_PER_INCH 25.4
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)) #define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
#define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))) #define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)))

Wyświetl plik

@ -1872,7 +1872,6 @@ sense_handler (int scsi_fd, unsigned char * result, void *arg)
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#define MM_PER_INCH 25.4
/* ilu per mm */ /* ilu per mm */
#define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 2700.0)) #define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 2700.0))

Wyświetl plik

@ -263,7 +263,6 @@ struct scanner
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#define MM_PER_INCH 25.4
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)) #define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
#define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))) #define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)))

Wyświetl plik

@ -341,10 +341,6 @@
#define PATH_MAX (1024) #define PATH_MAX (1024)
#endif #endif
#ifndef MM_PER_INCH
#define MM_PER_INCH 25.4
#endif
#define walloc(x) (x *)malloc(sizeof(x)) #define walloc(x) (x *)malloc(sizeof(x))
#define walloca(x) (x *)alloca(sizeof(x)) #define walloca(x) (x *)alloca(sizeof(x))

Wyświetl plik

@ -0,0 +1,552 @@
/* epson2 hardware colour correction coefficients
* Copyright (C) 2001-2009 SEIKO EPSON Corporation
* Copyright (C) 2009 Tower Technologies
*
* License: GPLv2
*
* This file is part of the SANE epson2 backend and has been derived
* from the epkowa backend distributed with Image Scan!
*
*/
/*! Hardware colour correction coefficients (CCC).
Each entry starts with a unique identifier, followed by four CCC
profiles; the first is for reflective materials, the second for
colour negatives, the third for monochrome negatives, and the
fourth and last one is for colour positives.
*/
#define DEBUG_DECLARE_ONLY
#include "epson2.h"
const struct epson_profile epson_cct_profiles[] = {
{0x00, /* default */
{{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x05, /* ES-6000H */
{{1.1419,-0.0596,-0.0825,-0.1234, 1.2812,-0.1413, 0.0703,-0.5720, 1.5016},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1419,-0.0596,-0.0825,-0.1234, 1.2812,-0.1413, 0.0703,-0.5720, 1.5016}}},
{0x06, /* GT-6600 */
{{1.1442,-0.0705,-0.0737,-0.0702, 1.1013,-0.0311,-0.0080,-0.3588, 1.3668},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x07, /* GT-7600 */
{{1.1967,-0.1379,-0.0588,-0.0538, 1.0385, 0.0153, 0.0348,-0.4070, 1.3721},
{1.0010,-0.0010, 0.0000,-0.1120, 1.1710,-0.0590, 0.0000,-0.0910, 1.0920},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1967,-0.1379,-0.0588,-0.0538, 1.0385, 0.0153, 0.0348,-0.4070, 1.3721}}},
{0x0D, /* ES-2000 */
{{1.1980,-0.1365,-0.0616,-0.1530, 1.1729,-0.0198,-0.0025,-0.2776, 1.2801},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1980,-0.1365,-0.0616,-0.1530, 1.1729,-0.0198,-0.0025,-0.2776, 1.2801}}},
{0x0F, /* ES-8500 */
{{1.0961,-0.0181,-0.0779,-0.1279, 1.1957,-0.0678, 0.0315,-0.3891, 1.3576},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0961,-0.0181,-0.0779,-0.1279, 1.1957,-0.0678, 0.0315,-0.3891, 1.3576}}},
{0x15, /* GT-6700 */
{{1.0999,-0.0425,-0.0574,-0.0806, 1.0835,-0.0028, 0.0057,-0.2924, 1.2866},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x16, /* GT-8700 */
{{1.2020,-0.1518,-0.0502,-0.0847, 1.1385,-0.0538, 0.0059,-0.3255, 1.3196},
{1.0030,-0.0030, 0.0000,-0.0980, 1.1500,-0.0520,-0.0030,-0.0840, 1.0880},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2456,-0.1617,-0.0839,-0.1160, 1.1862,-0.0702,-0.0036,-0.3438, 1.3473}}},
{0x18, /* GT-7700 */
{{1.1339,-0.0526,-0.0813,-0.1177, 1.1661,-0.0485,-0.0030,-0.3298, 1.3328},
{1.0010,-0.0010, 0.0000,-0.1120, 1.1710,-0.0590, 0.0000,-0.0910, 1.0920},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2066,-0.0360,-0.1706,-0.1313, 1.2523,-0.1210,-0.0299,-0.3377, 1.3676}}},
{0x1A, /* ES-9000H */
{{1.0986, 0.0235,-0.1221,-0.1294, 1.0896, 0.0399, 0.0928,-0.6043, 1.5115},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x1B, /* ES-2200 */
{{1.1855,-0.1372,-0.0483,-0.2060, 1.2468,-0.0407, 0.0358,-0.3059, 1.2701},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1976,-0.1182,-0.0794,-0.1578, 1.2720,-0.1142, 0.0122,-0.3467, 1.3345}}},
{0x1D, /* GT-7200 */
{{1.0675,-0.0586,-0.0088,-0.0332, 0.9716, 0.0616, 0.0175,-0.4054, 1.3879},
{1.0090,-0.0090, 0.0000,-0.0390, 1.0750,-0.0360,-0.0070,-0.1060, 1.1130},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1394,-0.0829,-0.0564,-0.0003, 1.0008,-0.0004,-0.0059,-0.3674, 1.3733}}},
{0x1F, /* GT-8200 */
{{1.0800,-0.0607,-0.0193,-0.0787, 1.0846,-0.0059, 0.0135,-0.3334, 1.3199},
{1.0040,-0.0040, 0.0000,-0.0780, 1.1360,-0.0570,-0.0020,-0.0810, 1.0830},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1334,-0.0929,-0.0405,-0.0418, 1.0689,-0.0271,-0.0521,-0.3262, 1.3783}}},
{0x21, /* GT-9700 */
{{1.0919,-0.0739,-0.0180,-0.0941, 1.1150,-0.0209, 0.0220,-0.3744, 1.3524},
{1.0090,-0.0100, 0.0010,-0.0720, 1.1310,-0.0600, 0.0000,-0.1000, 1.1000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1374,-0.1396, 0.0021,-0.0489, 1.0655,-0.0166, 0.0081,-0.3492, 1.3411}}},
{0x23, /* GT-7300 */
{{1.0339,-0.0166,-0.0173,-0.0117, 0.9797, 0.0319, 0.0010,-0.3609, 1.3599},
{1.0090,-0.0090, 0.0000,-0.0390, 1.0750,-0.0360,-0.0070,-0.1060, 1.1130},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1666,-0.0898,-0.0768,-0.0076, 1.0157,-0.0081, 0.0012,-0.3048, 1.3036}}},
{0x25, /* GT-8300 */
{{1.0800,-0.0607,-0.0193,-0.0787, 1.0846,-0.0059, 0.0135,-0.3334, 1.3199},
{1.0040,-0.0040, 0.0000,-0.0780, 1.1360,-0.0570,-0.0020,-0.0810, 1.0830},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1334,-0.0929,-0.0405,-0.0418, 1.0689,-0.0271,-0.0521,-0.3262, 1.3783}}},
{0x27, /* GT-9300 */
{{1.0919,-0.0739,-0.0180,-0.0941, 1.1150,-0.0209, 0.0220,-0.3744, 1.3524},
{1.0083,-0.0094, 0.0011,-0.0760, 1.1379,-0.0619,-0.0002,-0.0945, 1.0947},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1952,-0.1519,-0.0433,-0.0932, 1.1613,-0.0681,-0.0418,-0.3140, 1.3558}}},
{0x29, /* GT-9800F */
{{1.0369,-0.0210,-0.0160,-0.0820, 1.1160,-0.0341, 0.0150,-0.5035, 1.4885},
{1.0122,-0.0151, 0.0029,-0.0861, 1.1402,-0.0542,-0.0061,-0.1607, 1.1669},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1764,-0.1749,-0.0014,-0.0590, 1.0983,-0.0393, 0.0208,-0.5194, 1.4986}}},
{0x2B, /* ES-7000H */
{{1.0305,-0.0116,-0.0189,-0.0936, 1.1245,-0.0309,-0.0072,-0.1413, 1.1485},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x32, /* GT-9400 */
{{1.0932,-0.0529,-0.0403,-0.1077, 1.1416,-0.0338, 0.0079,-0.5525, 1.5446},
{1.0259,-0.0356, 0.0097,-0.1085, 1.2225,-0.1140,-0.0046,-0.1848, 1.1894},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2720,-0.2665,-0.0054,-0.0672, 1.1301,-0.0629,-0.0048,-0.3917, 1.3965}}},
{0x2D, /* CC-600PX */
{{1.0436,-0.0078,-0.0359,-0.0169, 1.0114, 0.0056, 0.0308,-0.4425, 1.4117},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x3A, /* PM-A850 */
{{1.1150,-0.0677,-0.0473,-0.1179, 1.1681,-0.0502, 0.0052,-0.4858, 1.4806},
{1.0133,-0.0151, 0.0017,-0.1216, 1.2207,-0.0991,-0.0003,-0.1512, 1.1515},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2105,-0.1644,-0.0461,-0.1124, 1.1945,-0.0820,-0.0450,-0.3367, 1.3817}}},
{0x36, /* CX5300/CX5400 */
{{1.0848,-0.0153,-0.0695,-0.0902, 1.0611, 0.0291, 0.0344,-0.5002, 1.4658},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x34, /* GT-X700 */
{{1.1032,-0.0590,-0.0442,-0.1915, 1.3371,-0.1456, 0.0387,-0.5804, 1.5417},
{1.0232,-0.0258, 0.0026,-0.1296, 1.2882,-0.1587,-0.0011,-0.1928, 1.1940},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2662,-0.2664, 0.0002,-0.1050, 1.3168,-0.2118,-0.0058,-0.4370, 1.4428}}},
{0x38, /* RX500/RX510 */
{{1.1150,-0.0677,-0.0473,-0.1179, 1.1681,-0.0502, 0.0052,-0.4858, 1.4806},
{1.0133,-0.0151, 0.0017,-0.1216, 1.2207,-0.0991,-0.0003,-0.1512, 1.1515},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2105,-0.1644,-0.0461,-0.1124, 1.1945,-0.0820,-0.0450,-0.3367, 1.3817}}},
{0x37, /* CX6300/CX6400 */
{{0.9640, 0.1455,-0.1095, 0.0108, 1.1933,-0.2041, 0.0071,-0.3487, 1.3416},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x3F, /* ES-10000G */
{{1.1223,-0.0985,-0.0238,-0.0847, 1.1502,-0.0655, 0.0118,-0.5022, 1.4904},
{1.0077,-0.0129, 0.0052,-0.0904, 1.1785,-0.0881, 0.0000,-0.1528, 1.1528},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1927,-0.1646,-0.0280,-0.0655, 1.1033,-0.0378, 0.0034,-0.4173, 1.4139}}},
{0x41, /* GT-F500/F550 */
{{1.0732,-0.0581,-0.0150,-0.0897, 1.1553,-0.0657,-0.0179,-0.6500, 1.6679},
{1.0163,-0.0203, 0.0040,-0.1125, 1.1797,-0.0672,-0.0091,-0.2343, 1.2434},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2437,-0.2022,-0.0415,-0.0352, 1.0735,-0.0383,-0.0188,-0.5020, 1.5209}}},
{0x43, /* GT-F600 */
{{1.0782,-0.0697,-0.0085,-0.1605, 1.2862,-0.1257, 0.0148,-0.5854, 1.5706},
{1.0136,-0.0151, 0.0016,-0.1836, 1.3422,-0.1586,-0.0014,-0.1851, 1.1865},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1491,-0.1456,-0.0035,-0.0990, 1.2657,-0.1666, 0.0015,-0.3868, 1.3853}}},
{0x46, /* CX3500/CX3600/CX4500/CX4600 */
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x48, /* PM-A700/RX420/RX430 */
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x49, /* CX6500/CX6600 */
{{0.9640, 0.1455,-0.1095, 0.0108, 1.1933,-0.2041, 0.0071,-0.3487, 1.3416},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x4B, /* PM-A870 */
{{1.1150,-0.0677,-0.0473,-0.1179, 1.1681,-0.0502, 0.0052,-0.4858, 1.4806},
{1.0133,-0.0151, 0.0017,-0.1216, 1.2207,-0.0991,-0.0003,-0.1512, 1.1515},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2105,-0.1644,-0.0461,-0.1124, 1.1945,-0.0820,-0.0450,-0.3367, 1.3817}}},
{0x4D, /* PM-A900 */
{{1.1011,-0.0824,-0.0186,-0.0970, 1.1991,-0.1021,-0.0161,-0.6247, 1.6408},
{1.0259,-0.0356, 0.0097,-0.1085, 1.2225,-0.1140,-0.0046,-0.1848, 1.1894},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2150,-0.2074,-0.0076,-0.0521, 1.1430,-0.0909,-0.0204,-0.4156, 1.4360}}},
{0x4F, /* GT-X800 */
{{1.1052,-0.0850,-0.0202,-0.1050, 1.2294,-0.1245,-0.0486,-0.4160, 1.4646},
{1.0255,-0.0272, 0.0017,-0.0919, 1.2098,-0.1180,-0.0021,-0.1296, 1.1317},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2950,-0.2619,-0.0332,-0.0562, 1.1587,-0.1025,-0.0397,-0.3100, 1.3497}}},
{0x51, /* LP-A500 */
{{1.0614,-0.0361,-0.0253,-0.1081, 1.1320,-0.0240,-0.0536,-0.2045, 1.2580},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x52, /* GT-F520/F570 */
{{1.0978,-0.0806,-0.0173,-0.0802, 1.1515,-0.0713,-0.0476,-0.4656, 1.5132},
{1.0192,-0.0192, 0.0000,-0.0974, 1.1846,-0.0872,-0.0031,-0.1797, 1.1828},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2490,-0.2030,-0.0460,-0.0469, 1.1046,-0.0577,-0.0361,-0.3857, 1.4217}}},
{0x54, /* GT-X750 */
{{1.0905,-0.0654,-0.0251,-0.1030, 1.1801,-0.0771,-0.0685,-0.4238, 1.4923},
{1.0206,-0.0207, 0.0000,-0.0890, 1.1770,-0.0880,-0.0014,-0.1450, 1.1464},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.3041,-0.2907,-0.0134,-0.0383, 1.0908,-0.0525,-0.0327,-0.2947, 1.3275}}},
{0x56, /* LP-M5500 */
{{1.0784,-0.0560,-0.0224,-0.1793, 1.2234,-0.0441,-0.0041,-0.2636, 1.2677},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x57, /* Stylus CX3700/CX3800/DX3800 */
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x58, /* PX-A650/Stylus CX4700/CX4800/DX4800 */
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x59, /* Stylus CX4100/CX4200/DX4200 */
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x5B, /* Stylus CX7700/CX7800 */
{{0.9764, 0.1095,-0.0859, 0.0149, 1.1154,-0.1303, 0.0051,-0.2851, 1.2800},
{1.0024,-0.0149, 0.0124,-0.2569, 1.3432,-0.0864,-0.0043,-0.1306, 1.1349},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1003,-0.0493,-0.0510,-0.1607, 1.2748,-0.1142,-0.0059,-0.3161, 1.3220}}},
{0x5D, /* Stylus Photo RX520/RX530 */
{{0.9764, 0.1095,-0.0859, 0.0149, 1.1154,-0.1303, 0.0051,-0.2851, 1.2800},
{1.0024,-0.0149, 0.0124,-0.2569, 1.3432,-0.0864,-0.0043,-0.1306, 1.1349},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.1003,-0.0493,-0.0510,-0.1607, 1.2748,-0.1142,-0.0059,-0.3161, 1.3220}}},
{0x5F, /* Stylus Photo RX640/RX650 */
{{1.0697,-0.0561,-0.0137,-0.0824, 1.1291,-0.0467,-0.0390,-0.5218, 1.5608},
{1.0208,-0.0209, 0.0000,-0.0923, 1.2017,-0.1093,-0.0020,-0.1290, 1.1310},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2606,-0.2125,-0.0482,-0.0567, 1.1441,-0.0874,-0.0431,-0.3490, 1.3921}}},
{0x61, /* PM-A950 */
{{1.0921,-0.0722,-0.0199,-0.0831, 1.1550,-0.0718,-0.0452,-0.3721, 1.4173},
{1.0168,-0.0168, 0.0000,-0.0953, 1.1928,-0.0975,-0.0012,-0.1235, 1.1247},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2603,-0.2763, 0.0155,-0.0398, 1.1033,-0.0635,-0.0249,-0.2675, 1.2924}}},
{0x63, /* GT-X900 */
{{1.0976,-0.0789,-0.0187,-0.0958, 1.1821,-0.0863,-0.0565,-0.4179, 1.4744},
{1.0250,-0.0267, 0.0016,-0.0930, 1.2108,-0.1178,-0.0022,-0.1296, 1.1317},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.3111,-0.2979,-0.0132,-0.0441, 1.1148,-0.0707,-0.0348,-0.2971, 1.3319}}},
{0x65, /* ES-H300 */
{{1.0359,-0.0146,-0.0213,-0.0752, 1.0963,-0.0211,-0.0456,-0.3238, 1.3693},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x66, /* GT-S600/F650, Perfection V10/V100 */
{{1.0878,-0.0667,-0.0211,-0.0892, 1.1513,-0.0622,-0.0654,-0.5175, 1.5829},
{1.0208,-0.0209, 0.0000,-0.0923, 1.2017,-0.1093,-0.0020,-0.1290, 1.1310},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2688,-0.2522,-0.0166,-0.0559, 1.1291,-0.0733,-0.0377,-0.3519, 1.3896}}},
{0x68, /* GT-F700, Perfection V350 */
{{1.0950,-0.0646,-0.0305,-0.0792, 1.1398,-0.0606,-0.0123,-0.5175, 1.5298},
{1.0258,-0.0306, 0.0048,-0.0995, 1.2173,-0.1178,-0.0054,-0.1242, 1.1296},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2697,-0.2501,-0.0195,-0.0351, 1.1236,-0.0885,-0.0131,-0.3268, 1.3400}}},
{0x6A, /* Stylus CX2800/CX2900/ME200 */
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x6B, /* Stylus PX-A620, CX3900/DX4000 */
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x6C, /* Stylus CX5900/CX6000/DX6000 */
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x70, /* Stylus Photo RX560/RX580/RX590 */
{{0.9533, 0.0885,-0.0418, 0.0033, 1.0627,-0.0660,-0.0137,-0.1904, 1.2041},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x71, /* PM-A920 */
{{1.0697,-0.0561,-0.0137,-0.0824, 1.1291,-0.0467,-0.0390,-0.5218, 1.5608},
{1.0208,-0.0209, 0.0000,-0.0923, 1.2017,-0.1093,-0.0020,-0.1290, 1.1310},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2606,-0.2125,-0.0482,-0.0567, 1.1441,-0.0874,-0.0431,-0.3490, 1.3921}}},
{0x73, /* PM-A970 */
{{1.0828,-0.0739,-0.0089,-0.0895, 1.1597,-0.0702,-0.0531,-0.4291, 1.4822},
{1.0258,-0.0306, 0.0048,-0.0995, 1.2173,-0.1178,-0.0054,-0.1242, 1.1296},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2579,-0.2384,-0.0195,-0.0569, 1.1454,-0.0884,-0.0411,-0.3072, 1.3483}}},
{0x75, /* PM-T990 */
{{1.0828,-0.0739,-0.0089,-0.0895, 1.1597,-0.0702,-0.0531,-0.4291, 1.4822},
{1.0258,-0.0306, 0.0048,-0.0995, 1.2173,-0.1178,-0.0054,-0.1242, 1.1296},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.2579,-0.2384,-0.0195,-0.0569, 1.1454,-0.0884,-0.0411,-0.3072, 1.3483}}},
{0x77, /* Stylus CX4900/CX5000/DX5000 */
{{0.9716, 0.0927,-0.0643, 0.0010, 1.1068,-0.1078, 0.0101,-0.3046, 1.2945},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x78, /* LP-M5600 */
{{1.0784,-0.0560,-0.0224,-0.1793, 1.2234,-0.0441,-0.0041,-0.2636, 1.2677},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x79, /* AcuLaser CX21 */
{{1.0614,-0.0361,-0.0253,-0.1081, 1.1320,-0.0240,-0.0536,-0.2045, 1.2580},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x7A, /* GT-F670, Perfection V200 */
{{1.1754,-0.1173,-0.0580,-0.0687, 1.1307,-0.0620,-0.0255,-0.4699, 1.4954},
{1.0150,-0.0173, 0.0022,-0.0853, 1.2238,-0.1384,-0.0073,-0.1490, 1.1562},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.4283,-0.4335, 0.0052,-0.0170, 1.1308,-0.1138,-0.0147,-0.2230, 1.2377}}},
{0x7C, /* GT-X770, Perfection V500 */
{{1.2470,-0.2041,-0.0429,-0.1920, 1.2918,-0.0998,-0.0100,-0.2503, 1.2603},
{1.0050,-0.0076, 0.0026,-0.2532, 1.1289, 0.1243,-0.0733,-0.0960, 1.1693},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.4724,-0.4599,-0.0125,-0.0876, 1.1562,-0.0686,-0.0097,-0.2278, 1.2375}}},
{0x7E, /* Stylus CX4300/CX4400/CX5500/CX5600/DX4400 */
{{0.9828, 0.0924,-0.0752, 0.0255, 1.1510,-0.1765, 0.0049,-0.3250, 1.3201},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x7F, /* PX-A640, Stylus CX7300/CX7400/DX7400 */
{{1.0936,-0.0142,-0.0795,-0.0001, 1.0951,-0.0949, 0.0308,-0.2967, 1.2659},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x80, /* PX-A740, Stylus CX8300/CX8400/DX8400 */
{{1.0936,-0.0142,-0.0795,-0.0001, 1.0951,-0.0949, 0.0308,-0.2967, 1.2659},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x81, /* PX-FA700, Stylus CX9300F/CX9400Fax/DX9400F */
{{1.1090,-0.0304,-0.0786, 0.0194, 1.1078,-0.1272,-0.0077,-0.1293, 1.1370},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x82, /* PM-T960 */
{{1.1622,-0.1102,-0.0519,-0.0717, 1.1060,-0.0343,-0.0248,-0.4138, 1.4385},
{0.9913, 0.0082, 0.0005,-0.1259, 1.0452, 0.0807,-0.0072,-0.0767, 1.0839},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.3900,-0.3008,-0.0892,-0.0254, 1.0890,-0.0636,-0.0300,-0.2501, 1.2801}}},
{0x84, /* PM-A940, Stylus Photo RX680/RX685/RX690 */
{{1.0934,-0.0042,-0.0892, 0.0052, 1.1019,-0.1071, 0.0259,-0.2651, 1.2392},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x85, /* PM-A840/A840S, Stylus Photo RX585/RX595/RX610 */
{{1.0534, 0.0399,-0.0934, 0.0098, 1.0589,-0.0687, 0.0016,-0.1131, 1.1115},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x86, /* GT-D1000, GT-1500 */
{{1.1945,-0.1413,-0.0532,-0.1929, 1.2525,-0.0596,-0.0235,-0.2761, 1.2996},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x87, /* GT-X970 */
{{1.1978,-0.1417,-0.0561,-0.0852, 1.1610,-0.0758,-0.0395,-0.3212, 1.3607},
{1.0000, 0.0009,-0.0009,-0.1268, 1.0523, 0.0745,-0.0075,-0.0873, 1.0948},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.4475,-0.3957,-0.0518,-0.0138, 1.0644,-0.0506,-0.0199,-0.2050, 1.2249}}},
{0x97, /* LP-M5000 */
{{1.1115,-0.0377,-0.0738,-0.0658, 1.0624, 0.0034, 0.0042,-0.2883, 1.2841},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x89, /* LP-M6000 */
{{1.1115,-0.0377,-0.0738,-0.0658, 1.0624, 0.0034, 0.0042,-0.2883, 1.2841},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x8A, /* ES-H7200, GT-20000 */
{{1.1221,-0.0396,-0.0825,-0.0718, 1.0822,-0.0104, 0.0112,-0.2995, 1.2883},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x8B, /* GT-F720/S620, Perfection V30/V300 */
{{1.2402,-0.1891,-0.0511,-0.1535, 1.2008,-0.0473,-0.0316,-0.3293, 1.3609},
{1.0027,-0.0048, 0.0021,-0.2067, 1.0878, 0.1189,-0.0408,-0.0767, 1.1175},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.4524,-0.4346,-0.0178,-0.0601, 1.1273,-0.0672,-0.0173,-0.1823, 1.1996}}},
{0x8D, /* Stylus NX200/SX200/TX200 */
{{1.0936,-0.0142,-0.0795,-0.0001, 1.0951,-0.0949, 0.0308,-0.2967, 1.2659},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x8E, /* PX-501A, Stylus NX400/SX400/TX400 */
{{1.0936,-0.0142,-0.0795,-0.0001, 1.0951,-0.0949, 0.0308,-0.2967, 1.2659},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x8F, /* Stylus NX300 / Stylus Office BX300F/TX300F / ME Office 600F */
{{1.1090,-0.0304,-0.0786, 0.0194, 1.1078,-0.1272,-0.0077,-0.1293, 1.1370},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x90, /* PX-601F, Stylus SX600FW/TX600FW / Stylus Office BX600FW / WorkForce 600 */
{{1.0316, 0.0864,-0.1180, 0.0268, 1.1111,-0.1379, 0.0213,-0.2235, 1.2022},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x91, /* EP-901A/901F, Artisan 800 / Stylus Photo PX800FW/FX800FW */
{{1.0777, 0.0152,-0.0929, 0.0244, 1.1221,-0.1465, 0.0103,-0.1544, 1.1441},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x92, /* EP-801A, Artisan 700 / Stylus Photo PX700W/TX700W */
{{1.0777, 0.0152,-0.0929, 0.0244, 1.1221,-0.1465, 0.0103,-0.1544, 1.1441},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x93, /* PX-401A, Stylus NX100/SX100/TX100 / ME 300 */
{{1.0934,-0.0042,-0.0892, 0.0052, 1.1019,-0.1071, 0.0259,-0.2651, 1.2392},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{0x96, /* WorkForce 500 */
{{1.1090,-0.0304,-0.0786, 0.0194, 1.1078,-0.1272,-0.0077,-0.1293, 1.1370},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000},
{1.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 1.0000}}},
{ 0xFF, { } } /* terminator */
};
const struct epson_profile_map epson_cct_models[] = {
{"GT-10000", 0x05 },
{"ES-6000", 0x05 },
{"Perfection610", 0x06 },
{"GT-6600", 0x06A },
{"Perfection1200", 0x07 },
{"GT-7600", 0x07 },
{"Expression1600", 0x0D },
{"ES-2000", 0x0D },
{"Expression1640XL", 0x0F },
{"ES-8500", 0x0F },
{"Perfection640", 0x15 },
{"GT-6700", 0x15 },
{"Perfection1640", 0x16 },
{"GT-8700", 0x16 },
{"Perfection1240", 0x18 },
{"GT-7700", 0x18 },
{"GT-30000", 0x1A },
{"ES-9000H", 0x1A },
{"Expression1680", 0x1B },
{"ES-2200", 0x1B },
{"GT-7200", 0x1D },
{"GT-8200", 0x1F },
{"GT-9700", 0x21 },
{"GT-7300", 0x23 },
{"GT-8300", 0x25 },
{"GT-9300", 0x27 },
{"GT-9800", 0x29 },
{"ES-7000H", 0x2B },
{"LP-A500", 0x51 },
{"AL-CX11", 0x51 },
{"GT-9400", 0x32 },
{"CC-600PX", 0x2D },
{"PM-A850", 0x3A },
{"CX5400", 0x36 },
{"GT-X700", 0x34 },
{"RX500", 0x38 },
{"PX-A650", 0x37 },
{"ES-10000G", 0x3F },
{"Expression10000", 0x3F },
{"CX4600", 0x46 },
{"CX6600", 0x49 },
{"CX3600", 0x46 },
{"RX420", 0x48 },
{"PM-A700", 0x48 },
{"PM-A870", 0x4B },
{"GT-F500", 0x41 },
{"GT-F600", 0x43 },
{"PM-A900", 0x4D },
{"GT-X800", 0x4F },
{"GT-X750", 0x54 },
{"LP-M5500", 0x56 },
{"LP-M5600", 0x78 },
{"GT-F520", 0x52 },
{"CX3800", 0x57 },
{"CX7800", 0x5B },
{"PM-A750", 0x5D },
{"CX4800", 0x58 },
{"CX4200", 0x59 },
{"PM-A950", 0x61 },
{"PM-A890", 0x5F },
{"GT-X900", 0x63 },
{"CX4000", 0x6B },
{"CX3000v", 0x6A },
{"ES-H300", 0x65 },
{"CX6000", 0x6C },
{"PM-A820", 0x70 },
{"PM-A920", 0x71 },
{"PM-A970", 0x73 },
{"PM-T990", 0x75 },
{"CX5000", 0x77 },
{"GT-S600", 0x66 },
{"GT-F700", 0x68 },
{"AL-CX21", 0x79 },
{"GT-F670", 0x7A },
{"GT-X770", 0x7C },
{"CX4400", 0x7E },
{"CX7400", 0x7F },
{"CX8400", 0x80 },
{"CX9400Fax", 0x81 },
{"PM-T960", 0x82 },
{"PM-A940", 0x84 },
{"PM-A840", 0x85 },
{"GT-D1000", 0x86 },
{"GT-X970", 0x87 },
{"LP-M5000", 0x97 },
{"LP-M6000", 0x89 },
{"ES-H7200", 0x8A },
{"GT-20000", 0x8A },
{"NX200", 0x8D },
{"NX400", 0x8E },
{"NX100", 0x93 },
{"NX300", 0x8F },
{"WorkForce 600", 0x90 },
{"Artisan 800", 0x91 },
{"Artisan 700", 0x92 },
{"WorkForce 500", 0x96 },
{"GT-F720", 0x8B },
{"GT-S620", 0x8B },
{"GT-S50", 0x00 },
{"GT-S80", 0x00 },
{"PID 0851", 0x98 },
{"PID 084D", 0x99 },
{"PID 084F", 0x9A },
{"PID 0854", 0x9B },
{"PID 0856", 0x9C },
{ } /* terminator */
};

Wyświetl plik

@ -20,6 +20,7 @@
#include "sane/config.h" #include "sane/config.h"
#include <byteorder.h> #include <byteorder.h>
#include <math.h>
#include "epson2.h" #include "epson2.h"
#include "epson2-io.h" #include "epson2-io.h"
@ -125,17 +126,158 @@ esci_set_scan_area(Epson_Scanner * s, int x, int y, int width, int height)
return e2_cmd_simple(s, params, 8); return e2_cmd_simple(s, params, 8);
} }
static int
get_roundup_index(double frac[], int n)
{
int i, index = -1;
double max_val = 0.0;
for (i = 0; i < n; i++) {
if (frac[i] < 0)
continue;
if (max_val < frac[i]) {
index = i;
max_val = frac[i];
}
}
return index;
}
static int
get_rounddown_index(double frac[], int n)
{
int i, index = -1;
double min_val = 1.0;
for (i = 0; i < n; i++) {
if (frac[i] > 0)
continue;
if (min_val > frac[i]) {
index = i;
min_val = frac[i];
}
}
return index;
}
static unsigned char
int2cpt(int val)
{
if (val >= 0) {
if (val > 127)
val = 127;
return (unsigned char) val;
} else {
val = -val;
if (val > 127)
val = 127;
return (unsigned char) (0x80 | val);
}
}
static void
round_cct(double org_cct[], int rnd_cct[])
{
int loop = 0;
int i, j, sum[3];
double mult_cct[9], frac[9];
for (i = 0; i < 9; i++) {
mult_cct[i] = org_cct[i] * 32;
rnd_cct[i] = (int) floor(mult_cct[i] + 0.5);
}
do {
for (i = 0; i < 3; i++) {
int k = i * 3;
if ((rnd_cct[k] == 11) &&
(rnd_cct[k] == rnd_cct[k + 1]) &&
(rnd_cct[k] == rnd_cct[k + 2])) {
rnd_cct[k + i]--;
mult_cct[k + i] = rnd_cct[k + i];
}
}
for (i = 0; i < 3; i++) {
int k = i * 3;
for (sum[i] = j = 0; j < 3; j++)
sum[i] += rnd_cct[k + j];
}
for (i = 0; i < 9; i++)
frac[i] = mult_cct[i] - rnd_cct[i];
for (i = 0; i < 3; i++) {
int k = i * 3;
if (sum[i] < 32) {
int index = get_roundup_index(&frac[k], 3);
if (index != -1) {
rnd_cct[k + index]++;
mult_cct[k + index] = rnd_cct[k + index];
sum[i]++;
}
} else if (sum[i] > 32) {
int index = get_rounddown_index(&frac[k], 3);
if (index != -1) {
rnd_cct[k + index]--;
mult_cct[k + index] = rnd_cct[k + index];
sum[i]--;
}
}
}
}
while ((++loop < 2)
&& ((sum[0] != 32) || (sum[1] != 32) || (sum[2] != 32)));
}
static void
profile_to_colorcoeff(double *profile, unsigned char *color_coeff)
{
int cc_idx[] = { 4, 1, 7, 3, 0, 6, 5, 2, 8 };
int i, color_table[9];
round_cct(profile, color_table);
for (i = 0; i < 9; i++)
color_coeff[i] = int2cpt(color_table[cc_idx[i]]);
}
/* /*
* Sends the "set color correction coefficients" command with the * Sends the "set color correction coefficients" command with the
* currently selected parameters to the scanner. * currently selected parameters to the scanner.
*/ */
SANE_Status SANE_Status
esci_set_color_correction_coefficients(Epson_Scanner * s) esci_set_color_correction_coefficients(Epson_Scanner * s, SANE_Word *table)
{ {
SANE_Status status; SANE_Status status;
unsigned char params[2]; unsigned char params[2];
signed char cct[9]; unsigned char data[9];
double cct[9];
DBG(8, "%s\n", __func__); DBG(8, "%s\n", __func__);
if (!s->hw->cmd->set_color_correction_coefficients) { if (!s->hw->cmd->set_color_correction_coefficients) {
@ -150,21 +292,23 @@ esci_set_color_correction_coefficients(Epson_Scanner * s)
if (status != SANE_STATUS_GOOD) if (status != SANE_STATUS_GOOD)
return status; return status;
cct[0] = s->val[OPT_CCT_1].w; cct[0] = SANE_UNFIX(table[0]);
cct[1] = s->val[OPT_CCT_2].w; cct[1] = SANE_UNFIX(table[1]);
cct[2] = s->val[OPT_CCT_3].w; cct[2] = SANE_UNFIX(table[2]);
cct[3] = s->val[OPT_CCT_4].w; cct[3] = SANE_UNFIX(table[3]);
cct[4] = s->val[OPT_CCT_5].w; cct[4] = SANE_UNFIX(table[4]);
cct[5] = s->val[OPT_CCT_6].w; cct[5] = SANE_UNFIX(table[5]);
cct[6] = s->val[OPT_CCT_7].w; cct[6] = SANE_UNFIX(table[6]);
cct[7] = s->val[OPT_CCT_8].w; cct[7] = SANE_UNFIX(table[7]);
cct[8] = s->val[OPT_CCT_9].w; cct[8] = SANE_UNFIX(table[8]);
profile_to_colorcoeff(cct, data);
DBG(11, "%s: %d,%d,%d %d,%d,%d %d,%d,%d\n", __func__, DBG(11, "%s: %d,%d,%d %d,%d,%d %d,%d,%d\n", __func__,
cct[0], cct[1], cct[2], cct[3], data[0] , data[1], data[2], data[3],
cct[4], cct[5], cct[6], cct[7], cct[8]); data[4], data[5], data[6], data[7], data[8]);
return e2_cmd_simple(s, params, 9); return e2_cmd_simple(s, data, 9);
} }
SANE_Status SANE_Status

Wyświetl plik

@ -39,7 +39,7 @@ SANE_Status esci_set_zoom(Epson_Scanner * s, unsigned char x, unsigned char y);
SANE_Status esci_set_resolution(Epson_Scanner * s, int x, int y); SANE_Status esci_set_resolution(Epson_Scanner * s, int x, int y);
SANE_Status esci_set_scan_area(Epson_Scanner * s, int x, int y, int width, SANE_Status esci_set_scan_area(Epson_Scanner * s, int x, int y, int width,
int height); int height);
SANE_Status esci_set_color_correction_coefficients(Epson_Scanner * s); SANE_Status esci_set_color_correction_coefficients(Epson_Scanner * s, SANE_Word *table);
SANE_Status esci_set_gamma_table(Epson_Scanner * s); SANE_Status esci_set_gamma_table(Epson_Scanner * s);
SANE_Status esci_request_status(SANE_Handle handle, unsigned char *scanner_status); SANE_Status esci_request_status(SANE_Handle handle, unsigned char *scanner_status);

Wyświetl plik

@ -19,12 +19,10 @@
#include "sane/config.h" #include "sane/config.h"
#include <stdlib.h> /* malloc */
#include <unistd.h> /* sleep */ #include <unistd.h> /* sleep */
#include <sys/select.h> #include <sys/select.h>
#include <stdio.h>
#include "byteorder.h" #include "byteorder.h"
@ -34,107 +32,68 @@
#include "epson2-io.h" #include "epson2-io.h"
#include "epson2-commands.h" #include "epson2-commands.h"
static EpsonCmdRec epson_cmd[] = {
/* /*
* request identity * request identity
* | request identity2 * | request identity2
* | | request status * | | request status
* | | | request command parameter * | | | request condition
* | | | | set color mode * | | | | set color mode
* | | | | | start scanning * | | | | | start scanning
* | | | | | | set data format * | | | | | | set data format
* | | | | | | | set resolution * | | | | | | | set resolution
* | | | | | | | | set zoom * | | | | | | | | set zoom
* | | | | | | | | | set scan area * | | | | | | | | | set scan area
* | | | | | | | | | | set brightness * | | | | | | | | | | set brightness
* | | | | | | | | | | | set gamma * | | | | | | | | | | | set gamma
* | | | | | | | | | | | | set halftoning * | | | | | | | | | | | | set halftoning
* | | | | | | | | | | | | | set color correction * | | | | | | | | | | | | | set color correction
* | | | | | | | | | | | | | | initialize scanner * | | | | | | | | | | | | | | initialize scanner
* | | | | | | | | | | | | | | | set speed * | | | | | | | | | | | | | | | set speed
* | | | | | | | | | | | | | | | | set lcount * | | | | | | | | | | | | | | | | set lcount
* | | | | | | | | | | | | | | | | | mirror image * | | | | | | | | | | | | | | | | | mirror image
* | | | | | | | | | | | | | | | | | | set gamma table * | | | | | | | | | | | | | | | | | | set gamma table
* | | | | | | | | | | | | | | | | | | | set outline emphasis * | | | | | | | | | | | | | | | | | | | set outline emphasis
* | | | | | | | | | | | | | | | | | | | | set dither * | | | | | | | | | | | | | | | | | | | | set dither
* | | | | | | | | | | | | | | | | | | | | | set color correction coefficients * | | | | | | | | | | | | | | | | | | | | | set color correction coefficients
* | | | | | | | | | | | | | | | | | | | | | | request extended status * | | | | | | | | | | | | | | | | | | | | | | request extension status
* | | | | | | | | | | | | | | | | | | | | | | | control an extension * | | | | | | | | | | | | | | | | | | | | | | | control an extension
* | | | | | | | | | | | | | | | | | | | | | | | | forward feed / eject * | | | | | | | | | | | | | | | | | | | | | | | | forward feed / eject
* | | | | | | | | | | | | | | | | | | | | | | | | | feed * | | | | | | | | | | | | | | | | | | | | | | | | | feed
* | | | | | | | | | | | | | | | | | | | | | | | | | | request push button status * | | | | | | | | | | | | | | | | | | | | | | | | | | request push button status
* | | | | | | | | | | | | | | | | | | | | | | | | | | | control auto area segmentation * | | | | | | | | | | | | | | | | | | | | | | | | | | | control auto area segmentation
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | set film type * | | | | | | | | | | | | | | | | | | | | | | | | | | | | set film type
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set exposure time * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set exposure time
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set bay * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set bay
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set threshold * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set threshold
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set focus position * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set focus position
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request focus position * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request focus position
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request extended identity * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request extended identity
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request scanner status * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request scanner status
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
*/ */
{"A1", 'I', 0x0, 'F', 'S', 0x0, 'G', 0x0, 'R', 0x0, 'A', 0x0,
{-0, 0, 0}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, static struct EpsonCmd epson_cmd[] = {
0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, {"A1",'I', 0 ,'F','S', 0 ,'G', 0 ,'R', 0 ,'A', 0 ,{ 0, 0, 0}, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
0x0, 0x0, 0x0, 0x0, 0x0}, {"A2",'I', 0 ,'F','S', 0 ,'G','D','R','H','A','L',{-3, 3, 0},'Z','B', 0 ,'@', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
{"A2", 'I', 0x0, 'F', 'S', 0x0, 'G', 'D', 'R', 'H', 'A', 'L', {"B1",'I', 0 ,'F','S','C','G','D','R', 0 ,'A', 0 ,{ 0, 0, 0}, 0 ,'B', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
{-3, 3, 0}, 'Z', 'B', 0x0, '@', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {"B2",'I', 0 ,'F','S','C','G','D','R','H','A','L',{-3, 3, 0},'Z','B', 0 ,'@', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
0x0, 0x0, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {"B3",'I', 0 ,'F','S','C','G','D','R','H','A','L',{-3, 3, 0},'Z','B','M','@', 0 , 0 , 0 , 0 , 0 , 0 ,'m','f','e', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
0x0}, {"B4",'I', 0 ,'F','S','C','G','D','R','H','A','L',{-3, 3, 0},'Z','B','M','@','g','d', 0 ,'z','Q','b','m','f','e', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
{"B1", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 0x0, 'A', 0x0, {"B5",'I', 0 ,'F','S','C','G','D','R','H','A','L',{-3, 3, 0},'Z','B','M','@','g','d','K','z','Q','b','m','f','e', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
{-0, 0, 0}, 0x0, 'B', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {"B6",'I', 0 ,'F','S','C','G','D','R','H','A','L',{-3, 3, 0},'Z','B','M','@','g','d','K','z','Q','b','m','f','e', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
0x0, 0x0, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {"B7",'I', 0 ,'F','S','C','G','D','R','H','A','L',{-4, 3, 0},'Z','B','M','@','g','d','K','z','Q','b','m','f','e','\f', 0 ,'!','s','N', 0 , 0 ,'t', 0 , 0 ,'I','F'},
0x0}, {"B8",'I', 0 ,'F','S','C','G','D','R','H','A','L',{-4, 3, 0},'Z','B','M','@','g','d','K','z','Q','b','m','f','e','\f', 0x19,'!','s','N', 0 , 0 ,'t','p','q','I','F'},
{"B2", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', /* XXX 'f' probably not supported on F5 */
{-3, 3, 0}, 'Z', 'B', 0x0, '@', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {"F5",'I', 0 ,'F','S','C','G','D','R','H','A','L',{-3, 3, 0},'Z', 0 ,'M','@','g','d','K','z','Q', 0 ,'m','f','e','\f', 0 , 0 , 0 ,'N','T','P', 0 , 0 , 0 , 0 , 0 },
0x0, 0x0, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {"D1",'I','i','F', 0 ,'C','G','D','R', 0 ,'A', 0 ,{ 0, 0, 0},'Z', 0 , 0 ,'@','g','d', 0 ,'z', 0 , 0 ,'m','f', 0 , 0 , 0 ,'!', 0 , 0 , 0 , 0 ,'t', 0 , 0 , 0 , 0 },
0x0}, {"D2",'I','i','F', 0 ,'C','G','D','R', 0 ,'A', 0 ,{ 0, 0, 0},'Z', 0 , 0 ,'@','g','d', 0 ,'z', 0 , 0 ,'m','f','e', 0 , 0 ,'!', 0 ,'N', 0 , 0 ,'t', 0 , 0 , 0 , 0 },
{"B3", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {"D7",'I','i','F', 0 ,'C','G','D','R', 0 ,'A', 0 ,{ 0, 0, 0},'Z', 0 , 0 ,'@','g','d', 0 ,'z', 0 , 0 , 0 ,'f','e','\f', 0 ,'!', 0 ,'N', 0 , 0 ,'t', 0 , 0 , 0 , 0 },
{-3, 3, 0}, 'Z', 'B', 'M', '@', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 'm', {"D8",'I','i','F', 0 ,'C','G','D','R', 0 ,'A', 0 ,{ 0, 0, 0},'Z', 0 , 0 ,'@','g','d', 0 ,'z', 0 , 0 ,'0','f','e','\f', 0 ,'!', 0 ,'N', 0 , 0 ,'t', 0 , 0 , 0 , 0 },
'f', 'e', 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0},
{"B4", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L',
{-3, 3, 0}, 'Z', 'B', 'M', '@', 'g', 'd', 0x0, 'z', 'Q', 'b', 'm',
'f', 'e', 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0},
{"B5", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L',
{-3, 3, 0}, 'Z', 'B', 'M', '@', 'g', 'd', 'K', 'z', 'Q', 'b', 'm',
'f', 'e', 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0},
{"B6", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L',
{-3, 3, 0}, 'Z', 'B', 'M', '@', 'g', 'd', 'K', 'z', 'Q', 'b', 'm',
'f', 'e', 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0},
{"B7", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L',
{-4, 3, 0}, 'Z', 'B', 'M', '@', 'g', 'd', 'K', 'z', 'Q', 'b', 'm',
'f', 'e', '\f', 0x00, '!', 's', 'N', 0x0, 0x0, 't', 0x0, 0x0, 'I',
'F'},
{"B8", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L',
{-4, 3, 0}, 'Z', 'B', 'M', '@', 'g', 'd', 'K', 'z', 'Q', 'b', 'm',
'f', 'e', '\f', 0x19, '!', 's', 'N', 0x0, 0x0, 0x0, 'p', 'q', 'I',
'F'},
{"F5", 'I', 0x0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L',
{-3, 3, 0}, 'Z', 0x0, 'M', '@', 'g', 'd', 'K', 'z', 'Q', 0x0, 'm',
0x0, 'e', '\f', 0x00, 0x0, 0x0, 'N', 'T', 'P', 0x0, 0x0, 0x0, 0x0,
0x0},
{"D1", 'I', 'i', 'F', 0x0, 'C', 'G', 'D', 'R', 0x0, 'A', 0x0,
{-0, 0, 0}, 'Z', 0x0, 0x0, '@', 'g', 'd', 0x0, 'z', 0x0, 0x0, 0x0,
'f', 0x0, 0x00, 0x00, '!', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0},
{"D7", 'I', 'i', 'F', 0x0, 'C', 'G', 'D', 'R', 0x0, 'A', 0x0,
{-0, 0, 0}, 'Z', 0x0, 0x0, '@', 'g', 'd', 0x0, 'z', 0x0, 0x0, 0x0,
'f', 0x0, 0x00, 0x00, '!', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0},
{"D8", 'I', 'i', 'F', 0x0, 'C', 'G', 'D', 'R', 0x0, 'A', 0x0,
{-0, 0, 0}, 'Z', 0x0, 0x0, '@', 'g', 'd', 0x0, 'z', 0x0, 0x0, 0x0,
'f', 'e', 0x00, 0x00, '!', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0},
}; };
extern struct mode_param mode_params[]; extern struct mode_param mode_params[];
/* Define the different scan sources */ /* Define the different scan sources */
@ -156,10 +115,10 @@ static int film_params[] = { 0, 1, 2, 3 };
extern const int halftone_params[]; extern const int halftone_params[];
static const int dropout_params[] = { static const int dropout_params[] = {
0x00, /* none */ 0x00, /* none */
0x10, /* red */ 0x10, /* red */
0x20, /* green */ 0x20, /* green */
0x30 /* blue */ 0x30 /* blue */
}; };
/* /*
@ -169,17 +128,15 @@ static const int dropout_params[] = {
* and one array to mark the user defined color correction (color_userdefined[]). * and one array to mark the user defined color correction (color_userdefined[]).
*/ */
static const int color_params[] = { static const int color_params[] = {
0x00, 0x00, /* None */
0x01, 0x01, /* Auto */
0x01, /* User defined */
0x10, 0x10,
0x20, 0x20,
0x40, 0x40,
0x80 0x80
}; };
static const SANE_Range outline_emphasis_range = { -2, 2, 0 };
void void
e2_dev_init(Epson_Device *dev, const char *devname, int conntype) e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
{ {
@ -187,6 +144,8 @@ e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
dev->model = NULL; dev->model = NULL;
dev->connection = conntype; dev->connection = conntype;
dev->model_id = 0;
dev->sane.name = devname; dev->sane.name = devname;
dev->sane.model = NULL; dev->sane.model = NULL;
@ -201,6 +160,8 @@ e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
dev->need_color_reorder = SANE_FALSE; dev->need_color_reorder = SANE_FALSE;
dev->need_double_vertical = SANE_FALSE; dev->need_double_vertical = SANE_FALSE;
dev->cct_profile = &epson_cct_profiles[0]; /* default profile */
dev->cmd = &epson_cmd[EPSON_LEVEL_DEFAULT]; dev->cmd = &epson_cmd[EPSON_LEVEL_DEFAULT];
/* Change default level when using a network connection */ /* Change default level when using a network connection */
@ -217,6 +178,26 @@ e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
SANE_Status SANE_Status
e2_dev_post_init(struct Epson_Device *dev) e2_dev_post_init(struct Epson_Device *dev)
{ {
int i;
/* find cct model id */
for (i = 0; epson_cct_models[i].name != NULL; i++) {
if (strcmp(epson_cct_models[i].name, dev->model) == 0) {
dev->model_id = epson_cct_models[i].id;
break;
}
}
/* find cct profile */
for (i = 0; epson_cct_profiles[i].model != 0xFF; i++) {
if (epson_cct_profiles[i].model == dev->model_id) {
dev->cct_profile = &epson_cct_profiles[i];
break;
}
}
DBG(1, "CCT model id is 0x%02x, profile offset %d\n", dev->model_id, i);
/* If we have been unable to obtain supported resolutions /* If we have been unable to obtain supported resolutions
* due to the fact we are on the network transport, * due to the fact we are on the network transport,
* add some convenient ones * add some convenient ones

Wyświetl plik

@ -197,6 +197,7 @@ static const SANE_String_Const dropout_list[] = {
static const SANE_Bool color_userdefined[] = { static const SANE_Bool color_userdefined[] = {
SANE_FALSE, SANE_FALSE,
SANE_TRUE, SANE_TRUE,
SANE_TRUE,
SANE_FALSE, SANE_FALSE,
SANE_FALSE, SANE_FALSE,
SANE_FALSE, SANE_FALSE,
@ -204,7 +205,8 @@ static const SANE_Bool color_userdefined[] = {
}; };
static const SANE_String_Const color_list[] = { static const SANE_String_Const color_list[] = {
SANE_I18N("No Correction"), SANE_I18N("None"),
SANE_I18N("Automatic"),
SANE_I18N("User defined"), SANE_I18N("User defined"),
SANE_I18N("Impact-dot printers"), SANE_I18N("Impact-dot printers"),
SANE_I18N("Thermal printers"), SANE_I18N("Thermal printers"),
@ -213,6 +215,21 @@ static const SANE_String_Const color_list[] = {
NULL NULL
}; };
/* cct profile has precedence over normal color correction */
static const SANE_String_Const cct_mode_list[] = {
"Automatic",
"Reflective",
"Colour negatives",
"Monochrome negatives",
"Colour positives",
NULL
};
enum {
CCT_AUTO, CCT_REFLECTIVE, CCT_COLORNEG, CCT_MONONEG,
CCT_COLORPOS
};
/* /*
* Gamma correction: * Gamma correction:
* The A and B level scanners work differently than the D level scanners, * The A and B level scanners work differently than the D level scanners,
@ -282,6 +299,7 @@ static const SANE_String_Const bay_list[] = {
/* minimum, maximum, quantization */ /* minimum, maximum, quantization */
static const SANE_Range u8_range = { 0, 255, 0 }; static const SANE_Range u8_range = { 0, 255, 0 };
static const SANE_Range s8_range = { -127, 127, 0 }; static const SANE_Range s8_range = { -127, 127, 0 };
static const SANE_Range fx_range = { SANE_FIX(-2.0), SANE_FIX(2.0), 0 };
static const SANE_Range outline_emphasis_range = { -2, 2, 0 }; static const SANE_Range outline_emphasis_range = { -2, 2, 0 };
@ -907,7 +925,7 @@ sane_get_devices(const SANE_Device ***device_list, SANE_Bool __sane_unused__ loc
DBG(5, "%s - results:\n", __func__); DBG(5, "%s - results:\n", __func__);
for (i = 0, dev = first_dev; i < num_devices; dev = dev->next, i++) { for (i = 0, dev = first_dev; i < num_devices && dev; dev = dev->next, i++) {
DBG(1, " %d (%d): %s\n", i, dev->connection, dev->model); DBG(1, " %d (%d): %s\n", i, dev->connection, dev->model);
devlist[i] = &dev->sane; devlist[i] = &dev->sane;
} }
@ -924,7 +942,7 @@ init_options(Epson_Scanner *s)
{ {
int i; int i;
for (i = 0; i < NUM_OPTIONS; ++i) { for (i = 0; i < NUM_OPTIONS; i++) {
s->opt[i].size = sizeof(SANE_Word); s->opt[i].size = sizeof(SANE_Word);
s->opt[i].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT; s->opt[i].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
} }
@ -1134,16 +1152,14 @@ init_options(Epson_Scanner *s)
s->opt[OPT_COLOR_CORRECTION].name = "color-correction"; s->opt[OPT_COLOR_CORRECTION].name = "color-correction";
s->opt[OPT_COLOR_CORRECTION].title = SANE_I18N("Color correction"); s->opt[OPT_COLOR_CORRECTION].title = SANE_I18N("Color correction");
s->opt[OPT_COLOR_CORRECTION].desc = s->opt[OPT_COLOR_CORRECTION].desc =
SANE_I18N SANE_I18N("Sets the color correction table for the selected output device.");
("Sets the color correction table for the selected output device.");
s->opt[OPT_COLOR_CORRECTION].type = SANE_TYPE_STRING; s->opt[OPT_COLOR_CORRECTION].type = SANE_TYPE_STRING;
s->opt[OPT_COLOR_CORRECTION].size = 32; s->opt[OPT_COLOR_CORRECTION].size = max_string_size(color_list);
s->opt[OPT_COLOR_CORRECTION].cap |= SANE_CAP_ADVANCED; s->opt[OPT_COLOR_CORRECTION].cap |= SANE_CAP_ADVANCED;
s->opt[OPT_COLOR_CORRECTION].constraint_type = s->opt[OPT_COLOR_CORRECTION].constraint_type = SANE_CONSTRAINT_STRING_LIST;
SANE_CONSTRAINT_STRING_LIST;
s->opt[OPT_COLOR_CORRECTION].constraint.string_list = color_list; s->opt[OPT_COLOR_CORRECTION].constraint.string_list = color_list;
s->val[OPT_COLOR_CORRECTION].w = 5; /* scanner default: CRT monitors */ s->val[OPT_COLOR_CORRECTION].w = 0;
if (!s->hw->cmd->set_color_correction) if (!s->hw->cmd->set_color_correction)
s->opt[OPT_COLOR_CORRECTION].cap |= SANE_CAP_INACTIVE; s->opt[OPT_COLOR_CORRECTION].cap |= SANE_CAP_INACTIVE;
@ -1173,25 +1189,7 @@ init_options(Epson_Scanner *s)
if (!s->hw->cmd->set_threshold) if (!s->hw->cmd->set_threshold)
s->opt[OPT_THRESHOLD].cap |= SANE_CAP_INACTIVE; s->opt[OPT_THRESHOLD].cap |= SANE_CAP_INACTIVE;
s->opt[OPT_CCT_GROUP].title = /*
SANE_I18N("Color correction coefficients");
s->opt[OPT_CCT_GROUP].desc =
SANE_I18N("Matrix multiplication of RGB");
s->opt[OPT_CCT_GROUP].type = SANE_TYPE_GROUP;
s->opt[OPT_CCT_GROUP].cap = SANE_CAP_ADVANCED;
/* color correction coefficients */
s->opt[OPT_CCT_1].name = "cct-1";
s->opt[OPT_CCT_2].name = "cct-2";
s->opt[OPT_CCT_3].name = "cct-3";
s->opt[OPT_CCT_4].name = "cct-4";
s->opt[OPT_CCT_5].name = "cct-5";
s->opt[OPT_CCT_6].name = "cct-6";
s->opt[OPT_CCT_7].name = "cct-7";
s->opt[OPT_CCT_8].name = "cct-8";
s->opt[OPT_CCT_9].name = "cct-9";
s->opt[OPT_CCT_1].title = SANE_I18N("Green"); s->opt[OPT_CCT_1].title = SANE_I18N("Green");
s->opt[OPT_CCT_2].title = SANE_I18N("Shift green to red"); s->opt[OPT_CCT_2].title = SANE_I18N("Shift green to red");
s->opt[OPT_CCT_3].title = SANE_I18N("Shift green to blue"); s->opt[OPT_CCT_3].title = SANE_I18N("Shift green to blue");
@ -1215,72 +1213,44 @@ init_options(Epson_Scanner *s)
SANE_I18N("Adds to green based on blue level"); SANE_I18N("Adds to green based on blue level");
s->opt[OPT_CCT_8].desc = SANE_I18N("Adds to red based on blue level"); s->opt[OPT_CCT_8].desc = SANE_I18N("Adds to red based on blue level");
s->opt[OPT_CCT_9].desc = SANE_I18N("Controls blue level"); s->opt[OPT_CCT_9].desc = SANE_I18N("Controls blue level");
*/
s->opt[OPT_CCT_1].type = SANE_TYPE_INT;
s->opt[OPT_CCT_2].type = SANE_TYPE_INT;
s->opt[OPT_CCT_3].type = SANE_TYPE_INT;
s->opt[OPT_CCT_4].type = SANE_TYPE_INT;
s->opt[OPT_CCT_5].type = SANE_TYPE_INT;
s->opt[OPT_CCT_6].type = SANE_TYPE_INT;
s->opt[OPT_CCT_7].type = SANE_TYPE_INT;
s->opt[OPT_CCT_8].type = SANE_TYPE_INT;
s->opt[OPT_CCT_9].type = SANE_TYPE_INT;
s->opt[OPT_CCT_1].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_2].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_3].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_4].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_5].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_6].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_7].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_8].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_9].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_1].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_2].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_3].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_4].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_5].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_6].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_7].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_8].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_9].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_1].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_2].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_3].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_4].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_5].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_6].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_7].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_8].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_9].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_1].constraint.range = &s8_range;
s->opt[OPT_CCT_2].constraint.range = &s8_range;
s->opt[OPT_CCT_3].constraint.range = &s8_range;
s->opt[OPT_CCT_4].constraint.range = &s8_range;
s->opt[OPT_CCT_5].constraint.range = &s8_range;
s->opt[OPT_CCT_6].constraint.range = &s8_range;
s->opt[OPT_CCT_7].constraint.range = &s8_range;
s->opt[OPT_CCT_8].constraint.range = &s8_range;
s->opt[OPT_CCT_9].constraint.range = &s8_range;
s->val[OPT_CCT_1].w = 32;
s->val[OPT_CCT_2].w = 0;
s->val[OPT_CCT_3].w = 0;
s->val[OPT_CCT_4].w = 0;
s->val[OPT_CCT_5].w = 32;
s->val[OPT_CCT_6].w = 0;
s->val[OPT_CCT_7].w = 0;
s->val[OPT_CCT_8].w = 0;
s->val[OPT_CCT_9].w = 32;
/* "Advanced" group: */ /* "Advanced" group: */
s->opt[OPT_ADVANCED_GROUP].title = SANE_I18N("Advanced"); s->opt[OPT_ADVANCED_GROUP].title = SANE_I18N("Advanced");
s->opt[OPT_ADVANCED_GROUP].desc = ""; s->opt[OPT_ADVANCED_GROUP].desc = "";
s->opt[OPT_ADVANCED_GROUP].type = SANE_TYPE_GROUP; s->opt[OPT_ADVANCED_GROUP].type = SANE_TYPE_GROUP;
s->opt[OPT_ADVANCED_GROUP].cap = SANE_CAP_ADVANCED; s->opt[OPT_ADVANCED_GROUP].cap |= SANE_CAP_ADVANCED;
/* "Color correction" group: */
s->opt[OPT_CCT_GROUP].title = SANE_I18N("Color correction");
s->opt[OPT_CCT_GROUP].desc = "";
s->opt[OPT_CCT_GROUP].type = SANE_TYPE_GROUP;
s->opt[OPT_CCT_GROUP].cap |= SANE_CAP_ADVANCED;
s->opt[OPT_CCT_MODE].name = "cct-mode";
s->opt[OPT_CCT_MODE].title = "CCT Mode";
s->opt[OPT_CCT_MODE].desc = "Color correction profile mode";
s->opt[OPT_CCT_MODE].type = SANE_TYPE_STRING;
s->opt[OPT_CCT_MODE].cap |= SANE_CAP_ADVANCED;
s->opt[OPT_CCT_MODE].size = max_string_size(cct_mode_list);
s->opt[OPT_CCT_MODE].constraint_type = SANE_CONSTRAINT_STRING_LIST;
s->opt[OPT_CCT_MODE].constraint.string_list = cct_mode_list;
s->val[OPT_CCT_MODE].w = CCT_AUTO;
s->opt[OPT_CCT_PROFILE].name = "cct-profile";
s->opt[OPT_CCT_PROFILE].title = "CCT Profile";
s->opt[OPT_CCT_PROFILE].desc = "Color correction profile data";
s->opt[OPT_CCT_PROFILE].type = SANE_TYPE_FIXED;
s->opt[OPT_CCT_PROFILE].cap |= SANE_CAP_ADVANCED;
s->opt[OPT_CCT_PROFILE].unit = SANE_UNIT_NONE;
s->opt[OPT_CCT_PROFILE].constraint_type = SANE_CONSTRAINT_RANGE;
s->opt[OPT_CCT_PROFILE].constraint.range = &fx_range;
s->opt[OPT_CCT_PROFILE].size = 9 * sizeof(SANE_Word);
s->val[OPT_CCT_PROFILE].wa = s->cct_table;
/* if (!s->hw->cmd->set_color_correction)
s->opt[OPT_FILM_TYPE].cap |= SANE_CAP_INACTIVE;
*/
/* mirror */ /* mirror */
s->opt[OPT_MIRROR].name = "mirror"; s->opt[OPT_MIRROR].name = "mirror";
@ -1663,6 +1633,7 @@ getvalue(SANE_Handle handle, SANE_Int option, void *value)
case OPT_GAMMA_VECTOR_R: case OPT_GAMMA_VECTOR_R:
case OPT_GAMMA_VECTOR_G: case OPT_GAMMA_VECTOR_G:
case OPT_GAMMA_VECTOR_B: case OPT_GAMMA_VECTOR_B:
case OPT_CCT_PROFILE:
memcpy(value, sval->wa, sopt->size); memcpy(value, sval->wa, sopt->size);
break; break;
@ -1678,15 +1649,8 @@ getvalue(SANE_Handle handle, SANE_Int option, void *value)
case OPT_BRIGHTNESS: case OPT_BRIGHTNESS:
case OPT_SHARPNESS: case OPT_SHARPNESS:
case OPT_AUTO_EJECT: case OPT_AUTO_EJECT:
case OPT_CCT_1: /* case OPT_CCT_1:
case OPT_CCT_2: */
case OPT_CCT_3:
case OPT_CCT_4:
case OPT_CCT_5:
case OPT_CCT_6:
case OPT_CCT_7:
case OPT_CCT_8:
case OPT_CCT_9:
case OPT_THRESHOLD: case OPT_THRESHOLD:
case OPT_BIT_DEPTH: case OPT_BIT_DEPTH:
case OPT_WAIT_FOR_BUTTON: case OPT_WAIT_FOR_BUTTON:
@ -1694,6 +1658,7 @@ getvalue(SANE_Handle handle, SANE_Int option, void *value)
break; break;
case OPT_MODE: case OPT_MODE:
case OPT_CCT_MODE:
case OPT_ADF_MODE: case OPT_ADF_MODE:
case OPT_HALFTONE: case OPT_HALFTONE:
case OPT_DROPOUT: case OPT_DROPOUT:
@ -1865,8 +1830,8 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
Option_Value *sval = &(s->val[option]); Option_Value *sval = &(s->val[option]);
SANE_Status status; SANE_Status status;
const SANE_String_Const *optval; const SANE_String_Const *optval = NULL;
int optindex; int optindex = 0;
SANE_Bool reload = SANE_FALSE; SANE_Bool reload = SANE_FALSE;
DBG(17, "%s: option = %d, value = %p\n", __func__, option, value); DBG(17, "%s: option = %d, value = %p\n", __func__, option, value);
@ -1880,16 +1845,9 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
DBG(17, "%s: constrained val = %d\n", __func__, DBG(17, "%s: constrained val = %d\n", __func__,
*(SANE_Word *) value); *(SANE_Word *) value);
s->option_has_changed = SANE_TRUE;
optval = NULL;
optindex = 0;
if (sopt->constraint_type == SANE_CONSTRAINT_STRING_LIST) { if (sopt->constraint_type == SANE_CONSTRAINT_STRING_LIST) {
optval = search_string_list(sopt->constraint.string_list, optval = search_string_list(sopt->constraint.string_list,
(char *) value); (char *) value);
if (optval == NULL) if (optval == NULL)
return SANE_STATUS_INVAL; return SANE_STATUS_INVAL;
optindex = optval - sopt->constraint.string_list; optindex = optval - sopt->constraint.string_list;
@ -1900,21 +1858,12 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
case OPT_GAMMA_VECTOR_R: case OPT_GAMMA_VECTOR_R:
case OPT_GAMMA_VECTOR_G: case OPT_GAMMA_VECTOR_G:
case OPT_GAMMA_VECTOR_B: case OPT_GAMMA_VECTOR_B:
case OPT_CCT_PROFILE:
memcpy(sval->wa, value, sopt->size); /* Word arrays */ memcpy(sval->wa, value, sopt->size); /* Word arrays */
break; break;
case OPT_CCT_1: case OPT_CCT_MODE:
case OPT_CCT_2: case OPT_ADF_MODE:
case OPT_CCT_3:
case OPT_CCT_4:
case OPT_CCT_5:
case OPT_CCT_6:
case OPT_CCT_7:
case OPT_CCT_8:
case OPT_CCT_9:
sval->w = *((SANE_Word *) value); /* Simple values */
break;
case OPT_DROPOUT: case OPT_DROPOUT:
case OPT_FILM_TYPE: case OPT_FILM_TYPE:
case OPT_BAY: case OPT_BAY:
@ -1957,16 +1906,19 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
case OPT_MODE: case OPT_MODE:
{ {
SANE_Bool isColor = mode_params[optindex].color; SANE_Bool isColor = mode_params[optindex].color;
SANE_Bool userDefined = /* SANE_Bool userDefined =
color_userdefined[s->val[OPT_COLOR_CORRECTION].w]; color_userdefined[s->val[OPT_COLOR_CORRECTION].w];
SANE_Bool canCCT = isColor && userDefined; */
sval->w = optindex; sval->w = optindex;
/* halftoning available only on bw scans */
if (s->hw->cmd->set_halftoning != 0) if (s->hw->cmd->set_halftoning != 0)
setOptionState(s, setOptionState(s, mode_params[optindex].depth == 1,
mode_params[optindex].depth == OPT_HALFTONE, &reload);
1, OPT_HALFTONE, &reload);
/* disable dropout on non-color scans */
setOptionState(s, !isColor, OPT_DROPOUT, &reload); setOptionState(s, !isColor, OPT_DROPOUT, &reload);
if (s->hw->cmd->set_color_correction) if (s->hw->cmd->set_color_correction)
@ -1974,24 +1926,9 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
OPT_COLOR_CORRECTION, &reload); OPT_COLOR_CORRECTION, &reload);
if (s->hw->cmd->set_color_correction_coefficients) { if (s->hw->cmd->set_color_correction_coefficients) {
setOptionState(s, isColor /*XXX setOptionState(s, isColor
&& userDefined, OPT_CCT_1, &reload); && userDefined, OPT_CCT_1, &reload);
setOptionState(s, isColor */
&& userDefined, OPT_CCT_2, &reload);
setOptionState(s, isColor
&& userDefined, OPT_CCT_3, &reload);
setOptionState(s, isColor
&& userDefined, OPT_CCT_4, &reload);
setOptionState(s, isColor
&& userDefined, OPT_CCT_5, &reload);
setOptionState(s, isColor
&& userDefined, OPT_CCT_6, &reload);
setOptionState(s, isColor
&& userDefined, OPT_CCT_7, &reload);
setOptionState(s, isColor
&& userDefined, OPT_CCT_8, &reload);
setOptionState(s, isColor
&& userDefined, OPT_CCT_9, &reload);
} }
/* if binary, then disable the bit depth selection */ /* if binary, then disable the bit depth selection */
@ -2015,10 +1952,6 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
break; break;
} }
case OPT_ADF_MODE:
sval->w = optindex;
break;
case OPT_BIT_DEPTH: case OPT_BIT_DEPTH:
sval->w = *((SANE_Word *) value); sval->w = *((SANE_Word *) value);
mode_params[s->val[OPT_MODE].w].depth = sval->w; mode_params[s->val[OPT_MODE].w].depth = sval->w;
@ -2032,18 +1965,10 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
case OPT_COLOR_CORRECTION: case OPT_COLOR_CORRECTION:
{ {
SANE_Bool f = color_userdefined[optindex]; /* SANE_Bool f = color_userdefined[optindex]; */
sval->w = optindex; sval->w = optindex;
setOptionState(s, f, OPT_CCT_1, &reload); /*XXX setOptionState(s, f, OPT_CCT_1, &reload); */
setOptionState(s, f, OPT_CCT_2, &reload);
setOptionState(s, f, OPT_CCT_3, &reload);
setOptionState(s, f, OPT_CCT_4, &reload);
setOptionState(s, f, OPT_CCT_5, &reload);
setOptionState(s, f, OPT_CCT_6, &reload);
setOptionState(s, f, OPT_CCT_7, &reload);
setOptionState(s, f, OPT_CCT_8, &reload);
setOptionState(s, f, OPT_CCT_9, &reload);
break; break;
} }
@ -2241,6 +2166,19 @@ sane_get_parameters(SANE_Handle handle, SANE_Parameters *params)
return SANE_STATUS_GOOD; return SANE_STATUS_GOOD;
} }
static void e2_load_cct_profile(struct Epson_Scanner *s, unsigned int index)
{
s->cct_table[0] = SANE_FIX(s->hw->cct_profile->cct[index][0]);
s->cct_table[1] = SANE_FIX(s->hw->cct_profile->cct[index][1]);
s->cct_table[2] = SANE_FIX(s->hw->cct_profile->cct[index][2]);
s->cct_table[3] = SANE_FIX(s->hw->cct_profile->cct[index][3]);
s->cct_table[4] = SANE_FIX(s->hw->cct_profile->cct[index][4]);
s->cct_table[5] = SANE_FIX(s->hw->cct_profile->cct[index][5]);
s->cct_table[6] = SANE_FIX(s->hw->cct_profile->cct[index][6]);
s->cct_table[7] = SANE_FIX(s->hw->cct_profile->cct[index][7]);
s->cct_table[8] = SANE_FIX(s->hw->cct_profile->cct[index][8]);
}
/* /*
* This function is part of the SANE API and gets called from the front end to * This function is part of the SANE API and gets called from the front end to
* start the scan process. * start the scan process.
@ -2289,9 +2227,26 @@ sane_start(SANE_Handle handle)
return status; return status;
} }
if (s->val[OPT_COLOR_CORRECTION].w == 1) { /* Automatic */
if (0) { /* XXX TPU */
/* XXX check this */
if (s->val[OPT_FILM_TYPE].w == 0)
e2_load_cct_profile(s, CCTP_COLORPOS);
else
e2_load_cct_profile(s, CCTP_COLORNEG);
} else {
e2_load_cct_profile(s, CCTP_REFLECTIVE);
}
}
/* ESC m, user defined color correction */ /* ESC m, user defined color correction */
if (s->val[OPT_COLOR_CORRECTION].w == 1) { if (color_userdefined[s->val[OPT_COLOR_CORRECTION].w]) {
status = esci_set_color_correction_coefficients(s); status = esci_set_color_correction_coefficients(s,
s->cct_table);
if (status != SANE_STATUS_GOOD) if (status != SANE_STATUS_GOOD)
return status; return status;
} }
@ -2304,7 +2259,6 @@ sane_start(SANE_Handle handle)
if (status != SANE_STATUS_GOOD) if (status != SANE_STATUS_GOOD)
return status; return status;
/* /*
status = sane_get_parameters(handle, NULL); status = sane_get_parameters(handle, NULL);
if (status != SANE_STATUS_GOOD) if (status != SANE_STATUS_GOOD)

Wyświetl plik

@ -19,7 +19,7 @@
#define epson2_h #define epson2_h
#undef BACKEND_NAME #undef BACKEND_NAME
#define BACKEND_NAME epson2 #define BACKEND_NAME epson2
#define DEBUG_NOT_STATIC #define DEBUG_NOT_STATIC
#include <sys/ioctl.h> #include <sys/ioctl.h>
@ -36,13 +36,12 @@
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#include <string.h> /* for memset and memcpy */ #include <string.h> /* for memset and memcpy */
#include <stdio.h> #include <stdio.h>
#include "sane/sane.h"
#include "../include/sane/sane.h" #include "sane/sanei_backend.h"
#include "../include/sane/sanei_backend.h" #include "sane/sanei_debug.h"
#include "../include/sane/sanei_debug.h"
#ifdef __GNUC__ #ifdef __GNUC__
#define __func__ __FUNCTION__ #define __func__ __FUNCTION__
@ -51,10 +50,10 @@
/* I cast my vote for C99... :) */ /* I cast my vote for C99... :) */
#endif #endif
#define EPSON2_CONFIG_FILE "epson2.conf" #define EPSON2_CONFIG_FILE "epson2.conf"
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX (1024) #define PATH_MAX (1024)
#endif #endif
#ifndef XtNumber #ifndef XtNumber
@ -67,12 +66,6 @@
#define DEVICE_NAME_LEN (16) /* length of device name in extended status */ #define DEVICE_NAME_LEN (16) /* length of device name in extended status */
/* some string constants that are used in the config file */
#define SANE_EPSON_CONFIG_USB "usb"
#define SANE_EPSON_CONFIG_PIO "pio"
#define SANE_EPSON_CONFIG_NET "net"
/* string constants for GUI elements that are not defined SANE-wide */ /* string constants for GUI elements that are not defined SANE-wide */
#define SANE_NAME_GAMMA_CORRECTION "gamma-correction" #define SANE_NAME_GAMMA_CORRECTION "gamma-correction"
@ -86,14 +79,11 @@
#define SANE_EPSON_WAIT_FOR_BUTTON_TITLE SANE_I18N("Wait for Button") #define SANE_EPSON_WAIT_FOR_BUTTON_TITLE SANE_I18N("Wait for Button")
#define SANE_EPSON_WAIT_FOR_BUTTON_DESC SANE_I18N("After sending the scan command, wait until the button on the scanner is pressed to actually start the scan process."); #define SANE_EPSON_WAIT_FOR_BUTTON_DESC SANE_I18N("After sending the scan command, wait until the button on the scanner is pressed to actually start the scan process.");
/* misc constants */
#define LINES_SHUFFLE_MAX 17 /* 2 x 8 lines plus 1 */ #define LINES_SHUFFLE_MAX 17 /* 2 x 8 lines plus 1 */
#define SANE_EPSON_MAX_RETRIES 14 /* warmup max retry */
#define SANE_EPSON_MAX_RETRIES 120 /* how often do we retry during warmup ? */ #define CMD_SIZE_EXT_STATUS 42
#ifndef MM_PER_INCH
#define MM_PER_INCH 25.4
#endif
/* NOTE: you can find these codes with "man ascii". */ /* NOTE: you can find these codes with "man ascii". */
#define STX 0x02 #define STX 0x02
@ -107,6 +97,8 @@
#define S_ACK "\006" #define S_ACK "\006"
#define S_CAN "\030" #define S_CAN "\030"
/* status bits */
#define STATUS_FER 0x80 /* fatal error */ #define STATUS_FER 0x80 /* fatal error */
#define STATUS_NOT_READY 0x40 /* scanner is in use on another interface */ #define STATUS_NOT_READY 0x40 /* scanner is in use on another interface */
#define STATUS_AREA_END 0x20 /* area end */ #define STATUS_AREA_END 0x20 /* area end */
@ -114,8 +106,6 @@
#define STATUS_EXT_COMMANDS 0x02 /* scanners supports extended commands */ #define STATUS_EXT_COMMANDS 0x02 /* scanners supports extended commands */
#define STATUS_RESERVED 0x01 /* this should be always 0 */ #define STATUS_RESERVED 0x01 /* this should be always 0 */
#define CMD_SIZE_EXT_STATUS 42
#define EXT_STATUS_FER 0x80 /* fatal error */ #define EXT_STATUS_FER 0x80 /* fatal error */
#define EXT_STATUS_FBF 0x40 /* flat bed scanner */ #define EXT_STATUS_FBF 0x40 /* flat bed scanner */
#define EXT_STATUS_ADFT 0x20 /* page type ADF */ #define EXT_STATUS_ADFT 0x20 /* page type ADF */
@ -181,170 +171,197 @@
* scanner with SANE get in touch with me and we can work something out - khk * scanner with SANE get in touch with me and we can work something out - khk
*/ */
#define EPSON_LEVEL_DEFAULT EPSON_LEVEL_B3 #define EPSON_LEVEL_DEFAULT EPSON_LEVEL_B3
typedef struct struct EpsonCmd
{ {
char *level; char *level;
unsigned char request_identity; unsigned char request_identity;
unsigned char request_identity2; /* new request identity command for Dx command level */ unsigned char request_identity2; /* new request identity level Dx */
unsigned char request_status; unsigned char request_status;
unsigned char request_condition; unsigned char request_condition;
unsigned char set_color_mode; unsigned char set_color_mode;
unsigned char start_scanning; unsigned char start_scanning;
unsigned char set_data_format; unsigned char set_data_format;
unsigned char set_resolution; unsigned char set_resolution;
unsigned char set_zoom; unsigned char set_zoom;
unsigned char set_scan_area; unsigned char set_scan_area;
unsigned char set_bright; unsigned char set_bright;
SANE_Range bright_range; SANE_Range bright_range;
unsigned char set_gamma; unsigned char set_gamma;
unsigned char set_halftoning; unsigned char set_halftoning;
unsigned char set_color_correction; unsigned char set_color_correction;
unsigned char initialize_scanner; unsigned char initialize_scanner;
unsigned char set_speed; /* B4 and later */ unsigned char set_speed; /* B4 and later */
unsigned char set_lcount; unsigned char set_lcount;
unsigned char mirror_image; /* B5 and later */ unsigned char mirror_image; /* B5 and later */
unsigned char set_gamma_table; /* B4 and later */ unsigned char set_gamma_table; /* B4 and later */
unsigned char set_outline_emphasis; /* B4 and later */ unsigned char set_outline_emphasis; /* B4 and later */
unsigned char set_dither; /* B4 and later */ unsigned char set_dither; /* B4 and later */
unsigned char set_color_correction_coefficients; /* B3 and later */ unsigned char set_color_correction_coefficients; /* B3 and later */
unsigned char request_extended_status; /* get extended status from scanner */ unsigned char request_extended_status; /* get extended status from scanner */
unsigned char control_an_extension; /* for extension control */ unsigned char control_an_extension; /* for extension control */
unsigned char eject; /* for extension control */ unsigned char eject; /* for extension control */
unsigned char feed; unsigned char feed;
unsigned char request_push_button_status; unsigned char request_push_button_status;
unsigned char control_auto_area_segmentation; unsigned char control_auto_area_segmentation;
unsigned char set_film_type; /* for extension control */ unsigned char set_film_type; /* for extension control */
unsigned char set_exposure_time; /* F5 only */ unsigned char set_exposure_time; /* F5 only */
unsigned char set_bay; /* F5 only */ unsigned char set_bay; /* F5 only */
unsigned char set_threshold; unsigned char set_threshold;
unsigned char set_focus_position; /* B8 only */ unsigned char set_focus_position; /* B8 only */
unsigned char request_focus_position; /* B8 only */ unsigned char request_focus_position; /* B8 only */
unsigned char request_extended_identity; unsigned char request_extended_identity;
unsigned char request_scanner_status; unsigned char request_scanner_status;
} EpsonCmdRec, *EpsonCmd; };
enum enum {
{ OPT_NUM_OPTS = OPT_NUM_OPTS = 0,
0, OPT_MODE_GROUP, OPT_MODE, OPT_BIT_DEPTH, OPT_HALFTONE, OPT_DROPOUT, OPT_MODE_GROUP, OPT_MODE, OPT_BIT_DEPTH, OPT_HALFTONE, OPT_DROPOUT,
OPT_BRIGHTNESS, OPT_SHARPNESS, OPT_GAMMA_CORRECTION, OPT_COLOR_CORRECTION, OPT_BRIGHTNESS, OPT_SHARPNESS, OPT_GAMMA_CORRECTION, OPT_COLOR_CORRECTION,
OPT_RESOLUTION, OPT_THRESHOLD, OPT_ADVANCED_GROUP, OPT_MIRROR, OPT_RESOLUTION, OPT_THRESHOLD, OPT_ADVANCED_GROUP, OPT_MIRROR,
OPT_AAS, OPT_GAMMA_VECTOR_R, OPT_GAMMA_VECTOR_G, OPT_GAMMA_VECTOR_B, OPT_AAS, OPT_GAMMA_VECTOR_R, OPT_GAMMA_VECTOR_G, OPT_GAMMA_VECTOR_B,
OPT_WAIT_FOR_BUTTON, OPT_CCT_GROUP, OPT_CCT_1, OPT_CCT_2, OPT_CCT_3, OPT_WAIT_FOR_BUTTON, OPT_CCT_GROUP, OPT_CCT_MODE, OPT_CCT_PROFILE,
OPT_CCT_4, OPT_CCT_5, OPT_CCT_6, OPT_CCT_7, OPT_CCT_8, OPT_CCT_9, OPT_PREVIEW_GROUP, OPT_PREVIEW, OPT_GEOMETRY_GROUP,
OPT_PREVIEW_GROUP, OPT_PREVIEW, OPT_GEOMETRY_GROUP, OPT_TL_X, OPT_TL_Y, OPT_BR_X, OPT_BR_Y, OPT_EQU_GROUP,
OPT_TL_X, OPT_TL_Y, OPT_BR_X, OPT_BR_Y, OPT_EQU_GROUP, OPT_SOURCE, OPT_AUTO_EJECT, OPT_FILM_TYPE, OPT_FOCUS, OPT_BAY,
OPT_SOURCE, OPT_AUTO_EJECT, OPT_FILM_TYPE, OPT_FOCUS, OPT_BAY, OPT_EJECT, OPT_ADF_MODE, NUM_OPTIONS
OPT_EJECT, OPT_ADF_MODE, NUM_OPTIONS
}; };
typedef enum typedef enum
{ /* hardware connection to the scanner */ { /* hardware connection to the scanner */
SANE_EPSON_NODEV, /* default, no HW specified yet */ SANE_EPSON_NODEV, /* default, no HW specified yet */
SANE_EPSON_SCSI, /* SCSI interface */ SANE_EPSON_SCSI, /* SCSI interface */
SANE_EPSON_PIO, /* parallel interface */ SANE_EPSON_PIO, /* parallel interface */
SANE_EPSON_USB, /* USB interface */ SANE_EPSON_USB, /* USB interface */
SANE_EPSON_NET /* network interface */ SANE_EPSON_NET /* network interface */
} Epson_Connection_Type; } Epson_Connection_Type;
struct epson_profile
{
unsigned int model;
double cct[4][9];
};
enum {
CCTP_REFLECTIVE = 0, CCTP_COLORNEG,
CCTP_MONONEG, CCTP_COLORPOS
};
struct epson_profile_map
{
char *name;
unsigned int id;
};
extern const struct epson_profile epson_cct_profiles[];
extern const struct epson_profile_map epson_cct_models[];
/* hardware description */
struct Epson_Device struct Epson_Device
{ {
struct Epson_Device *next; struct Epson_Device *next;
char *name; char *name;
char *model; char *model;
unsigned int model_id;
SANE_Device sane; SANE_Device sane;
SANE_Int level; SANE_Int level;
SANE_Range dpi_range; SANE_Range dpi_range;
SANE_Range *x_range; /* x range w/out extension */ SANE_Range *x_range; /* x range w/out extension */
SANE_Range *y_range; /* y range w/out extension */ SANE_Range *y_range; /* y range w/out extension */
SANE_Range fbf_x_range; /* flattbed x range */ SANE_Range fbf_x_range; /* flattbed x range */
SANE_Range fbf_y_range; /* flattbed y range */ SANE_Range fbf_y_range; /* flattbed y range */
SANE_Range adf_x_range; /* autom. document feeder x range */ SANE_Range adf_x_range; /* autom. document feeder x range */
SANE_Range adf_y_range; /* autom. document feeder y range */ SANE_Range adf_y_range; /* autom. document feeder y range */
SANE_Range tpu_x_range; /* transparency unit x range */ SANE_Range tpu_x_range; /* transparency unit x range */
SANE_Range tpu_y_range; /* transparency unit y range */ SANE_Range tpu_y_range; /* transparency unit y range */
Epson_Connection_Type connection; Epson_Connection_Type connection;
/* hardware interface type */
SANE_Int *res_list; /* list of resolutions */ SANE_Int *res_list; /* list of resolutions */
SANE_Int res_list_size; /* number of entries in this list */ SANE_Int res_list_size; /* number of entries in this list */
SANE_Int last_res; /* last selected resolution */ SANE_Int last_res; /* last selected resolution */
SANE_Int last_res_preview; /* last selected preview resolution */ SANE_Int last_res_preview; /* last selected preview resolution */
SANE_Word *resolution_list; /* for display purposes we store a second copy */ SANE_Word *resolution_list; /* for display purposes we store a second copy */
SANE_Bool extension; /* extension is installed */ SANE_Bool extension; /* extension is installed */
SANE_Int use_extension; /* use the installed extension */ SANE_Int use_extension; /* use the installed extension */
SANE_Bool TPU; /* TPU is installed */ SANE_Bool TPU; /* TPU is installed */
SANE_Bool TPU2; /* TPU2 is installed */ SANE_Bool TPU2; /* TPU2 is installed */
SANE_Bool ADF; /* ADF is installed */ SANE_Bool ADF; /* ADF is installed */
SANE_Bool duplex; /* does the ADF handle duplex scanning */ SANE_Bool duplex; /* does the ADF handle duplex scanning */
SANE_Bool focusSupport; /* does this scanner have support for "set focus position" ? */ SANE_Bool focusSupport; /* does this scanner have support for "set focus position" ? */
SANE_Bool color_shuffle; /* does this scanner need color shuffling */ SANE_Bool color_shuffle; /* does this scanner need color shuffling */
SANE_Int maxDepth; /* max. color depth */ SANE_Int maxDepth; /* max. color depth */
SANE_Word *depth_list; SANE_Word *depth_list;
SANE_Int optical_res; /* optical resolution */ SANE_Int optical_res; /* optical resolution */
SANE_Int max_line_distance; SANE_Int max_line_distance;
SANE_Bool need_double_vertical; SANE_Bool need_double_vertical;
SANE_Bool need_color_reorder; SANE_Bool need_color_reorder;
SANE_Bool need_reset_on_source_change; SANE_Bool need_reset_on_source_change;
SANE_Bool wait_for_button; /* do we have to wait until the scanner button is pressed? */ SANE_Bool wait_for_button; /* do we have to wait until the scanner button is pressed? */
SANE_Bool extended_commands; SANE_Bool extended_commands;
EpsonCmd cmd; struct EpsonCmd *cmd;
const struct epson_profile *cct_profile;
}; };
typedef struct Epson_Device Epson_Device; typedef struct Epson_Device Epson_Device;
/* an instance of a scanner */
struct Epson_Scanner struct Epson_Scanner
{ {
struct Epson_Scanner *next; struct Epson_Scanner *next;
int fd; struct Epson_Device *hw;
Epson_Device *hw;
SANE_Option_Descriptor opt[NUM_OPTIONS];
Option_Value val[NUM_OPTIONS];
SANE_Parameters params;
SANE_Bool block;
SANE_Bool eof;
SANE_Byte *buf, *end, *ptr;
SANE_Bool canceling;
SANE_Bool focusOnGlass;
SANE_Byte currentFocusPosition;
/* SANE_Word gamma_table [ 4] [ 256]; */
SANE_Word gamma_table[3][256];
SANE_Int retry_count;
SANE_Byte *line_buffer[LINES_SHUFFLE_MAX];
/* buffer lines for color shuffling */
SANE_Int color_shuffle_line; /* current line number for color shuffling */
SANE_Int line_distance; /* current line distance */
SANE_Int current_output_line; /* line counter when color shuffling */
SANE_Int lines_written; /* debug variable */
SANE_Bool option_has_changed; /* did one of the options change it's value? */
SANE_Int left, top, lcount;
unsigned char *netbuf, *netptr;
size_t netlen;
int fd;
/* extended image data handshaking */ SANE_Option_Descriptor opt[NUM_OPTIONS];
SANE_Int ext_block_len; Option_Value val[NUM_OPTIONS];
SANE_Int ext_last_len; SANE_Parameters params;
SANE_Int ext_blocks;
SANE_Int ext_counter; SANE_Bool block;
SANE_Bool eof;
SANE_Byte *buf, *end, *ptr;
SANE_Bool canceling;
SANE_Word gamma_table[3][256];
SANE_Word cct_table[9];
SANE_Int retry_count;
/* buffer lines for color shuffling */
SANE_Byte *line_buffer[LINES_SHUFFLE_MAX];
SANE_Int color_shuffle_line; /* current line number for color shuffling */
SANE_Int line_distance; /* current line distance */
SANE_Int current_output_line; /* line counter when color shuffling */
SANE_Int lines_written; /* debug variable */
SANE_Int left, top, lcount;
SANE_Bool focusOnGlass;
SANE_Byte currentFocusPosition;
/* network buffers */
unsigned char *netbuf, *netptr;
size_t netlen;
/* extended image data handshaking */
SANE_Int ext_block_len;
SANE_Int ext_last_len;
SANE_Int ext_blocks;
SANE_Int ext_counter;
}; };
typedef struct Epson_Scanner Epson_Scanner; typedef struct Epson_Scanner Epson_Scanner;
@ -357,4 +374,4 @@ struct mode_param
int depth; int depth;
}; };
#endif /* epson2_h */ #endif

Wyświetl plik

@ -115,11 +115,12 @@ sanei_epson_net_read(Epson_Scanner *s, unsigned char *buf, size_t wanted,
return 0; return 0;
} }
} else if (wanted < size && s->netlen == size) { /* } else if (wanted < size && s->netlen == size) { */
} else {
DBG(23, "%s: partial read\n", __func__); DBG(23, "%s: partial read\n", __func__);
read = sanei_tcp_read(s->fd, s->netbuf, size); read = sanei_tcp_read(s->fd, s->netbuf, size);
if (read < 0) { if (read != size) {
*status = SANE_STATUS_IO_ERROR; *status = SANE_STATUS_IO_ERROR;
return 0; return 0;
} }

Wyświetl plik

@ -640,7 +640,6 @@ struct fujitsu
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#define MM_PER_INCH 25.4
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)) #define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
#define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))) #define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)))

Wyświetl plik

@ -69,7 +69,6 @@
if (status != SANE_STATUS_GOOD) return status; \ if (status != SANE_STATUS_GOOD) return status; \
} while (SANE_FALSE) } while (SANE_FALSE)
#define MM_PER_INCH 25.4
/* Flags */ /* Flags */
#define GENESYS_FLAG_UNTESTED (1 << 0) /* Print a warning for these scanners */ #define GENESYS_FLAG_UNTESTED (1 << 0) /* Print a warning for these scanners */

Wyświetl plik

@ -70,7 +70,6 @@
#define HIBYTE(w) ((SANE_Byte)(((SANE_Word)(w) >> 8) & 0xFF)) #define HIBYTE(w) ((SANE_Byte)(((SANE_Word)(w) >> 8) & 0xFF))
#define LOBYTE(w) ((SANE_Byte)(w)) #define LOBYTE(w) ((SANE_Byte)(w))
#define MM_PER_INCH 25.4
/* return if an error occured while the function was called */ /* return if an error occured while the function was called */
#ifdef MAX_DEBUG #ifdef MAX_DEBUG

Wyświetl plik

@ -47,6 +47,7 @@ extern int sanei_debug_hp; */
#define DEBUG_DECLARE_ONLY #define DEBUG_DECLARE_ONLY
#include "../include/sane/config.h" #include "../include/sane/config.h"
#include "../include/sane/sanei_backend.h"
#include "../include/lassert.h" #include "../include/lassert.h"
#include <string.h> #include <string.h>

Wyświetl plik

@ -69,6 +69,7 @@
extern int sanei_debug_hp; */ extern int sanei_debug_hp; */
#define DEBUG_DECLARE_ONLY #define DEBUG_DECLARE_ONLY
#include "../include/sane/config.h" #include "../include/sane/config.h"
#include "../include/sane/sanei_backend.h"
#include "../include/lalloca.h" #include "../include/lalloca.h"
#include <stdio.h> #include <stdio.h>

Wyświetl plik

@ -70,7 +70,6 @@
#define HP_CONFIG_FILE STRINGIFY(BACKEND_NAME) ".conf" #define HP_CONFIG_FILE STRINGIFY(BACKEND_NAME) ".conf"
#define MM_PER_INCH 25.4
#define DEVPIX_PER_INCH 300.0 #define DEVPIX_PER_INCH 300.0
#define MM_PER_DEVPIX (MM_PER_INCH / DEVPIX_PER_INCH) #define MM_PER_DEVPIX (MM_PER_INCH / DEVPIX_PER_INCH)

Wyświetl plik

@ -117,7 +117,6 @@
typedef int (*rts8801_callback) (void *param, unsigned bytes, void *data); typedef int (*rts8801_callback) (void *param, unsigned bytes, void *data);
#define DEBUG 1 #define DEBUG 1
#define MM_PER_INCH 25.4
#define SCANNER_UNIT_TO_FIXED_MM(number) SANE_FIX(number * MM_PER_INCH / 1200) #define SCANNER_UNIT_TO_FIXED_MM(number) SANE_FIX(number * MM_PER_INCH / 1200)
#define FIXED_MM_TO_SCANNER_UNIT(number) SANE_UNFIX(number) * 1200 / MM_PER_INCH #define FIXED_MM_TO_SCANNER_UNIT(number) SANE_UNFIX(number) * 1200 / MM_PER_INCH

Wyświetl plik

@ -27,7 +27,6 @@
#define min(a, b) (((a) < (b)) ? (a) : (b)) #define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b))
#define MM_PER_INCH 25.4
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/

Wyświetl plik

@ -52,6 +52,7 @@
tables and stores the results of a scan. - 19/02/2003 Martijn tables and stores the results of a scan. - 19/02/2003 Martijn
*/ */
#include "../include/_stdint.h"
#ifdef __GNUC__ #ifdef __GNUC__
#define PACKED __attribute__ ((packed)) #define PACKED __attribute__ ((packed))

Wyświetl plik

@ -55,6 +55,7 @@
#include <string.h> #include <string.h>
#include "../include/sane/sanei_debug.h" #include "../include/sane/sanei_debug.h"
#include "../include/_stdint.h"
#include "hp5590_low.h" #include "hp5590_low.h"
#include "hp5590_cmds.h" #include "hp5590_cmds.h"

Wyświetl plik

@ -53,6 +53,7 @@
#include "../include/sane/sanei_debug.h" #include "../include/sane/sanei_debug.h"
#include "../include/sane/sanei_usb.h" #include "../include/sane/sanei_usb.h"
#include "../include/_stdint.h"
#include "hp5590_low.h" #include "hp5590_low.h"
/* Debug levels */ /* Debug levels */

Wyświetl plik

@ -521,7 +521,6 @@ typedef struct mode_page_connect
} MP_CXN; } MP_CXN;
/* 1 inch = 6 picas = 72 points = 25.4 mm */ /* 1 inch = 6 picas = 72 points = 25.4 mm */
#define MM_PER_INCH 25.4
#define DEFAULT_MUD 1200 /* WHY ? */ #define DEFAULT_MUD 1200 /* WHY ? */
/* BASIC MEASUREMENT UNIT /* BASIC MEASUREMENT UNIT
* 00H INCH * 00H INCH

Wyświetl plik

@ -76,7 +76,6 @@
#include "ibm.h" #include "ibm.h"
#include "ibm-scsi.c" #include "ibm-scsi.c"
#define MM_PER_INCH 25.4
#define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b))
static int num_devices = 0; static int num_devices = 0;

Wyświetl plik

@ -201,7 +201,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#define MM_PER_INCH 25.4
#define mmToIlu(mm) (((mm) * dev->x_resolution) / MM_PER_INCH) #define mmToIlu(mm) (((mm) * dev->x_resolution) / MM_PER_INCH)
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->x_resolution) #define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->x_resolution)

Wyświetl plik

@ -477,6 +477,9 @@ sanei_lexmark_low_init (Lexmark_Device * dev)
} }
/* set up per model constant values */ /* set up per model constant values */
dev->shadow_regs[0xf3] = 0xf8;
dev->shadow_regs[0xf4] = 0x7f;
switch (dev->model.sensor_type) switch (dev->model.sensor_type)
{ {
case X1100_B2_SENSOR: case X1100_B2_SENSOR:
@ -519,8 +522,6 @@ sanei_lexmark_low_init (Lexmark_Device * dev)
dev->shadow_regs[0xc9] = 0x3b; dev->shadow_regs[0xc9] = 0x3b;
dev->shadow_regs[0xed] = 0xc2; dev->shadow_regs[0xed] = 0xc2;
dev->shadow_regs[0xee] = 0x02; dev->shadow_regs[0xee] = 0x02;
dev->shadow_regs[0xf5] = 0xf8;
dev->shadow_regs[0xf6] = 0x7f;
status = SANE_STATUS_GOOD; status = SANE_STATUS_GOOD;
break; break;
case X1100_2C_SENSOR: case X1100_2C_SENSOR:
@ -604,8 +605,6 @@ sanei_lexmark_low_init (Lexmark_Device * dev)
dev->shadow_regs[0xca] = 0x0a; dev->shadow_regs[0xca] = 0x0a;
dev->shadow_regs[0xe2] = 0xf8; dev->shadow_regs[0xe2] = 0xf8;
dev->shadow_regs[0xe3] = 0x2a; dev->shadow_regs[0xe3] = 0x2a;
dev->shadow_regs[0xf3] = 0xf8;
dev->shadow_regs[0xf4] = 0x7f;
status = SANE_STATUS_GOOD; status = SANE_STATUS_GOOD;
break; break;
case X1200_USB2_SENSOR: case X1200_USB2_SENSOR:
@ -652,8 +651,6 @@ sanei_lexmark_low_init (Lexmark_Device * dev)
dev->shadow_regs[0xca] = 0x0a; dev->shadow_regs[0xca] = 0x0a;
dev->shadow_regs[0xe2] = 0xf8; dev->shadow_regs[0xe2] = 0xf8;
dev->shadow_regs[0xe3] = 0x2a; dev->shadow_regs[0xe3] = 0x2a;
dev->shadow_regs[0xf3] = 0xf8;
dev->shadow_regs[0xf4] = 0x7f;
status = SANE_STATUS_GOOD; status = SANE_STATUS_GOOD;
break; break;
case A920_SENSOR: case A920_SENSOR:
@ -702,8 +699,6 @@ sanei_lexmark_low_init (Lexmark_Device * dev)
dev->shadow_regs[0xc2] = 0x80; dev->shadow_regs[0xc2] = 0x80;
dev->shadow_regs[0xc4] = 0x20; dev->shadow_regs[0xc4] = 0x20;
dev->shadow_regs[0xc8] = 0x04; dev->shadow_regs[0xc8] = 0x04;
dev->shadow_regs[0xf3] = 0xf8;
dev->shadow_regs[0xf4] = 0x7f;
status = SANE_STATUS_GOOD; status = SANE_STATUS_GOOD;
break; break;
case X1200_SENSOR: case X1200_SENSOR:
@ -1124,8 +1119,8 @@ sanei_lexmark_low_open_device (Lexmark_Device * dev)
shadow_regs[0xb0] = 0x2c; shadow_regs[0xb0] = 0x2c;
shadow_regs[0x10] = 0x97; shadow_regs[0x10] = 0x97;
shadow_regs[0x10] = 0x87; shadow_regs[0x10] = 0x87;
shadow_regs[0xf4] = 0xf8; shadow_regs[0xf3] = 0xf8;
shadow_regs[0xf5] = 0x7f; shadow_regs[0xf4] = 0x7f;
#else #else
result = sanei_usb_open (dev->sane.name, &(dev->devnum)); result = sanei_usb_open (dev->sane.name, &(dev->devnum));
#endif #endif
@ -2341,8 +2336,6 @@ sanei_lexmark_low_find_start_line (Lexmark_Device * dev)
dev->shadow_regs[0x92] = 0x20; dev->shadow_regs[0x92] = 0x20;
dev->shadow_regs[0xea] = 0x00; dev->shadow_regs[0xea] = 0x00;
dev->shadow_regs[0xeb] = 0x00; dev->shadow_regs[0xeb] = 0x00;
dev->shadow_regs[0xf3] = 0xf8;
dev->shadow_regs[0xf4] = 0x7f;
break; break;
case A920_SENSOR: case A920_SENSOR:
dev->shadow_regs[0x2c] = 0x0d; dev->shadow_regs[0x2c] = 0x0d;

Wyświetl plik

@ -63,7 +63,6 @@
#endif #endif
#define MA1509_CONFIG_FILE "ma1509.conf" #define MA1509_CONFIG_FILE "ma1509.conf"
#define MM_PER_INCH 25.4
/* Convenience macros */ /* Convenience macros */
#if defined(MIN) #if defined(MIN)

Wyświetl plik

@ -162,7 +162,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#define MM_PER_INCH 25.4
#define mmToIlu(mm) (((mm) * 1200) / MM_PER_INCH) #define mmToIlu(mm) (((mm) * 1200) / MM_PER_INCH)
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / 1200) #define iluToMm(ilu) (((ilu) * MM_PER_INCH) / 1200)

Wyświetl plik

@ -85,7 +85,6 @@
# define PATH_MAX 1024 # define PATH_MAX 1024
#endif #endif
#define MM_PER_INCH 25.4
#define SCSI_BUFF_SIZE sanei_scsi_max_request_size #define SCSI_BUFF_SIZE sanei_scsi_max_request_size

Wyświetl plik

@ -78,7 +78,6 @@
#endif /* HAVE_AUTHORIZATION */ #endif /* HAVE_AUTHORIZATION */
#define MM_PER_INCH 25.4
#define ENDIAN_TYPE(d) { unsigned i, test = 0; \ #define ENDIAN_TYPE(d) { unsigned i, test = 0; \
for (i=0; i < sizeof(int); i++ ) \ for (i=0; i < sizeof(int); i++ ) \

Wyświetl plik

@ -55,7 +55,6 @@
# define PATH_MAX 1024 # define PATH_MAX 1024
#endif #endif
#define MUSTEK_CONFIG_FILE "mustek.conf" #define MUSTEK_CONFIG_FILE "mustek.conf"
#define MM_PER_INCH 25.4
#define MAX_WAITING_TIME 60 /* How long to wait for scanner to become ready */ #define MAX_WAITING_TIME 60 /* How long to wait for scanner to become ready */
#define MAX_LINE_DIST 40 /* Extra lines needed for LD correction */ #define MAX_LINE_DIST 40 /* Extra lines needed for LD correction */

Wyświetl plik

@ -56,7 +56,6 @@
#define DISABLE(OPTION) s->opt[OPTION].cap |= SANE_CAP_INACTIVE #define DISABLE(OPTION) s->opt[OPTION].cap |= SANE_CAP_INACTIVE
#define IS_ACTIVE(OPTION) (((s->opt[OPTION].cap) & SANE_CAP_INACTIVE) == 0) #define IS_ACTIVE(OPTION) (((s->opt[OPTION].cap) & SANE_CAP_INACTIVE) == 0)
#define MM_PER_INCH 25.4
#define MUSTEK_USB_CONFIG_FILE "mustek_usb.conf" #define MUSTEK_USB_CONFIG_FILE "mustek_usb.conf"
#define SCAN_BUFFER_SIZE (64 * 1024) #define SCAN_BUFFER_SIZE (64 * 1024)

Wyświetl plik

@ -60,7 +60,6 @@
#define RIE(function) do {status = function; if (status != SANE_STATUS_GOOD) \ #define RIE(function) do {status = function; if (status != SANE_STATUS_GOOD) \
return status;} while (SANE_FALSE) return status;} while (SANE_FALSE)
#define MM_PER_INCH 25.4
#define SCAN_BUFFER_SIZE (64 * 1024) #define SCAN_BUFFER_SIZE (64 * 1024)
#define MAX_RESOLUTIONS 12 #define MAX_RESOLUTIONS 12
#define DEF_LINEARTTHRESHOLD 128 #define DEF_LINEARTTHRESHOLD 128

Wyświetl plik

@ -49,6 +49,7 @@
#include "../include/sane/config.h" #include "../include/sane/config.h"
#include "../include/lalloca.h" #include "../include/lalloca.h"
#include "../include/_stdint.h"
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>

Wyświetl plik

@ -115,7 +115,6 @@
#define BUILD 9 #define BUILD 9
#define PIE_CONFIG_FILE "pie.conf" #define PIE_CONFIG_FILE "pie.conf"
#define MM_PER_INCH 25.4
#define LINEART_STR "Lineart" #define LINEART_STR "Lineart"
#define HALFTONE_STR "Halftone" #define HALFTONE_STR "Halftone"

Wyświetl plik

@ -63,7 +63,6 @@ extern int errno;
#include "pint.h" #include "pint.h"
#define MM_PER_INCH 25.4
#define DECIPOINTS_PER_MM (720.0 / MM_PER_INCH) #define DECIPOINTS_PER_MM (720.0 / MM_PER_INCH)
#define TWELVEHUNDS_PER_MM (1200.0 / MM_PER_INCH) #define TWELVEHUNDS_PER_MM (1200.0 / MM_PER_INCH)

Wyświetl plik

@ -71,17 +71,17 @@
#define MF4100_PID 0x26a3 #define MF4100_PID 0x26a3
#define MF4600_PID 0x26b0 #define MF4600_PID 0x26b0
#define MF4010_PID 0x26b4 #define MF4010_PID 0x26b4
#define D480_PID 0x26ed
/* the following are all untested */ /* the following are all untested */
#define MF5630_PID 0x264e #define MF5630_PID 0x264e
#define MF5650_PID 0x264f #define MF5650_PID 0x264f
#define MF8100_PID 0x2659 #define MF8100_PID 0x2659
#define MF5730_PID 0x265d
#define MF5750_PID 0x265e
#define MF3110_PID 0x2660 #define MF3110_PID 0x2660
#define MF3200_PID 0x2684 #define MF3200_PID 0x2684
#define MF6500_PID 0x2686 #define MF6500_PID 0x2686
enum iclass_state_t enum iclass_state_t
{ {
state_idle, state_idle,
@ -178,6 +178,7 @@ activate (pixma_t * s, uint8_t x)
{ {
case MF4200_PID: case MF4200_PID:
case MF4600_PID: case MF4600_PID:
case D480_PID:
return iclass_exec (s, &mf->cb, 1); return iclass_exec (s, &mf->cb, 1);
break; break;
case MF4100_PID: case MF4100_PID:
@ -198,11 +199,14 @@ select_source (pixma_t * s)
{ {
iclass_t *mf = (iclass_t *) s->subdriver; iclass_t *mf = (iclass_t *) s->subdriver;
uint8_t *data = pixma_newcmd (&mf->cb, cmd_select_source, 10, 0); uint8_t *data = pixma_newcmd (&mf->cb, cmd_select_source, 10, 0);
data[0] = (s->param->source == PIXMA_SOURCE_ADF) ? 2 : 1; data[0] = (s->param->source == PIXMA_SOURCE_ADF ||
s->param->source == PIXMA_SOURCE_ADFDUP) ? 2 : 1;
data[5] = (s->param->source == PIXMA_SOURCE_ADFDUP) ? 3 : 0;
switch (s->cfg->pid) switch (s->cfg->pid)
{ {
case MF4200_PID: case MF4200_PID:
case MF4600_PID: case MF4600_PID:
case D480_PID:
return iclass_exec (s, &mf->cb, 0); return iclass_exec (s, &mf->cb, 0);
break; break;
case MF4100_PID: case MF4100_PID:
@ -233,6 +237,7 @@ send_scan_param (pixma_t * s)
{ {
case MF4200_PID: case MF4200_PID:
case MF4600_PID: case MF4600_PID:
case D480_PID:
return iclass_exec (s, &mf->cb, 0); return iclass_exec (s, &mf->cb, 0);
break; break;
case MF4100_PID: case MF4100_PID:
@ -308,6 +313,7 @@ read_error_info (pixma_t * s, void *buf, unsigned size)
{ {
case MF4200_PID: case MF4200_PID:
case MF4600_PID: case MF4600_PID:
case D480_PID:
error = iclass_exec (s, &mf->cb, 0); error = iclass_exec (s, &mf->cb, 0);
break; break;
case MF4100_PID: case MF4100_PID:
@ -667,16 +673,15 @@ static const pixma_scan_ops_t pixma_iclass_ops = {
const pixma_config_t pixma_iclass_devices[] = { const pixma_config_t pixma_iclass_devices[] = {
DEV ("Canon imageCLASS MF4270", "MF4270", MF4200_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon imageCLASS MF4270", "MF4270", MF4200_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF4150", "MF4100", MF4100_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon imageCLASS MF4150", "MF4100", MF4100_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF4690", "MF4690", MF4600_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS D480", "D480", D480_PID, 600, 640, 877, PIXMA_CAP_ADFDUP),
/* FIXME: the following capabilities all need updating/verifying */ /* FIXME: the following capabilities all need updating/verifying */
DEV ("Canon imageCLASS MF5630", "MF5630", MF5630_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon imageCLASS MF5630", "MF5630", MF5630_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon laserBase MF5650", "MF5650", MF5650_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon laserBase MF5650", "MF5650", MF5650_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF8170c", "MF8170c", MF8100_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon imageCLASS MF8170c", "MF8170c", MF8100_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF5730", "MF5730", MF5730_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF5750", "MF5750", MF5750_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF3110", "MF3110", MF3110_PID, 600, 640, 877, 0), DEV ("Canon imageCLASS MF3110", "MF3110", MF3110_PID, 600, 640, 877, 0),
DEV ("Canon imageCLASS MF3240", "MF3240", MF3200_PID, 600, 640, 877, 0), DEV ("Canon imageCLASS MF3240", "MF3240", MF3200_PID, 600, 640, 877, 0),
DEV ("Canon imageClass MF6500", "MF6500", MF6500_PID, 600, 640, 877, PIXMA_CAP_ADF), DEV ("Canon imageClass MF6500", "MF6500", MF6500_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF4690", "MF4690", MF4600_PID, 600, 640, 877, PIXMA_CAP_ADF),
DEV ("Canon imageCLASS MF4010", "MF4010", MF4010_PID, 600, 640, 877, 0), DEV ("Canon imageCLASS MF4010", "MF4010", MF4010_PID, 600, 640, 877, 0),
DEV (NULL, NULL, 0, 0, 0, 0, 0) DEV (NULL, NULL, 0, 0, 0, 0, 0)
}; };

Wyświetl plik

@ -1441,7 +1441,7 @@ const pixma_config_t pixma_mp150_devices[] = {
DEVICE ("Canon PIXMA MP190", "MP190", MP190_PID, 600, 638, 877, PIXMA_CAP_CIS), DEVICE ("Canon PIXMA MP190", "MP190", MP190_PID, 600, 638, 877, PIXMA_CAP_CIS),
/* PIXMA 2009 vintage */ /* PIXMA 2009 vintage */
DEVICE ("Canon PIXMA MX320", "MX320", MX330_PID, 1200, 638, 1050, PIXMA_CAP_CIS | PIXMA_CAP_ADF), DEVICE ("Canon PIXMA MX320", "MX320", MX320_PID, 1200, 638, 1050, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
DEVICE ("Canon PIXMA MX330", "MX330", MX330_PID, 1200, 638, 1050, PIXMA_CAP_CIS | PIXMA_CAP_ADF), DEVICE ("Canon PIXMA MX330", "MX330", MX330_PID, 1200, 638, 1050, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
DEVICE ("Canon PIXMA MX860", "MX860", MX860_PID, 2400, 638, 1050, PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP), DEVICE ("Canon PIXMA MX860", "MX860", MX860_PID, 2400, 638, 1050, PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),

Wyświetl plik

@ -62,18 +62,20 @@
#define IMAGE_BLOCK_SIZE (0xc000) #define IMAGE_BLOCK_SIZE (0xc000)
#define CMDBUF_SIZE 512 #define CMDBUF_SIZE 512
#define MP730_PID 0x262f
#define MP700_PID 0x2630
#define MP360_PID 0x263c #define MP360_PID 0x263c
#define MP370_PID 0x263d #define MP370_PID 0x263d
#define MP390_PID 0x263e #define MP390_PID 0x263e
#define MP700_PID 0x2630
#define MP740_PID 0x264c /* Untested */ #define MP740_PID 0x264c /* Untested */
#define MP710_PID 0x264d #define MP710_PID 0x264d
#define MP730_PID 0x262f
#define MF5730_PID 0x265d /* Untested */
#define MF5750_PID 0x265e /* Untested */
#define MF5770_PID 0x265f #define MF5770_PID 0x265f
enum mp730_state_t enum mp730_state_t
{ {
state_idle, state_idle,
@ -285,6 +287,8 @@ handle_interrupt (pixma_t * s, int timeout)
case MP360_PID: case MP360_PID:
case MP370_PID: case MP370_PID:
case MP390_PID: case MP390_PID:
case MF5730_PID:
case MF5750_PID:
case MF5770_PID: case MF5770_PID:
if (len != 16) if (len != 16)
{ {
@ -332,6 +336,8 @@ has_ccd_sensor (pixma_t * s)
return (s->cfg->pid == MP360_PID || return (s->cfg->pid == MP360_PID ||
s->cfg->pid == MP370_PID || s->cfg->pid == MP370_PID ||
s->cfg->pid == MP390_PID || s->cfg->pid == MP390_PID ||
s->cfg->pid == MF5730_PID ||
s->cfg->pid == MF5750_PID ||
s->cfg->pid == MF5770_PID); s->cfg->pid == MF5770_PID);
} }
@ -369,27 +375,47 @@ step1 (pixma_t * s)
return PIXMA_ENO_PAPER; return PIXMA_ENO_PAPER;
if (has_ccd_sensor (s)) if (has_ccd_sensor (s))
{ {
/* MF5770: Wait 10 sec before starting for 1st page only */ switch (s->cfg->pid)
if (s->cfg->pid == MF5770_PID && s->param->adf_pageid == 0)
{ {
tmo = 10; /* like Windows driver, 10 sec CCD calibration ? */ case MF5730_PID:
while (--tmo >= 0) case MF5750_PID:
{ case MF5770_PID:
error = handle_interrupt (s, 1000); \ /* MF57x0: Wait 10 sec before starting for 1st page only */
if (s->cancel) \ if (s->param->adf_pageid == 0)
return PIXMA_ECANCELED; \ {
if (error != PIXMA_ECANCELED && error < 0) \ tmo = 10; /* like Windows driver, 10 sec CCD calibration ? */
return error; while (--tmo >= 0)
PDBG (pixma_dbg (2, "CCD Calibration ends in %d sec.\n", tmo)); {
} error = handle_interrupt (s, 1000); \
if (s->cancel) \
return PIXMA_ECANCELED; \
if (error != PIXMA_ECANCELED && error < 0) \
return error;
PDBG (pixma_dbg (2, "CCD Calibration ends in %d sec.\n", tmo));
}
}
break;
default:
break;
} }
activate (s, 0); activate (s, 0);
error = calibrate (s); error = calibrate (s);
/* MF5770: calibration returns PIXMA_STATUS_FAILED */ switch (s->cfg->pid)
if (s->cfg->pid == MF5770_PID && error == PIXMA_ECANCELED) {
error = read_error_info (s, NULL, 0); case MF5730_PID:
case MF5750_PID:
case MF5770_PID:
/* MF57x0: calibration returns PIXMA_STATUS_FAILED */
if (error == PIXMA_ECANCELED)
error = read_error_info (s, NULL, 0);
break;
default:
break;
}
} }
if (error >= 0) if (error >= 0)
error = activate (s, 0); error = activate (s, 0);
@ -582,14 +608,17 @@ mp730_fill_buffer (pixma_t * s, pixma_imagebuf_t * ib)
/* n = number of full lines (rows) we have in the buffer. */ /* n = number of full lines (rows) we have in the buffer. */
if (n != 0) if (n != 0)
{ {
if (s->param->channels != 1 && s->cfg->pid != MF5770_PID) if (s->param->channels != 1 &&
s->cfg->pid != MF5730_PID &&
s->cfg->pid != MF5750_PID &&
s->cfg->pid != MF5770_PID)
{ {
/* color */ /* color, and not an MF57x0 */
pack_rgb (mp->imgbuf, n, mp->raw_width, mp->lbuf); pack_rgb (mp->imgbuf, n, mp->raw_width, mp->lbuf);
} }
else else
{ {
/* grayscale */ /* grayscale or MF57x0 */
memcpy (mp->lbuf, mp->imgbuf, n * s->param->line_size); memcpy (mp->lbuf, mp->imgbuf, n * s->param->line_size);
} }
block_size = n * s->param->line_size; block_size = n * s->param->line_size;
@ -690,7 +719,9 @@ const pixma_config_t pixma_mp730_devices[] = {
DEVICE ("Canon MultiPASS MP730", "MP730", MP730_PID, 1200, 637, 868, PIXMA_CAP_ADF), DEVICE ("Canon MultiPASS MP730", "MP730", MP730_PID, 1200, 637, 868, PIXMA_CAP_ADF),
DEVICE ("Canon MultiPASS MP740", "MP740", MP740_PID, 1200, 637, 868, PIXMA_CAP_ADF), DEVICE ("Canon MultiPASS MP740", "MP740", MP740_PID, 1200, 637, 868, PIXMA_CAP_ADF),
DEVICE ("Canon imageCLASS MF5770", "MF5770", MF5770_PID, 600, 640, 877, PIXMA_CAP_ADF), DEVICE ("Canon imageCLASS MF5730", "MF5730", MF5730_PID, 1200, 636, 868, PIXMA_CAP_ADF),
DEVICE ("Canon imageCLASS MF5750", "MF5750", MF5750_PID, 1200, 636, 868, PIXMA_CAP_ADF),
DEVICE ("Canon imageCLASS MF5770", "MF5770", MF5770_PID, 1200, 636, 868, PIXMA_CAP_ADF),
DEVICE (NULL, NULL, 0, 0, 0, 0, 0) DEVICE (NULL, NULL, 0, 0, 0, 0, 0)
}; };

Wyświetl plik

@ -475,7 +475,6 @@ typedef struct {
#ifndef __KERNEL__ #ifndef __KERNEL__
#define MM_PER_INCH 25.4
#define PLUSTEK_CONFIG_FILE "plustek_pp.conf" #define PLUSTEK_CONFIG_FILE "plustek_pp.conf"

Wyświetl plik

@ -106,7 +106,6 @@
/************************ some definitions ***********************************/ /************************ some definitions ***********************************/
#define MM_PER_INCH 25.4
#define PLUSTEK_CONFIG_FILE "plustek.conf" #define PLUSTEK_CONFIG_FILE "plustek.conf"

Wyświetl plik

@ -71,7 +71,6 @@
#include "ricoh.h" #include "ricoh.h"
#define MM_PER_INCH 25.4
#define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b))
static int num_devices = 0; static int num_devices = 0;

Wyświetl plik

@ -57,7 +57,6 @@
#define DBG_io2 7 /* io functions that are called very often */ #define DBG_io2 7 /* io functions that are called very often */
#define DBG_data 8 /* log image data */ #define DBG_data 8 /* log image data */
#define MM_PER_INCH 25.4
/* Flags */ /* Flags */
#define RTS8891_FLAG_UNTESTED (1 << 0) /* Print a warning for these scanners */ #define RTS8891_FLAG_UNTESTED (1 << 0) /* Print a warning for these scanners */

Wyświetl plik

@ -41,7 +41,6 @@
#define BACKEND_NAME s9036 #define BACKEND_NAME s9036
#include "../include/sane/sanei_backend.h" #include "../include/sane/sanei_backend.h"
#define MM_PER_INCH 25.4
#undef Byte #undef Byte
#define Byte SANE_Byte #define Byte SANE_Byte

Wyświetl plik

@ -229,7 +229,6 @@ CDB;
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#define MM_PER_INCH 25.4
#define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 600)) #define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 600))
#define mmToIlu(mm) ((mm) / length_quant) #define mmToIlu(mm) ((mm) / length_quant)
#define iluToMm(ilu) ((ilu) * length_quant) #define iluToMm(ilu) ((ilu) * length_quant)

Wyświetl plik

@ -119,7 +119,6 @@ typedef struct SM3840_Scan
#define SM3840_CONFIG_FILE "sm3840.conf" #define SM3840_CONFIG_FILE "sm3840.conf"
#define MM_PER_INCH 25.4
#define SCAN_BUF_SIZE 65536 #define SCAN_BUF_SIZE 65536

Wyświetl plik

@ -192,7 +192,6 @@ struct sp15c
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#define MM_PER_INCH 25.4
#define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)) #define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
#define mmToIlu(mm) ((mm) / length_quant) #define mmToIlu(mm) ((mm) / length_quant)
#define iluToMm(ilu) ((ilu) * length_quant) #define iluToMm(ilu) ((ilu) * length_quant)

Wyświetl plik

@ -103,7 +103,6 @@ static ST400_Model st400_models[] = {
{ 0, NULL, 0, NULL, 0, 0, 0, NULL, NULL, NULL, NULL } { 0, NULL, 0, NULL, 0, 0, 0, NULL, NULL, NULL, NULL }
}; };
#define MM_PER_INCH 25.4
static ST400_Device *st400_devices = NULL; static ST400_Device *st400_devices = NULL;
static unsigned int st400_num_devices = 0; static unsigned int st400_num_devices = 0;

Wyświetl plik

@ -76,7 +76,6 @@
#define TAMARACK_CONFIG_FILE "tamarack.conf" #define TAMARACK_CONFIG_FILE "tamarack.conf"
#define MM_PER_INCH 25.4
static int num_devices; static int num_devices;
static Tamarack_Device *first_dev; static Tamarack_Device *first_dev;

Wyświetl plik

@ -214,7 +214,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#define MM_PER_INCH 25.4
#define mmToIlu(mm) (((mm) * dev->def->x_resolution_max) / MM_PER_INCH) #define mmToIlu(mm) (((mm) * dev->def->x_resolution_max) / MM_PER_INCH)
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->def->x_resolution_max) #define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->def->x_resolution_max)

Wyświetl plik

@ -237,7 +237,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#define MM_PER_INCH 25.4
#define mmToIlu(mm) (((mm) * dev->def->x_resolution_max) / MM_PER_INCH) #define mmToIlu(mm) (((mm) * dev->def->x_resolution_max) / MM_PER_INCH)
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->def->x_resolution_max) #define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->def->x_resolution_max)

Wyświetl plik

@ -228,7 +228,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#define MM_PER_INCH 25.4
#define mmToIlu(mm) (((mm) * 300) / MM_PER_INCH) #define mmToIlu(mm) (((mm) * 300) / MM_PER_INCH)
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / 300) #define iluToMm(ilu) (((ilu) * MM_PER_INCH) / 300)

Wyświetl plik

@ -46,7 +46,6 @@
#ifndef test_h #ifndef test_h
#define test_h #define test_h
#define MM_PER_INCH 25.4
typedef enum typedef enum
{ {

Wyświetl plik

@ -101,7 +101,6 @@ in ADF mode this is done often:
#define BACKEND_NAME umax #define BACKEND_NAME umax
#define UMAX_CONFIG_FILE "umax.conf" #define UMAX_CONFIG_FILE "umax.conf"
#define MM_PER_INCH 25.4
/* ------------------------------------------------------------ SANE INTERNATIONALISATION ------------------ */ /* ------------------------------------------------------------ SANE INTERNATIONALISATION ------------------ */

Wyświetl plik

@ -182,7 +182,6 @@ static const SANE_String_Const astra_models[] =
#define UMAX_PP_MODE_GRAYSCALE 1 #define UMAX_PP_MODE_GRAYSCALE 1
#define UMAX_PP_MODE_COLOR 2 #define UMAX_PP_MODE_COLOR 2
#define MM_PER_INCH 25.4
#define MM_TO_PIXEL(mm, res) (SANE_UNFIX(mm) * (float )res / MM_PER_INCH) #define MM_TO_PIXEL(mm, res) (SANE_UNFIX(mm) * (float )res / MM_PER_INCH)
#define PIXEL_TO_MM(px, res) (SANE_FIX((float )(px * MM_PER_INCH / (res / 10)) / 10.0)) #define PIXEL_TO_MM(px, res) (SANE_FIX((float )(px * MM_PER_INCH / (res / 10)) / 10.0))

Wyświetl plik

@ -16,7 +16,6 @@
#define UNCONST(ptr) ((void *)(long)(ptr)) #define UNCONST(ptr) ((void *)(long)(ptr))
#define MM_PER_INCH 25.4
#define PNT_PER_MM (1200. / MM_PER_INCH) #define PNT_PER_MM (1200. / MM_PER_INCH)
#define PADDING_SIZE 16 #define PADDING_SIZE 16

Wyświetl plik

@ -241,7 +241,7 @@
:interface "USB Ethernet" :interface "USB Ethernet"
:usbid "0x04a9" "0x172c" :usbid "0x04a9" "0x172c"
:status :good :status :good
:comment "Works in flatbed and ADF simplex. ADF Duplex supported, but no report yet." :comment "All resolutions supported (up to 2400DPI). Flatbed, ADF simplex and Duplex supported."
:model "PIXMA MX7600" :model "PIXMA MX7600"
:interface "USB Ethernet" :interface "USB Ethernet"
@ -297,6 +297,12 @@
:status :good :status :good
:comment "All resolutions supported (up to 600DPI)" :comment "All resolutions supported (up to 600DPI)"
:model "imageCLASS D480"
:interface "USB"
:usbid "0x04a9" "0x26ed"
:status :good
:comment "All resolutions supported (up to 600DPI). Flatbed, ADF simplex and Duplex supported."
:model "imageCLASS MF5630" :model "imageCLASS MF5630"
:interface "USB" :interface "USB"
:usbid "0x04a9" "0x264e" :usbid "0x04a9" "0x264e"
@ -331,7 +337,7 @@
:interface "USB" :interface "USB"
:usbid "0x04a9" "0x265f" :usbid "0x04a9" "0x265f"
:status :good :status :good
:comment "All resolutions supported (up to 600DPI) in color. Grayscale not working yet in preview (75 dpi capable ?)." :comment "All resolutions supported (up to 600DPI)."
:model "imageCLASS MF3110" :model "imageCLASS MF3110"
:interface "USB" :interface "USB"

Wyświetl plik

@ -30,7 +30,7 @@ MultiPASS MP700, MP730, PIXMA MP750 (no grayscale)
.br .br
ImageCLASS MF4010, MF4018, MF4120, MF4122, MF4140, MF4150 ImageCLASS MF4010, MF4018, MF4120, MF4122, MF4140, MF4150
.br .br
ImageCLASS MF4270, MF5770 ImageCLASS MF4270, MF5770, D480
.RE .RE
.PP .PP
The following models are not well tested and/or the scanner sometimes hangs The following models are not well tested and/or the scanner sometimes hangs

Wyświetl plik

@ -56,6 +56,10 @@
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#endif #endif
#ifndef MM_PER_INCH
#define MM_PER_INCH 25.4
#endif
#ifdef HAVE_SIGPROCMASK #ifdef HAVE_SIGPROCMASK
# define SIGACTION sigaction # define SIGACTION sigaction
#else #else

Plik diff jest za duży Load Diff