Skip to content

fix: verify 10-bit probe succeeded before advertising - #5690

Open
bitness wants to merge 2 commits into
LizardByte:masterfrom
bitness:fix/yuv444-10bit-advertisement
Open

fix: verify 10-bit probe succeeded before advertising#5690
bitness wants to merge 2 commits into
LizardByte:masterfrom
bitness:fix/yuv444-10bit-advertisement

Conversation

@bitness

@bitness bitness commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Description

These changes make Sunshine separately track encoder probe results for 10-bit encoding with 4:2:0 and 4:4:4 chroma subsampling, and verifies that the probes succeeded before advertising support for those configurations. Without these patches, Sunshine conflates a successful 8-bit YUV 4:4:4 encoding probe with the ability to encode 10-bit YUV 4:4:4, which isn't always the case on some hardware or driver/API combinations.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Adds two arrays that store the probe results for h264, hevc, and av1's
10-bit 4:2:0 and 4:4:4 encoding support. The naming scheme for the
arrays follows the codebase's use of "dynamic_range" to indicate 10-bit,
even though these results can be used for SDR and HDR encoding.
With this change, 8-bit and 10-bit 444 encoder advertisement will
correctly reflect the results of the encoder probes.

Before it, the code used the probe result for 8-bit 444 encoding to
decide whether or not to advertise 10-bit 444 encoding, but not all
hardware can do both. (Mostly it seems like older Intel Media Engines
and older VA-API versions make up that category.) In those cases, the
code would still offer the 10-bit 444 advertisement, but if the client
selected it, it wouldn't have worked.
@bitness bitness changed the title fix certain 10-bit advertisements fix: verify 10-bit advertisements before advertising Sep 11, 2026
@bitness bitness changed the title fix: verify 10-bit advertisements before advertising fix: verify 10-bit probe succeeded before advertising Sep 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4 New issues
C Maintainability Rating on New Code (required ≥ A)
4 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@bitness

bitness commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Hmm, SonarQube is displeased with the new variables I added not being const, but I just followed the pattern set by an existing variable that serves a similar purpose.

@ReenigneArcher

Copy link
Copy Markdown
Member

Sunshine has a lot of existing sonar issues. I'll review if these should be fixed or not. Thanks.

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