# AVSLib :: 'base' package :: 'constants' module
# Copyright (c) 2005 George Zarkadas (gzarkadas@users.sourceforge.net)

# This program is free software; you can redistribute it and/or modify it under the terms of 
# the GNU General Public License as published by the Free Software Foundation; either 
# version 2 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
# PURPOSE.  See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along with this program; 
# if not, write to the "Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA"

DefineModule("avslib", "base", "constants")

# string constants

global TAB = Chr(9)
global CRLF = Chr(13) + Chr(10)

# Standard framerate constants

global FRATE_NTSC = 29.97		# NTSC television standard
global FRATE_PAL  = 25.0		# PAL television standard
global FRATE_FILM = 24.0		# Cinema Film
global FRATE_IMAX = 48.0		# IMax Film

# Standard aspect ratio constants

global ASRAT_TV = 4.0/3			# Normal TV
global ASRAT_TVWIDE = 16.0/9	# Wide TV (HDTV)
global ASRAT_ANIM = 5.0/3		# Film (animations)
global ASRAT_ACFLAT1 = 1.85		# Film (Academy Flat 1)
global ASRAT_ACFLAT2 = 16.0/9	# Film (Academy Flat 2)
global ASRAT_SCOPE = 2.35		# Film (Sinescope)

# Standard clip sizes constants

global WSIZE_NTSC = 720			# NTSC pixel width
global HSIZE_NTSC = 480			# NTSC pixel height 
global OSIZE_NTSC = 525 		# NTSC pixel height with overscan (not shown on TV) scanlines 

global WSIZE_PAL = 720 			# PAL pixel width
global HSIZE_PAL = 576 			# PAL pixel height
global OSIZE_PAL = 625 			# PAL pixel height with overscan (not shown on TV) scanlines 

# Colorspace-related size constants; they can also be used 
# as a base to RoundBs/CeilBs/FloorBs rounding functions.
# Note that Avisynth resizers do not accept anything below 8x4 and may
# choke at even greater sizes if the downsampling is too high.

global CS_MINW_RGB  = 1			# minimum clip's width (progressive & interlaced)
global CS_MINW_YUY2 = 2
global CS_MINW_YV12 = 4

global CS_MINH_RGB  = 1			# minimum progressive clip's height
global CS_MINH_YUY2 = 1
global CS_MINH_YV12 = 2

global CS_MINI_RGB  = 2			# minimum interlaced clip's height
global CS_MINI_YUY2 = 2
global CS_MINI_YV12 = 4
