mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 05:34:17 +00:00
Fix YUV444 hardware decoding on Windows systems without an Intel GPU present
This commit is contained in:
parent
9d99ecbca6
commit
f756be87ff
2 changed files with 11 additions and 1 deletions
|
@ -1169,7 +1169,12 @@ IFFmpegRenderer::InitFailureReason D3D11VARenderer::getInitFailureReason()
|
|||
// NB2: We're also assuming that no GPU exists which lacks any D3D11 driver but has drivers
|
||||
// for non-DX APIs like Vulkan. I believe this is a Windows Logo requirement so it should be
|
||||
// safe to assume.
|
||||
if (m_DevicesWithFL11Support != 0 && m_DevicesWithCodecSupport == 0) {
|
||||
//
|
||||
// NB3: Sigh, there *are* GPUs drivers with greater codec support available via Vulkan than
|
||||
// D3D11VA even when both D3D11 and Vulkan APIs are supported. This is the case for HEVC RExt
|
||||
// profiles that were not supported by Microsoft until the Windows 11 24H2 SDK. Don't report
|
||||
// that hardware support is missing for YUV444 profiles since the Vulkan driver may support it.
|
||||
if (m_DevicesWithFL11Support != 0 && m_DevicesWithCodecSupport == 0 && !(m_DecoderParams.videoFormat & VIDEO_FORMAT_MASK_YUV444)) {
|
||||
return InitFailureReason::NoHardwareSupport;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -717,6 +717,11 @@ bool DXVA2Renderer::initialize(PDECODER_PARAMETERS params)
|
|||
// the HDR colorspace and HDR display metadata required to enable HDR mode properly.
|
||||
return false;
|
||||
}
|
||||
else if (params->videoFormat & VIDEO_FORMAT_MASK_YUV444) {
|
||||
// It's theoretically possible to use YUV444 with D3D9, but probably not worth actually
|
||||
// implementing because any YUV444-capable hardware supports D3D11 or Vulkan.
|
||||
return false;
|
||||
}
|
||||
#ifndef Q_PROCESSOR_X86
|
||||
else if (qgetenv("DXVA2_ENABLED") != "1" && m_DecoderSelectionPass == 0) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
|
|
Loading…
Reference in a new issue