summaryrefslogtreecommitdiffstats
path: root/sys/qcam
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2005-12-06 19:55:58 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2005-12-06 19:55:58 +0000
commitbdb814f6ef56edca67e1241eb16df22fdd8ab17c (patch)
tree7b43c9dfbf67b852503d263a322064f0101bf591 /sys/qcam
parent04ad447fcfa1502907339a6a68e975bb6d35536a (diff)
downloadgst-plugins-bad-bdb814f6ef56edca67e1241eb16df22fdd8ab17c.tar.gz
gst-plugins-bad-bdb814f6ef56edca67e1241eb16df22fdd8ab17c.tar.bz2
gst-plugins-bad-bdb814f6ef56edca67e1241eb16df22fdd8ab17c.zip
expand tabs
Original commit message from CVS: expand tabs
Diffstat (limited to 'sys/qcam')
-rw-r--r--sys/qcam/dark.c58
-rw-r--r--sys/qcam/gstqcamsrc.c26
2 files changed, 42 insertions, 42 deletions
diff --git a/sys/qcam/dark.c b/sys/qcam/dark.c
index ac462b36..cdfa2ab8 100644
--- a/sys/qcam/dark.c
+++ b/sys/qcam/dark.c
@@ -25,17 +25,17 @@ OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
/* Fixdark
- Routine to repair dark current artifacts in qcam output.
- Basic idea: the Qcam CCD suffers from "dark current";
- that is, some of the CCD pixels will leak current under
- long exposures, even if they're in the dark, and this
- shows up as ugly speckling on images taken in low light.
+ Routine to repair dark current artifacts in qcam output.
+ Basic idea: the Qcam CCD suffers from "dark current";
+ that is, some of the CCD pixels will leak current under
+ long exposures, even if they're in the dark, and this
+ shows up as ugly speckling on images taken in low light.
- Fortunately, the leaky pixels are the same from shot to
- shot. So, we can figure out which pixels are leaky by
- taking some establishing shots in the dark, and try to
- fix those pixels on subsequent shots. The dark
- establishing shots need only be done once per camera.
+ Fortunately, the leaky pixels are the same from shot to
+ shot. So, we can figure out which pixels are leaky by
+ taking some establishing shots in the dark, and try to
+ fix those pixels on subsequent shots. The dark
+ establishing shots need only be done once per camera.
*/
#ifdef HAVE_CONFIG_H
@@ -77,7 +77,7 @@ read_darkmask()
}
if (fread(master_darkmask1, sizeof(unsigned char), MAX_WIDTH*MAX_HEIGHT, fp) !=
- MAX_WIDTH*MAX_HEIGHT) {
+ MAX_WIDTH*MAX_HEIGHT) {
#ifdef DEBUG
fprintf(stderr, "Error reading darkfile\n");
#endif
@@ -88,14 +88,14 @@ read_darkmask()
for (x = 0; x < MAX_WIDTH; x += 2) {
min_bright = master_darkmask1[y][x];
if (y < MAX_HEIGHT-1 && master_darkmask1[y+1][x] < min_bright)
- min_bright = master_darkmask1[y+1][x];
+ min_bright = master_darkmask1[y+1][x];
if (x < MAX_WIDTH-1 && master_darkmask1[y][x+1] < min_bright)
- min_bright = master_darkmask1[y][x+1];
+ min_bright = master_darkmask1[y][x+1];
if (y < MAX_HEIGHT-1 && x < MAX_WIDTH-1 && master_darkmask1[y+1][x+1] < min_bright)
- min_bright = master_darkmask1[y+1][x+1];
+ min_bright = master_darkmask1[y+1][x+1];
master_darkmask2[y/2][x/2] = min_bright;
- assert(y/2 < MAX_HEIGHT/2+1);
- assert(x/2 < MAX_WIDTH/2+1);
+ assert(y/2 < MAX_HEIGHT/2+1);
+ assert(x/2 < MAX_WIDTH/2+1);
}
}
@@ -103,14 +103,14 @@ read_darkmask()
for (x = 0; x < MAX_WIDTH/2; x += 2) {
min_bright = master_darkmask2[y][x];
if (y < MAX_HEIGHT/2-1 && master_darkmask2[y+1][x] < min_bright)
- min_bright = master_darkmask2[y+1][x];
+ min_bright = master_darkmask2[y+1][x];
if (x < MAX_WIDTH/2-1 && master_darkmask2[y][x+1] < min_bright)
- min_bright = master_darkmask2[y][x+1];
+ min_bright = master_darkmask2[y][x+1];
if (y < MAX_HEIGHT/2-1 && x < MAX_WIDTH-1 && master_darkmask2[y+1][x+1] < min_bright)
- min_bright = master_darkmask2[y+1][x+1];
+ min_bright = master_darkmask2[y+1][x+1];
master_darkmask4[y/2][x/2] = min_bright;
- assert(y/2 < MAX_HEIGHT/4+1);
- assert(x/2 < MAX_WIDTH/4+1);
+ assert(y/2 < MAX_HEIGHT/4+1);
+ assert(x/2 < MAX_WIDTH/4+1);
}
}
@@ -121,15 +121,15 @@ read_darkmask()
/* fixdark
- We first record a list of bad leaky pixels, by making a
- number of exposures in the dark. master_darkmask holds
- this information. It's a map of the CCD.
- master_darkmask[y][x] == val means that the pixel is
- unreliable for brightnesses of "val" and above.
+ We first record a list of bad leaky pixels, by making a
+ number of exposures in the dark. master_darkmask holds
+ this information. It's a map of the CCD.
+ master_darkmask[y][x] == val means that the pixel is
+ unreliable for brightnesses of "val" and above.
- We go over the image. If a pixel is bad, look at the
- adjacent four pixels, average the ones that have good
- values, and use that instead.
+ We go over the image. If a pixel is bad, look at the
+ adjacent four pixels, average the ones that have good
+ values, and use that instead.
*/
int
diff --git a/sys/qcam/gstqcamsrc.c b/sys/qcam/gstqcamsrc.c
index 901beca5..2bae6d85 100644
--- a/sys/qcam/gstqcamsrc.c
+++ b/sys/qcam/gstqcamsrc.c
@@ -40,19 +40,19 @@ GST_ELEMENT_DETAILS ("QCam Source",
"Read from a QuickCam device",
"Wim Taymans <wim.taymans@chello.be>");
-#define AE_NONE 3
-
-#define DEF_WIDTH 320
-#define DEF_HEIGHT 224
-#define DEF_BRIGHTNESS 226
-#define DEF_WHITEBAL 128
-#define DEF_CONTRAST 72
-#define DEF_TOP 1
-#define DEF_LEFT 14
-#define DEF_TRANSFER_SCALE 2
-#define DEF_DEPTH 6
-#define DEF_PORT 0x378
-#define DEF_AUTOEXP AE_NONE
+#define AE_NONE 3
+
+#define DEF_WIDTH 320
+#define DEF_HEIGHT 224
+#define DEF_BRIGHTNESS 226
+#define DEF_WHITEBAL 128
+#define DEF_CONTRAST 72
+#define DEF_TOP 1
+#define DEF_LEFT 14
+#define DEF_TRANSFER_SCALE 2
+#define DEF_DEPTH 6
+#define DEF_PORT 0x378
+#define DEF_AUTOEXP AE_NONE
static GstStaticPadTemplate gst_qcamsrc_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",