Commit graph

13 commits

Author SHA1 Message Date
Jaap Haitsma
2ff513b0b4 merge upstream 2021-06-16 23:52:51 -04:00
YAMAMOTO Takashi
38f882b3d6 flood_fill_seed: Simplify the flow by having a single "return point". 2021-05-11 13:46:31 +09:00
YAMAMOTO Takashi
dd6c64cafe Add QUIRC_ASSERT 2021-05-11 13:26:47 +09:00
YAMAMOTO Takashi
40def012e7 flood_fill_seed: Unify "left" and "x" vars
This reduces the memory usage a bit.
2021-05-11 13:04:02 +09:00
YAMAMOTO Takashi
772cd3e73f Improve stack usage for flood filling
* 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.
2021-05-11 11:05:58 +09:00
Claudio Felber
963d6ed126 Fix stack corruption and bus errors while scanning oversized QR codes 2020-09-15 00:51:41 +02:00
Jaap Haitsma
bff065d88b Try all possible groups and new algo for grid_size 2020-05-27 21:33:51 -04:00
Alexandre Perrin
f700e456b4 define a QUIRC_PIXEL_ALIAS_IMAGE constant to explicit conditional path
Before this patch, the "sizeof dance" was confusing, fix #54.
2019-07-02 09:22:25 +02:00
Claudio Felber
96a5a380fb Remove quirc.row_average and associated code
quirc.row_average was used by the former threshold function and has
become obsolete with the introduction of the Otsu threshold function.
2019-04-30 18:43:57 +02:00
Alexandre Perrin
21f6863577 Added a row_average member to struct quirc.
Prep to remove the VLA from threshold()
2017-06-11 10:08:58 +02:00
Daniel Beer
59182ef1cd Deinterleave blocks correct.
Use explicit small-block count. Derived value using greedy calculation
wasn't correct in many cases.
2016-12-28 15:37:18 +13:00
Alexandre Perrin
3a6efb3d84 Large images decoding support
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).
2016-07-15 14:40:40 +02:00
Daniel Beer
a3142bc6b4 Initial commit: version 1.0. 2012-05-04 12:58:42 +12:00