Any chance of a "Simple 2X/3X/4X" filter?
Any chance of a "Simple 2X/3X/4X" filter?
Currently in bsnes you have two options for scaling the image. With "linear" filtering, you get a rather blurry image. With "point" filtering on the other hand you get sharp pixels, but if you stretch it out to 4:3 you will get ugly artifacts.
A good compromise is to upsize the image first by just doubling the pixels, and then letting the hardware stretch it to 4:3 using bilinear interpolation. Several other emulators have this option.
A good compromise is to upsize the image first by just doubling the pixels, and then letting the hardware stretch it to 4:3 using bilinear interpolation. Several other emulators have this option.
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands
All right, let me post some pictures for comparision.
bsnes with "linear" filtering selected:

bsnes with "point" filtering selected:

snes9x with "Simple 2x" filtering selected (and window manually resized to approximately 4:3)

Sharpness-wise it's somewhere in between the two bsnes images, but with no nasty warped pixels like in the second bsnes shot.
bsnes with "linear" filtering selected:

bsnes with "point" filtering selected:

snes9x with "Simple 2x" filtering selected (and window manually resized to approximately 4:3)

Sharpness-wise it's somewhere in between the two bsnes images, but with no nasty warped pixels like in the second bsnes shot.
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands
Several other emulators have options to swap the left and right mouse buttons. Not always the best measurement :PA good compromise is to upsize the image first by just doubling the pixels, and then letting the hardware stretch it to 4:3 using bilinear interpolation. Several other emulators have this option.
I suppose a 2x point filter would be fine. Easy enough to get it working with hires / interlace, too. Just ensure the final image is 512x(448,480). No promises on how quickly I'll get around to it.
I was actually just thinking the other day it'd be nice to re-do libfilter as a fully-fledged library. Support the most popular ones natively. Plugins never work well because they only get compiled for / work on Windows. So what about a library that creates its own secondary thread, and has a Python / whatever script compiler that builds and executes user-defined .py plugin filters? Works on any platform and requires no compilation. Uses second core so there's no emulator slowdown for being interpreted.
If you use my build line that disables all the crap, about 10 minutes. If you do a stock compile with "configure -static && make", it'll take about four hours on a Core 2.Does anyone here know how long Qt is supposed to take to compile? It's been going for bloody ages now, and I'm starting to think it's stuck in some sort of infinite loop.
You need to have your eyeballs checked, Missingo. The image with the least visible line duplication is the one with the most intense blur. Look at the right side of the tomato in your snes9x shot. Why would you claim that that image has no noticeable duplication? Either you want it gone or you don't, and that negligible amount of blending is insufficient in accomplishing that.
As I said in my first post, it's a compromise. Yes I notice the side of the "tomato", now that you point it out. Pretty much every other part of the image looks much better than the image above it.FitzRoy wrote:You need to have your eyeballs checked, Missingo. The image with the least visible line duplication is the one with the most intense blur. Look at the right side of the tomato in your snes9x shot. Why would you claim that that image has no noticeable duplication? Either you want it gone or you don't, and that negligible amount of blending is insufficient in accomplishing that.
You have to choose between visible line duplication and blur. It strikes me as odd that anyone would want to incur noticeable levels of both. There are practically infinite variations that could be employed of every filter. Where do you think the line should be drawn? If you get your blur slider, I want my yellow polka dots. This is the slippery slope of supporting any kind of filtration.
Last edited by FitzRoy on Wed Apr 01, 2009 5:28 pm, edited 1 time in total.
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands
I'm trying this command line from the 0.040 topic now:
That's still what you're using, right?
Code: Select all
configure -static -release -no-exceptions -no-rtti -no-accessibility -no-stl -plugin-sql-sqlite -no-opengl -no-phonon -no-webkit -no-scripttools -no-openssl -no-dbus -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde
I disabled more stuff, but that'll work fine and be ~90% as small as what I have now. Make sure to use (mingw32-)make sub-src as well. No need to build examples and demos. I have the line saved at home. I need to write up instructions on how to build the damn thing already. Getting really complicated: Qt 4.5 source fixes for MinGW 4 (lazy Nokia), DirectX SDK, XInput.lib -> libxinput.a, updating the path to Qt 4.5 in the Makefile ...
-
- Trooper
- Posts: 376
- Joined: Tue Apr 19, 2005 11:08 pm
- Location: DFW area, TX USA
- Contact:
Missingno wrote:As I said in my first post, it's a compromise. Yes I notice the side of the "tomato", now that you point it out. Pretty much every other part of the image looks much better than the image above it.FitzRoy wrote:You need to have your eyeballs checked, Missingo. The image with the least visible line duplication is the one with the most intense blur. Look at the right side of the tomato in your snes9x shot. Why would you claim that that image has no noticeable duplication? Either you want it gone or you don't, and that negligible amount of blending is insufficient in accomplishing that.
I myself use point filtering and then apply a custom res to my monitor in order to correct the aspect ratio via monitor scaling. It maintains sharpness and avoids warping the pixels. On my 1680x1050, I use powerstrip to apply a 1440x1050 mode whenever bsnes is loaded. In bsnes, I use 4xscale in fullscreen with aspect turned off and this makes the 1440 res perfectly correct the image to 4:3 aspect.
End result of all that jargon? A perfectly aspect corrected, point filtered image with no warped pixels. Its literally impossible for software filters to do it that well.

NES NTSC palette file:
http://www.firebrandx.com/downloads/fbx2pal.zip
http://www.firebrandx.com/downloads/fbx2pal.zip
Line duplication is an effect simulating stretched pixels for modern displays, there really is no clever way to defeat it without incurring blur. You could also make it imperceptible with an obscenely high pixel density that doesn't exist yet, but that's besides the point.
Super Mario World is also one of those games that looks normal when it's NOT corrected to 4:3. Objects we would expect to have equidistance only have it when uncorrected. Not a relevant statement here, I just found it funny that SMW was the example used.
Super Mario World is also one of those games that looks normal when it's NOT corrected to 4:3. Objects we would expect to have equidistance only have it when uncorrected. Not a relevant statement here, I just found it funny that SMW was the example used.
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands
I actually got it to compile without any fixes. (some warnings, but no errors) I used 1.902.0 of the TDM/MinGW.byuu wrote:Qt 4.5 source fixes for MinGW 4 (lazy Nokia)
-
- Trooper
- Posts: 376
- Joined: Tue Apr 19, 2005 11:08 pm
- Location: DFW area, TX USA
- Contact:
The blur incurred with my method is nearly undetectable. Having the monitor do the horizontal scaling as opposed to having the software handle it really does look a lot better. This is because instead of randomly warping pixels, the monitor averages the pixel width for the entire resolution. The result is each pixel has the exact same width, and sharpness is almost fully retained. By my own experience, the sharpness is about 95% of an unscaled image. By far the best method, though there is a learning curve as not many people know how to set it up.FitzRoy wrote:Line duplication is an effect simulating stretched pixels for modern displays, there really is no clever way to defeat it without incurring blur.
NES NTSC palette file:
http://www.firebrandx.com/downloads/fbx2pal.zip
http://www.firebrandx.com/downloads/fbx2pal.zip
Are you using MinGW that TDM/MinGW is asking for? I never did try that way. I use the QT instead.Verdauga Greeneyes wrote: I actually got it to compile without any fixes. (some warnings, but no errors) I used 1.902.0 of the TDM/MinGW.
byuu I will wait on your instructions on what you did before I change stuff at my end. It crazy making those demos for make on byuu src to work.
Window Vista Home Premium 32-bit / Intel Core 2 Quad Q6600 2.40Ghz / 3.00 GB RAM / Nvidia GeForce 8500 GT
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands