Add outer_alloc flag
Add int quirc_set_image_buffer(struct quirc* q, uint8_t* image_buffer);
call quirc_set_image_buffer(struct quirc* q, uint8_t* image_buffer); before int quirc_resize(struct quirc *q, int w, int h);
tested on esp32s2 (esp-idf 4.2)
* Make flood filling logic iterative (vs recursive)
I basically tried one-to-one conversions here to avoid mistakes.
probably it has a room for later optimizations.
* Use explicit malloc (vs variables on stack) to allocate the work area.
* Estimate the amount of memory for the work area dynamically
from the image size, instead of using a constant FLOOD_FILL_MAX_DEPTH,
which is too big in the most cases.
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).