fweiss / mcu-gif

A GIF decoder for MCUs
MIT License
0 stars 1 forks source link

Provide pixel decoding progress #2

Open fweiss opened 9 months ago

fweiss commented 9 months ago

Primarily for debugging the "dancing" gif, show how many pixels were decoding for each image data block. Don't just put a printf in the gd code, as that mucks up the test output. Good place to put it is in the gd_main_t or gd_info_t, although the latter is a bit too deep.

The spec would go in either:

fweiss commented 9 months ago

In image_expand_spec.cc, the expand.outputLength is tested in the spec "full example".

But image_expand_spec.cc does not use gd_main_t.

But need to test new field pixelOutputProgress in gd_main_t.

fweiss commented 9 months ago

Maybe better is read_bblock_spec.cc. It references gd_init() and gd_read_image_data(). However, the latter is currently only checking the correct bytes are read from the mock file, in the "image data" spec.

fweiss commented 9 months ago

Almost fixed, but mushroomed into fixing the error handlers. Could not run the whole 128px gif because the string table ran iut of space for entries and string. That required a major refactor, including tests..