Document decode_into() usage and update benchmark results (ESP32S3)#4
Open
itdogwowo wants to merge 5 commits into
Open
Document decode_into() usage and update benchmark results (ESP32S3)#4itdogwowo wants to merge 5 commits into
itdogwowo wants to merge 5 commits into
Conversation
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.
Summary
This PR improves the documentation for the new Decoder.decode_into() API and refreshes benchmark results using an ESP32S3 run. The goal is to clarify how decode_into() should be used for framebuffer-oriented rendering, including both FULL and STEP (cooperative) modes.
Changes
Benchmark Environment
Results
Decoder FPS
Format FPS normal decode ( decode , block=False) FPS block decode ( decode , block=True) FPS block decode + write (python slice) FPS decode_into step (blocks=1) FPS decode_into full (blocks=0) RGB565_BE 18.47 24.65 4.82 21.38 21.52 RGB565_LE 18.46 24.65 4.82 21.40 21.52 RGB888 16.49 23.75 3.43 20.19 20.34 CbYCrY 18.92 26.03 4.85 21.99 22.13
Encoder FPS (RGB888)
Quality FPS 100 10.95 90 16.88 80 19.18 70 20.23 60 22.46
Performance Comparison (non-exaggerated)
decode_into() mainly improves the decode + write-to-framebuffer workflow by writing directly into a user-provided buffer and avoiding Python-level slice assembly. The module still supports direct decode() for full-frame output.
A) Full-frame workflow: decode_into(full) vs decode(normal)
This compares “get a full frame result” in one call path.
B) Framebuffer assembly path: decode_into(full) vs block decode + Python slice write
This reflects the common UI case where blocks must be placed into a full framebuffer.
C) Cooperative scheduling: decode_into(step) vs decode_into(full)
STEP mode shows minimal overhead in this test (typically within ~0.5–1 FPS), making it practical for responsive UI loops.
Notes
Testing
Breaking Changes