-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
[Windows] DXVA: check if HDR10 color spaces are supported by video processor #23358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
UHD Blu-ray is not the only source of HDR so unsure about always preferring topleft (it's most likely the most common though). Looks like a solid change, will have to run-time test it to go through some of the combinations. |
4K Remuxes, even 1080p HDR versions probably comes all from UHD Blu Ray anyway. In any case the difference (if any) sure is minimal: probably chroma plane half pixel shifted vertically. This in 4K resolution I'm not sure if can be noticed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to push the button earlier, sorry.
We can go with topleft preferred, but please add a comment that flags are ignored on purpose. |
|
Is it stable for runtime testing? |
|
Sure, for me is ready for merge. Has been tested in Intel NUC with full and limited range and RTX 4070 with full/limited HDR10 passthrough in combination with Denon AVR-1600X and TV Sony AG9. No issues found. Black level is correct and is the same in all cases. No visible differences due use Pixel Shaders in Nvidia limited comparing DXVA in NUC (limited or full). Also for reference compared with Kodi in Shield Pro 2019 in the same setup (AVR - TV). I won't have much time in the next few days to make changes or runtime test others PRs. |
|
Testing completed on AMD, Intel Gen 4 and Gen 8. See the previous notes. The problem of destination format in IsHDR10PassthroughSupported() is blocking. The limited output is rejected for AMD and accepted by Intel, as expected. AMD also doesn't output limited range for SDR, do you think the new function can be generalized or would it take a separate one? (no questions of top left vs left in SDR) |
ecc6f8c to
9d09bfa
Compare
|
Comments answered, please let me know when you consider this stable for another round of testing. |
|
I think all points are resolved and is ready for final test/review. |
Maybe a new separated method like |
|
Sorry for the ignorant question but... I have tried installing the build from today. I saw from Jenkins, up here, that it failed building for TVOS and Linux GLES but it built for other platforms, Windows included. Does this mean that build 20230607-babe32cf-master-x64 should include this? If it does... it doesn't appear to solve the problem with HDR material. If it doesn't, please ignore (or maybe explain why, so that I won't repeat the mistake in the future). Edit: I see this it's still at the "pull request" stage, so maybe it wasn't included in the official nightly build? How can one test developments like this, then? Or is it something that just developers do? I ask because, due to the complexity of hardware, different platforms, different GPUs, etc. maybe it could be helpful to involve users. |
|
current nightly doesn't include these changes till this will be merged |
Ok, thanks for confirming. So testing PRs before merge is something that only devs can do (unless one builds by him/herself)? |
|
There is a build here: KodiSetup-20230607-bb6f0be3-dxva-hdr10-x64.exe |
For me, RTX 3070, this solves the HDR playback problem. Thanks for sharing the build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, ran well. No need for a retest after the couple cosmetic comments, it's approved for me.
…ocessor And fallback to Pixel Shaders when not supported.
|
You can merge whenever. |
|
TVOS build failure is unrelated. |
Description
DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020andDXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020.CheckVideoProcessorFormatConversionreturns is not valid conversion.Motivation and context
Found that in NVIDIA RTX 4070 things goes wrong with HDR10 limited range.... The use of only "native" color spaces for HDR10 simplifies things and with more strictly checks and fallback to Pixel Shaders more robust and predictable behavior should result.
Closes #23357
Also should fix other sporadic issues seen in forums as:
https://forum.kodi.tv/showthread.php?tid=372606&pid=3146966#pid3146966
How has this been tested?
Runtime tested Intel NUC8i3BEK and NVIDIA RTX 4070.
On NUC continues working as before supporting DXVA HDR10 passthrough in full and limited range.
On RTX 4070 DXVA HDR10 works only in full range and now is used Pixel Shaders in limited range.
Note that current behavior for RTX 4070 limited range in Nexus is wrong black level and in master execution halts in:
xbmc/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererDXVA.cpp
Line 137 in f84cf8b
What is the effect on users?
Avoids failures or wrong picture/black screen when DXVA HDR10 color conversion is not full supported and improves compatibility in some scenarios.
Screenshots (if appropriate):
Types of change
Checklist: