Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add outer alloc memory buffer options. #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HassenLin
Copy link

few code add for outer alloc image for low memory device.

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)

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)
@dlbeer
Copy link
Owner

dlbeer commented Oct 15, 2021

It looks like this code assumes that quirc_pixel_t is uint8_t? It may be different depending on compile-time options, so that needs to be taken into account in any allocations, and probably also in the function prototypes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants