Determine if source file will be upscaled or downscaled

"How to's" and tips and tricks - for all VSO products- not for questions!

Moderators: Maggie, Cougar_II, ckhouston, JJ, alexia, Forum admin

Post Reply
ckhouston
VSO Fanatic
Posts: 4590
Joined: Wed Aug 08, 2007 4:12 am

Determine if source file will be upscaled or downscaled

Post by ckhouston »

CX2D version 4 includes new scalar filters to resize source file resolution to that to be converted to. It is important to some people to know if the source resolution will be upscaled or downscaled in order to pick a filter they believe works best for upscaling or downscaling.

The determination cannot be made by simply comparing source resolution with that to be converted to because pixel shape of the source and converted target can be different. So one has to calculate the resolution that the source will be scaled to and compare that with source resolution.

Some definitions are needed before presenting equations to determine the resolution a source will be rescaled to.

SAR (Source Aspect Ratio) ~ the aspect ratio of the source file being converted
TAR (Target Aspect Ratio) ~ the aspect ratio to be converted to -- either 4:3 = 1.333 or 16:9 = 1.778
THP (Target Horizontal Pixels) ~ number of horizontal pixels to be converted to -- 720 for Full D1 resolution for example
TVP (Target Vertical Pixels) ~ number of vertical pixels to be converted to -- 480 NTSC or 576 PAL for Full D1 resolution for example
SHP (Source Horizontal Pixels) ~ number of horizontal pixels in source
SVP (Source Vertical Pixels) ~ number of vertical pixels in source

How to determine these values for either version 4 or 5 is explained in Notes 1 and 2 of http://forums.vso-software.fr/calculati ... t9319.html.

If SAR > TAR, a source file will be rescaled to THP horizontal pixels and [(TAR/SAR) x TVP] vertical pixels. If SAR < TAR, the source will be scaled to [(SAR/TAR) x THP] horizontal pixels and TVP vertical pixels.

So a source is upscaled if either of the rescaled components is greater than the corresponding source resolution component, downscaled otherwise.

Note: You can verify the equations above for new scaled resolutions with entries in the conversion log like

Video processing: Mitchell (VSO) resampler (720*480)->(720*428) 4 threads

This entry shows slight downscaling even though the source had 720x480 resolution and was converted to 720x480 NTSC.
Last edited by ckhouston on Wed Oct 28, 2009 1:53 pm, edited 2 times in total.
User avatar
hansK
VSO Fanatic
Posts: 2516
Joined: Mon Mar 17, 2008 10:22 pm
Location: Netherlands

Post by hansK »

Thanks ckhouston for this explanation.

A second method is:

- Add file.
- Click convert.
- Cancel conversion after 15 seconds.
- See/read in log file what the program did.
2009-10-24 12:27:56 Info Output Stream #3 (SUBTITLE) - dvdsub, 64 kb/s
2009-10-24 12:27:56 Info Output Stream #2 (AUDIO) - ac3, 48000 Hz, stereo, s16, 224 kb/s
2009-10-24 12:27:56 Info Output Stream #1 (VIDEO) - mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3], q=2-31, pass 1, 6057 kb/s, frame compensation: 25,000 -> 25,00 Fps
2009-10-24 12:27:56 Info Video processing: Pad (Left:0 - Top:68 - Right:0 - Bottom:68)
2009-10-24 12:27:56 Info Video processing: Mitchell (VSO) resampler (640*368)->(720*440)
2009-10-24 12:27:56 Info Chapter sequences require 168 Mb. temp space
2009-10-24 12:27:56 ---- ************ Source file #4 END DETAILS ************
Select then the by you wanted filter and do all other settings.
Click convert to create the DVD.

Regards,
hansK
ckhouston
VSO Fanatic
Posts: 4590
Joined: Wed Aug 08, 2007 4:12 am

Post by ckhouston »

That is a good alternative that many users may be more comfortable doing than using equations.

I presented the equations because of a couple of posts in the past where a user questioned why the program was not resampling to the target resolution.

But none of this is necessary in the typical case where source resolution is much different from the target/converted resolution. A high definition source will clearly be downsampled and a low resolution source will be upsampled unless being converted to low resolution like Half D1 or SIF.

EDIT note: Similar info is not shown in the log for version 5 as of 12/7/2012 so the calculations will have to be done for it.
Post Reply