def main(): parser = MCTF_parser(description="Info.") parser.add_argument("--GOPs", help="number of GOPs to process. (Default = {})".format(info.GOPs)) parser.add_argument("--TRLs", help="number of iterations of the temporal transform + 1. (Default = {})".format(info.TRLs)) parser.add_argument("--FPS", help="frames per second. (Default = {})".format(info.FPS)) args = parser.parse_known_args()[0] if args.GOPs: info.GOPs = int(args.GOPs) if args.TRLs: info.TRLs = int(args.TRLs) if args.FPS: info.FPS = int(args.FPS) x=info_j2k(info.GOPs, info.TRLs, info.FPS) #x=info_j2k() # ?
def main(): parser = MCTF_parser(description="Info.") parser.add_argument( "--GOPs", help="number of GOPs to process. (Default = {})".format(info.GOPs)) parser.add_argument( "--TRLs", help="number of iterations of the temporal transform + 1. (Default = {})" .format(info.TRLs)) parser.add_argument("--FPS", help="frames per second. (Default = {})".format( info.FPS)) args = parser.parse_known_args()[0] if args.GOPs: info.GOPs = int(args.GOPs) if args.TRLs: info.TRLs = int(args.TRLs) if args.FPS: info.FPS = int(args.FPS) x = info_j2k(info.GOPs, info.TRLs, info.FPS) #x=info_j2k() # ?
## Number of Group Of Pictures to process. GOPs = 1 ## Number of Temporal Resolution Levels. TRLs = 5 ## Frames per second. FPS = 30 # 30 # 50 ## The parser module provides an interface to Python's internal parser ## and byte-code compiler. parser = MCTF_parser(description="Information of codestream.") parser.GOPs(GOPs) parser.FPS(FPS) ## A script may only parse a few of the command-line arguments, ## passing the remaining arguments on to another script or program. args = parser.parse_known_args()[0] if args.GOPs: GOPs = int(args.GOPs) if args.TRLs: TRLs = int(args.TRLs) if args.FPS: FPS = int(args.FPS) ## Initializes the class GOP (Group Of Pictures). gop = GOP() ## Extract the value of the size of a GOP, that is, the number of images. GOP_size = gop.get_size(TRLs) ## Calculate the total number of video images. pictures = GOPs * GOP_size + 1 ## Duration of the sequence. duration = pictures / (FPS * 1.0)
#!/usr/bin/python # -*- coding: iso-8859-15 -*- import sys from subprocess import check_call from subprocess import CalledProcessError from MCTF_parser import MCTF_parser file = "" parser = MCTF_parser(description="Does nothing with the HFB texture data.") parser.add_argument("--file", help="file that contains the LFB data. Default = {})".format(file)) args = parser.parse_known_args()[0] if args.file: file = args.file try: check_call("trace cp " + file + ".cp " + file, shell=True) except CalledProcessError: sys.exit(-1)