sane-project-website/old-archive/2001-03/0256.html

198 wiersze
7.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: Scan ahead</TITLE>
<META NAME="Author" CONTENT="Tom Martone (tom@martoneconsulting.com)">
<META NAME="Subject" CONTENT="Re: Scan ahead">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: Scan ahead</H1>
<!-- received="Sat Mar 31 08:32:28 2001" -->
<!-- isoreceived="20010331163228" -->
<!-- sent="Sat, 31 Mar 2001 12:00:39 -0500" -->
<!-- isosent="20010331170039" -->
<!-- name="Tom Martone" -->
<!-- email="tom@martoneconsulting.com" -->
<!-- subject="Re: Scan ahead" -->
<!-- id="3AC60D37.C5A113BD@martoneconsulting.com" -->
<!-- inreplyto="200103302054.MAA19579@icarus.com" -->
<STRONG>From:</STRONG> Tom Martone (<A HREF="mailto:tom@martoneconsulting.com?Subject=Re:%20Scan%20ahead&In-Reply-To=&lt;3AC60D37.C5A113BD@martoneconsulting.com&gt;"><EM>tom@martoneconsulting.com</EM></A>)<BR>
<STRONG>Date:</STRONG> Sat Mar 31 2001 - 09:00:39 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0257.html">Henning Meier-Geinitz: "Re: preview and selectable scanarea for MFS-12000's ADF"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0255.html">Karsten Festag: "Re: microtek2 and scsi_read_image_status"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0252.html">Stephen Williams: "Re: Scan ahead"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#256">[ date ]</A>
<A HREF="index.html#256">[ thread ]</A>
<A HREF="subject.html#256">[ subject ]</A>
<A HREF="author.html#256">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Greetings,
<BR>
<P>Stephen Williams wrote:
<BR>
<EM>&gt;
</EM><BR>
<EM>&gt; <A HREF="mailto:peter@kirchgessner.net?Subject=Re:%20Scan%20ahead&In-Reply-To=&lt;3AC60D37.C5A113BD@martoneconsulting.com&gt;">peter@kirchgessner.net</A> said:
</EM><BR>
<EM>&gt; &gt; I dont know a scanner that can store a single frame completely. For an
</EM><BR>
<EM>&gt; &gt; A4 scan at 600 dpi with 24bit you would need about 100MB of memory.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; I know several, and they are grayscale and color. And we keep building
</EM><BR>
<EM>&gt; more because this pipelining really does help when you are talking about
</EM><BR>
<EM>&gt; large batches. Of course, we are not talking about desk-top flat-bed
</EM><BR>
<EM>&gt; scanners here:-)
</EM><BR>
<P>The Bell+Howell CopiScan series scanners have an Remote SCSI Controller
<BR>
that is a little computer with memory sufficient to store images
<BR>
and perform operations such as compression, automatic border detection,
<BR>
deskew, etc. This is done in b/w at resolutions ~200dpi-400dpi.
<BR>
Depending on the size of the pages, there can be room for several
<BR>
images in the cache. As the image data is read by the host computer
<BR>
the cache is freed and more pages are fed through.
<BR>
<P><EM>&gt; So Marius asked a valid question and I'm curious myself how this issue
</EM><BR>
<EM>&gt; was dealt with by others. I suspect the answer is going to be something
</EM><BR>
<EM>&gt; like &quot;a child process does the pipelining.&quot;
</EM><BR>
<P>The Bell + Howell has a batch-scanning mode which is used to implement
<BR>
the scan-ahead functionality. Once started, the scanner keeps scanning
<BR>
as fast as it can (based on the RSC cache availability, etc) until the
<BR>
feeder is out of documents, the stop button on the scanner is pressed
<BR>
or the host aborts/cancels batch mode.
<BR>
<P>The normal non-batch mode would wait for the host to send the start
<BR>
scan command, and this would never result in the full rated throughput.
<BR>
<P>On the SANE side, the sequence of calls to scan a feeder full of
<BR>
documents will look like this (... indicates multiple calls):
<BR>
<P>[bh] sane_init called
<BR>
&nbsp;&nbsp;&nbsp;[bh] sane_open called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_control_option called (option:0, action:0)...
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_get_option_descriptor called (option:0)...
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_start called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_get_parameters called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_read called...
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_start called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_get_parameters called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_read called...
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_start called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_get_parameters called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_read called...
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_start called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_get_parameters called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_read called...
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_start called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_get_parameters called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_read called...
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_start called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_get_parameters called
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_read called...
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_start called (returns SANE_STATUS_NO_DOCS)
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[bh] sane_cancel called
<BR>
&nbsp;&nbsp;&nbsp;[bh] sane_close called
<BR>
[bh] sane_exit called
<BR>
<P>It is important NOT to call sane_cancel until the entire batch is
<BR>
finished (sane_start returns SANE_STATUS_NO_DOCS). This gives the
<BR>
backend the understanding of the front-end's notion of &quot;the batch&quot;.
<BR>
<P>In the bh driver, I've not implemented the non-blocking io mode nor
<BR>
do I use a child process for buffering. The performance exhibited
<BR>
is close to the rated speed and the scanner seems to be swallowing
<BR>
pages as fast as it physically can.
<BR>
<P>Tom Martone
<BR>
<P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Scan%20ahead&In-Reply-To=&lt;3AC60D37.C5A113BD@martoneconsulting.com&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0257.html">Henning Meier-Geinitz: "Re: preview and selectable scanarea for MFS-12000's ADF"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0255.html">Karsten Festag: "Re: microtek2 and scsi_read_image_status"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0252.html">Stephen Williams: "Re: Scan ahead"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#256">[ date ]</A>
<A HREF="index.html#256">[ thread ]</A>
<A HREF="subject.html#256">[ subject ]</A>
<A HREF="author.html#256">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Sat Mar 31 2001 - 08:32:47 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>