dtechsrv / LibreELEC-AML

'Just enough OS' for Kodi for some Amlogic TV boxes
49 stars 9 forks source link

AML-VNC: Fix resolution issue when used other than native #32

Closed dtechsrv closed 12 months ago

dtechsrv commented 1 year ago

This is not a workaround in this state, it is currently just a rollback to a previous version, from f87a8f4 back to 6be9c4d. In the meantime, I created a possible solution to this issue.

Kodi screenshot: Kodi-screenshot_720p@60Hz VNC screen at the same time: AML-VNC_720p@60Hz

The goal is to make a patch that fixes the miscalculation issue in the latest version that causes the above error to appear when the service starts other resolution (e.g. 720p) instead of the native resolution (1080p).

dtechsrv commented 1 year ago

ping @kszaq

If you could help me, I would appreciate it, because I haven't figured out what could be causing the error so far.

Due to the extra performance, your last two patches (compare every 4th pixel, copy only modified area) are definitely useful, and it would also be good to leave the scaling at 1:1.

It seems as if even at 720p resolution, the width of the canvas is one and a half times larger (1920 instead of 1280), which is why the individual lines are wedged into each other.

I tried to figure it out and modify your code, but I got a bit bogged down in the math part.

dtechsrv commented 1 year ago

ping @vpeter4

This error also exists on CE. I checked it under CoreELEC v20.2. After changing the resolution from 1080p to 720p, and restarting the service, it looks like this: AML-VNC-CE20 2

vpeter4 commented 1 year ago

I'm not familiar with this issue - looks like no one is using non-default resolution.

dtechsrv commented 1 year ago

I'm not familiar with this issue - looks like no one is using non-default resolution.

Regardless, this bug still exists. I just wanted to let you know.

vpeter4 commented 1 year ago

Yes, and thank you for the info. But I'm not going to make some changes which no one will see or even use. It would be waste of my free time for nothing at this point.

kszaq commented 11 months ago

Sorry for not responding in reasonable time. I've not used this code for a long time. I'm glad you found a solution.

dtechsrv commented 11 months ago

No problem, I also sent you a PR in the meantime. :)