Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #################
- # #
- # NTSCSquare #
- # By Cannonaire #
- # #
- # Ver. 1.1c #
- # #
- # Updated: #
- # 2011-02-17 #
- # #
- #################
- #
- # Required plugins: None!
- # Required input: Width must be 720 pixels,
- # Height must be 480 pixels for
- # 'big' parameter.
- #
- #################
- # Usage: NTSCSquare(bool wide, bool big)
- # Recommendation: Crop after this script to remove junk
- #
- #################
- # Arguments:
- # Wide (default=false) - True for 16:9 flagged source,
- # False for 4:3 flagged source
- #
- # Big (default=false) - True if you want to mix 4:3 and
- # 16:9 sources at 16:9 resolution.
- #
- # Left (Default=4.575) - Tweak cropping on the left.
- # Default value is centered.
- #
- #################
- # Purpose: Scale NTSC pixels to 1:1 PAR. Useful for getting
- # a common PAR when mixing 4:3 and 16:9 sources.
- #
- # Active picture area numbers taken from this page:
- # http://ps-auxw.de/cgi-bin/ar-calc.pl
- #
- #################
- function NTSCSquare(clip oclp, bool "wide", bool "big", float "left")
- {
- assert(oclp.width==720, "NTSCSquare: Width must be 720")
- big = Default(big, false)
- (big==true) ? assert(oclp.height==480, "NTSCSquare: Height must be 480 for 'big' parameter") : last
- yres = height(oclp)
- wide = Default(wide, false)
- left = Default(left, 4.575)
- xr = (big==true) ? int(864) : (wide==true) ? int(864) : int(648)
- yr = (big==true) ? int(640) : yres
- fclp = oclp.Spline36Resize(xr, yr, src_left=left, src_top=0, src_width=710.85, src_height=yres)
- return fclp
- }
- #################
- # Changes:
- # 1.1c
- # -Fixed parameter bug.
- #
- # 1.1b
- # -Reimplemented support for any vertical resolution
- # when 'big' parameter is false.
- #
- # 1.1
- # -Added 'big' parameter for
- # -No longer supports any vertical resolution
- #################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement