kopia lustrzana https://gitlab.com/sane-project/backends
				
				
				
			canon_dr backend v27, bugfixes and new calibration code
- bug fix in read_panel() - initialize vars in do_usb_cmd() - set buffermode off by default - clear page counter during init and sane_start() - eject previous page during init and sane_start() - improved SSM_BUFF macros - moved set_window() to after ssm-*() - add coarse calibration (AFE offset/gain & per-channel exposure) - add fine calibration (per-cell offset/gain) - free image and fine cal buffers in sane_close() - compare page counter of small scanners only in non-buffered mode - add back-side gray mirroring code for DR-2580Cmerge-requests/1/head
							rodzic
							
								
									484478524e
								
							
						
					
					
						commit
						024cd35c9c
					
				
							
								
								
									
										15
									
								
								ChangeLog
								
								
								
								
							
							
						
						
									
										15
									
								
								ChangeLog
								
								
								
								
							| 
						 | 
				
			
			@ -1,3 +1,18 @@
 | 
			
		|||
2009-05-08 m. allan noah <kitno455 at gmail dot com>
 | 
			
		||||
	* backend/canon_dr*: backend v27
 | 
			
		||||
	- bug fix in read_panel()
 | 
			
		||||
	- initialize vars in do_usb_cmd()
 | 
			
		||||
	- set buffermode off by default
 | 
			
		||||
	- clear page counter during init and sane_start()
 | 
			
		||||
	- eject previous page during init and sane_start()
 | 
			
		||||
	- improved SSM_BUFF macros
 | 
			
		||||
	- moved set_window() to after ssm-*()
 | 
			
		||||
	- add coarse calibration (AFE offset/gain & per-channel exposure)
 | 
			
		||||
	- add fine calibration (per-cell offset/gain)
 | 
			
		||||
	- free image and fine cal buffers in sane_close()
 | 
			
		||||
	- compare page counter of small scanners only in non-buffered mode
 | 
			
		||||
	- add back-side gray mirroring code for DR-2580C
 | 
			
		||||
 | 
			
		||||
2009-05-06  Nicolas Martin <nicols-guest at users.alioth.debian.org> 
 | 
			
		||||
	* doc/descriptions/pixma.desc:
 | 
			
		||||
	Updated descriptions in pixma backend for ImageClass MF4010 and MF4018.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -307,18 +307,20 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
 | 
			
		|||
#define SSM_PAGE_len                    0x0e
 | 
			
		||||
#define set_SSM_page_len(sb, val)       sb[0x05] = val
 | 
			
		||||
 | 
			
		||||
/* for DF page */
 | 
			
		||||
/* for DF (0x30) page */
 | 
			
		||||
#define set_SSM_DF_deskew_roll(sb, val) setbitfield(sb+7, 1, 5, val)
 | 
			
		||||
#define set_SSM_DF_staple(sb, val)      setbitfield(sb+7, 1, 4, val)
 | 
			
		||||
#define set_SSM_DF_thick(sb, val)       setbitfield(sb+7, 1, 2, val)
 | 
			
		||||
#define set_SSM_DF_len(sb, val)         setbitfield(sb+7, 1, 0, val)
 | 
			
		||||
#define set_SSM_DF_textdir(sb, val)     setbitfield(sb+9, 0xf, 0, val)
 | 
			
		||||
 | 
			
		||||
/* for BUFFER page */
 | 
			
		||||
#define set_SSM_BUFF_duplex(sb, val)    sb[0x06] = val
 | 
			
		||||
#define set_SSM_BUFF_async(sb, val)     sb[0x0a] = val
 | 
			
		||||
/* for BUFFER (0x32) page */
 | 
			
		||||
#define set_SSM_BUFF_duplex(sb, val)    setbitfield(sb+6, 1, 1, val)
 | 
			
		||||
#define set_SSM_BUFF_unk(sb, val)       sb[0x07] = val
 | 
			
		||||
#define set_SSM_BUFF_async(sb, val)     setbitfield(sb+0x0a, 1, 6, val)
 | 
			
		||||
#define set_SSM_BUFF_ald(sb, val)       setbitfield(sb+0x0a, 1, 5, val)
 | 
			
		||||
 | 
			
		||||
/* for DO page */
 | 
			
		||||
/* for DO (0x36) page */
 | 
			
		||||
#define SSM_DO_none                     0
 | 
			
		||||
#define SSM_DO_red                      1
 | 
			
		||||
#define SSM_DO_green                    2
 | 
			
		||||
| 
						 | 
				
			
			@ -345,6 +347,28 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
 | 
			
		|||
/* the payload */
 | 
			
		||||
#define CC_pay_len                  0x20
 | 
			
		||||
 | 
			
		||||
#define set_CC_f_gain(sb, val)      sb[0] = val
 | 
			
		||||
#define set_CC_unk1(sb, val)        sb[1] = val
 | 
			
		||||
#define set_CC_f_offset(sb, val)    sb[2] = val
 | 
			
		||||
#define set_CC_unk2(sb, val)        sb[3] = val
 | 
			
		||||
 | 
			
		||||
#define set_CC_exp_f_r1(sb, val)    putnbyte(sb + 0x04, val, 2)
 | 
			
		||||
#define set_CC_exp_f_g1(sb, val)    putnbyte(sb + 0x06, val, 2)
 | 
			
		||||
#define set_CC_exp_f_b1(sb, val)    putnbyte(sb + 0x08, val, 2)
 | 
			
		||||
#define set_CC_exp_f_r2(sb, val)    putnbyte(sb + 0x0a, val, 2)
 | 
			
		||||
#define set_CC_exp_f_g2(sb, val)    putnbyte(sb + 0x0c, val, 2)
 | 
			
		||||
#define set_CC_exp_f_b2(sb, val)    putnbyte(sb + 0x0e, val, 2)
 | 
			
		||||
 | 
			
		||||
#define set_CC_b_gain(sb, val)      sb[0x10] = val
 | 
			
		||||
#define set_CC_b_offset(sb, val)    sb[0x12] = val
 | 
			
		||||
 | 
			
		||||
#define set_CC_exp_b_r1(sb, val)    putnbyte(sb + 0x14, val, 2)
 | 
			
		||||
#define set_CC_exp_b_g1(sb, val)    putnbyte(sb + 0x16, val, 2)
 | 
			
		||||
#define set_CC_exp_b_b1(sb, val)    putnbyte(sb + 0x18, val, 2)
 | 
			
		||||
#define set_CC_exp_b_r2(sb, val)    putnbyte(sb + 0x1a, val, 2)
 | 
			
		||||
#define set_CC_exp_b_g2(sb, val)    putnbyte(sb + 0x1c, val, 2)
 | 
			
		||||
#define set_CC_exp_b_b2(sb, val)    putnbyte(sb + 0x1e, val, 2)
 | 
			
		||||
 | 
			
		||||
/* ==================================================================== */
 | 
			
		||||
/* window descriptor macros for SET_WINDOW and GET_WINDOW */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												Plik diff jest za duży
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -133,7 +133,8 @@ struct scanner
 | 
			
		|||
  int max_x_fb;
 | 
			
		||||
  int max_y_fb;
 | 
			
		||||
 | 
			
		||||
  int can_color; /* actually might be in vpd, but which bit? */
 | 
			
		||||
  int can_color;     /* actually might be in vpd, but which bit? */
 | 
			
		||||
  int need_cal;      /* scanner needs software to help with calibration */
 | 
			
		||||
 | 
			
		||||
  int has_counter;
 | 
			
		||||
  int has_rif;
 | 
			
		||||
| 
						 | 
				
			
			@ -257,6 +258,21 @@ struct scanner
 | 
			
		|||
  */
 | 
			
		||||
  SANE_Parameters params;
 | 
			
		||||
 | 
			
		||||
  /* --------------------------------------------------------------------- */
 | 
			
		||||
  /* values which are set by calibration functions                         */
 | 
			
		||||
  int c_res;
 | 
			
		||||
  int c_mode;
 | 
			
		||||
 | 
			
		||||
  int c_offset[2];
 | 
			
		||||
  int c_gain[2];
 | 
			
		||||
  int c_exposure[2][3];
 | 
			
		||||
 | 
			
		||||
  int f_res;
 | 
			
		||||
  int f_mode;
 | 
			
		||||
 | 
			
		||||
  unsigned char * f_offset[2];
 | 
			
		||||
  unsigned char * f_gain[2];
 | 
			
		||||
 | 
			
		||||
  /* --------------------------------------------------------------------- */
 | 
			
		||||
  /* values which are set by scanning functions to keep track of pages, etc */
 | 
			
		||||
  int started;
 | 
			
		||||
| 
						 | 
				
			
			@ -308,6 +324,10 @@ struct scanner
 | 
			
		|||
#define SIDE_FRONT 0
 | 
			
		||||
#define SIDE_BACK 1
 | 
			
		||||
 | 
			
		||||
#define CHAN_RED 0
 | 
			
		||||
#define CHAN_GREEN 1
 | 
			
		||||
#define CHAN_BLUE 2
 | 
			
		||||
 | 
			
		||||
#define SOURCE_FLATBED 0
 | 
			
		||||
#define SOURCE_ADF_FRONT 1
 | 
			
		||||
#define SOURCE_ADF_BACK 2
 | 
			
		||||
| 
						 | 
				
			
			@ -341,6 +361,7 @@ enum {
 | 
			
		|||
 | 
			
		||||
#define GRAY_INTERLACE_NONE 0
 | 
			
		||||
#define GRAY_INTERLACE_2510 1
 | 
			
		||||
#define GRAY_INTERLACE_gG 2
 | 
			
		||||
 | 
			
		||||
#define COLOR_INTERLACE_RGB 0
 | 
			
		||||
#define COLOR_INTERLACE_BGR 1
 | 
			
		||||
| 
						 | 
				
			
			@ -473,12 +494,12 @@ static SANE_Status set_window (struct scanner *s);
 | 
			
		|||
static SANE_Status read_panel(struct scanner *s, SANE_Int option);
 | 
			
		||||
static SANE_Status send_panel(struct scanner *s);
 | 
			
		||||
 | 
			
		||||
static SANE_Status start_scan (struct scanner *s);
 | 
			
		||||
static SANE_Status start_scan (struct scanner *s, int type);
 | 
			
		||||
 | 
			
		||||
static SANE_Status cancel(struct scanner *s);
 | 
			
		||||
 | 
			
		||||
static SANE_Status read_from_scanner(struct scanner *s, int side);
 | 
			
		||||
static SANE_Status read_from_scanner_duplex(struct scanner *s);
 | 
			
		||||
static SANE_Status read_from_scanner(struct scanner *s, int side, int exact);
 | 
			
		||||
static SANE_Status read_from_scanner_duplex(struct scanner *s, int exact);
 | 
			
		||||
 | 
			
		||||
static SANE_Status copy_simplex(struct scanner *s, unsigned char * buf, int len, int side);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -486,7 +507,15 @@ static SANE_Status copy_duplex(struct scanner *s, unsigned char * buf, int len);
 | 
			
		|||
 | 
			
		||||
static SANE_Status read_from_buffer(struct scanner *s, SANE_Byte * buf, SANE_Int max_len, SANE_Int * len, int side);
 | 
			
		||||
 | 
			
		||||
static SANE_Status setup_buffers (struct scanner *s);
 | 
			
		||||
static SANE_Status image_buffers (struct scanner *s, int setup);
 | 
			
		||||
static SANE_Status offset_buffers (struct scanner *s, int setup);
 | 
			
		||||
static SANE_Status gain_buffers (struct scanner *s, int setup);
 | 
			
		||||
 | 
			
		||||
static SANE_Status calibrate_AFE(struct scanner *s);
 | 
			
		||||
static SANE_Status calibrate_fine(struct scanner *s);
 | 
			
		||||
 | 
			
		||||
static SANE_Status write_AFE (struct scanner *s);
 | 
			
		||||
static SANE_Status calibration_scan (struct scanner *s, int);
 | 
			
		||||
 | 
			
		||||
static void hexdump (int level, char *comment, unsigned char *p, int l);
 | 
			
		||||
static void default_globals (void);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue