From 40dd588bef22078324aba9de1602bb44235fe153 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 13 Oct 2022 00:17:05 -0500 Subject: [PATCH] Use 10-bit format mask instead of hardcoding specific formats --- app/streaming/video/ffmpeg-renderers/dxva2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/dxva2.cpp b/app/streaming/video/ffmpeg-renderers/dxva2.cpp index 4c823619..48deb4e6 100644 --- a/app/streaming/video/ffmpeg-renderers/dxva2.cpp +++ b/app/streaming/video/ffmpeg-renderers/dxva2.cpp @@ -589,7 +589,7 @@ bool DXVA2Renderer::initializeDevice(SDL_Window* window, bool enableVsync) d3dpp.BackBufferHeight = currentMode.Height; d3dpp.FullScreen_RefreshRateInHz = currentMode.RefreshRate; - if (m_VideoFormat == VIDEO_FORMAT_H265_MAIN10) { + if (m_VideoFormat & VIDEO_FORMAT_MASK_10BIT) { d3dpp.BackBufferFormat = currentMode.Format = D3DFMT_A2R10G10B10; } else { @@ -751,7 +751,7 @@ bool DXVA2Renderer::initialize(PDECODER_PARAMETERS params) m_Desc.SampleFormat.VideoTransferFunction = DXVA2_VideoTransFunc_Unknown; m_Desc.SampleFormat.SampleFormat = DXVA2_SampleProgressiveFrame; - if (m_VideoFormat == VIDEO_FORMAT_H265_MAIN10) { + if (m_VideoFormat & VIDEO_FORMAT_MASK_10BIT) { m_Desc.Format = (D3DFORMAT)MAKEFOURCC('P','0','1','0'); } else {