BestFit()_v1.0.1 - mixing different aspect ratio's

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
User avatar
Mol
Strawberry Pie
Joined: Thu Feb 22, 2007 2:28 am
Status: sutatS
Location: Sweden
Contact:
Org Profile

Re: BestFit()_v1.0.1 - mixing different aspect ratio's

Post by Mol » Mon Jun 14, 2010 4:09 pm

well i ddint need it to upscale that much ; p but i thought i could get nicer result... but spline is fine too on 4:3 to wide screen , i like it :)
Still better than that MMO.
Image

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

Re: BestFit()_v1.0.1 - mixing different aspect ratio's

Post by Mister Hatt » Tue Jun 15, 2010 3:51 am

Not sure where mirko pulled some of that from but the correct way to scale with nnedi is to use nnedi2's nnedi2_rpow() function with 6-tap spline correction. Syntax is nnedi2_rpow("spline36resize", width_you_want, height_you_want) It is important to use the cshift argument of spline36resize or the centre of the image will be off. This goes for all forms of nnedi scaling. If you want a straight 2x resize, you can leave out the fheight/fwidth parameters. You can also do a 4x rescale, or any other power of 2 really, by adding in rfactor=x where x is the factor you want to scale by. Can be any power of 2 from 2 to 1024. Tbh though, there is little reason to use nnedi2 to scale things. It's only useful for upsampling and even then it works best when doing split-channel scaling, which is more useful for still images than video footage. I'd advise against using nnedi for upscaling video, just stick to a high-tap spline filter instead.

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

Re: BestFit()_v1.0.1 - mixing different aspect ratio's

Post by mirkosp » Tue Jun 15, 2010 6:31 am

Mister Hatt wrote:Not sure where mirko pulled some of that from but the correct way to scale with nnedi is to use nnedi2's nnedi2_rpow() function with 6-tap spline correction. Syntax is nnedi2_rpow("spline36resize", width_you_want, height_you_want) It is important to use the cshift argument of spline36resize or the centre of the image will be off. This goes for all forms of nnedi scaling.
That's not how you use nnedi2_rpow2 (that's the name). And about where I pulled that from, it's how it used to be done with the old nnedi, and it works the same with nnedi2.
I mean, compare nnedi2_rpow2(2) and that. If you want to specify other parameters in nnedi2_rpow2 (like for example the quality), you'd be specifying those in the simple nnedi2 call instead, and as for the target resolution, you just downscale with spline36resize after the line (which is the same thing that nnedi2_rpow2 does internally). So yeah, either way is fine, really.
Image

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

Re: BestFit()_v1.0.1 - mixing different aspect ratio's

Post by Mister Hatt » Tue Jun 15, 2010 9:53 am

Without the central shift correction the upscale will be bulged. You HAVE to correct it if you don't want your image being deformed. What I wrote above is how Tritical told me to use it, as well as what is in the manual. Regular nnedi2 doesn't have cshift correction as it is made for use as a field interpolator, not an extrapolator. You are right that it's nnedi2_rpow2 though, I forgot it has another 2 in it now.

Locked

Return to “AviSynth Help”