Repository navigation
capture_scaled and capture_yuy2 through ppa (media Phase 5) - #11
Merged
Merged
Conversation
…s own YUY2 converter is gone capture_yuy2() now scales properly (the old decimation took the top-left 640x480 of an 800x800 frame) and samples chroma as the PPA does. A misaligned capture_scaled() buffer gets software instead of an error. Media modules roadmap, Phase 5.
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.
cameraif stops talking to the PPA itself.
capture_scaled()andcapture_yuy2()call ppa's C API (micropython-pydevicesmodules/ppa), declared weak, so a firmware without ppa still builds and the two calls say ppa is missing. cameraif's own YUY2 converter is gone.What changes for a caller:
capture_yuy2()scales for real. The old integer decimation took a step of 1 for 800x800 to 640x480, which sent the top-left corner. It now samples chroma as the PPA does (U from the left pixel of a pair, V from the right).capture_scaled()buffer gets the right picture from ppa's software path, instead of an error.Proven on the P4 panel (pre-rev3), firmware built with
--modules all:camera_transform.py(every orientation, and the cropped inset),camera_snapshot.pyandcamera_frame.pyrun.capture_scaledruns at 34.9 fps to the 720x720 panel,capture_yuy2at 35.8 fps for 320x240 and 11.7 fps for 640x480, andcapture_jpegis unchanged. The pairing micropython-pydevices PR moves its cameraif pin to this.