Advertisement
Guest User

NTSCSquare1.1c

a guest
Feb 17th, 2011
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #################
  2. #               #
  3. #  NTSCSquare   #
  4. # By Cannonaire #
  5. #               #
  6. #   Ver. 1.1c   #
  7. #               #
  8. #   Updated:    #
  9. #  2011-02-17   #
  10. #               #
  11. #################
  12. #
  13. # Required plugins: None!
  14. # Required input: Width must be 720 pixels,
  15. #                 Height must be 480 pixels for
  16. #                 'big' parameter.
  17. #
  18. #################
  19. # Usage: NTSCSquare(bool wide, bool big)
  20. # Recommendation: Crop after this script to remove junk
  21. #
  22. #################
  23. # Arguments:
  24. # Wide (default=false) - True for 16:9 flagged source,
  25. #                        False for 4:3 flagged source
  26. #
  27. # Big (default=false) - True if you want to mix 4:3 and
  28. #                       16:9 sources at 16:9 resolution.
  29. #
  30. # Left (Default=4.575) - Tweak cropping on the left.
  31. #                        Default value is centered.
  32. #
  33. #################
  34. # Purpose: Scale NTSC pixels to 1:1 PAR.  Useful for getting
  35. #   a common PAR when mixing 4:3 and 16:9 sources.
  36. #
  37. # Active picture area numbers taken from this page:
  38. # http://ps-auxw.de/cgi-bin/ar-calc.pl
  39. #
  40. #################
  41.  
  42. function NTSCSquare(clip oclp, bool "wide", bool "big", float "left")
  43. {
  44. assert(oclp.width==720, "NTSCSquare: Width must be 720")
  45. big = Default(big, false)
  46. (big==true) ? assert(oclp.height==480, "NTSCSquare: Height must be 480 for 'big' parameter") : last
  47.  
  48. yres = height(oclp)
  49. wide = Default(wide, false)
  50. left = Default(left, 4.575)
  51. xr = (big==true) ?  int(864) : (wide==true) ? int(864) : int(648)
  52. yr = (big==true) ? int(640) : yres
  53.  
  54. fclp = oclp.Spline36Resize(xr, yr, src_left=left, src_top=0, src_width=710.85, src_height=yres)
  55.  
  56. return fclp
  57. }
  58. #################
  59. # Changes:
  60. # 1.1c
  61. # -Fixed parameter bug.
  62. #
  63. # 1.1b
  64. # -Reimplemented support for any vertical resolution
  65. #  when 'big' parameter is false.
  66. #
  67. # 1.1
  68. # -Added 'big' parameter for
  69. # -No longer supports any vertical resolution
  70. #################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement