filter: fix YCBCR2RGBA shader compilation error from format mismatch#184
Open
crmurillo wants to merge 2 commits intoKhronosGroup:mainfrom
Open
filter: fix YCBCR2RGBA shader compilation error from format mismatch#184crmurillo wants to merge 2 commits intoKhronosGroup:mainfrom
crmurillo wants to merge 2 commits intoKhronosGroup:mainfrom
Conversation
The output image of the filter was created with the decoder's outImageFormat (YCbCr format), causing the shader generator to emit YCbCr output bindings instead of RGBA, leading to undeclared identifier errors at shader compile time. Add GetOutputFormat() to select the RGBA format, currently,R8G8B8A8 for 8-bit and R16G16B16A16 for 10/12/16-bit inputs. Also guard plane-view asserts for single-plane RGBA outputs.
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
When the filter YCBCR2RGBA is active, the output image of the filter was created with the decoder's output image format (YCbCr format), causing the shader generator to emit YCbCr output bindings instead of RGBA. This led to undeclared identifier errors at shader compile time.
This patch adds a function to retrieve the filter output format:
GetOutputFormat().The RGBA format is selected based on the bit-depth of the input format. Currently, R8G8B8A8 is selected for 8-bit and R16G16B16A16 for the rest. The function will be expanded when there are more tests for other bit-depths.
Also guard plane-view asserts for single-plane RGBA outputs.
Type of change
bug fix
Issue (optional)
Fixes #147
Tests
Intel(R) UHD Graphics 770 (ADL-S GT1) / Intel open-source Mesa driver Mesa 26.1.0-devel (git-055aec542e) / Ubuntu 24.04.4 LTS
Total Tests: 76
Passed: 51
Crashed: 0
Failed: 0
Not Supported: 16
Skipped: 9 (in skip list)
Success Rate: 100.0%
AMD Radeon RX 7600 (RADV NAVI33) / radv Mesa 26.1.0-devel (git-055aec542e) / Ubuntu 24.04.4 LTS
Total Tests: 76
Passed: 65
Crashed: 0
Failed: 0
Not Supported: 7
Skipped: 4 (in skip list)
Success Rate: 100.0%
NVIDIA GeForce RTX 4060 Ti / NVIDIA 595.44.00 / Ubuntu 22.04.5 LTS
Total Tests: 76
Passed: 64
Crashed: 0
Failed: 0
Not Supported: 10
Skipped: 2 (in skip list)
Success Rate: 100.0%