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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd February 2009, 05:23   #1  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Spline Resize vs. Lanczos Resize

Believe it or not, I'm actually asking a question... More specifically though, what are the real differences between Spline16Resize for example vs. LanczosResize? What are the pros and cons of one as opposed to the other?

-I'm just looking for the one resize that I can permanently use to upscale. I want to just find and use one. Or... is that stupid just mentioning? Like, I don't understand what the different situations are to use one resizer vs. another...

Last edited by Guest; 24th February 2009 at 03:42. Reason: rule 12
Typhoon859 is offline   Reply With Quote
Old 23rd February 2009, 06:13   #2  |  Link
TheRyuu
warpsharpened
 
Join Date: Feb 2007
Posts: 788
There's a massive spline vs lanczos thread somewhere.

IMO, spline is definitely better at downsizing (less halos, blackman fixes this as far as tap resizers), as for other stuff, it's whatever.
TheRyuu is offline   Reply With Quote
Old 23rd February 2009, 22:59   #3  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Maybe somebody can direct me to a thread or a page that explains the differences between Spline16, Spline36, etc... And then maybe another or the same page which describes lanczos. I used all possible resizes and compared the same frame with each of them and it was hard to tell specifically what the differences were in most cases. I did end up liking regular lanczos and Spline16 the best though.
Typhoon859 is offline   Reply With Quote
Old 23rd February 2009, 23:07   #4  |  Link
Video Dude
Senior Member
 
Join Date: Apr 2004
Posts: 1,040
Quote:
LanczosResize is an alternative to BicubicResize with high values of c about 0.6 ... 0.75 which produces quite strong sharpening. It usually offers better quality (fewer artifacts) and a sharp image.

Lanczos was created for AviSynth because it retained so much detail, more so even than BicubicResize(x,y,0,0.75). As you might know, the more detail a frame has, the more difficult it is to compress it. This means that Lanczos is NOT suited for low bitrate video, the various Bicubic flavours are much better for this.

Quote:
Spline16Resize & Spline36Resize & Spline64Resize

Three Spline based resizers. The rational for Spline is to be as sharp as possible with less ringing artefacts as LanczosResize produces. Spline16Resize uses sqrt(16)=4 sample points, Spline36Resize uses 6 sample points, etc ... The more sample points is used, the sharper your clip will get.

Code:
http://avisynth.org/mediawiki/Resize
Video Dude is offline   Reply With Quote
Old 23rd February 2009, 23:12   #5  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Try downsampling a high detail 1080p frame to 480p using the Spline and Lanczos resizers Interleave + AvsP make for a very useful combo for seeing the differences between the two.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 24th February 2009, 00:01   #6  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Quote:
Originally Posted by Sagekilla View Post
Try downsampling a high detail 1080p frame to 480p using the Spline and Lanczos resizers Interleave + AvsP make for a very useful combo for seeing the differences between the two.
Well, I don't have a blu-ray player on my PC but I'm more interested in upscaling. I'm convinced Spline16 is the best for downsampling.
Typhoon859 is offline   Reply With Quote
Old 24th February 2009, 01:50   #7  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
You don't need a blu-ray player. Try downloading a nice high resolution image with a good level of detail off google, that works just as good. Personally, I prefer Spline36 because I tend to denoise after downsampling (1080p -> 720p).

But, remember it's your eyes: If spline16 is what looks best stick with it
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 24th February 2009, 02:34   #8  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Quote:
Originally Posted by Sagekilla View Post
You don't need a blu-ray player. Try downloading a nice high resolution image with a good level of detail off google, that works just as good. Personally, I prefer Spline36 because I tend to denoise after downsampling (1080p -> 720p).

But, remember it's your eyes: If spline16 is what looks best stick with it
Alright, I'll try that. Meanwhile, it'd be cool to hear people's opinions on upscaling. To truly understand what even just I consider best, I need to comprehend the differences and at least the basics of what's going on with one resizer as opposed to another, more specifically the ones I mentioned..
Typhoon859 is offline   Reply With Quote
Old 24th February 2009, 04:17   #9  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
IIRC spline26's[edit:spline16's] kernel is slightly unbalanced. That said, people apear to like it anyway.

eedi2 and nnedi both work well on cartoons, eedi being better for heavily damaged sources, and nnedi being better for high quality sources. However eedi2 or nnedi alone aren't really enough to justify upscaling beofre encoding.

Last edited by *.mp4 guy; 24th February 2009 at 10:24.
*.mp4 guy is offline   Reply With Quote
Old 24th February 2009, 04:29   #10  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
@M4G: How is the Spline36 kernel unbalanced (out of curiosity)? What kind of a difference does that make?
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 24th February 2009, 04:32   #11  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Quote:
Originally Posted by *.mp4 guy View Post
IIRC spline26's kernel is slightly unbalanced. That said, people apear to like it anyway.

eedi2 and nnedi both work well on cartoons, eedi being better for heavily damaged sources, and nnedi being better for high quality sources. However eedi2 or nnedi alone aren't really enough to justify upscaling beofre encoding.
As I've proven to myself with comparisons, upscaling helps a lot with the picture because then, a higher bitrate is justifiable. Here's one example. (These frames are captured with Print Screen - all decoded by FFDShow.)

Original



Import("C:\Program Files (x86)\AviSynth 2.5\plugins\LimitedSharpen.avs")

crop(2,2,-2,-2,true)

FFT3DFilter(sigma=2.5)
UnDot()
FluxSmoothST(7,7)

Toon(.6)

Tweak(sat=1.12, cont=1.02)

Spline16Resize(704,396)

LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=3,strength=20)

x264 @ 1500 kbps



Import("C:\Program Files (x86)\AviSynth 2.5\plugins\LimitedSharpen.avs")

ColorMatrix(mode="Rec.601->Rec.709")

crop(2,2,-2,-2,true)

FFT3DFilter(sigma=2.5)
UnDot()
FluxSmoothST(7,7)

Toon(.3)
LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=3,strength=30)
WarpSharp(25,1)

Tweak(sat=1.12, cont=1.02)

LanczosResize(1280,720)

x264 @ 3000 kbps


Yes, obviously if I made the bitrate higher for the Non-HD encode, the quality of it would've been better but then, same goes for the HD one. The higher bitrate is justified for it and it isn't unreasonable.

-BTW, NNEDI isn't a resizer.. right?.. I'm not too sure what it does actually although I've heard about it at least 20 times, honestly. But, I'm pretty sure it doesn't have anything to do with resizing which is what I was talking about. I might be saying something stupid though, idk...

Last edited by Typhoon859; 24th February 2009 at 04:45.
Typhoon859 is offline   Reply With Quote
Old 24th February 2009, 10:27   #12  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
Quote:
Originally Posted by Sagekilla View Post
@M4G: How is the Spline36 kernel unbalanced (out of curiosity)? What kind of a difference does that make?
spline36 is balanced, spline16 (which is what I meant to type) is not. It oversharpens the image, if you iterate it it will quickly do far more damage then any other balanced linear interpolator in avisynth.
*.mp4 guy is offline   Reply With Quote
Old 24th February 2009, 11:37   #13  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,423
I'd swear that I read that bilinear was the best for dowscaling..
leeperry is offline   Reply With Quote
Old 24th February 2009, 12:51   #14  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: Yorkshire, UK
Posts: 1,673
I think it's worth pointing out that the differences aren't really that great - especially where there isn't that much high frequency content in your original.

I know there are differences, but you've got to put it in perspective.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 24th February 2009, 12:58   #15  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Quote:
Originally Posted by 2Bdecided View Post
I think it's worth pointing out that the differences aren't really that great - especially where there isn't that much high frequency content in your original.

I know there are differences, but you've got to put it in perspective.

Cheers,
David.
Well, the reason I posted this frame in particular is because the x264 codec always has trouble with details in really dark areas. I wanted to show how it dealt with it in the HD encode as opposed to the 704x396 one. Obviously, it's the higher bitrate that allowed more details to be captured in the encode, but there was a significant amount of extra pixels to work with... So, I dunno, I guess this also boils down to opinion. I feel that it is worth it, though I still doubt I will be encoding in HD, lol.

EDIT: If you compare the actually video footage, you'd also see how much smoother the HD encode looks due to the fact of how much less jittery lines there are. Practically none compared to the non-HD encode.

Last edited by Typhoon859; 24th February 2009 at 13:10.
Typhoon859 is offline   Reply With Quote
Old 24th February 2009, 13:00   #16  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Quote:
Originally Posted by *.mp4 guy View Post
spline36 is balanced, spline16 (which is what I meant to type) is not. It oversharpens the image, if you iterate it it will quickly do far more damage then any other balanced linear interpolator in avisynth.
There seriously wasn't that much a difference. I made comparisons of different resizers. What I noticed was that when I upscaled with Spline16, more details were left in-tact. The sharpness was identical. If you want, I can post those frames.
Typhoon859 is offline   Reply With Quote
Old 24th February 2009, 13:01   #17  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Quote:
Originally Posted by leeperry View Post
I'd swear that I read that bilinear was the best for dowscaling..
Lol, ok, I'll check it out. That's one resizer I never actually checked out. I just felt that it really sucked as opposed to most others. Maybe not for downsizing though.
Typhoon859 is offline   Reply With Quote
Old 24th February 2009, 14:50   #18  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: Yorkshire, UK
Posts: 1,673
Quote:
Originally Posted by Typhoon859 View Post
I feel that it is worth it, though I still doubt I will be encoding in HD, lol.
Sorry, I meant the different resizers only cause a very small difference from each other - not that resizing itself only causes a small difference vs not resizing.

I was replying to the thread title, not the previous post - sorry, I should have quoted!

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 24th February 2009, 15:50   #19  |  Link
Typhoon859
Banned
 
Join Date: Feb 2009
Posts: 136
Quote:
Originally Posted by 2Bdecided View Post
Sorry, I meant the different resizers only cause a very small difference from each other - not that resizing itself only causes a small difference vs not resizing.

I was replying to the thread title, not the previous post - sorry, I should have quoted!

Cheers,
David.
Oh, alright. Well yeah, you're certainly right. Some resizers have a big difference but to what I was asking for, yeah, I know. I mainly wanted to know the differences between how they work. No matter how subtle the difference, I like to be sure that I'm doing the best thing.
Typhoon859 is offline   Reply With Quote
Old 24th February 2009, 17:29   #20  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
All of the Spline and Lanczos resizers are very sharp. The differences between Spline16, 36, and 64 are minute. Likewise, for Lanczos(taps=0-10). There's not much comparison to be done between Spline16 and Spline36, but vs the other resizers like Bicubic, Bilinear, etc there is a worthwhile comparison to be made.

IMO:
Spline64 > Spline36 > Spline 16 > Bicubic ~= Gauss >= Bilinear
Spline >= Blackman > Lanczos

Bilinear is the softest I know of, while Gauss* has adjustable sharpness. Bicubic is sort of like Gauss except you can make it absurdly sharp and ringy, or very blurry (by adjusting b and c). IIRC, at c=0.6 or higher, Bicubic rings too much and Lanczos does better. Spline is sharp like Lanczos, but doesn't ring from what I've seen. Blackman on the other hand, I haven't used much but it seems to be very similar to Spline.


*Gauss is interesting, if you use too low of a p the image is completed blurred. Otherwise, it's like a slightly softer bicubic to me.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.

Last edited by Sagekilla; 24th February 2009 at 17:39.
Sagekilla is offline   Reply With Quote
Reply

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 01:38.


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