Lanczos vs Bicubic

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
User avatar
TEKnician
Joined: Thu Mar 04, 2010 4:40 pm
Status: Not reading the spoilers or manga
Location: Smack in the middle of the Pacific Ocean
Org Profile

Lanczos vs Bicubic

Post by TEKnician » Fri Mar 30, 2012 3:29 pm

Wondering which resizer would be better for upscaling. Other resizers welcome.

From the avisynth wiki, I'm getting the impression that Bicubic is better, but Lanczos has better sharpening? Any thoughts?
Almost as hard as fighting a Holy Paladin.

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Location: North Cackalacky
Contact:
Org Profile

Re: Lanczos vs Bicubic

Post by Zarxrax » Sat Mar 31, 2012 6:10 am

Spline36 is generally considered better than either. I think it has less ringing, but it still pretty sharp.

User avatar
TEKnician
Joined: Thu Mar 04, 2010 4:40 pm
Status: Not reading the spoilers or manga
Location: Smack in the middle of the Pacific Ocean
Org Profile

Lanczos vs Bicubic

Post by TEKnician » Sat Mar 31, 2012 1:33 pm

K
Almost as hard as fighting a Holy Paladin.

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: Lanczos vs Bicubic

Post by Mister Hatt » Sun Apr 01, 2012 5:33 am

They're all terrible. The general recommendation is gamma-aware nnedi scaling with spline36 centre correction, run separately for each plane of the video and then recombined. See the Dither 16bit package, nnedi3, and merge() functionality of Avisynth.

User avatar
TEKnician
Joined: Thu Mar 04, 2010 4:40 pm
Status: Not reading the spoilers or manga
Location: Smack in the middle of the Pacific Ocean
Org Profile

Lanczos vs Bicubic

Post by TEKnician » Sun Apr 01, 2012 2:29 pm

Mister Hatt wrote:They're all terrible. The general recommendation is gamma-aware nnedi scaling with spline36 centre correction, run separately for each plane of the video and then recombined. See the Dither 16bit package, nnedi3, and merge() functionality of Avisynth.
THERE YOU ARE. I was wondering when you were going to show up!

K, I'm on a Mac using Crossover to run Avisynth and friends.

These packages are obviously separate. So I'll figure out the installation issues. But you say to run for each plane of the video, as in separating the one into several videos, applying a script to each, then merging?
Almost as hard as fighting a Holy Paladin.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Lanczos vs Bicubic

Post by mirkosp » Sun Apr 01, 2012 4:15 pm

No, he's saying to make different clips for each plane within the same script and then merging them. I personally think that it's not too necessary to do, however, and also, nnedi3 is not gamma aware by default, so you will have to either manually correct the gamma before or after the upscale or, just to make stuff easier, use resamplehq with spline36 for luma and sinc with 8 lobes for chroma, which will give a still decently sharp upscale and it will be easier and gamma aware out of the box. Some sharpening post the resize could help but for filters and parameters it's a matter of taste; don't overdo it, but YMMV on what is too much and what isn't.
Image

User avatar
TEKnician
Joined: Thu Mar 04, 2010 4:40 pm
Status: Not reading the spoilers or manga
Location: Smack in the middle of the Pacific Ocean
Org Profile

Lanczos vs Bicubic

Post by TEKnician » Sun Apr 01, 2012 4:29 pm

So most of these suggestions revolve around variations of spline36.

I'll run some tests and do some more research. At least I know which direction I'm going.

Thanks guys
Almost as hard as fighting a Holy Paladin.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Lanczos vs Bicubic

Post by mirkosp » Sun Apr 01, 2012 4:56 pm

Assuming you're trying to upscale an NTSC DVD to 720p, here's basically what you shoud do:

Code: Select all

mpeg2source("your.d2v")
#ivtc/deinterlace as needed here
resamplehq(1280,720,srcmatrix="TV.601",dstmatrix="TV.709",src_left=8,src_width=-8,chroma_kernel="SINC",chroma_karg1=8)
#sharpening here
Download link of ResampleHQ if you don't have it.
Image

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: Lanczos vs Bicubic

Post by Mister Hatt » Mon Apr 02, 2012 12:58 am

I actually meant to use dither to unpack the gamma as ResampleHQ breaks chroma at the moment.

The nnedi planar scaling stuff is only really relevant for RGB upscaling however. If you're doing it on YUV, then you can split it into Y and UV if you want but IMO it isn't strictly necessary. The main reason to do channels individually in RGB is that the channels can have different intensity values and these don't always scale the same way, so you tend to not fuck up luma when doing it that way, IIRC. In YUV, the luma is separate so it isn't really an issue anyway.

So I guess you'd be looking at something more like this:
[MOD258: Redacted the code at author's request because it was incorrect.]

If you want to do split channel handling, it's relatively simple by defining a clip and informing nnedi3_rpow2 on which channels to run, then merge back together. If you do this, mirko's suggestion of sinc interpolation for chroma is a good idea. You may also want to remove the nns argument but I put it in to improve speed for negligible quality changes.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Lanczos vs Bicubic

Post by mirkosp » Mon Apr 02, 2012 1:00 am

Mister Hatt wrote:I actually meant to use dither to unpack the gamma as ResampleHQ breaks chroma at the moment.
What? Also, I hope you're aware that your script can only fix the gamma for the luma and thus YOU have the wrong chroma right there.
Image

Locked

Return to “AviSynth Help”