Onion icon indicating copy to clipboard operation
Onion copied to clipboard

Blargg NTSC filters are messing up with integer upscaling

Open mtaras0 opened this issue 2 years ago • 1 comments

Checklist

  • [x] I am reporting a bug in the Onion OS - Any issues with the closed source frontend (MainUI), or RetroArch or any of the cores should be directed to their respective repositories
  • [X] I have reviewed the Onion Docs and did not find the answer
  • [X] I have searched the existing (open and closed) issues to ensure I do not log a duplicate

Onions OS Version

4.2.3

Miyoo Firmware Version

202204190828

Provide a clear and concise description of the issue

Applying Blargg NTSC filter to SNES games breaks integer scaling -- the image is about 4 pixels taller then it should be, resulting in vertical blurring

Steps to Reproduce

  1. Load a SNES game (to my knowledge this happens on all games and all cores, may even be happening on other consoles)
  2. Apply Blargg NTCS, any variation, as a video filter or as a core option if supported (snes9x core does). This internally stretches output image to 2x horizontally, but not vertically, basically producing a 2x wide image.
  3. Turn on integer scaling, which should stretch image 2x vertically, but then see that it actually doesn't -- the image is 4 pixels taller than it should be.

To compare to how it should work: 4. Turn on "Keep aspect ratio" option in scaling. This will output the image as is after Blargg filter pass -- wide but squished vertically, this basically produces a perfect 1x output of Blargg pass 5a. Either stretch that screenshot 2x vertically manually in an image editing software without scaling filter 5b. Or apply normal_2x_vertical filter if Blargg filter was applied as a core option. That also stretches to 2x on device without using native scaling.

Both options above produce correctly vertically scaled images. The video compares native scaling (with nearest neighbour filter to prevent smudging) with scaling raw Blargg output in photoshop. The shorter image is correct, the taller one has extra horizontal lines.

Provide any additional context or information that may help us investigate your issue


mtaras0 avatar Dec 03 '23 13:12 mtaras0

Here's a video comparing what happens on device with raw Blargg output stretched 2x in photoshop. Taller image is on-device, it has extra lines (nearest neighbour scaling filter), the photoshop one is the correct scaling

https://github.com/OnionUI/Onion/assets/106077126/e5be1176-4e3f-4e2c-aa69-7a8c644777de

mtaras0 avatar Dec 03 '23 13:12 mtaras0