Commit graph

10 commits

Author SHA1 Message Date
Bastien Nocera b817b46494 lib: Remove home-grown min() implementation
And use GLib's.
2018-09-27 14:49:50 +02:00
Bastien Nocera dda6857fee assembling: Add guards to fpi_assemble_lines()
With the goal of not crashing when we try to malloc MAXINT bytes of RAM.

See https://bugzilla.redhat.com/show_bug.cgi?id=1484812

Closes: #42
2018-05-31 11:06:31 +02:00
Timur Celik 0215483fb3 assembling: Fix assembling of last frame in reverse mode
The last image is always misplaced because the sign of the delta
vector isn't corrected.

This could result in false positives and verification failing.

https://bugs.freedesktop.org/show_bug.cgi?id=105027
2018-05-30 11:17:08 +02:00
Timur Celik 37bb59df13 assembling: Fix assembling of frames for non-reverse stripes
Every frame stores the delta from the previous frame, in reverse mode
it stores the delta to the next frame. This causes images to use the
wrong delta while assembling in forward mode.

The broken assembling in forward mode will create a small error for
linear motion, because the delta of all frames is approximately the
same in this case. But if you move your finger, stop and then continue
moving in a single scan, the misplaced frames should be visible in
the assembled output.

This could result in false positives and verification failing.

https://bugs.freedesktop.org/show_bug.cgi?id=105027
2018-05-30 11:15:17 +02:00
Bastien Nocera 32fcfde86b lib: Use GLib and libusb directly for debug output
Use GLib internally to output debug information, and tell about
libusb's LIBUSB_DEBUG envvar for libusb debug.

fp_set_debug() is now a no-op.

https://bugs.freedesktop.org/show_bug.cgi?id=106552
2018-05-23 19:13:08 +02:00
Bastien Nocera c376c6fb02 lib: Fix type mismatch warnings in debug output 2018-05-23 19:11:05 +02:00
Vasily Khoruzhick 9437c98d54 lib: frame assembling: flip image for non-reverse direction
It was here for aes2501 and aes1610 before moving assembling routines
into common code.
2015-12-16 13:24:39 -08:00
Vasily Khoruzhick f7d00a828d lib: use normalized error to make decision about movement direction
Height is not a good determinant in movement direction, normalized
error is much better. Should fix aes1610 and aes2501 driver issues.
2015-12-16 13:24:39 -08:00
Vasily Khoruzhick b51fa446e3 lib: move line assembling routines out of vfs5011 into common code 2015-12-16 13:24:38 -08:00
Vasily Khoruzhick e40f7bd1f7 lib: move frame assembling routines into a separate file and make them usable by non-aes drivers
Frame assembling routines are not aes-specific, so move them into a separate file
and add an accessor for peeking a pixel.
2015-12-16 13:24:38 -08:00