Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EGLNativeTypeAmlogic: Enable GUI scaling when framebuffer size is less than output res #10332

Closed
wants to merge 1 commit into from
Closed

Conversation

kszaq
Copy link
Contributor

@kszaq kszaq commented Aug 23, 2016

For 4K output Kodi renders GUI at 1080p and this results in GUI covering only 1/4 screen.

Example: https://forum.libreelec.tv/thread-1355-post-9983.html#pid9983

This patch enables hardware upscaling if output resolution is greater than rendered GUI resolution.

Another solution would be to render GUI at full resolution but there are 2 disadvantages:

  • more reserved memory is needed for framebuffer
  • rendering performance is not satisfactory at 4K

…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.
@@ -53,6 +53,8 @@ class CEGLNativeTypeAmlogic : public CEGLNativeType
protected:
bool SetDisplayResolution(const char *resolution);
void SetupVideoScaling(const char *mode);
void DealWithScale(const RESOLUTION_INFO &res);

This comment was marked as spam.

This comment was marked as spam.

@fritsch
Copy link
Member

fritsch commented Aug 24, 2016

@codesnake that looks not clean in my opinion, please review as it is "your" platform :-)

kszaq added a commit to kszaq/LibreELEC.tv that referenced this pull request Aug 26, 2016
Issues with previous set of patches:
- at some 4K output resolutions GUI was rendered at 1080p and covered only 1/4 of screen due to not changed iWidth and iHeight parameters
- rendering GUI at 4K while playing high-bitrate 4K video caused stuttering

Changes introduced in this patch:
- rewrite platform_init to be aware of 4K resolutions passed by uboot in "hdmimode" parameter
- always set virtual framebuffer resolution to 1920x2160 (like Kodi does)
- remove Kodi patch to render GUI at 4K
- add Kodi patch (xbmc/xbmc#10332) to upscale GUI when screen resolution is 4K
kszaq added a commit to kszaq/LibreELEC.tv that referenced this pull request Aug 27, 2016
Issues with previous set of patches:
- at some 4K output resolutions GUI was rendered at 1080p and covered only 1/4 of screen due to not changed iWidth and iHeight parameters
- rendering GUI at 4K while playing high-bitrate 4K video caused stuttering

Changes introduced in this patch:
- rewrite platform_init to be aware of 4K resolutions passed by uboot in "hdmimode" parameter
- always set virtual framebuffer resolution to 1920x2160 (like Kodi does)
- remove Kodi patch to render GUI at 4K
- add Kodi patch (xbmc/xbmc#10332) to upscale GUI when screen resolution is 4K
@MartijnKaijser
Copy link
Member

@kszaq please do not refer this PR in a commit message cause that will spam the PR

@codesnake
Copy link
Contributor

@kszaq Can you confirm this PR handles correctly all video view modes (I mean Normal, Zoom, Wide Zoom etc)?

@kszaq kszaq closed this Sep 25, 2016
codesnake pushed a commit to codesnake/LibreELEC.tv that referenced this pull request Jan 31, 2017
Issues with previous set of patches:
- at some 4K output resolutions GUI was rendered at 1080p and covered only 1/4 of screen due to not changed iWidth and iHeight parameters
- rendering GUI at 4K while playing high-bitrate 4K video caused stuttering

Changes introduced in this patch:
- rewrite platform_init to be aware of 4K resolutions passed by uboot in "hdmimode" parameter
- always set virtual framebuffer resolution to 1920x2160 (like Kodi does)
- remove Kodi patch to render GUI at 4K
- add Kodi patch (xbmc/xbmc#10332) to upscale GUI when screen resolution is 4K
@kszaq kszaq deleted the amlogic_scaling branch February 22, 2017 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants