Skip to content
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

Prep HEVC decoder for upstreaming #6519

Draft
wants to merge 15 commits into
base: rpi-6.12.y
Choose a base branch
from

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Dec 6, 2024

Adds the driver with the multiplanar SAND format support, and then adds the minimal patch to reintroduce the legacy single planar format.

Working with both stock FFmpeg, and John's new multi-planar branch https://github.com/jc-kynesim/rpi-ffmpeg/tree/dev/5.1.6/sandm_1

Mesa does still need updating to support the SAND height of 0.

@popcornmix popcornmix force-pushed the rpi-6.12.y branch 2 times, most recently from 1348250 to 2b062ea Compare December 10, 2024 14:47
@6by9 6by9 force-pushed the rpi-6.12.y-hevc_dec branch from 3406809 to 6168cbb Compare December 12, 2024 17:36
@popcornmix popcornmix force-pushed the rpi-6.12.y branch 2 times, most recently from 2accb17 to 49679ed Compare December 20, 2024 13:36
6by9 and others added 15 commits January 14, 2025 16:08
Adds a binding for the HEVC decoder found on the BCM2711 / Raspberry Pi 4,
and BCM2712 / Raspberry Pi 5.

Signed-off-by: Dave Stevenson <[email protected]>
The Raspberry Pi HEVC decoder uses a tiled format based on
columns for 8 and 10 bit YUV images, so document them as
NV12MT_COL128 and NV12MT_10_COL128.

Signed-off-by: Dave Stevenson <[email protected]>
Add V4L2_PIXFMT_NV12MT_COL128 and V4L2_PIXFMT_NV12MT_10_COL128
to describe the Raspberry Pi HEVC decoder NV12 multiplanar formats.

Signed-off-by: Dave Stevenson <[email protected]>
The BCM2711 and BCM2712 SoCs used on Rapsberry Pi 4 and Raspberry
Pi 5 boards include an HEVC decoder block. Add a driver for it.

Signed-off-by: John Cox <[email protected]>
Signed-off-by: Dave Stevenson <[email protected]>
The SAND handling had been using what was believed to be a runtime
parameter in the modifier, however that has been clarified that
all permitted variants of the modifier must be advertised, so
making it variable wasn't practical.

With a rationalisation of how the producers of this format are
configured, we can switch to a variant that doesn't have as much
variation, and can be configured such that only 2 options are
required.

Add a modifier with value 0 to denote that the height of the luma
column matches the buffer height, and chroma column will be half
that due to YUV420.
A modifier of 1 denotes that the height of the luma column still
matches the buffer height, but the chroma column height is the same.
This can be used to replicate the previous behaviour.

Signed-off-by: Dave Stevenson <[email protected]>
Adds the relevant node for the HEVC decoder on BCM2711 / Pi4.

Signed-off-by: Dave Stevenson <[email protected]>
For downstream only, add back in the legacy single planar
SAND formats.

Signed-off-by: Dave Stevenson <[email protected]>
Upstream will take the multi-planar SAND format, but add back
in the downstream single planar variant for backwards compatibility

Signed-off-by: Dave Stevenson <[email protected]>
@6by9 6by9 force-pushed the rpi-6.12.y-hevc_dec branch from 6168cbb to 310d12e Compare January 14, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants