diff options
author | CrystalP <CrystalP@xbmc.org> | 2012-03-18 01:01:36 -0400 |
---|---|---|
committer | CrystalP <CrystalP@xbmc.org> | 2012-03-19 22:49:21 -0400 |
commit | b48d0b87862505bc25d03dc7e96df44421dccaed (patch) | |
tree | fc436d6da70179435530e1dd6139b6563fda9c78 | |
parent | 0692d0bd46ef049650c5fd29023a976ca1ee7a81 (diff) |
[WIN] open the correct dxva processor with deinterlace mode auto
instead of opening the wrong one and switching later.
-rw-r--r-- | xbmc/cores/VideoRenderers/WinRenderer.cpp | 11 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/xbmc/cores/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoRenderers/WinRenderer.cpp index 8ff4a1297f..55d29a67e3 100644 --- a/xbmc/cores/VideoRenderers/WinRenderer.cpp +++ b/xbmc/cores/VideoRenderers/WinRenderer.cpp @@ -131,13 +131,14 @@ void CWinRenderer::ManageTextures() void CWinRenderer::SelectRenderMethod() { + // Set rendering to dxva before trying it, in order to open the correct processor immediately, when deinterlacing method is auto. + // Force dxva renderer after dxva decoding: PS and SW renderers have performance issues after dxva decode. if (g_advancedSettings.m_DXVAForceProcessorRenderer && CONF_FLAGS_FORMAT_MASK(m_flags) == CONF_FLAGS_FORMAT_DXVA) { CLog::Log(LOGNOTICE, "D3D: rendering method forced to DXVA2 processor"); - if (m_processor.Open(m_sourceWidth, m_sourceHeight, m_flags, m_format)) - m_renderMethod = RENDER_DXVA; - else + m_renderMethod = RENDER_DXVA; + if (!m_processor.Open(m_sourceWidth, m_sourceHeight, m_flags, m_format)) { CLog::Log(LOGNOTICE, "D3D: unable to open DXVA2 processor"); m_processor.Close(); @@ -151,11 +152,9 @@ void CWinRenderer::SelectRenderMethod() switch(m_iRequestedMethod) { case RENDER_METHOD_DXVA: + m_renderMethod = RENDER_DXVA; if (m_processor.Open(m_sourceWidth, m_sourceHeight, m_flags, m_format)) - { - m_renderMethod = RENDER_DXVA; break; - } else { CLog::Log(LOGNOTICE, "D3D: unable to open DXVA2 processor"); diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp index 5b6c035cf7..1fbdeef2f2 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp @@ -1151,6 +1151,9 @@ bool CProcessor::Open(UINT width, UINT height, unsigned int flags, unsigned int return false; } + m_deinterlace_mode = g_settings.m_currentVideoSettings.m_DeinterlaceMode; + m_interlace_method = g_renderManager.AutoInterlaceMethod(g_settings.m_currentVideoSettings.m_InterlaceMethod);; + if (!OpenProcessor()) return false; |