fix(vaapi): consider rate control when selecting encoding entrypoint - #5763
Draft
Alex-wangyang wants to merge 2 commits into
Draft
Alex-wangyang wants to merge 2 commits into
Alex-wangyang wants to merge 2 commits into
Conversation
|
This branch has not been deployed
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.




Description
On an Intel Skylake HD 520 host, the driver advertises H.264 low-power encoding with CQP only, while normal encoding supports bitrate-controlled modes. Sunshine selects the low-power entrypoint before checking rate-control capabilities, so lowering the client bitrate does not reliably constrain encoded output. The observed symptoms were delayed initial video, repeated unrecoverable frames, and prolonged freezes.
Select an entrypoint that supports the requested rate-control mode before falling back to the existing preference order. In automatic mode, prefer CBR/VBR support for the existing Intel/AV1 whitelist, and CBR elsewhere; retain low-power preference when it offers either. Explicit CQP remains supported, and devices with only low-power encoding retain their existing fallback.
This is a narrower upstream candidate than the locally tested workaround that unconditionally swapped the two entrypoints. It does not change deployed software on the test host.
Related work
Searched open and closed PRs/issues for VAAPI, CQP, entrypoint, and low-power encoding. #5388 adds rate-control configuration after entrypoint selection, but does not address this selection problem. No direct existing fix was found. This is not claimed to be a regression introduced by the latest release: the previous tested release has the same entrypoint preference.
Evidence
Host: Surface Pro 4, Intel HD 520, Arch Linux/Hyprland; intel-media-driver 26.2.4, libva 2.24.1. Original Sunshine: v2026.914.233613.
Validation
-Wall -Wextra -Werror, andSUNSHINE_BUILD_VAAPI.vaapi.cppsyntax checked with the existing Linux build's compiler flags and dependencies.git diff --check.Screenshot
Not applicable.
Issues Fixed or Closed
None automatically closed.
Roadmap Issues
None.
Type of Change
Checklist
AI Usage
This draft follows review in the contributor fork (Alex-wangyang#1) and is submitted upstream at the contributor's explicit request.