kopia lustrzana https://gitlab.com/sane-project/website
113 wiersze
4.5 KiB
HTML
113 wiersze
4.5 KiB
HTML
<!-- received="Tue Mar 18 17:42:56 1997 MST" -->
|
|
<!-- sent="Tue, 18 Mar 1997 17:40:36 -0700" -->
|
|
<!-- name="David Mosberger-Tang" -->
|
|
<!-- email="davidm@azstarnet.com" -->
|
|
<!-- subject="Re: BW QuickCam" -->
|
|
<!-- id="199703190040.RAA10706@panda.mosberger" -->
|
|
<!-- inreplyto="BW QuickCam" -->
|
|
<title>sane-devel: Re: BW QuickCam</title>
|
|
<h1>Re: BW QuickCam</h1>
|
|
<b>David Mosberger-Tang</b> (<a href="mailto:davidm@azstarnet.com"><i>davidm@azstarnet.com</i></a>)<br>
|
|
<i>Tue, 18 Mar 1997 17:40:36 -0700</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#14">[ date ]</a><a href="index.html#14">[ thread ]</a><a href="subject.html#14">[ subject ]</a><a href="author.html#14">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0015.html">Alex Belits: "QuickCam drivers"</a>
|
|
<li> <b>Previous message:</b> <a href="0013.html">Guido Muesch: "BW QuickCam"</a>
|
|
<li> <b>Maybe in reply to:</b> <a href="0013.html">Guido Muesch: "BW QuickCam"</a>
|
|
<!-- nextthread="start" -->
|
|
<li> <b>Next in thread:</b> <a href="0030.html">David Mosberger-Tang: "Re: BW QuickCam"</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
<i>>>>>> On Mon, 17 Mar 1997 23:11:14 +0100 (MET), Guido Muesch <<a href="mailto:odiug@faho.rwth-aachen.de">odiug@faho.rwth-aachen.de</a>> said:</i><br>
|
|
<p>
|
|
Guido> qcam.README says: The qcam backend currently works for the<br>
|
|
Guido> Connectix _color_ QuickCam only. Almost all code is there<br>
|
|
Guido> for the black&white camera is there, but it hasn't been<br>
|
|
Guido> finished or tested yet.<br>
|
|
<p>
|
|
Guido> So what is missing? I have not looked deeper into the code<br>
|
|
Guido> yet. Any help needed? Testing?<br>
|
|
<p>
|
|
Can you try it after applying this patch to sane-pre0.5? If it<br>
|
|
doesn't work, could you send me the debug output you get when<br>
|
|
running:<br>
|
|
<p>
|
|
SANE_DEBUG_QCAM=128 scan -d qcam >/dev/null<br>
|
|
<p>
|
|
Good luck,<br>
|
|
<p>
|
|
--david<br>
|
|
<p>
|
|
--- backend/qcam.c~ Mon Mar 10 22:31:53 1997<br>
|
|
+++ backend/qcam.c Tue Mar 18 17:27:37 1997<br>
|
|
@@ -664,38 +664,25 @@<br>
|
|
}<br>
|
|
<br>
|
|
if (q->version == QC_COLOR)<br>
|
|
- {<br>
|
|
- for (len = 0; len < num_bytes; len += count)<br>
|
|
- count = qc_readbytes (s, buffer + len);<br>
|
|
- }<br>
|
|
+ for (len = 0; len < num_bytes; len += count)<br>
|
|
+ count = qc_readbytes (s, buffer + len);<br>
|
|
else<br>
|
|
{<br>
|
|
-#ifdef XXX<br>
|
|
/* strange -- should be 15:63 below, but 4bpp is odd */<br>
|
|
- invert = (s->val[OPT_DEPTH] == 4) ? 16 : 63;<br>
|
|
+ int i, invert = (s->val[OPT_DEPTH].w == 4) ? 16 : 63;<br>
|
|
<br>
|
|
- for (i = 0; i < linestotrans; i++)<br>
|
|
+ for (len = 0; len < num_bytes; len += count)<br>
|
|
{<br>
|
|
- for (pixels_read = j = 0; j < transperline; j++)<br>
|
|
+ count = qc_readbytes (s, buffer + len);<br>
|
|
+ for (i = 0; i < count; ++i)<br>
|
|
{<br>
|
|
- bytes = qc_readbytes (q, buffer);<br>
|
|
- assert (bytes > 0);<br>
|
|
- for (k = 0; k < bytes && (pixels_read + k) < pixels_per_line; k++)<br>
|
|
- {<br>
|
|
- assert (buffer[k] <= invert);<br>
|
|
- if (buffer[k] == 0 && invert == 16)<br>
|
|
- {<br>
|
|
- /* 4bpp is odd (again) -- inverter is 16, not<br>
|
|
- 15, but output must be 0-15 */<br>
|
|
- buffer[k] = 16;<br>
|
|
- }<br>
|
|
- ret[i*pixels_per_line + pixels_read + k] = invert - buffer[k];<br>
|
|
- }<br>
|
|
- pixels_read += bytes;<br>
|
|
+ /* 4bpp is odd (again) -- inverter is 16, not 15,<br>
|
|
+ but output must be 0-15 */<br>
|
|
+ if (buffer[len + i] > 0 || invert != 16)<br>
|
|
+ buffer[len + i] = invert - buffer[len + i];<br>
|
|
}<br>
|
|
- qc_readbytes (q, 0); /* reset state machine */<br>
|
|
}<br>
|
|
-#endif<br>
|
|
+ qc_readbytes (s, 0); /* reset state machine */<br>
|
|
}<br>
|
|
/* we're done reading this frame: */<br>
|
|
DBG(2, "qcam.reader_process: frame complete\n");<br>
|
|
<p>
|
|
<pre>
|
|
--
|
|
Source code, list archive, and docs: <a href="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</a>
|
|
To unsubscribe: mail -s unsubscribe <a href="mailto:sane-devel-request@listserv.azstarnet.com">sane-devel-request@listserv.azstarnet.com</a>
|
|
</pre>
|
|
<!-- body="end" -->
|
|
<p>
|
|
<ul>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0015.html">Alex Belits: "QuickCam drivers"</a>
|
|
<li> <b>Previous message:</b> <a href="0013.html">Guido Muesch: "BW QuickCam"</a>
|
|
<li> <b>Maybe in reply to:</b> <a href="0013.html">Guido Muesch: "BW QuickCam"</a>
|
|
<!-- nextthread="start" -->
|
|
<li> <b>Next in thread:</b> <a href="0030.html">David Mosberger-Tang: "Re: BW QuickCam"</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|