Skip to content

Commit

Permalink
[WIN] open the correct dxva processor with deinterlace mode auto
Browse files Browse the repository at this point in the history
instead of opening the wrong one and switching later.
  • Loading branch information
CrystalP authored and CrystalP committed Mar 20, 2012
1 parent 0692d0b commit b48d0b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 5 additions & 6 deletions xbmc/cores/VideoRenderers/WinRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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");
Expand Down
3 changes: 3 additions & 0 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b48d0b8

Please sign in to comment.