libobs-d3d11: Add GPU compute shader for YUV→RGBA colorspace conversion#13202
Closed
marcusbooker77 wants to merge 1 commit intoobsproject:masterfrom
Closed
libobs-d3d11: Add GPU compute shader for YUV→RGBA colorspace conversion#13202marcusbooker77 wants to merge 1 commit intoobsproject:masterfrom
marcusbooker77 wants to merge 1 commit intoobsproject:masterfrom
Conversation
Add GPU-accelerated colorspace conversion shader and C++ implementation for the D3D11 renderer. Update plugins CMakeLists for build compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
|
We do not accept AI-generated PRs. In the future, please take the time to read any project's published guidelines before submitting PRs. |
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.
Summary
Adds a Direct3D 11 Compute Shader (CS 5.0) that converts YUV video frames (I420/NV12) to RGBA entirely on the GPU, eliminating the CPU-bound software colorspace conversion path for applicable sources.
How It Works
d3d11-colorspace.hlsl) dispatches 8×8 thread groups — each thread converts one pixelTexture2DSRVsRWTexture2D<float4>RGBA texture via UAVd3d11-colorspace.cpp) wraps shader compilation, constant buffer updates, and dispatch into a simple create/convert/destroy lifecycleArchitecture
Performance Impact
API
Compatibility
D3DCompilewithcs_5_0target andOPTIMIZATION_LEVEL3nullptr, logs error)Test Plan
if (id.x >= width || id.y >= height) return)Files Changed
libobs-d3d11/d3d11-colorspace.cpplibobs-d3d11/d3d11-colorspace.hlsllibobs-d3d11/CMakeLists.txtplugins/CMakeLists.txt🤖 Generated with Claude Code