LanczosResize("")

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
AaronAMV
eating that e. coli spinach
Joined: Tue Jan 22, 2008 7:54 pm
Status: (◔ ◡ ◔ )
Location: (◔ ◡ ◔ )
Org Profile

LanczosResize("")

Post by AaronAMV » Fri Jun 20, 2008 10:17 am

When I put my Avisynth file in VDubMod and I do all the scripting IN VDubMod, what is the ratio for a wide screen source. One of my friends said it was 640x480 for both full and wide screen, but when I made the 640x480 in my wide screen, it turned full screen. So what is the proper ratio for wide screen? Or what do I need to do differently?

User avatar
LivingFlame
Joined: Sat May 28, 2005 4:41 pm
Location: Closer than you think...
Org Profile

Post by LivingFlame » Fri Jun 20, 2008 11:39 am

Use 848x480. It's as close as you're getting.
... yea ...

User avatar
AaronAMV
eating that e. coli spinach
Joined: Tue Jan 22, 2008 7:54 pm
Status: (◔ ◡ ◔ )
Location: (◔ ◡ ◔ )
Org Profile

Post by AaronAMV » Fri Jun 20, 2008 12:03 pm

Ok. I've heard of that but never actually used it. Thanks.

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

Post by Phantasmagoriat » Fri Jun 20, 2008 4:01 pm

wide=length/width=1.7777777777
full=length/width=1.333333333

-they could be any length/width combination,
but for efficiency-sake, it's best when both the length
and width are divisible by 16 [mod16]

-for filesize and quality considerations, it's best to leave
your footage in it's original dimensions, then set the
AR [aspect ratio] flag to 16:9; it will be stretched to
853x480 upon playback. This is why any dimensions can
be wide or full, hence dvd's are all 720x480 regardless of being
wide or full [fullscreen dvds are stretched to 720x540 on playback]

-so unless you really know how to enhance quality,
848x480 will just have an unnecessary bloated file size.

-of course, if you put your video into an avi container that
doesn't respect the AR flag, then 848x480 is what you would
have to do... but since mp4 is getting more widespread,
nobody wants to do that any more...

-I like 768x432 since it has ~same area as 720x480 to
stuff the information into... it divides exactly to 1.7777... and is mod 16

~Phan
PLAY FREEDOOM!! | Phan Picks! | THE424SHOW | YouTube | "Painkiller" | Vanilla MIDI's
"Effort to Understand; Effort to be Understood; to See through Different Eyes."

User avatar
AaronAMV
eating that e. coli spinach
Joined: Tue Jan 22, 2008 7:54 pm
Status: (◔ ◡ ◔ )
Location: (◔ ◡ ◔ )
Org Profile

Post by AaronAMV » Fri Jun 20, 2008 5:22 pm

So you would put
LanczosResize(768,432) r
right?

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Fri Jun 20, 2008 5:31 pm

Phantasmagoriat: After such an otherwise sensible post, the last part disappoints me. Yes, 848x480 wastes bits, but how is 768x432 any better? If you want to save vertical resolution, why not use 720/704x432 and set the aspect ratio flag? 768x432 just seems like a terrible compromise because it introduces fake detail in one direction and removes real detail in another.

Upscaling is a waste, downscaling is a shame, so I see absolutely no reason not to just retain the original resolution if you're aiming for optimal quality.

User avatar
LivingFlame
Joined: Sat May 28, 2005 4:41 pm
Location: Closer than you think...
Org Profile

Post by LivingFlame » Fri Jun 20, 2008 5:40 pm

If you aren't messing with AR flags, 848x480 doesn't seem like it should lose much detail simply because it's converting the 720 columns of widescreen pixels (1.2121) to 848 columns of square pixels (1.0), though you will end up cropping off a bit on the sides. Some detail is lost, but it's not all that noticeable from what I've seen.
... yea ...

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Fri Jun 20, 2008 6:05 pm

While upscaling does theoretically decrease quality slightly, that's not the issue here. The problem is that you have to encode 20% more pixels for no added benefit.

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

Post by Phantasmagoriat » Fri Jun 20, 2008 8:11 pm

Mosc wrote:Phantasmagoriat: After such an otherwise sensible post, the last part disappoints me. Yes, 848x480 wastes bits, but how is 768x432 any better? If you want to save vertical resolution, why not use 720/704x432 and set the aspect ratio flag? 768x432 just seems like a terrible compromise because it introduces fake detail in one direction and removes real detail in another.

Upscaling is a waste, downscaling is a shame, so I see absolutely no reason not to just retain the original resolution if you're aiming for optimal quality.
I don't know why I've never thought of that before. I should mention that I don't know the technical details of what happens to the bits when resized, so I was always under the assumption that the amount of area was what mattered, and the information for the extra bits would be shifted to the stretched area; maybe after filtering... [okay, now I'm just grabbing at straws since I'm probably wrong :sweat:] Could there be any truth to this idea?
PLAY FREEDOOM!! | Phan Picks! | THE424SHOW | YouTube | "Painkiller" | Vanilla MIDI's
"Effort to Understand; Effort to be Understood; to See through Different Eyes."

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Sat Jun 21, 2008 8:20 am

Not really, no. Let me illustrate this by showing what happens when we alter the following 32x64 pattern:
Image

Let's resize this to 64x32 using Photoshop's Bicubic resampler. By the logic of importance of total area, this would hardly affect the image quality, right?
Image

Ouch! The pattern was totally destroyed. To further illustrate that the conversion was far from lossless, let's resize it back to 32x64:
Image

Apparently, we can't recover the original pattern once we've downsized in a certain direction. In contrast, resizing the original pattern to 64x64 and back to 32x64 is less destructive:
Image

Of course, this example was artificially generated and results will never be this extreme in realistic scenarios. Nonetheless, it's best to avoid resizing when possible.

Locked

Return to “AviSynth Help”