aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrystalP <CrystalP@xbmc.org>2012-03-18 01:01:36 -0400
committerCrystalP <CrystalP@xbmc.org>2012-03-19 22:49:21 -0400
commitb48d0b87862505bc25d03dc7e96df44421dccaed (patch)
treefc436d6da70179435530e1dd6139b6563fda9c78
parent0692d0bd46ef049650c5fd29023a976ca1ee7a81 (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.cpp11
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp3
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;