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: Star Huntin'
Location: Sweden
Contact:
Org Profile

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

Postby Mol » Mon Jun 14, 2010 9:30 am

looks ar noob friendly :P , will try it out,... just wondering can if it cooperate with nnedi ;p
Still better than that MMO.
Image

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

Postby mirkosp » Mon Jun 14, 2010 10:04 am

I don't think you can tell it to use nnedi/nnedi2/nnedi3... although you'd only need that when upscaling, and the way you upscale with nnedi filters is pretty much pointresize(width*2,height*2).nnedi2.turnleft.nnedi2.turnright so what you'd do is probably upscale to a bigger res with the nnedi filter you prefer (atm nnedi2 is the best one, nnedi3 can use improvements, especially for speed) and then use bestfit to downscale back.
Image

User avatar
Mol
Strawberry Pie
Joined: Thu Feb 22, 2007 2:28 am
Status: Star Huntin'
Location: Sweden
Contact:
Org Profile

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

Postby Mol » Mon Jun 14, 2010 10:41 am

nah , too bad .. well i guess i will go with default and see the outcome first ; o.
Still better than that MMO.
Image

User avatar
Phantasmagoriat
Joined: Mon Feb 06, 2006 11:26 pm
Status: ☁SteamPunked≈☂
Contact:
Org Profile

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

Postby Phantasmagoriat » Mon Jun 14, 2010 12:26 pm

I believe nnedi works best for resizing by powers of 2, so it won't work unless you do what mirko suggested.

By default bestfit uses spline36resize, so you should still get good results ;)
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."

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

Postby mirkosp » Mon Jun 14, 2010 2:31 pm

Yeah, it's by powers of 2 and its usage is much different of the one of other resizers, so I don't think there's a way to really use it inside bestfit, unless it's somehow internally called when upscaling.
Image

User avatar
Mol
Strawberry Pie
Joined: Thu Feb 22, 2007 2:28 am
Status: Star Huntin'
Location: Sweden
Contact:
Org Profile

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

Postby 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

Postby 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

Postby 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

Postby 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.


Return to “AviSynth Help”

Who is online

Users browsing this forum: No registered users and 1 guest