kopia lustrzana https://gitlab.com/sane-project/backends
2004-04-14 Rene Rebe <rene@rocklinux.org>
* backend/avision.h, backend/avision.c: the current development state, including cleanups, code refactoring, dynamic color and scan source list creation, implemented ADF mirroring needed for some ASICs , some scan window scaliing fixes for some ASICs, added 16bit gray and color support, fixed a tiny big-endian issue, fixed command error reporting for some ASICs, improved inquiry logging and some tiny fixes for film-scanners. Sorry for such a bit chunk so late in feature freeze (...). But tested on Ultra SPARC, PowerPC and x86 Linux ... ;-)merge-requests/1/head
rodzic
733850d4e8
commit
c4b01509ab
11
ChangeLog
11
ChangeLog
|
@ -1,4 +1,15 @@
|
|||
2004-04-14 Rene Rebe <rene@rocklinux.org>
|
||||
|
||||
* backend/avision.h, backend/avision.c: the current development state,
|
||||
including cleanups, code refactoring, dynamic color and scan source
|
||||
list creation, implemented ADF mirroring needed for some ASICs ,
|
||||
some scan window scaliing fixes for some ASICs, added 16bit gray
|
||||
and color support, fixed a tiny big-endian issue, fixed command
|
||||
error reporting for some ASICs, improved inquiry logging and some
|
||||
tiny fixes for film-scanners.
|
||||
|
||||
2004-04-14 Gerhard Jaeger <gerhard@gjaeger.de>
|
||||
|
||||
* backend/plustek_pp.c backend/plustek-pp_sysdep.h
|
||||
backend/plustek-pp_scan.h backend/plustek-pp_ptdrv.c
|
||||
backend/plustek-pp_misc.c: Fixed Kernel 2.6 compilation problems.
|
||||
|
|
1247
backend/avision.c
1247
backend/avision.c
Plik diff jest za duży
Load Diff
|
@ -67,8 +67,10 @@ typedef struct Avision_Connection {
|
|||
typedef struct Avision_HWEntry {
|
||||
char* scsi_mfg;
|
||||
char* scsi_model;
|
||||
|
||||
int usb_vendor;
|
||||
int usb_product;
|
||||
|
||||
const char* real_mfg;
|
||||
const char* real_model;
|
||||
|
||||
|
@ -111,7 +113,7 @@ typedef struct Avision_HWEntry {
|
|||
|
||||
/* maybe more ...*/
|
||||
} feature_type;
|
||||
|
||||
|
||||
} Avision_HWEntry;
|
||||
|
||||
typedef enum {
|
||||
|
@ -128,6 +130,8 @@ typedef enum {
|
|||
AV_DITHERED,
|
||||
AV_GRAYSCALE,
|
||||
AV_TRUECOLOR,
|
||||
AV_GRAYSCALE16,
|
||||
AV_TRUECOLOR16,
|
||||
AV_COLOR_MODE_LAST
|
||||
} color_mode;
|
||||
|
||||
|
@ -144,7 +148,6 @@ enum Avision_Option
|
|||
|
||||
OPT_MODE_GROUP,
|
||||
OPT_MODE,
|
||||
#define OPT_MODE_DEFAULT 3
|
||||
OPT_RESOLUTION,
|
||||
#define OPT_RESOLUTION_DEFAULT 300
|
||||
OPT_SPEED,
|
||||
|
@ -215,10 +218,19 @@ typedef struct Avision_Device
|
|||
SANE_Bool inquiry_needs_software_colorpack;
|
||||
SANE_Bool inquiry_needs_line_pack;
|
||||
SANE_Bool inquiry_adf_need_mirror;
|
||||
SANE_Bool inquiry_adf_bgr_order;
|
||||
SANE_Bool inquiry_light_detect;
|
||||
SANE_Bool inquiry_light_control;
|
||||
int inquiry_max_shading_target;
|
||||
|
||||
/* the list of available color modes */
|
||||
SANE_String_Const color_list[AV_COLOR_MODE_LAST];
|
||||
color_mode color_list_num[AV_COLOR_MODE_LAST];
|
||||
|
||||
/* the list of available source modes */
|
||||
SANE_String_Const source_list[AV_SOURCE_MODE_LAST];
|
||||
source_mode source_list_num[AV_SOURCE_MODE_LAST];
|
||||
|
||||
int inquiry_optical_res; /* in dpi */
|
||||
int inquiry_max_res; /* in dpi */
|
||||
|
||||
|
@ -230,17 +242,20 @@ typedef struct Avision_Device
|
|||
int inquiry_dithered_boundary;
|
||||
int inquiry_thresholded_boundary;
|
||||
int inquiry_line_difference; /* software color pack */
|
||||
|
||||
/* int inquiry_bits_per_channel; */
|
||||
|
||||
int inquiry_channels_per_pixel;
|
||||
int inquiry_bits_per_channel;
|
||||
|
||||
int scsi_buffer_size; /* nice to have SCSI buffer size */
|
||||
|
||||
/* additional information - read delayed until sane_open() */
|
||||
|
||||
SANE_Bool additional_probe;
|
||||
|
||||
/* accessories */
|
||||
SANE_Bool acc_light_box;
|
||||
SANE_Bool acc_adf;
|
||||
|
||||
SANE_Bool is_adf; /* ADF scanner */
|
||||
|
||||
/* film scanner atributes - maybe these should be in the scanner struct? */
|
||||
SANE_Range frame_range;
|
||||
SANE_Word current_frame;
|
||||
|
@ -249,9 +264,6 @@ typedef struct Avision_Device
|
|||
/* some versin corrections */
|
||||
u_int16_t data_dq; /* was ox0A0D - but hangs some new scanners */
|
||||
|
||||
/* driver state */
|
||||
SANE_Bool is_calibrated;
|
||||
|
||||
Avision_HWEntry* hw;
|
||||
} Avision_Device;
|
||||
|
||||
|
@ -265,8 +277,10 @@ typedef struct Avision_Scanner
|
|||
Option_Value val [NUM_OPTIONS];
|
||||
SANE_Int gamma_table [4][256];
|
||||
|
||||
/* page (ADF) state */
|
||||
int page;
|
||||
/* we now save the calib data because we might need it for 16bit software
|
||||
calibration :-( */
|
||||
u_int8_t* dark_avg_data;
|
||||
u_int8_t* white_avg_data;
|
||||
|
||||
/* Parsed option values and variables that are valid only during
|
||||
the actual scan: */
|
||||
|
@ -293,6 +307,12 @@ typedef struct Avision_Scanner
|
|||
/* Some Avision driver internal defines */
|
||||
#define AV_WINID 0
|
||||
|
||||
/* SCSI error codes */
|
||||
#define AVISION_SCSI_GOOD 0x00
|
||||
#define AVISION_SCSI_CONDITION_GOOD 0x02
|
||||
#define AVISION_SCSI_INTERMEDIATE_GOOD 0x08
|
||||
#define AVISION_SCSI_INTERMEDIATE_C_GOOD 0x0a
|
||||
|
||||
/* SCSI commands that the Avision scanners understand: */
|
||||
|
||||
#define AVISION_SCSI_TEST_UNIT_READY 0x00
|
||||
|
|
Ładowanie…
Reference in New Issue