Skip to content

Add linux yuv444 chromasubsampling support (cuda/cuda gl)#4965

Open
Sheynar wants to merge 2 commits intoLizardByte:masterfrom
Sheynar:linux-yuv-444/x11-wayland-yuv444-cuda
Open

Add linux yuv444 chromasubsampling support (cuda/cuda gl)#4965
Sheynar wants to merge 2 commits intoLizardByte:masterfrom
Sheynar:linux-yuv-444/x11-wayland-yuv444-cuda

Conversation

@Sheynar
Copy link
Copy Markdown

@Sheynar Sheynar commented Apr 9, 2026

Description

Added to Linux based systems support for YUV444 chroma subsampling on Nvidia graphics cards with hardware encoding.

Both CUDA and CUDA GL encoding are affected.

It was necessary to add some workarounds to the probing system: previously, YUV444 and HDR functionality were verified in a single location, so YUV444 couldn't work without HDR.

Screenshot

image

Issues Fixed or Closed

Fixes #4836

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

  • 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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
21 New issues
21.3% Duplication on New Code (required ≤ 2%)
21 New Code Smells (required ≤ 0)
6 Duplicated Blocks on New Code (required ≤ 0)

See analysis details on SonarQube Cloud

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

@Sheynar
Copy link
Copy Markdown
Author

Sheynar commented Apr 9, 2026

Added BREAKING CHANGE due to changes in the way available modes are checked and send to client.

Previously, three cases per encoder could be distinguished:
1 - yuv420,
2 - yuv420 HDR,
3 - yuv444 and yuv444HDR.

Now it's 4 cases:
1-yuv420
2-yuv420 HDR,
3-yuv444,
4-yuv444HDR,

With little workaround i could achieve it workink without changes on client, it probes and fallback to another encoder with HDR priority:

yuv444 HDR? -> yuv420HDR? -> yuv444? -> yuv420

But some client error messages can be missleading as of it not intended to be like that.

This separation made because there can be situations with encoder capabilities vary. As example H264 nvenc encoder, it can not hardware encode HDR, but capable of encoding in yuv444.
Part of coding and testing were made on old gaming laptop with geforce m980 which capable of hardware encode h264 4:4:4.

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.

Pixel format negotiation skips yuv444p and falls back directly to 4:2:0

1 participant