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

Rewrite frame decoding #68

Merged
merged 6 commits into from
Aug 7, 2023
Merged

Rewrite frame decoding #68

merged 6 commits into from
Aug 7, 2023

Conversation

tirr-c
Copy link
Owner

@tirr-c tirr-c commented Aug 7, 2023

Make frame decoding lazy.

  • Groups are decoded only when needed during rendering.
  • Image header is shared using Arc. This simplifies API by removing a lifetime parameter.
  • There is no PassGroup struct anymore; Modular data and HF coefficients are decoded directly into the buffer.
  • Removed various heap allocations.

TODO

  • Investigate decode failures. I think this shouldn't be a problem, conformance passes anyway. But then where does the error come from?
  • Try to fix clippy warnings.
  • Make cropped decoding work (separate PR).
  • Rework progressive decoding.

@tirr-c tirr-c marked this pull request as ready for review August 7, 2023 11:10
Copy link
Contributor

@EugeneVert EugeneVert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

enum GroupInstr {
Read(usize, TocGroup),
Decode(usize),
ProgressiveScan {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any plans to reintroduce progressive decoding in the future?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to add features back step by step, and yeah, signaling progressive scan is one of those.

@tirr-c tirr-c merged commit dcf1841 into main Aug 7, 2023
@tirr-c tirr-c deleted the rewrite-frame branch August 7, 2023 16:51
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