Repository navigation
Play GIF animation on e-paper displays - #11740
Open
mikeysklar wants to merge 20 commits into
Open
mikeysklar wants to merge 20 commits into
mikeysklar wants to merge 20 commits into
Conversation
Packed pixels with each row padded to a whole byte, so a 1-bit source can stream into a plain buffer. Framebuffer targets stay whole bytes per pixel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bits_per_pixel argument picks RGB565 or packed 1-bit frames, for e-paper. A pixel is white when its luma is at least half, so a black and white GIF converts exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnimatedGIF refuses anything wider than 320 pixels, so 400x300 and 800x480 e-paper animations would not open. CIRCUITPY_GIFIO_MAX_WIDTH stays 320 by default, so other boards don't pay for a longer line buffer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy whole bytes when the rects line up and no layer above claimed the pixels. Polarity and bit order already match a monochrome EPaperDisplay: MSB first, 1 = white. Falls back to a per-pixel copy that honors the mask. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This is the board the 1 bit GIF numbers come from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
tannewt
reviewed
Nov 3, 2026
tannewt
left a comment
Member
There was a problem hiding this comment.
Just glanced at this. I think we will want to push back the display format info back to the gif decoder so it can do the color conversion early. I'm not sure that'll always work though because LVGL doesn't support all color modes that displayio does. In that case we'd need to color convert late.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VideoBuffer takes bits_per_pixel for a plain buffer, or uses the framebuffer's color depth, and asks the source for it at play(). The GIF source decodes to whichever it is asked for; the camera only accepts its own format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
VideoBuffer now tells the GIF decoder the pixel format at play time. The decoder converts to 1 bit itself. A format the decoder can't produce raises for now. Late conversion could cover those. |
# Conflicts: # ports/raspberrypi/boards/adafruit_feather_rp2040_thinkink/mpconfigboard.mk
# Conflicts: # shared-module/videogif/GifDecoder.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GIFs can now play as 1-bit video on monochrome e-paper, through displayio.
Why
A stock e-paper update takes about 6 seconds, too slow for animation.
Part 3 of 3, stacked on #11739, which is stacked on #11738.
lag3_nf1_hq_autoclean_wipes.mp4
Feather RP2040 ThinkInk with the 4.2" panel, filmed on an earlier build of this stack. The script also ran a wipe every 4 s and a clean every 15 s.
VideoBuffer(bits_per_pixel=1)ValueErrorTest files
Test GIF:
teapot_1bit_hq.gif(400x300, 120 frames at 20 ms)Test driver:
ssd1683_lag.py(needs a lag build, see #11739)Video uses the fast updates from #11739, so its panel warning applies here.
AI assistance
Written with Claude Code.
🤖 Generated with Claude Code