Before this patch, in the event of `q->image` reallocation success but
`q->pixels` failure, `q->image` would point to a freed memory.
After this patch, once quirc_resize() returns, `q->image` consistently
point to a memory address that can be freed.
There is still an inconsistency left in the example codepath: `q->{h,w}`
would hold the "old" values, while `q->image` allocated size would be
based in the requested width/height; hence the comment update about the
state of the QR-code recognizer (it should only be passed to
quirc_destroy()).
Fix the following warning when compiling with GCC 6:
lib/identify.c: In function ‘quirc_end’:
lib/identify.c:430:6: warning: ‘last_color’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int last_color;
^~~~~~~~~~
Calculate the correct number of syndromes, and fix calculation of the
error locator polynomial. Many QR codes with logos in the middle should
now work.
Fix#2, this patch makes large images support a compile time option by
allowing QUIRC_MAX_REGIONS to be tuned via CFLAGS up to 65534 (current
default is 254).
Previously, the payload was assumed to consist of one large data
segment. Now, multiple segments of different types may be concatenated
together. The data type reported is the highest data type encountered
while decoding.