Author Topic: [Release] Sharpscale - native 960x544 HDMI output for PSTV  (Read 38219 times)

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 97
    • View Profile
[Release] Sharpscale - native 960x544 HDMI output for PSTV
« on: April 02, 2020, 06:29:27 AM »
Sharpscale is a PSTV and PS Vita plugin that changes the framebuffer to display scaling method to provide a cleaner and sharper image.

This plugin is the only method to obtain native resolution video capture with accurate colours at 60fps. A hardware capture kit for the Vita was previously available from Japan for $450 USD, but due to changes in Japanese laws, this is no longer available.

This is the first time in history a Vita nuova bounty organised by Rinnegamante has been filled. I want to thank the donors ScHlAuChii, eleriaqueen, mansjg, TG, as well as the excellent members of CBPS for the support they have provided.

I also want to thank rinne for diligently updating each bounty issue with the bounty total whenever someone else donated.

Usage:

Sharpscale can be configured to different scaling methods.

Scaling Modes:

- Original: system default
- Integer: integer scaling while fitting inside the display, for general use with bilinear filtering off
- Real: no scaling, for video capture
- Fitted: non integer scaling fitting exactly inside the display while preserving aspect ratio, for media use with bilinear filtering on, or PS1 with bilinear filtering off

PS1 aspect ratio:

- Pixel: aspect ratio of the framebuffer is retained
- 4∶3: aspect ratio is forced to 4∶3
- 16∶9: aspect ratio is forced to 16∶9

Scaling algorithm:

- Point: nearest neighbour
- Bilinear: bilinear interpolation (system default)

In Adrenaline, set graphics mode to original in Adrenaline settings.

Unlock framebuffer size:

- On: allow framebuffers of sizes 1280x720, 1440x1080, and 1920x1080 to be used
- Off: system default

Installation:

Code: [Select]
*KERNEL
ur0:tai/sharpscale.skprx

Configuration:

Use the provided configuration app to change settings instantly without needing to close the foreground application or needing to reboot.



If the config app crashes on startup, follow these steps:

1. Use the plugin and config app attached to this post
2. Ensure that the plugin is loaded. It will be immediately noticeable on startup if it is loaded.
3. Disable plugins for the config app by adding the following line

Code: [Select]
*!AKRK00005

before this line in the taihen config.txt

Code: [Select]
*ALL

Preview video from Zodasaur:



Source code
Report bugs

Changelog

2020-06-13 v1.5.0

- Texts in the configuration app has been changed for clarity
- Configuration app has a manual that can be opened from the LiveArea
- kernel plugin does not need to be updated

2020-06-09 v1.4.0

- Allow enable HD framebuffer sizes on the Vita
- Add HD resolutions to scaling test
- Fixed crashes in config app
- Bilinear filtering reverts to system default whenever scaling is not applied

2020-05-05 v1.3.0

- Added an option to enable large framebuffer sizes, when the application uses large framebuffers

2020-04-24 v1.2.0

- Added options for PS1 aspect ratio modes
- Added fitted scaling mode
- Added config application (ur0:/data/sharpscale/config.txt no longer needed)

2020-04-09 v1.1.1

- Fixed a bug where some PS1 games had black screen in 1080i
- Centred the framebuffer when cropping occurs
- Enabled "display area settings" in original mode

2020-04-06 v1.1.0

- All framebuffer sizes are now supported and there are now two configurable options, scaling mode, and bilinear filtering. Configuration is provided by a text file at ur0:/data/sharpscale/config.txt.
« Last Edit: June 13, 2020, 06:55:51 AM by cuevavirus »

Offline hawk1024

  • End User
  • *
  • Posts: 1
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #1 on: April 02, 2020, 09:27:38 AM »
Amazing work @cuevavirus!

Would pstv be capable of outputting 1920x1200? In my (niche) case I have a 16:10 old Dell screen which has exactly that native resolution, but when feeded with 16:9 video it simply stretch it to fill the whole screen, blurring the image and destroying proportions - there are no built-in settings in the monitor to prevent that.

If pstv could serve 1920x1200 with black bars, then even those 8 lost lines would be back  ;D
Cheers!

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 97
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #2 on: April 02, 2020, 03:36:30 PM »
I don't think 1920x1200 is possible because of hardware limitations.

Offline dots_tb

  • Refugee
  • **
  • Posts: 93
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #3 on: April 02, 2020, 07:18:56 PM »
https://twitter.com/CBPS9/status/1245758302925062145


Regardless, very nice work cuevavirus!

Offline bitfan2011

  • End User
  • *
  • Posts: 1
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #4 on: April 05, 2020, 02:59:32 AM »
Thank you so much for this  8)

How do I get Adrenaline to obey the rules? It seems to do 2x on PSP games no matter what I try, even tho you can see it scaled down when you have the PS menu open? Weirdness
Would be awesome to have SS as well as 1x and 2x for PSP and PSX

Cheerz

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 97
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #5 on: April 05, 2020, 03:32:52 AM »
adrenaline has a different sized framebuffer so it's not working at the moment, but I'll have that fixed soon

Offline hexcode99

  • End User
  • *
  • Posts: 5
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #6 on: April 05, 2020, 07:14:41 AM »
adrenaline has a different sized framebuffer so it's not working at the moment, but I'll have that fixed soon

Just wanted to say thank you for your work with Sharpscale cuevavirus.  :)

So you are saying we will soon also be able to get native 480x272 output for PSP games (with black borders) from Adrenaline using Vita's 720p mode or will we need to switch Vita to 480p mode?
« Last Edit: April 05, 2020, 07:17:56 AM by hexcode99 »

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 97
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #7 on: April 05, 2020, 08:08:53 AM »
No need to switch video modes. Either 480x272 or doubled 960x544 in 720p with black bars.

Offline hexcode99

  • End User
  • *
  • Posts: 5
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #8 on: April 05, 2020, 08:46:01 AM »
No need to switch video modes. Either 480x272 or doubled 960x544 in 720p with black bars.

Oh, so native PSP resolution now working in Adrenaline because of your plugin? How do you cycle/change between the 480x272 or 960x544 outputs?

You might be able to claim this bounty:
https://github.com/vita-nuova/bounties/issues/5

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 97
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #9 on: April 05, 2020, 08:59:22 AM »
Either a config text file or a config app.

The other bounty is for rendering at 960x544, while this plugin changes how a rendered frame is scaled to the display output. For example if you are using 720p mode on PSTV, PSP games will render at 480x272 but will output 480x272 or 960x544 to the display, instead of 1280x720.

Offline hexcode99

  • End User
  • *
  • Posts: 5
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #10 on: April 06, 2020, 04:03:48 AM »
Either a config text file or a config app.

The other bounty is for rendering at 960x544, while this plugin changes how a rendered frame is scaled to the display output. For example if you are using 720p mode on PSTV, PSP games will render at 480x272 but will output 480x272 or 960x544 to the display, instead of 1280x720.

Will have to look into how to setup a config text file or find a config app. But is 480x272 with the black borders the default output option for PSP games when Vita is set to 720p?
And is this the thread to watch for "updated" versions of your plugin to download?

Thank you again.

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 97
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #11 on: April 06, 2020, 04:12:52 AM »
Yes please watch this thread for the latest updates. I will also provide information here on how to configure the next version of sharpscale. The default configuration is not yet decided.

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 97
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #12 on: April 06, 2020, 11:25:53 PM »
Sharpscale has been update with new features:

All framebuffer sizes are now supported and there are now two configurable options.

Scaling modes
    Original: system default
    Integer: integer scaling up to the largest size that fits inside the display resolution
    Real: no scaling is performed

Bilinear filtering
    On: system default
    Off: nearest neighbour

Here are some recommended configurations for different cases:

Games: integer bilinear off
Games with variable framebuffer size: original bilinear on
HDMI capture: real
Media: original bilinear on

For Adrenaline and PS1 games, disable any built-in scaling via the adrenaline options or quick menu (official) options.

Configuration is provided by a text file at ur0:/data/sharpscale/config.txt containing two numbers separated by a space.

    Scaling mode
        0 original
        1 integer
        2 real
    Bilinear filtering
        0 off
        1 on

For example, to use integer mode and turn off bilinear filtering, write "1 0" in the text file.

For source code and bug reports see https://github.com/cuevavirus/Sharpscale

Example: game with a framebuffer smaller than 960x544 outputting the unscaled framebuffer on the Vita


« Last Edit: April 09, 2020, 07:18:55 PM by cuevavirus »

Offline hexcode99

  • End User
  • *
  • Posts: 5
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #13 on: April 06, 2020, 11:53:53 PM »
Looks great! ;D How do you configure the "Media: original bilinear" on/off setting though?
Your recommended configuration has three different settings but your example config file only has two settings. ???

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 97
    • View Profile
Re: [Release] Sharpscale - native 960x544 HDMI output for PSTV
« Reply #14 on: April 07, 2020, 12:00:01 AM »
That's two settings, original and bilinear on, for media playback.