diff options
author | bobo1on1 <bobo1on1@svn> | 2009-12-19 16:18:03 +0000 |
---|---|---|
committer | bobo1on1 <bobo1on1@svn> | 2009-12-19 16:18:03 +0000 |
commit | 9f4912735181912f92e778010fef61c6a2ca734a (patch) | |
tree | 086bf11d730021bab8c2706af8a0e5b777f9e7b0 | |
parent | 5987a117646efaac4835536f48c6eab9be339c35 (diff) |
fixed: allow turning on software upscaling via as.xml
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@25856 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/AdvancedSettings.cpp | 4 | ||||
-rw-r--r-- | xbmc/AdvancedSettings.h | 3 | ||||
-rw-r--r-- | xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 19 |
3 files changed, 17 insertions, 9 deletions
diff --git a/xbmc/AdvancedSettings.cpp b/xbmc/AdvancedSettings.cpp index d33329675f..eb2e3062b3 100644 --- a/xbmc/AdvancedSettings.cpp +++ b/xbmc/AdvancedSettings.cpp @@ -85,6 +85,8 @@ void CAdvancedSettings::Initialize() m_videoIgnoreAtStart = 15; m_videoIgnoreAtEnd = 5; m_videoPlayCountMinimumPercent = 90.0f; + m_videoHighQualityScaling = SOFTWARE_UPSCALING_DISABLED; + m_videoHighQualityScalingMethod = VS_SCALINGMETHOD_BICUBIC_SOFTWARE; m_musicUseTimeSeeking = true; m_musicTimeSeekForward = 10; @@ -397,6 +399,8 @@ bool CAdvancedSettings::Load() XMLUtils::GetString(pElement,"cleandatetime", m_videoCleanDateTimeRegExp); XMLUtils::GetString(pElement,"postprocessing",m_videoPPFFmpegType); + XMLUtils::GetInt(pElement,"highqualityscaling",m_videoHighQualityScaling); + XMLUtils::GetInt(pElement,"highqualityscalingmethod",m_videoHighQualityScalingMethod); } pElement = pRootElement->FirstChildElement("musiclibrary"); diff --git a/xbmc/AdvancedSettings.h b/xbmc/AdvancedSettings.h index 0136dc0429..4e874792f0 100644 --- a/xbmc/AdvancedSettings.h +++ b/xbmc/AdvancedSettings.h @@ -92,6 +92,9 @@ class CAdvancedSettings CStdString m_audioHost; bool m_audioApplyDrc; + int m_videoHighQualityScaling; + int m_videoHighQualityScalingMethod; + CStdString m_videoDefaultPlayer; CStdString m_videoDefaultDVDPlayer; float m_videoPlayCountMinimumPercent; diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp index 0640f04c22..8e6de5682a 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp @@ -214,7 +214,7 @@ void CLinuxRendererGL::ChooseUpscalingMethod() m_upscalingWidth = m_destRect.Width(); m_upscalingHeight = m_destRect.Height(); - int upscale = g_guiSettings.GetInt("videoplayer.highqualityupscaling"); + int upscale = g_advancedSettings.m_videoHighQualityScaling; // See if we're a candiate for upscaling. bool candidateForUpscaling = false; @@ -233,13 +233,13 @@ void CLinuxRendererGL::ChooseUpscalingMethod() if (candidateForUpscaling) { - ESCALINGMETHOD ret = (ESCALINGMETHOD)g_guiSettings.GetInt("videoplayer.upscalingalgorithm"); + ESCALINGMETHOD ret = (ESCALINGMETHOD)g_advancedSettings.m_videoHighQualityScalingMethod; // Make sure to override the default setting for the video g_stSettings.m_currentVideoSettings.m_ScalingMethod = ret; // Initialize software upscaling. - if (g_guiSettings.GetInt("videoplayer.upscalingalgorithm") < 10) //non-hardware + if (g_advancedSettings.m_videoHighQualityScalingMethod < 10) //non-hardware { InitializeSoftwareUpscaling(); CLog::Log(LOGWARNING, "Upscale: selected algorithm %d", ret); @@ -1918,12 +1918,13 @@ bool CLinuxRendererGL::Supports(ESCALINGMETHOD method) && m_renderMethod == RENDER_GLSL) return true; -#if 0 - if(method == VS_SCALINGMETHOD_BICUBIC_SOFTWARE - || method == VS_SCALINGMETHOD_LANCZOS_SOFTWARE - || method == VS_SCALINGMETHOD_SINC_SOFTWARE) - return true; -#endif + if (g_advancedSettings.m_videoHighQualityScaling != SOFTWARE_UPSCALING_DISABLED) + { + if(method == VS_SCALINGMETHOD_BICUBIC_SOFTWARE + || method == VS_SCALINGMETHOD_LANCZOS_SOFTWARE + || method == VS_SCALINGMETHOD_SINC_SOFTWARE) + return true; + } if(method == VS_SCALINGMETHOD_VDPAU_HARDWARE && m_renderMethod == RENDER_METHOD_VDPAU) return true; |