当前位置: 首页>>代码示例>>Python>>正文


Python MCTF_parser.add_argument方法代码示例

本文整理汇总了Python中MCTF_parser.MCTF_parser.add_argument方法的典型用法代码示例。如果您正苦于以下问题:Python MCTF_parser.add_argument方法的具体用法?Python MCTF_parser.add_argument怎么用?Python MCTF_parser.add_argument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MCTF_parser.MCTF_parser的用法示例。


在下文中一共展示了MCTF_parser.add_argument方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
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() # ?
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:19,代码来源:info_j2k.py

示例2: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
#!/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)
开发者ID:josejuansanchez,项目名称:cr_mc_j2k,代码行数:23,代码来源:texture_expand_hfb_cp.py

示例3: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
COMPONENTS = 3
BYTES_PER_COMPONENT = 1

file = ""
pictures = 33
pixels_in_x = 352
pixels_in_y = 288
quantization = 45000
subband = 4 # meterla en parametros !!!!!!!!!!!!!!!!!
SRLs = 5
nLayers = 5

parser = MCTF_parser(description="Compress the LFB texture data using JPEG 2000.")

parser.add_argument("--file", 
                    help="file that contains the LFB data. Default = {})".format(file))
parser.add_argument("--nLayers",
                    help="Number of layers. Logarithm controls the quality level and the bit-rate of the code-stream. (Default = {})".format(nLayers))
parser.pictures(pictures)
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.quantization(quantization)
parser.SRLs(SRLs)

args = parser.parse_known_args()[0]
if args.file:
    file = args.file
if args.nLayers:
    nLayers = args.nLayers
if args.pictures:
    pictures = int(args.pictures)
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:33,代码来源:texture_compress_lfb_j2k.py

示例4: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
pictures            = 9
## Search range for motion vectors.
search_range        = 4
## Sub-pixel accuracy in motion estimate.
subpixel_accuracy   = 0
## Level update. For example, a value equal to 1/4 means that the high-frequency subband is 4 times less important than the low-frequency subband.
update_factor       = 0 # 1.0/4


## The parser module provides an interface to Python's internal parser and byte-code compiler.
parser = MCTF_parser(description="Performs a temporal analysis step.")
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.GOPs(GOPs)
parser.TRLs(TRLs)
parser.add_argument("--temporal_subband", help="iteration of the temporal transform.".format(temporal_subband))
parser.always_B(always_B)
parser.block_overlaping(block_overlaping)
parser.block_size(block_size)
parser.border_size(border_size)
parser.pictures(pictures)
parser.search_range(search_range)
parser.subpixel_accuracy(subpixel_accuracy)
parser.update_factor(update_factor)

## 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.pixels_in_x:
    pixels_in_x = int(args.pixels_in_x)
if args.pixels_in_y:
    pixels_in_y = int(args.pixels_in_y)
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:33,代码来源:analyze_step.py

示例5: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
## Number of blocks in the X direction.
blocks_in_x = 0
## Number of blocks in the Y direction.
blocks_in_y = 0
## Number of pictures of a temporal resolution.
fields      = 0
## Name of the file with the motion fields.
file        = ""
# Number of discard level.
# discard_levels = 0

## The parser module provides an interface to Python's internal parser
#  and byte-code compiler.
parser = MCTF_parser(description="Expands the motion data using JPEG 2000.")
#parser.add_argument("--discard_levels", help="number of discard level. (Default = {})".format(discard_levels))
parser.add_argument("--blocks_in_x",     help="number of blocks in the X direction. (Default = {})".format(blocks_in_x))
parser.add_argument("--blocks_in_y",     help="number of blocks in the Y direction. (Default = {})".format(blocks_in_y))
parser.add_argument("--fields",          help="number of fields in to compress. (Default = {})".format(fields))
parser.add_argument("--file",            help="name of the file with the motion fields. (Default = {})".format(file))

## 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.discard_levels:
#    discard_levels = int(args.discard_levels)
if args.blocks_in_x:
    blocks_in_x = int(args.blocks_in_x)
if args.blocks_in_y:
    blocks_in_y = int(args.blocks_in_y)
if args.fields:
    fields = int(args.fields)
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:33,代码来源:motion_expand_j2k.py

示例6: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
HIGH = "high_"
LOW = "low_"
COMPONENTS = 4

discard_TRLs=0
discard_SRLs_Tex=0
discard_SRLs_Mot=0
new_slope = 45000
GOPs = 1
TRLs = 3
SRLs = 5
FPS = 30
BRC = 99999999

parser = MCTF_parser(description="Transcode.")
parser.add_argument("--discard_TRLs",
                    help="number of discarded temporal resolution levels. (Default = {})".format(discard_TRLs))
parser.add_argument("--discard_SRLs_Tex",
                    help="number of discarded spatial resolution levels for textures. (Default = {})".format(discard_SRLs_Tex))
parser.add_argument("--discard_SRLs_Mot",
                    help="number of discarded spatial resolution levels for motions. (Default = {})".format(discard_SRLs_Mot))
parser.add_argument("--new_slope",
                    help="new slope. (Default = {})".format(new_slope))
parser.add_argument("--GOPs",
                    help="number of GOPs to process. (Default = {})".format(GOPs))
parser.add_argument("--TRLs",
                    help="number of iterations of the temporal transform + 1. (Default = {})".format(TRLs))
parser.add_argument("--BRC",
                    help="bit-rate control (kbps). (Default = {})".format(BRC))

args = parser.parse_known_args()[0]
if args.discard_TRLs:
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:34,代码来源:transcode_COPIA_SIN_DEMUX.py

示例7: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
from MCTF_parser import MCTF_parser

COMPONENTS          = 4
BYTES_PER_COMPONENT = 2
BITS_PER_COMPONENT  = BYTES_PER_COMPONENT * 8

file         = ""
blocks_in_x  = 0
blocks_in_y  = 0
fields       = 0
clayers      = 1
quantization = 45000
SRLs         = 5

parser = MCTF_parser(description="Compress the motion data using JPEG 2000.")
parser.add_argument("--blocks_in_x",   help="number of blocks in the X direction. (Default = {})".format(blocks_in_x))
parser.add_argument("--blocks_in_y",   help="number of blocks in the Y direction. (Default = {})".format(blocks_in_y))
parser.add_argument("--fields",        help="number of fields in to compress. (Default = {})".format(fields))
parser.add_argument("--quantization",  help="controls the quality level and the bit-rate of the code-stream. (Default = {})".format(quantization))
parser.add_argument("--clayers",       help="logarithm controls the quality level and the bit-rate of the code-stream. (Default = {})".format(clayers))
parser.add_argument("--file",          help="name of the file with the motion fields. (Default = {})".format(file))

args = parser.parse_known_args()[0]
if args.blocks_in_x:
    blocks_in_x = int(args.blocks_in_x)
if args.blocks_in_y:
    blocks_in_y = int(args.blocks_in_y)
if args.fields:
    fields = int(args.fields)
if args.clayers:
    clayers = str(args.clayers)
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:33,代码来源:motion_compress_j2k_sincomponents.py

示例8: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
import sys
import math
from subprocess import check_call
from subprocess import CalledProcessError
from MCTF_parser import MCTF_parser

file = ""
rate = 0.0
pictures = 33
pixels_in_x = 352
pixels_in_y = 288
subband = 4 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

parser = MCTF_parser(description="Expands the the LFB texture data using JPEG 2000.")
parser.add_argument("--file", help="file that contains the LFB data. Default = {})".format(file))
parser.add_argument("--rate", help="read only the initial portion of the code-stream, corresponding to an overall bit-rate of \"rate\" bits/sample. Default = {})".format(rate))
parser.pictures(pictures)
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)

args = parser.parse_known_args()[0]
if args.file:
    file = args.file
if args.rate:
    rate = float(args.rate)
if args.pictures:
    pictures = int(args.pictures)
if args.pixels_in_x:
    pixels_in_x = int(args.pixels_in_x)
if args.pixels_in_y:
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:32,代码来源:texture_expand_lfb_j2k.py

示例9: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
from subprocess import check_call
from subprocess import CalledProcessError
from MCTF_parser import MCTF_parser
HIGH = "high"
LOW = "low"

GOPs = 1
discarded_TRLs = 0
discarded_SRLs = 0
quantization = "45000"
TRLs = 6
GOPs = 1

parser = MCTF_parser(description="Transcodes a code-stream.")
parser.GOPs(GOPs)
parser.add_argument("--discarded_SRLs", help="number of discarded spatial resolution levels. Default = {}".format(discarded_parser.add_argument("--discarded_TRLs", help="number of discarded temporal resolution levels. Default = {}".format(discarded_TRLs))
SRLs))
parser.quantization(quantization)
parser.TRLs(TRLs)
parser.SRLs(SRLs)

args = parser.parse_known_args()[0]
if args.discarded_SRLs:
    discarded_SRLs = int(args.discarded_SRLs)
if args.discarded_TRLs:
    discarded_TRLs = int(args.discarded_TRLs)
if args.quantization:
    quantization = args.quantization
if args.SRLs:
    SRLs = int(args.SRLs)
if args.TRLs:
    TRLs = int(args.TRLs)
开发者ID:josejuansanchez,项目名称:cr_mc_j2k,代码行数:34,代码来源:transcode.py

示例10: MCTF_parser

# 需要导入模块: from MCTF_parser import MCTF_parser [as 别名]
# 或者: from MCTF_parser.MCTF_parser import add_argument [as 别名]
from MCTF_parser import MCTF_parser

COMPONENTS = 3
BYTES_PER_COMPONENT = 1

file = ""
pictures = 33
pixels_in_x = 352
pixels_in_y = 288
quantizations = "45000"
subband = 1
SRLs = 5

parser = MCTF_parser(description="Compress the HFB texture data using JPEG 2000.")

parser.add_argument("--file", help="file that contains the HFB data. Default = {})".format(file))
parser.pictures(pictures)
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.quantizations(quantizations)
parser.add_argument("--subband", help="subband to compress. Default = {})".format(file))
parser.SRLs(SRLs)

args = parser.parse_known_args()[0]
if args.file:
    file = args.file
if args.pictures:
    pictures = int(args.pictures)
if args.pixels_in_x:
    pixels_in_x = int(args.pixels_in_x)
if args.pixels_in_y:
开发者ID:josejuansanchez,项目名称:cr_mc_j2k,代码行数:33,代码来源:texture_compress_hfb_j2k.py


注:本文中的MCTF_parser.MCTF_parser.add_argument方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。