mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 15:07:49 +00:00
Merge pull request #1297 from lrusak/kodi-18
kodi: remove aarch64 patches that have been merged upstream
This commit is contained in:
commit
1e9896e063
@ -1,89 +0,0 @@
|
|||||||
From a348ef744e260f76e1e4e1299f9181ae40352eb5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: kszaq <kszaquitto@gmail.com>
|
|
||||||
Date: Mon, 22 Aug 2016 06:55:00 +0200
|
|
||||||
Subject: [PATCH] EGLNativeTypeAmlogic: Enable GUI free_scale when framebuffer
|
|
||||||
size is less than output resolution
|
|
||||||
|
|
||||||
For 4K output Kodi renders GUI at 1080p and this results in GUI covering only 1/4 screen.
|
|
||||||
This patch enables hardware upscaling if output resolution is greater than rendered GUI
|
|
||||||
resolution.
|
|
||||||
---
|
|
||||||
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 33 ++++++++++++++++++++++++++---
|
|
||||||
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 2 ++
|
|
||||||
2 files changed, 32 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
|
|
||||||
index 88cd385..3cbb604 100644
|
|
||||||
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
|
|
||||||
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
|
|
||||||
@@ -133,6 +133,8 @@ bool CEGLNativeTypeAmlogic::GetNativeResolution(RESOLUTION_INFO *res) const
|
|
||||||
|
|
||||||
bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
|
|
||||||
{
|
|
||||||
+ bool result = false;
|
|
||||||
+
|
|
||||||
#if defined(_FBDEV_WINDOW_H_)
|
|
||||||
if (m_nativeWindow)
|
|
||||||
{
|
|
||||||
@@ -144,10 +146,12 @@ bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
|
|
||||||
// Don't set the same mode as current
|
|
||||||
std::string mode;
|
|
||||||
SysfsUtils::GetString("/sys/class/display/mode", mode);
|
|
||||||
- if (res.strId == mode)
|
|
||||||
- return false;
|
|
||||||
+ if (res.strId != mode)
|
|
||||||
+ result = SetDisplayResolution(res.strId.c_str());
|
|
||||||
+
|
|
||||||
+ DealWithScale(res);
|
|
||||||
|
|
||||||
- return SetDisplayResolution(res.strId.c_str());
|
|
||||||
+ return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CEGLNativeTypeAmlogic::ProbeResolutions(std::vector<RESOLUTION_INFO> &resolutions)
|
|
||||||
@@ -220,6 +224,29 @@ void CEGLNativeTypeAmlogic::SetupVideoScaling(const char *mode)
|
|
||||||
SysfsUtils::SetInt("/sys/class/graphics/fb0/blank", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void CEGLNativeTypeAmlogic::DealWithScale(const RESOLUTION_INFO &res)
|
|
||||||
+{
|
|
||||||
+ if (res.iScreenWidth > res.iWidth && res.iScreenHeight > res.iHeight)
|
|
||||||
+ EnableFreeScale(res);
|
|
||||||
+ else
|
|
||||||
+ DisableFreeScale();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void CEGLNativeTypeAmlogic::EnableFreeScale(const RESOLUTION_INFO &res)
|
|
||||||
+{
|
|
||||||
+ char fsaxis_str[256] = {0};
|
|
||||||
+ sprintf(fsaxis_str, "0 0 %d %d", res.iWidth-1, res.iHeight-1);
|
|
||||||
+ char waxis_str[256] = {0};
|
|
||||||
+ sprintf(waxis_str, "0 0 %d %d", res.iScreenWidth-1, res.iScreenHeight-1);
|
|
||||||
+
|
|
||||||
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0);
|
|
||||||
+ SysfsUtils::SetString("/sys/class/graphics/fb0/free_scale_axis", fsaxis_str);
|
|
||||||
+ SysfsUtils::SetString("/sys/class/graphics/fb0/window_axis", waxis_str);
|
|
||||||
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_width", res.iWidth);
|
|
||||||
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_height", res.iHeight);
|
|
||||||
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0x10001);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void CEGLNativeTypeAmlogic::DisableFreeScale()
|
|
||||||
{
|
|
||||||
// turn off frame buffer freescale
|
|
||||||
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
|
|
||||||
index cfb33ca..96aa6f7 100644
|
|
||||||
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
|
|
||||||
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
|
|
||||||
@@ -53,6 +53,8 @@ public:
|
|
||||||
protected:
|
|
||||||
bool SetDisplayResolution(const char *resolution);
|
|
||||||
void SetupVideoScaling(const char *mode);
|
|
||||||
+ void DealWithScale(const RESOLUTION_INFO &res);
|
|
||||||
+ void EnableFreeScale(const RESOLUTION_INFO &res);
|
|
||||||
void DisableFreeScale();
|
|
||||||
|
|
||||||
private:
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
|||||||
From 211edfa19b20820772b33f6042992811037a21b3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jamie Coldhill <wrxtasy@amnet.net.au>
|
|
||||||
Date: Thu, 6 Oct 2016 17:54:40 +0800
|
|
||||||
Subject: [PATCH] [aml] Scale video axis correctly when 1080p to 2160p switching
|
|
||||||
Fixup 720p60hz fallback resolution
|
|
||||||
|
|
||||||
---
|
|
||||||
xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp | 10 +++++++++-
|
|
||||||
xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h | 1 +
|
|
||||||
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 2 +-
|
|
||||||
3 files changed, 11 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
|
|
||||||
index f9b4138..2a3b413 100644
|
|
||||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
|
|
||||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
|
|
||||||
@@ -2163,6 +2163,13 @@ void CAMLCodec::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
|
|
||||||
update = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ RESOLUTION video_res = g_graphicsContext.GetVideoResolution();
|
|
||||||
+ if (m_video_res != video_res)
|
|
||||||
+ {
|
|
||||||
+ m_video_res = video_res;
|
|
||||||
+ update = true;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (!update)
|
|
||||||
{
|
|
||||||
// mainvideo 'should' be showing already if we get here, make sure.
|
|
||||||
@@ -2176,7 +2183,8 @@ void CAMLCodec::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
|
|
||||||
#ifdef TARGET_ANDROID
|
|
||||||
display = m_display_rect;
|
|
||||||
#else
|
|
||||||
- display = gui;
|
|
||||||
+ const RESOLUTION_INFO& video_res_info = CDisplaySettings::GetInstance().GetResolutionInfo(video_res);
|
|
||||||
+ display = m_display_rect = CRect(0, 0, video_res_info.iScreenWidth, video_res_info.iScreenHeight);
|
|
||||||
#endif
|
|
||||||
if (gui != display)
|
|
||||||
{
|
|
||||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h
|
|
||||||
index 0eb5c3e..ede815d 100644
|
|
||||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h
|
|
||||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h
|
|
||||||
@@ -93,6 +93,7 @@ private:
|
|
||||||
float m_zoom;
|
|
||||||
int m_contrast;
|
|
||||||
int m_brightness;
|
|
||||||
+ RESOLUTION m_video_res;
|
|
||||||
|
|
||||||
PosixFilePtr m_amlVideoFile;
|
|
||||||
std::string m_defaultVfmMap;
|
|
||||||
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
|
|
||||||
index 88cd385..6d63571 100644
|
|
||||||
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
|
|
||||||
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
|
|
||||||
@@ -173,7 +173,7 @@ bool CEGLNativeTypeAmlogic::GetPreferredResolution(RESOLUTION_INFO *res) const
|
|
||||||
if (!GetNativeResolution(res))
|
|
||||||
{
|
|
||||||
// punt to 720p if we get nothing
|
|
||||||
- aml_mode_to_resolution("720p", res);
|
|
||||||
+ aml_mode_to_resolution("720p60hz", res);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
Loading…
x
Reference in New Issue
Block a user