sane-project-website/old-archive/1997-05/0120.html

71 wiersze
3.3 KiB
HTML

<!-- received="Thu Jun 19 10:17:11 1997 MST" -->
<!-- sent="Thu, 19 Jun 1997 13:09:18 -0400 (EDT)" -->
<!-- name="Andrew Kuchling" -->
<!-- email="amk@magnet.com" -->
<!-- subject="Re: QuickCam bit depth wired to 8: why?" -->
<!-- id="199706191709.NAA23353@lemur.magnet.com" -->
<!-- inreplyto="QuickCam bit depth wired to 8: why?" -->
<title>sane-devel: Re: QuickCam bit depth wired to 8: why?</title>
<h1>Re: QuickCam bit depth wired to 8: why?</h1>
<b>Andrew Kuchling</b> (<a href="mailto:amk@magnet.com"><i>amk@magnet.com</i></a>)<br>
<i>Thu, 19 Jun 1997 13:09:18 -0400 (EDT)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#120">[ date ]</a><a href="index.html#120">[ thread ]</a><a href="subject.html#120">[ subject ]</a><a href="author.html#120">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0121.html">Mathias Weigt: "Problem compiling umax-driver with glibc-2.03"</a>
<li> <b>Previous message:</b> <a href="0119.html">David Mosberger-Tang: "Re: QuickCam bit depth wired to 8: why?"</a>
<li> <b>Maybe in reply to:</b> <a href="0115.html">Andrew Kuchling: "QuickCam bit depth wired to 8: why?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
David Mosberger-Tang wrote:<br>
<i>&gt;qc_readbytes() would be the right place. Cases 4 and 6 there can occur</i><br>
<i>&gt;with the b&amp;w camera only.</i><br>
<p>
However, reader_process also inverts the values for the B&amp;W<br>
qcam, so just shifting things over in qc_readbytes() isn't enough.<br>
For the moment I've added the shift to reader_process() after the<br>
inversion (patch included below FYI) and it works fine; if doing the<br>
shift in reader_process() is unacceptable, let me know and I'll redo<br>
the patch. (Maybe the inversion should be taken out of reader_process<br>
and moved into the 4- and 6-bit cases in qc_readbytes?)<br>
<p>
<p>
Andrew Kuchling<br>
<a href="mailto:amk@magnet.com">amk@magnet.com</a><br>
<a href="http://people.magnet.com/%7Eamk/">http://people.magnet.com/%7Eamk/</a><br>
<p>
<p>
diff -urN /scratch/sane-0.6/backend/qcam.c sane-0.6/backend/qcam.c<br>
--- /scratch/sane-0.6/backend/qcam.c Sat Jun 14 17:30:54 1997<br>
+++ sane-0.6/backend/qcam.c Thu Jun 19 12:50:33 1997<br>
@@ -858,6 +858,10 @@<br>
but output must be 0-15 */<br>
if (buffer[len + i] &gt; 0 || invert != 16)<br>
buffer[len + i] = invert - buffer[len + i];<br>
+ if (invert==16) <br>
+ buffer[len+i] &lt;&lt;= 4;<br>
+ else <br>
+ buffer[len+i] &lt;&lt;= 2;<br>
}<br>
}<br>
qc_readbytes (s, 0); /* reset state machine */<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="0121.html">Mathias Weigt: "Problem compiling umax-driver with glibc-2.03"</a>
<li> <b>Previous message:</b> <a href="0119.html">David Mosberger-Tang: "Re: QuickCam bit depth wired to 8: why?"</a>
<li> <b>Maybe in reply to:</b> <a href="0115.html">Andrew Kuchling: "QuickCam bit depth wired to 8: why?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>