Wykres commitów

6080 Commity (1458d23c4229a9d9fa46f93a3859d501ec7aa149)

Autor SHA1 Wiadomość Data
David Ward 1458d23c42 umax: Fix unintended string concatenation in array definition
This causes the wrong error message to be used in the log.
2022-03-08 19:00:00 -05:00
David Ward bfa69c26e6 snapscan: Fix debug logging in sense_handler()
Remove an extraneous log message.

Ensure that a separate log message is only printed when the preceding
if-statement is true (and its string argument has actually been set).

Both issues were identified from GCC warnings about indentation.
2022-03-08 19:00:00 -05:00
David Ward 23addf5590 sm3840: Fix argument types for variadic function
Values of type unsigned char are automatically promoted to a larger
integer type, so they cannot be used as variadic function arguments.
2022-03-08 19:00:00 -05:00
David Ward 4cf3b09e49 rts8822, rts8891: Replace abs() with fabs() where needed
abs() has an integer parameter and returns an integer value. Floating-
point values should be passed to fabs() instead.

In particular, this affected calculations for gain and offset, where a
value with floating-point precision is clearly expected.
2022-03-08 19:00:00 -05:00
David Ward e859ea4d89 pieusb: Add missing calls to sanei_pieusb_convert_status()
Fix cases where values of type PIEUSB_Status were used or returned when
the expected type was SANE_Status.
2022-03-08 19:00:00 -05:00
David Ward f651d6f098 microtek: Fix null termination of string, and adjust buffer lengths
The Product Revision Level field in the SCSI inquiry data has a fixed
length of 4 bytes. When copying it as a null-terminated string, place
the null terminator in the correct position; currently the string has
an extra character that is never initialized in memory.

Reduce the length of each string buffer, so it does not extend beyond
the null terminator.
2022-03-08 19:00:00 -05:00
Ralph Little 95e2498fe9 Merge branch 'canon_pp-weights-file' into 'master'
canon_pp: Avoid buffer overflow if pathname exceeds PATH_MAX

See merge request sane-project/backends!702
2022-03-14 00:25:02 +00:00
Ralph Little 7cdd2ad268 Merge branch '580-canoscan-lide-220-aborts-before-end-of-4800dpi-colour-scan' into 'master'
Resolve "Canoscan LiDE 220 aborts before end of 4800dpi colour scan"

Closes #580

See merge request sane-project/backends!697
2022-03-10 01:31:01 +00:00
Ordissimo e5ff5d06e5 pixma:Fix max resolution 2022-03-10 01:29:59 +00:00
David Ward 0c70fd560c canon_pp: Avoid buffer overflow if pathname exceeds PATH_MAX
If the weights file pathname is longer than PATH_MAX, it may be written
past the end of the buffer on the stack; or it may be truncated when it
is written to allocated memory (such that it is not null-terminated).

Adjust the code to fix both issues. Dynamically allocate memory for the
actual length of the pathname so that it is not constrained by PATH_MAX.
2022-03-08 19:00:00 -05:00
Ralph Little 41866df6e1 genesys: fix for computation of total file size exceeding unsigned
Large scans that exceed 32-bits need cast to allow 64-bit size.
2022-02-27 18:55:26 -08:00
Ralph Little 9512d05fe6 genesys: added conf entry for Plustek OpticFilm 7600i
User reports scanner works fine, but entry missing from config.
2022-02-22 16:22:23 -08:00
David Ward ba07a8a7f5 backend/Makefile: Fix installation of backend libraries
When using Automake variables like sanelib* to install files in a custom
directory, the files are assumed to be platform-independent, unless these
variables contain "exec" in the name. This affects whether the files are
installed during "make install-data" or "make install-exec". It does not
matter whether a suffix like _DATA or _LTLIBRARIES is added to this name.

The packaging scripts for Debian call those Makefile targets separately
and are affected by this behavior. Since the backend libraries themselves
are platform-dependent files, rename these variables to execsanelib*.
2022-02-06 23:02:01 -05:00
Povilas Kanapickas 2f17613dbb genesys: Simplify gamma buffer setup
This also makes sure that we never access the source gamma tables out of
bounds which was possible previously.
2022-01-28 22:39:26 +02:00
Povilas Kanapickas 188cf63627 genesys: Simplify interface of generate_gamma_buffer() 2022-01-28 22:39:26 +02:00
Zdenek Dohnal d8ebd5a4d7 genesys: GL845 has vector size 257 as well
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2042316
2022-01-28 22:31:09 +02:00
Povilas Kanapickas 3f955dd532 Merge branch 'make-jpeg-compression-optional' into 'master'
xerox_mfp: make JPEG compression user-configurable

See merge request sane-project/backends!615
2021-12-30 18:50:56 +00:00
Andrew Sayers a336f5ed2f xerox_mfp: make JPEG compression user-configurable
JPEG compression improves scan time, and some scanners require it
for high DPI values.  But it loses some data, and we already support
toggling it at compile-time.

Add an advanced option so users can decide at scan-time.
2021-12-30 20:34:05 +02:00
Povilas Kanapickas cf7dde3c4b genesys: Remove several accidental edits
Fixes 59506f866d.
2021-12-30 20:21:31 +02:00
Povilas Kanapickas 59506f866d genesys: Remove exception for the GPL license
Several files already don't have the exception that allows uses of the
code that are additional to the GPL license. I'm no longer comfortable
granting this exception for my subsequent contributions, thus the
exception has been removed.
2021-12-30 19:16:54 +02:00
Povilas Kanapickas eca148dbf4 genesys: Remove unsupported 75 and 100 dpi resolutions on LiDE 200 2021-12-28 02:49:59 +02:00
Povilas Kanapickas c86564a3e3 genesys: Remove unsupported 75 and 100 dpi resolutions on LiDE 100 2021-12-28 02:49:58 +02:00
Povilas Kanapickas f5d5928346 genesys: Log the target motor speed in case it can't be acquired 2021-12-28 02:49:57 +02:00
Povilas Kanapickas 75ac76f87a genesys: Remove unneeded per-scanner register setup
These register values are overwritten later.
2021-12-27 22:39:19 +02:00
Povilas Kanapickas f06e507de7 genesys: Fixed offset calibration on certain gl841 devices 2021-12-27 22:39:19 +02:00
Povilas Kanapickas 334e4bd8d1 genesys: Use consistent initial exposure for led calibration on gl841 2021-12-27 22:39:19 +02:00
Povilas Kanapickas af175f6d4c genesys: Fix inconsistent exposure values in led calib in testing mode 2021-12-27 22:39:19 +02:00
Povilas Kanapickas 3e9431d079 genesys: Ensure sensor exposure is up-to-date when scanning on gl841 2021-12-27 22:39:19 +02:00
Povilas Kanapickas c11a0e7ab6 genesys: Reuse gl124 led calibration acceptability criteria for gl841 2021-12-27 22:39:19 +02:00
Povilas Kanapickas d19ccd2fad genesys: Remove no longer used led calibration fallback code on gl841
This was used only on scanners which did not have calibration target
intensity value. All gl841 scanners now have such setting, so the code
can be removed.
2021-12-27 22:39:19 +02:00
Povilas Kanapickas e540778cfa genesys: Specify target white level for all gl841 devices 2021-12-27 22:39:19 +02:00
Povilas Kanapickas c1f731a7e0 genesys: Remove duplicate register write during led calibration on gl841 2021-12-27 22:39:19 +02:00
Povilas Kanapickas f1910ae58c genesys: Reset registers after move during led calibration on gl841 2021-12-27 22:39:19 +02:00
Povilas Kanapickas 86fe51e224 genesys: Remove erroneous register write on LiDE 80 2021-12-27 22:39:19 +02:00
Povilas Kanapickas 0f341bf5a0 genesys: Clean up exposure calibration on gl841 2021-12-27 22:39:19 +02:00
Povilas Kanapickas 4ee36a2e31 genesys: Use more robust gain calibration on gl841 2021-12-27 22:39:19 +02:00
Povilas Kanapickas bbc1543525 genesys: Remove duplicate register writes in gl841 calibration 2021-12-27 22:39:19 +02:00
Povilas Kanapickas 675497fcd8 genesys: Use host-side gray instead of device-side true-gray on gl841
True gray mode is not handled correctly by devices: they have bugs that
lead to incorrect LED color being emitted (e.g. dark red) and thus this
feature is completely unusable. At least LiDE 35/40/50, LiDE 60 and LiDE
80 are affected.

Simpy disabling true-gray unfortunately leads to even worse outcome
because the scanner then simply proceeds to perform a color scan.

To work around these problems we do a normal color scan and then produce
gray output based on the color data. This will satisfy the use cases
when correct gray is needed. In cases when it is sufficient to construct
gray from a single color channel, the color filter setting could be
used.
2021-12-27 22:39:19 +02:00
Povilas Kanapickas 7bbb6d8fdb genesys: Implement host-side gray support 2021-12-27 22:39:19 +02:00
Povilas Kanapickas 2f030f04e2 genesys: Implement image pipeline for merging color channels to gray 2021-12-27 22:22:44 +02:00
Povilas Kanapickas ad84284186 genesys: Rename ImagePipelineNodeMergeMono{Lines -> LinesToColor} 2021-12-27 22:22:44 +02:00
Povilas Kanapickas bd4f009122 genesys: Remove true_gray variable by deriving its value directly 2021-12-27 22:22:44 +02:00
Povilas Kanapickas 1e75025048 genesys: Fix incorrect scan exposure setup on gl841
When sensor exposure values are significantly different from each other
the total scan exposure will be too low leading to the device becoming
confused and significantly
2021-12-27 22:22:44 +02:00
Povilas Kanapickas 601705fa3a genesys: Inline gl841_get_led_exposure() 2021-12-27 22:22:44 +02:00
Povilas Kanapickas 6c0fafac79 genesys: Remove broken two-table feeding support from gl841
At least on LiDE 50 two-table feeding caused unexplained motor spin-up
failures on certain motor exposures. Various register modifications
showed that there's high likelihood on device-side bug. Even the
official drivers don't use proper two-table feeding.
2021-12-27 22:22:44 +02:00
Povilas Kanapickas e27d991fdf genesys: Remove unused two-table feeding support from gl847 2021-12-27 22:22:44 +02:00
Povilas Kanapickas d4dc13f527 genesys: Remove unused two-table feeding support from gl846 2021-12-27 22:22:44 +02:00
Povilas Kanapickas 137a2d676f genesys: Remove unused two-table feeding support from gl124 2021-12-27 22:22:44 +02:00
Ordissimo 584f16e2ee pixma: add 2021 models.
Fix white space

Fix build

Add descriptions

Reduces the length of the line
2021-12-27 16:33:37 +02:00
Povilas Kanapickas b668e92047 genesys: Use {uint,int}{8,16,32,64} from std namespace
This is not strictly necessary as all known C++ compilers also inject
these types to the global namespace. However this is not guaranteed by
the C++ standard and accordingly some code completion tools don't
support this without additional configuration.
2021-12-26 16:09:17 +02:00