Define a new enum that contains Avision data type codes and use those instead
of pure values. I also added a couple of helper functions for debugging the
command operation and data type code if read or send.
With the exception of use in three quotes as well as our inlcuded copy
of the GPL, all use of the Free Software Foundation's postal address
has been removed.
Re #320.
i1120 has another offset. When scanning in ADF multi-page mode (the
default), the very first sheet is moved 1.5mm down. That leads to 1.5mm
being cut off at the bottom.
This implements the (hopefully last) offset setting for multi-sheet ADF
scans.
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
This adds offset compensation for ADF front-only scans, which may
have different offsets than ADF duplex scans.
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
This is a complete rewrite of the offset compensation using a
combination of overscan and line skipping. It replaces the option
AV_REAR_OFFSET by specifying exact offset values for each scanner.
This was needed for Kodak i1120 which needs bottom line skipping.
The old implementation could not skip bottom lines since we could
not know how many lines we will get in the end from ADF.
The new implementation redirects the output file descriptor to a
temporary file. After the current page is completely scanned,
offsets are applied and the output is passed to the original
output file descriptor.
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Kodak i1120 has single-sheet and multi-sheet scan modes. This option sets
bitset3[7] which enables multi-sheet scan by default so there is no pause
of 1s between two sheets in ADF scan mode. This also fixes some offsets
when scanning multiple sheets.
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Kodak i1120 has a different gamma table format that looks like a
uint16/double array. Implement it and add an option for it.
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Some scanners like i1120 support fast feed-out of the sheet when
cancelling a running scan. Add a new option for this release type.
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Adds a "cancelled" flag to the Avision device structure, cleared
in sane_start() and set in sane_cancel(). Test this flag in
wait_4_light() and bail out of the 90-second "wait for the
light to warm up" loop if the scan is cancelled.
Flipping duplex scanners must flip the page in order to scan the back side
of the page. With this option set (which is the default), the page is
flipped back to the original orientation. This is important if you have
a stack of papers. However, if you don't care if every page ends up
flipped compared to how it was loaded, turning this option off might save
some scanning time as the paper won't have to be pulled back through the
ADF mechanism a third time.
After fixing the duplexer initialization, it became clear that the code was
mirroring the back pages. Since the scanner already supports page
mirroring internally with an optional bit setting (which was already set)
it made the most sense to simplify the code base and remove the variable.
Added the AV_ADF_FLIPPING_DUPLEX flag to activate the flipping duplex code
only for models known to have such duplexing ADFs. Prior to this a doubious
huristic was used to guess when the hardware had a flipping duplex unit.
The additional_probe variable protected add_source_mode() and
add_color_mode() from being entered upon subsequent calls. These functions
were patched to not insert duplicate records in this case, removing the
need for the gatekeeper variable.
There was an old TODO in the code which suggests creating an option for using
the paper_length field to detect double feeds in the ADF. I've added it as
an option, but set the default to not use it since it might cause older
scanners to get confused.
I felt that the ehancements group was doing double duity for image tuning and
other more hardware related options. This new group takes ownership of those.
I'm not happy with the name, but that can always be changed.
Added support for the Avision AV210D2+ scanner. This is the first scanner
to require the use of the gray filter bits, so code was added to enable them.
Regenerated description file to reflect this change.
Changed the AVISION_FILTER_* defines to their final values rather than
bit-shifting them prior to use. This make reading the code much easier
since no mental calculation is necessary to determine what the final
bit-pattern/value will be.
Implemented support for latest Avision ASICs and features,
including overscan, background raster, software scaling for
cheaper ASICs used in HP scanners. Changed types used to
more portable uint* ones, without underscore (_), removed
in-file ChangeLog history, as the files became big enough.
Implemented early calibration for easier handling of
Avision-based film scanners and implemented support for
2-pass duplex scanners.
from BUILD 167 to 179, including support for HP 5370, AV600U,
AV210C2, AV220C2, et. al. The USB i/o paths got hardened, and a
lot of fixes as well es enhancements and optimizations where added
and a lot of typos, mostly in debug output and comments, got fixed.
The "Line Art" mode was renamed to "Lineart" to match the other
backends.
fixed segmentation faults for some modes, many many new devices, two
different duplex modes are supported, vast speedup of multi page batch scans,
buttons as well a 7-segment LED readout and some quirks for old scanners not
filling all fields
wait_4_light bugfixes, fixed color packing, fixed 16bit modes
(especially for big-endian systems), avoid 16bit modes for default
modes, fixed gamma-table for some models as well as spelling on the
way
* backend/avision.h, backend/avision.c: the current development state,
including cleanups, code refactoring, dynamic color and scan source
list creation, implemented ADF mirroring needed for some ASICs ,
some scan window scaliing fixes for some ASICs, added 16bit gray
and color support, fixed a tiny big-endian issue, fixed command
error reporting for some ASICs, improved inquiry logging and some
tiny fixes for film-scanners.
Sorry for such a bit chunk so late in feature freeze (...). But tested on Ultra
SPARC, PowerPC and x86 Linux ... ;-)
endianess fixes, calibration code, ADF detection, correct lamp warmup,
gamma table for new ASICs, some workarounds for ASIC variations and the
convertion to use OPT_SOURCE instead of seperate OPT_ADF and OPT_TRANS.
to copy it over and over again. Changed header inclusion order in backend
files to include backend.h after sanei_backend.h. Based on a patch from stef
<stef-listes@wanadoo.fr>.