Repository navigation
capture_jpeg() encodes through jpegio - #10
Merged
Merged
Conversation
…encoder jpegio_encode() is declared weak, so a firmware without jpegio still links and capture_jpeg() raises OSError naming what is missing. It asks for the engine's own RGB565 read (exact=false): zero-copy from the frame buffer, as before, so the frame rate is unchanged.
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.
Media modules roadmap, Phase 2 (D2): cameraif owns no JPEG encoder; capture_jpeg() calls jpegio's C API (jpegio_encode, declared weak), asking for the engine's own RGB565 read (exact=false), zero-copy from the frame buffer as before.
Proven on the P4 panel's camera with micropython-pydevices media/2-jpegio-encode: examples/camera_snapshot.py and examples/camera_mjpeg.py run unchanged (every streamed frame a whole 800x800 JPEG Pillow decodes), and capture_jpeg(70) runs at 35.7 fps, the README's 36.
A firmware without jpegio still links; capture_jpeg() then raises OSError naming jpegio.