aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2019-02-10 10:19:18 +0100
committerGitHub <noreply@github.com>2019-02-10 10:19:18 +0100
commitdf5cdf05b6a225ea795ac758979c67db6a69010d (patch)
tree62651f0944307e31efc3a92c662fcab131f6b1e7
parentf463b356a8eb5e8789af1386b532c7ed383b8f42 (diff)
parent3cc137f4fa8ea87d335c210786aee652226e7710 (diff)
Merge pull request #15466 from afedchin/dxva-hq-setting
[videoplayer] WinRenderer: remove `dxvaallowhqscaling` setting
-rw-r--r--xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp54
-rw-r--r--xbmc/settings/AdvancedSettings.cpp2
-rw-r--r--xbmc/settings/AdvancedSettings.h1
3 files changed, 15 insertions, 42 deletions
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp
index 3a2f7a62b4..bf3ac0e651 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp
@@ -493,42 +493,25 @@ void CWinRenderer::SelectPSVideoFilter()
switch (m_scalingMethod)
{
- case VS_SCALINGMETHOD_NEAREST:
- case VS_SCALINGMETHOD_LINEAR:
- break;
-
case VS_SCALINGMETHOD_CUBIC:
case VS_SCALINGMETHOD_LANCZOS2:
case VS_SCALINGMETHOD_SPLINE36_FAST:
case VS_SCALINGMETHOD_LANCZOS3_FAST:
- m_bUseHQScaler = true;
- break;
-
case VS_SCALINGMETHOD_SPLINE36:
case VS_SCALINGMETHOD_LANCZOS3:
m_bUseHQScaler = true;
break;
- case VS_SCALINGMETHOD_SINC8:
- CLog::Log(LOGERROR, "D3D: TODO: This scaler has not yet been implemented");
- break;
-
- case VS_SCALINGMETHOD_BICUBIC_SOFTWARE:
- case VS_SCALINGMETHOD_LANCZOS_SOFTWARE:
- case VS_SCALINGMETHOD_SINC_SOFTWARE:
- CLog::Log(LOGERROR, "D3D: TODO: Software scaling has not yet been implemented");
- break;
-
default:
break;
}
if (m_scalingMethod == VS_SCALINGMETHOD_AUTO)
{
- bool scaleSD = m_sourceHeight < 720 && m_sourceWidth < 1280;
- bool scaleUp = static_cast<int>(m_sourceHeight) < CServiceBroker::GetWinSystem()->GetGfxContext().GetHeight()
+ const bool scaleSD = m_sourceHeight < 720 && m_sourceWidth < 1280;
+ const bool scaleUp = static_cast<int>(m_sourceHeight) < CServiceBroker::GetWinSystem()->GetGfxContext().GetHeight()
&& static_cast<int>(m_sourceWidth) < CServiceBroker::GetWinSystem()->GetGfxContext().GetWidth();
- bool scaleFps = m_fps < (CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_videoAutoScaleMaxFps + 0.01f);
+ const bool scaleFps = m_fps < CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_videoAutoScaleMaxFps + 0.01f;
if (m_renderMethod == RENDER_DXVA)
{
@@ -540,6 +523,8 @@ void CWinRenderer::SelectPSVideoFilter()
m_scalingMethod = VS_SCALINGMETHOD_LANCZOS3_FAST;
m_bUseHQScaler = true;
}
+ else
+ m_scalingMethod = VS_SCALINGMETHOD_LINEAR;
}
if (m_renderOrientation)
m_bUseHQScaler = false;
@@ -1037,21 +1022,17 @@ bool CWinRenderer::Supports(ERENDERFEATURE feature)
bool CWinRenderer::Supports(ESCALINGMETHOD method)
{
- if (m_renderMethod == RENDER_PS || m_renderMethod == RENDER_DXVA)
- {
- if (m_renderMethod == RENDER_DXVA)
- {
- if (method == VS_SCALINGMETHOD_DXVA_HARDWARE
- || method == VS_SCALINGMETHOD_AUTO)
- return true;
- if (!CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_DXVAAllowHqScaling || m_renderOrientation)
- return false;
- }
+ if (method == VS_SCALINGMETHOD_AUTO)
+ return true;
- if ( method == VS_SCALINGMETHOD_AUTO
- || (method == VS_SCALINGMETHOD_LINEAR && m_renderMethod == RENDER_PS))
- return true;
+ if (method == VS_SCALINGMETHOD_LINEAR && m_renderMethod != RENDER_DXVA)
+ return true;
+ if (method == VS_SCALINGMETHOD_DXVA_HARDWARE && m_renderMethod == RENDER_DXVA)
+ return true;
+
+ if (m_renderMethod == RENDER_PS || m_renderMethod == RENDER_DXVA)
+ {
if (DX::DeviceResources::Get()->GetDeviceFeatureLevel() >= D3D_FEATURE_LEVEL_9_3 && !m_renderOrientation)
{
if (method == VS_SCALINGMETHOD_CUBIC
@@ -1071,12 +1052,7 @@ bool CWinRenderer::Supports(ESCALINGMETHOD method)
}
}
}
- else if(m_renderMethod == RENDER_SW)
- {
- if (method == VS_SCALINGMETHOD_AUTO
- || method == VS_SCALINGMETHOD_LINEAR)
- return true;
- }
+
return false;
}
diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
index f3931613ed..1b38457c7c 100644
--- a/xbmc/settings/AdvancedSettings.cpp
+++ b/xbmc/settings/AdvancedSettings.cpp
@@ -173,7 +173,6 @@ void CAdvancedSettings::Initialize()
m_DXVACheckCompatibility = false;
m_DXVACheckCompatibilityPresent = false;
m_DXVAForceProcessorRenderer = true;
- m_DXVAAllowHqScaling = true;
m_videoFpsDetect = 1;
m_maxTempo = 1.55f;
m_videoPreferStereoStream = false;
@@ -718,7 +717,6 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file)
m_DXVACheckCompatibilityPresent = XMLUtils::GetBoolean(pElement,"checkdxvacompatibility", m_DXVACheckCompatibility);
XMLUtils::GetBoolean(pElement,"forcedxvarenderer", m_DXVAForceProcessorRenderer);
- XMLUtils::GetBoolean(pElement, "dxvaallowhqscaling", m_DXVAAllowHqScaling);
XMLUtils::GetBoolean(pElement, "usedisplaycontrolhwstereo", m_useDisplayControlHWStereo);
XMLUtils::GetBoolean(pElement, "allowdiscretedecoder", m_allowUseSeparateDeviceForDecoding);
//0 = disable fps detect, 1 = only detect on timestamps with uniform spacing, 2 detect on all timestamps
diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
index 1df75ad562..1de3b00b27 100644
--- a/xbmc/settings/AdvancedSettings.h
+++ b/xbmc/settings/AdvancedSettings.h
@@ -179,7 +179,6 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
bool m_DXVACheckCompatibility;
bool m_DXVACheckCompatibilityPresent;
bool m_DXVAForceProcessorRenderer;
- bool m_DXVAAllowHqScaling;
int m_videoFpsDetect;
bool m_mediacodecForceSoftwareRendering;
float m_maxTempo;