ludo icon indicating copy to clipboard operation
ludo copied to clipboard

[New Feature] Integer scaling and super resolution

Open donmor opened this issue 3 years ago • 13 comments

Former issue #483 . This PR added a feature that making it able to do integer scaling, to achieve "pixel perfect". When option Settings > Video Integer Scaling is on, the core renderer detects the window size and scale the original video to the max size while keeping pixel-perfect. An entry added in settings. 2022-06-17 21-42-50 2022-06-17 21-55-38

donmor avatar Jun 17 '22 14:06 donmor

This pull request introduces 1 alert when merging 204b64a75e39324d850ca014f3f33eb6333924f3 into 500c8bad7c5b437119a4a29087f4dbf6644a3e48 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

lgtm-com[bot] avatar Jun 17 '22 14:06 lgtm-com[bot]

Update: Super resolution Makes the video horizontally stretched when Video Super Resolution enabled. Can be affected by Video Integer Scaling. The menu will have a different behavior to work properly under super resolutions. 2022-06-18 01-12-04 2022-06-18 01-02-54 2022-06-18 13-54-41

donmor avatar Jun 18 '22 05:06 donmor

Update: Added support to unicode font. A unifont.png need to be placed in assets directory. To generate unifont.png, fetch "Plane 0 Chart" in BMP format from http://unifoundry.com/unifont/index.html, then make it reversed and saved as PNG. 2022-06-18 22-34-53

donmor avatar Jun 18 '22 14:06 donmor

Update: Refactorred Super Resolution to Aspect Correction. Once set to the aspect ratio of your monitor, it'll always keep the correct video aspect ratio, despite what resolution is in use.

donmor avatar Jun 18 '22 18:06 donmor

Update: Nowadays people are usually not willing to change their resolution once a neat one has been set, and the largest resolution is not always best (especially for CRTs). This commit makes Ludo use current desktop resolution when entering full-screen mode.

donmor avatar Jun 25 '22 16:06 donmor

@donmor That last commit gold ⭐ Ludo changes the resolution from 1920x1080 to 1920x1200 when connected to my capture card, which introduces screen clipping and refresh rate desync. Thanks for the patch.

flexiondotorg avatar Jul 01 '22 00:07 flexiondotorg

But this last commit breaks full screen on OSX

kivutar avatar Sep 25 '22 12:09 kivutar

But this last commit breaks full screen on OSX

Hmmmmmm... Maybe a macro.could help (does go have macros?) or a statement block?

donmor avatar Sep 26 '22 09:09 donmor

I think it's also likely to break fullscreen elsewhere. If I recall correctly API of GLFW wants a monitor to be passed to achieve full screen.

kivutar avatar Sep 27 '22 11:09 kivutar

Gosh I've not even had a mac and my windows pc's wonky :( Better to make the last patch a linux-only feature, until I have a mac

donmor avatar Sep 30 '22 13:09 donmor

Finally I managed to fix the fullscreen mode on linux, and'll test on windows later. So does anyone have a mac here?

donmor avatar Mar 04 '23 07:03 donmor

Okay please wait for a while before I put some comments in code :)

donmor avatar Mar 04 '23 07:03 donmor

BTW I think it'd be better to use unicode font glyph instead ascii, as the first step to making i18n stuff.

donmor avatar Mar 04 '23 07:03 donmor