kodi: add patch to limit HQ scalers

This commit is contained in:
piotrasd 2017-06-25 19:34:44 +01:00
parent a07f0570c0
commit 60ad30c0cb

View File

@ -0,0 +1,32 @@
From 4e356d49fc5955fcf9ea8b14d9be22af4edd5b39 Mon Sep 17 00:00:00 2001
From: fritsch <Peter.Fruehberger@gmail.com>
Date: Sat, 17 Dec 2016 16:06:31 +0100
Subject: [PATCH] LinuxRendererGL: Don't use hq scalers when coping with sizes
> 2560 (we are too slow)
---
xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp
index 4e785f7..0ee1666 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp
@@ -2501,6 +2501,14 @@ bool CLinuxRendererGL::Supports(ESCALINGMETHOD method)
float scaleX = fabs(((float)m_sourceWidth - m_destRect.Width())/m_sourceWidth)*100;
float scaleY = fabs(((float)m_sourceHeight - m_destRect.Height())/m_sourceHeight)*100;
int minScale = CSettings::GetInstance().GetInt(CSettings::SETTING_VIDEOPLAYER_HQSCALERS);
+ // Don't use hq scalers if source width is larger than 2560 pixels
+ if (m_sourceWidth > 2560)
+ return false;
+
+ // Don't use hq scalers if we try to upscale to something > 2560
+ if (m_destRect.Width() > 2560)
+ return false;
+
if (scaleX < minScale && scaleY < minScale)
return false;
--
2.7.4