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

Provide pixel decoding progress #2

Open
fweiss opened this issue Dec 9, 2023 · 3 comments
Open

Provide pixel decoding progress #2

fweiss opened this issue Dec 9, 2023 · 3 comments

Comments

@fweiss
Copy link
Owner

fweiss commented Dec 9, 2023

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 output length is updated in gd_image_expand_code
  • the block type event is GD_BLOCK_IMAGE_DATA, after the call to gd_read_image_data

The spec would go in either:

  • image_block_spec.cc
  • read_block_error_spec.cc
  • read_block_spec.cc
@fweiss
Copy link
Owner Author

fweiss commented Dec 9, 2023

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
Copy link
Owner Author

fweiss commented Dec 9, 2023

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
Copy link
Owner Author

fweiss commented Dec 23, 2023

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..

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

No branches or pull requests

1 participant