Skip to content

fix(linux): size the VA-API placeholder context for V4L2-backed drivers - #1410

Closed
TheWeaklessOne wants to merge 1 commit into
OpenCloudGaming:devfrom
TheWeaklessOne:fix/linux-vaapi-v4l2-minimum-size
Closed

TheWeaklessOne wants to merge 1 commit into
OpenCloudGaming:devfrom
TheWeaklessOne:fix/linux-vaapi-v4l2-minimum-size

Conversation

@TheWeaklessOne

Copy link
Copy Markdown

On SteamOS ARM (AYN Odin 2 Portal, Snapdragon 8 Gen 2) VA-API goes through the msm driver, which opens the Qualcomm iris V4L2 decoder for every VA context. iris rejects anything below its 96x96 minimum, so the 16x16 probe surface made a working H.264 decoder look unavailable: VA-API cannot create the initial H.264 decoder context: HW busy now (VA_STATUS_ERROR_HW_BUSY from the driver).

This raises INITIAL_CONTEXT_SIZE from 64 to 128, which still covers the radeonsi 64x64 minimum from #1301, and sizes the probe surface from the same constant instead of a hard-coded 16x16. The compile-time check now asserts 96.

Verification on the Odin 2 Portal (msm VA driver from hashtagbasit/Zaviya#80):

  • Before: the streamer hello reported the VA-API H.264 backend unavailable with the error above. After: available.
  • The same driver decodes H.264 outside OpenNOW (FFmpeg -hwaccel vaapi, 90/90 frames of a 720p clip, no errors).
  • cargo test -p opennow-streamer-core -p opennow-streamer-platform -p opennow-streamer-platform-linux: all pass except fixed_audio_output_never_falls_back_and_stays_isolated, which fails the same way without this change on that device (ALSA device enumeration returns -2).

Not tested: AMD/radeonsi with 128x128 (only the minimum changes direction, the placeholder is still replaced at the first SPS).

🤖 Generated with Claude Code

Qualcomm iris behind the msm VA-API driver (SteamOS ARM, Odin 2 Portal)
rejects contexts and surfaces below its 96x96 decoder minimum, so the 16x16
probe surface reported a working H.264 decoder as unavailable. Raise
INITIAL_CONTEXT_SIZE to 128, which still covers radeonsi's 64x64 minimum,
and size the probe surface from the same constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b5c369a2-8c7d-44d3-a219-458a025bcbd4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T20:02:04.112276Z 5a65aa9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TheWeaklessOne

Copy link
Copy Markdown
Author

Correction to the verification above: cargo test without features does not compile video/vaapi.rs, so that run did not cover this change. Rerun with the features the app build uses, cargo test --release -p opennow-streamer-platform-linux --features ffmpeg-bundled,vaapi, on clean dev with this change: 252 passed, the same as clean dev. The one failure, fixed_audio_output_never_falls_back_and_stays_isolated, also fails on clean dev on that device.

@TheWeaklessOne

Copy link
Copy Markdown
Author

Folded into #1470 together with the other Linux decode fixes, rebased on dev and retested on the Portal. Closing this one in favour of it.

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.

1 participant