Repository navigation
Conversation
libva-v4l2request (Apple Silicon AVD on Asahi) fixes the capture memory
mode on the first decode and then rejects surfaces exported afterwards
("cannot decode into the already-exported surface"), so the GPU client
decoded garbage/blocky frames. Export every decode surface when the stream
is created and import those descriptors in the Vulkan pipeline.
e2e: add 4c, a GPU-decode session held under steady damage (300 frames)
and run twice with a fresh decoder, failing on any decode error. It also
runs on decode-only machines (server on the CPU tier).
Also move an image.rs SAFETY comment above its closure so clippy
(undocumented_unsafe_blocks, rust 1.93) passes.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThe PR exports each VA-API decode surface before the first decode and keeps its descriptor with the stream.
Acknowledgments supplied by
|
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.
Bug
On Apple Silicon (Asahi, libva-v4l2request / AVD), GPU decode produced blocky, corrupted frames and logged:
The client exported each decode surface (
vaExportSurfaceHandle) lazily inDecodeStream, after the first decode. v4l2-request drivers fix the capture memory mode on the first decode and reject surfaces exported after that.Fix
H264Decodernow exports every surface once, when the stream (and decode context) is created and before any decode. It keeps thePrimeDescriptors and exposes them viaexports().DecodeStreamimports those descriptors instead of exporting on generation change. A resolution change or reconnect builds a new stream, so it gets fresh surfaces and fresh exports.Tests
scripts/check.sh(fmt, clippy -D warnings, unit tests): PASS on aarch64. One clippy fix is unrelated: animage.rsSAFETY comment moved above its closure forundocumented_unsafe_blockson rust 1.93.scripts/e2e.shadds 4c. It holds a GPU-decode session under steady damage for 300 frames (~15 s, well past startup), then connects again with a fresh decoder/exports. It fails on any decode error. It also runs on decode-only machines like Apple AVD, where the server uses the CPU tier.mainon this machine and are unrelated to this change: 4bcpu server -> cpu client("server applied the requested output scale") and 11 (fcitx keymap switch).