-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
Improve image decompression speed and handling #2414
Comments
ad the 2287 issue: agree that splitting could be a way, though the shape is just circle and rounded triangle for which procedural implementation would make more sense. The glyph could then be greyscale, though it wouldn't fit the discussed 24*24 limit. Maybe the |
That is an option -- but the real difference IMO is that FWIW,
could be, but would the procedural implementation actually be smaller? :) |
yeah that doesn't seem to be very useful. but this blending could be similar to 1bpp image usage on TT, in T1/TR homescreens the FG and BG color are just implicit, and theoretically you could want them flipped for some reason
essentially, but the text has more complexity due to the bearing and it also handles the different BPP values internally (in compile time)
who knows without trying, but procedural impl of basic geometric shapes can be easily reused in different context, sizes etc, which, ultimately, should lead to smaller flash footprint |
One more thing to consider when optimizing decompression in animations like loader with icon is to do the decompression only once instead of during every frame. The decompressed data would(should) be stored on heap/gc allocated if used from rust. |
what remains to be done here? could we close, or transfer knowledge to Notion and then close? |
waiting for micropython update #2341 , after that i want to set optimization of the deflate function to -03. |
comment thread from a different PR: #2339 (comment)
measurement results:
semantic issues:
B&W models (T1, TR) use
display_icon
to render the homescreen. The homescreen is certainly not an icon, and the important feature of "icon" is that its format is 4bpp alpha and so can be blended into different colored foregrounds/backgrounds -- unlike a "homescreen" which is an image at the display's native color resolution.This is also incompatible with actual T1 homescreens which are stored as raw 1bpp data stream.
We probably need a separate function for rendering TR/T1 homescreens.
When we have that, we can limit
display_icon
accepted size: largest icons currently used are 24x24, so 576 pixels, or 288 bytes. That allows us to use window-less decompression into a static buffer.Loaders are using a larger 64x64 center glyph, which is 4096 pixels or 2048 bytes. This could still be acceptable for window-less decompression.
possibly worth folding in: the new popups are using relatively large full-color icons. These could be split into smaller shape+glyph combinations: #2287 (comment)
The text was updated successfully, but these errors were encountered: