summaryrefslogtreecommitdiff
path: root/backend/stv680.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/stv680.c')
-rw-r--r--backend/stv680.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/backend/stv680.c b/backend/stv680.c
index 15a8472..473def0 100644
--- a/backend/stv680.c
+++ b/backend/stv680.c
@@ -2,10 +2,10 @@
Copyright (C) 2004 - 2006 Gerard Klaver <gerard at gkall dot hobby dot nl>
- The teco2 and gl646 backend (Frank Zago) are used as a template for
+ The teco2 and gl646 backend (Frank Zago) are used as a template for
this backend.
- For the usb commands and bayer decoding parts of the following
+ For the usb commands and bayer decoding parts of the following
program are used:
The pencam2 program (GNU GPL license 2)
@@ -13,22 +13,22 @@
The libgphoto2 (camlib stv0680) (GNU GPL license 2)
The stv680.c/.h kernel module (GNU GPL license 2)
- For the stv680_add_text routine the add_text routine and font_6x11.h file
+ For the stv680_add_text routine the add_text routine and font_6x11.h file
are taken from the webcam.c file, part of xawtv program,
(c) 1998-2002 Gerd Knorr (GNU GPL license 2).
This file is part of the SANE package.
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston,
@@ -54,7 +54,7 @@
. . - sane_start() : start image acquisition
. . - sane_get_parameters() : returns actual scan parameters
. . - sane_read() : read image data (from pipe)
- . . (sane_read called multiple times;
+ . . (sane_read called multiple times;
. . after sane_read returns EOF)
. . go back to sane_start() if more frames desired
. . - sane_cancel() : cancel operation
@@ -559,7 +559,7 @@ stv680_identify_vidcam (Stv680_Vidcam * dev)
"stv680_vidcam_init: STV680 FAILED to set configure\n");
return status;
}
- */
+ */
sizer = 0x02;
status =
sanei_usb_control_msg (dev->fd, 0xc1, 0x88, 0x5678, 0, sizer,
@@ -1180,7 +1180,7 @@ stv680_fill_image (Stv680_Vidcam * dev)
/* i = stv_sndctrl (0, dev, 0x80, 0, &window, 0x02); *//* Get Last Error */
/* DBG (DBG_proc, "STV(i): last error: %i, command = 0x%x", window[0], window[1]);
return -1; */
-/*
+/*
}
return 0; */
@@ -1189,8 +1189,8 @@ stv680_fill_image (Stv680_Vidcam * dev)
}
#define MSG_MAXLEN 45
-#define CHAR_HEIGHT 11
-#define CHAR_WIDTH 6
+#define TEXT_CHAR_HEIGHT 11
+#define TEXT_CHAR_WIDTH 6
#define CHAR_START 4
static SANE_Status
@@ -1216,14 +1216,14 @@ stv680_add_text (SANE_Byte * image, int width, int height, char *txt)
len = strftime (line, MSG_MAXLEN, fmttxt, tm);
- for (y = 0; y < CHAR_HEIGHT; y++)
+ for (y = 0; y < TEXT_CHAR_HEIGHT; y++)
{
- ptr = image + 3 * width * (height - CHAR_HEIGHT - 2 + y) + 12;
+ ptr = image + 3 * width * (height - TEXT_CHAR_HEIGHT - 2 + y) + 12;
for (x = 0; x < len; x++)
{
- f = fontdata[line[x] * CHAR_HEIGHT + y];
- for (i = CHAR_WIDTH - 1; i >= 0; i--)
+ f = fontdata[line[x] * TEXT_CHAR_HEIGHT + y];
+ for (i = TEXT_CHAR_WIDTH - 1; i >= 0; i--)
{
if (f & (CHAR_START << i))
{
@@ -1315,9 +1315,9 @@ stv680_bayer_unshuffle (Stv680_Vidcam * dev, SANE_Byte * buf, size_t * size)
} /* for y */
/****** gamma correction plus hardcoded white balance */
- /* Correction values red[], green[], blue[], are generated by
- (pow(i/256.0, GAMMA)*255.0)*white balanceRGB where GAMMA=0.55, 1<i<255.
- White balance (RGB)= 1.0, 1.17, 1.48. Values are calculated as double float and
+ /* Correction values red[], green[], blue[], are generated by
+ (pow(i/256.0, GAMMA)*255.0)*white balanceRGB where GAMMA=0.55, 1<i<255.
+ White balance (RGB)= 1.0, 1.17, 1.48. Values are calculated as double float and
converted to unsigned char. Values are in stv680.h */
if (dev->scan_mode == STV680_COLOR_RGB
|| dev->scan_mode == STV680_COLOR_RGB_TEXT)