Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th May 2010, 00:30   #1  |  Link
`Orum
Registered User
 
Join Date: Sep 2005
Posts: 178
PointSize: A collection of pixel scaling filters

PointSize is a collection of specialized resizers for pixel-art and other low resolution graphics (e.g. old or portable video game captures).

Download v0.2 (or scroll down to download it from the attached files)
Note: Requires Visual C++ Redistributable for Visual Studio 2015 if you don't already have it installed.

The readme:
Code:
+-----------------------------------------------------------------------------+
|   PointSize v0.2 - A collection of resiziers for AviSynth 2.6 / AviSynth+   |
+-----------------------------------------------------------------------------+

Filters
-----------------
PointSize contains the following filters:
  scalex(clip c, int scale=2) - Scale (e.g. Scale2x) resize
  LQx(   clip c, int scale=2) - LQ (e.g. LQ2x) resize
  HQx(   clip c, int scale=2) - HQ (e.g. HQ2x) resize
  xBRZ(  clip c, int scale=2, float Yweight=1, float EqColorTol=30, \
    float DomDirThresh=3.6, float SteepDirThresh=2.2) - xBRZ resize

Supported "scale" values for various filters (inclusive):
  scalex(): 2 to 3
  LQx():    2 to 4
  HQx():    2 to 4
  xBRZ():   2 to 6

ALL filters take ONLY RGB32 input and produce ONLY RGB32 output.

For an explanation of the various filters, please see:
  https://en.wikipedia.org/wiki/Image_scaling


FAQ
-----------------
Q: Do you plan to support more color spaces (e.g. YV12)?
A: No.  Use the various converting functions in AviSynth (e.g. ConvertToRGB32()
   and ConvertToYV12()) if you need to use other source/destination spaces.

Q: Do you plan to support more algorithms?
A: Yes.  However, I am limiting myself to those that already have at least some
   working C/C++ or assembly (must support x86 and x64) implementation.  While
   HLSL and GLSL versions of algorithms are fast, they require a graphics card
   and I don't want that to be a prerequisite to use this filter.  If you know
   of an implementation of an algorithm that is not included, and it works and
   is license compatible, or you'd like to write your own for this purpose,
   don't hesitate to contact me and I can include it in a new release.  In
   particular, I'm looking to support the following algorithms, license
   permitting: EPX, AdvMAME2/3, [Super]Eagle, [Super]2xSaI, xBR, and Kopf-
   Lischinski.


License
-----------------
PointSize is licensed under the GPLv3, which is included along with the source
code for the program.
Change log:
Code:
v0.2
	Restructured so that each algorithm family has only a single function, with a scale parameter
	Added support for the xBRZ algorithm, including support for tweaking its parameters
	License changed to GPLv3 due to inclusion of the xBRZ algorithm
	Resource added to include file version information within the DLL
	Plugin is now updated for AviSynth 2.6 / AviSynth+
	64-bit binaries are now included in the release (in addition to x86)
	Binaries are built with a newer version of MSVS (2015)
	Cleaned up code a bit (negligible or no effect on the binary)

v0.1
	Initial release
Please let me know what you think below.
Attached Files
File Type: zip PointSize_0.2.zip (201.4 KB, 404 views)
__________________
My filters: DupStep | PointSize

Last edited by `Orum; 3rd July 2021 at 22:32. Reason: Update
`Orum is offline   Reply With Quote
Old 20th May 2010, 00:40   #2  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Attaching for easier access. Thank you for your contribution.

Any plans for other color spaces?
Attached Files
File Type: 7z PointSize_0.1.7z (51.7 KB, 1068 views)
Guest is offline   Reply With Quote
Old 20th May 2010, 01:25   #3  |  Link
`Orum
Registered User
 
Join Date: Sep 2005
Posts: 178
I was thinking about it...I don't see any reason why it couldn't work, but I don't know if the interpolation will work as well in something like 4:2:0. I might have to adjust it or maybe it will work right off the bat--but, I imagine most things scaled with these filters will at least be captured in RGB24/32 to begin with, so it's low priority.

First I want to try and understand how the SaI family of resizers is supposed to work without accessing invalid memory ...
__________________
My filters: DupStep | PointSize
`Orum is offline   Reply With Quote
Old 20th May 2010, 16:08   #4  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
how to load the plugin?
Terka is offline   Reply With Quote
Old 20th May 2010, 17:01   #5  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
loadplugin("pointsize.dll")
Guest is offline   Reply With Quote
Old 20th May 2010, 17:19   #6  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,533
Hey, excellent, I looked into implementing these algorithms in AviSynth a while ago but didn't get around to it... so thanks for saving me the trouble

David
wonkey_monkey is offline   Reply With Quote
Old 4th January 2016, 22:30   #7  |  Link
`Orum
Registered User
 
Join Date: Sep 2005
Posts: 178
New release out, v0.2, with the main changes being AviSynth 2.6 / AviSynth+ support (with 64 bit binaries to boot), as well as support for another algorithm: xBRZ.
__________________
My filters: DupStep | PointSize
`Orum is offline   Reply With Quote
Old 5th January 2016, 14:48   #8  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,410
^ Many thanks for the update
filler56789 is offline   Reply With Quote
Old 5th January 2016, 16:31   #9  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,560
How about providing image comparison samples?
MysteryX is offline   Reply With Quote
Old 5th January 2016, 19:48   #10  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by MysteryX View Post
How about providing image comparison samples?
hq2x/xbrz and friends are very well known algorithms, comparison images are just a google search away (or you can just check wikipedia like the readme suggests, hqx even has its own article)

that said, if you haven't heard of them you're probably not in the target audience for this filter

Last edited by TheFluff; 5th January 2016 at 19:50.
TheFluff is offline   Reply With Quote
Old 5th January 2016, 19:58   #11  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,560
Quote:
Originally Posted by TheFluff View Post
hq2x/xbrz and friends are very well known algorithms, comparison images are just a google search away (or you can just check wikipedia like the readme suggests, hqx even has its own article)

that said, if you haven't heard of them you're probably not in the target audience for this filter
It does make old video games look a LOT better!
MysteryX is offline   Reply With Quote
Old 6th January 2016, 08:13   #12  |  Link
Bloax
The speed of stupid
 
Bloax's Avatar
 
Join Date: Sep 2011
Posts: 317
That highly depends on the content of said game.


Shit like this will get butchered to high hell.
Bloax is offline   Reply With Quote
Old 6th January 2016, 23:14   #13  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,371
Quote:
Originally Posted by Bloax View Post
...will get butchered to high hell.
I dunno, bloax, depends on what you are looking for.





(PS, a simple BicubicResize has a look somewhere between LQ2x and scale2x)

Last edited by raffriff42; 16th March 2017 at 23:34. Reason: (fixed image links)
raffriff42 is offline   Reply With Quote
Old 7th January 2016, 09:57   #14  |  Link
Bloax
The speed of stupid
 
Bloax's Avatar
 
Join Date: Sep 2011
Posts: 317
Well yes, there we go. None of them look any better than straight-up pointresize due to ruining the shapes and barely doing anything else (unless it's hq2x, in which case it also blurs very detailed bits to make them not detailed).

They only manage to look worse, and even bigshot XBR that works wonders on a lot of things completely botches this stuff.

I'm simply making too detailed and too complicated things for these low-detail pixel art upscalers to survive.
Bloax is offline   Reply With Quote
Old 7th January 2016, 19:15   #15  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,371
Quote:
Originally Posted by Bloax View Post
I'm simply making too detailed and too complicated things for these low-detail pixel art upscalers to survive.
You are indeed, and they are lovely too.
raffriff42 is offline   Reply With Quote
Old 7th January 2016, 22:21   #16  |  Link
`Orum
Registered User
 
Join Date: Sep 2005
Posts: 178
Quote:
Originally Posted by raffriff42 View Post
I dunno, bloax, depends on what you are looking for.

<snip>
You have LQ2x in there twice, and no xBRZ?

Anyway, yes, there will never be a "one resizer fits all", and different people have different tastes. I'd love to include some more algorithms to provide more options, but my time is quite limited (in case you couldn't tell by the > 5.5 years between releases).

I'm mostly looking at other programs that already implement the filters (e.g. MAME) and trying to get them into AviSynth, but there are often challenges in doing so, as they'll often lack support for things like input/output pitch. It shouldn't be too hard to fix for the older algorithms, but some of the newer ones are still under active development, like xBR. In addition, xBR is written in HLSL, and the only port to C++ that I know of is an old version of the algorithm. If I ever get through updating the multitude of other software/hardware projects I'm working on (hah!), maybe I'll even port it myself.
__________________
My filters: DupStep | PointSize
`Orum is offline   Reply With Quote
Old 7th January 2016, 23:47   #17  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,560
Quote:
Originally Posted by `Orum View Post
In addition, xBR is written in HLSL, and the only port to C++ that I know of is an old version of the algorithm. If I ever get through updating the multitude of other software/hardware projects I'm working on (hah!), maybe I'll even port it myself.
Until then, it can run with AviSynthShader
MysteryX is offline   Reply With Quote
Old 8th January 2016, 00:16   #18  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,371
Quote:
Originally Posted by `Orum View Post
You have LQ2x in there twice, and no xBRZ?
Whoa, so I do. I also forgot to download version 0.2. So to make good, here are some new images.

Also included are Bicubic, nnedi3_rpow2, and my function, which I can't take full credit for, pow2Qt.





xBRZ is pretty great, but it does go crazy sometimes.

Thx Bloax for your images.

Here's another one from the old video game "F117A" running on DOSBOx.
It puts a premium on antialiasing diagonal lines.

Last edited by raffriff42; 16th March 2017 at 23:33. Reason: (fixed image links)
raffriff42 is offline   Reply With Quote
Old 8th January 2016, 00:32   #19  |  Link
Hyllian
Registered User
 
Hyllian's Avatar
 
Join Date: Jun 2014
Posts: 42
For fun:

Hyllian is offline   Reply With Quote
Old 9th January 2016, 05:02   #20  |  Link
Bloax
The speed of stupid
 
Bloax's Avatar
 
Join Date: Sep 2011
Posts: 317
If you guys want to have fun with that thing without the limited palette fucking things up to some degree,

here you go. (Just make sure to scale it down to its original resolution, obviously.)

Some of the little details get wiped out due to the obviously limited amount of shades a certain tone has.


And here's a more kind image.

Looks quite nice when run through 4xbrlv4 and pointresized to halve the resolution.

The blue armored one is hardly news - the main offender among the scaling algorithms is that heavy dithering makes them fall apart.
The other one showcases that a ton of very intricate details and line flows also makes them take a dump on the quality, since they're there for a reason.

Last edited by Bloax; 9th January 2016 at 05:20.
Bloax is offline   Reply With Quote
Reply

Tags
hq2x, lq2x, point size, pointsize, scale2x

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.