View unanswered posts | View active topics It is currently Mon Jun 17, 2019 9:05 am



This topic is locked, you cannot edit posts or make further replies.  [ 20 posts ] 
Any chance of a "Simple 2X/3X/4X" filter? 
Author Message
New Member

Joined: Wed Apr 01, 2009 12:14 pm
Posts: 3
Reply with quote
Post 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.


Wed Apr 01, 2009 12:17 pm
Profile
Gecko snack

Joined: Sun Aug 21, 2005 11:06 am
Posts: 2372
Location: Australia, QLD
Reply with quote
Post 
I think the license that the filters use, is not compatible with the BSNES license.

_________________
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64


Wed Apr 01, 2009 12:20 pm
Profile WWW
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
That shouldn't be an issue here.

Your idea should be simple enough.. if byuu doesn't pounce on it I'll give it a go and post some screenshots.


Wed Apr 01, 2009 1:20 pm
Profile
Veteran

Joined: Wed Aug 04, 2004 5:43 pm
Posts: 861
Location: Sloop
Reply with quote
Post 
Uhh, why would hardware bilinear interpolation be any better than software bilinear interpolation?


Wed Apr 01, 2009 3:04 pm
Profile
New Member

Joined: Wed Apr 01, 2009 12:14 pm
Posts: 3
Reply with quote
Post 
All right, let me post some pictures for comparision.

bsnes with "linear" filtering selected:
Image

bsnes with "point" filtering selected:
Image

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

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


Wed Apr 01, 2009 3:34 pm
Profile
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
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.


Wed Apr 01, 2009 4:28 pm
Profile
Reply with quote
Post 
Quote:
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.


Several other emulators have options to swap the left and right mouse buttons. Not always the best measurement :P

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.

Quote:
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.


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.


Wed Apr 01, 2009 4:36 pm
Veteran

Joined: Wed Aug 04, 2004 5:43 pm
Posts: 861
Location: Sloop
Reply with quote
Post 
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.


Wed Apr 01, 2009 4:38 pm
Profile
New Member

Joined: Wed Apr 01, 2009 12:14 pm
Posts: 3
Reply with quote
Post 
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.


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.


Wed Apr 01, 2009 4:51 pm
Profile
Veteran

Joined: Wed Aug 04, 2004 5:43 pm
Posts: 861
Location: Sloop
Reply with quote
Post 
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.



Wed Apr 01, 2009 5:18 pm
Profile
Reply with quote
Post 
It would at least be a nice option for people stuck with eg DirectDraw pre-Vista or Xv YUY2 on Linux. A 2x scale would greatly reduce blurring if it weren't desired.

But yeah it would be fairly uncommon. Even the Scale2x filter is a bit out of place.


Wed Apr 01, 2009 5:26 pm
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
I'm trying this command line from the 0.040 topic now:
Code:
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

That's still what you're using, right?


Wed Apr 01, 2009 5:31 pm
Profile
Lurker

Joined: Mon Mar 10, 2008 11:36 pm
Posts: 199
Reply with quote
Post 
That is what I'm using. I wondering he change it at end as well.

_________________
Window Vista Home Premium 32-bit / Intel Core 2 Quad Q6600 2.40Ghz / 3.00 GB RAM / Nvidia GeForce 8500 GT


Wed Apr 01, 2009 5:50 pm
Profile
Reply with quote
Post 
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 ...


Wed Apr 01, 2009 6:50 pm
Trooper
User avatar

Joined: Tue Apr 19, 2005 11:08 pm
Posts: 376
Location: DFW area, TX USA
Reply with quote
Post 
Missingno wrote:
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.


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.




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. 8)

_________________
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip


Wed Apr 01, 2009 7:11 pm
Profile WWW
Veteran

Joined: Wed Aug 04, 2004 5:43 pm
Posts: 861
Location: Sloop
Reply with quote
Post 
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.


Wed Apr 01, 2009 7:45 pm
Profile
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
byuu wrote:
Qt 4.5 source fixes for MinGW 4 (lazy Nokia)

I actually got it to compile without any fixes. (some warnings, but no errors) I used 1.902.0 of the TDM/MinGW.


Wed Apr 01, 2009 8:02 pm
Profile
Trooper
User avatar

Joined: Tue Apr 19, 2005 11:08 pm
Posts: 376
Location: DFW area, TX USA
Reply with quote
Post 
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.


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.

_________________
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip


Wed Apr 01, 2009 10:23 pm
Profile WWW
Lurker

Joined: Mon Mar 10, 2008 11:36 pm
Posts: 199
Reply with quote
Post 
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.


Are you using MinGW that TDM/MinGW is asking for? I never did try that way. I use the QT instead.

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


Thu Apr 02, 2009 4:42 pm
Profile
Regular
User avatar

Joined: Tue Mar 07, 2006 10:32 am
Posts: 347
Location: The Netherlands
Reply with quote
Post 
Dullaron wrote:
Are you using MinGW that TDM/MinGW is asking for? I never did try that way. I use the QT instead.

Yeah, I installed the TDM/MinGW first, then pointed the Qt installer to it.


Thu Apr 02, 2009 7:00 pm
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 20 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.