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
Conversation
…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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@codesnake that looks not clean in my opinion, please review as it is "your" platform :-) |
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
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 please do not refer this PR in a commit message cause that will spam the PR |
@kszaq Can you confirm this PR handles correctly all video view modes (I mean Normal, Zoom, Wide Zoom etc)? |
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
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: