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


Python MCTF_parser.MCTF_parser类代码示例

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


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

示例1: main

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,代码行数:17,代码来源:info_j2k.py

示例2: MCTF_parser

## Size of the blocks in the motion estimation process.
block_size     = 32
## Minimal block size allowed in the motion estimation process.
block_size_min = 32
## Number of Group Of Pictures to process.
GOPs           = 1
## Number of Temporal Resolution Levels.
TRLs           = 4
## Controls the quality level and the bit-rate of the code-stream.
quantization   = 45000 # Jse
## Number of layers. Logarithm controls the quality level and the bit-rate of the code-stream.
clayers        = "1"

## The parser module provides an interface to Python's internal parser
## and byte-code compiler.
parser = MCTF_parser(description="Compress the motion data.")
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.block_size(block_size)
parser.block_size_min(block_size_min)
parser.GOPs(GOPs)
parser.TRLs(TRLs)
parser.quantization(quantization)
parser.clayers(clayers)

## 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:
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:31,代码来源:motion_compress.py

示例3: MCTF_parser

block_size_min    = 32
## Border size or margin of a block.
border_size       = 0
## Number of Groups Of Pictures of the scene.
GOPs              = 1
## Search range for motion vectors.
search_range      = 4
## Sub-pixel accuracy in motion estimate.
subpixel_accuracy = 0
## Number of Temporal resolution Levels.
TRLs              = 4
## 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 the temporal analysis of a picture sequence.")
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.always_B(always_B)
parser.block_overlaping(block_overlaping)
parser.block_size(block_size)
parser.block_size_min(block_size_min)
parser.border_size(border_size)
parser.GOPs(GOPs)
parser.search_range(search_range)
parser.subpixel_accuracy(subpixel_accuracy)
parser.TRLs(TRLs)
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]
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:31,代码来源:analyze.py

示例4: MCTF_parser

# NOTA: Añadir código para que sea posible codificar todas las componentes juntas.

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:
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:30,代码来源:texture_compress_lfb_j2k.py

示例5: str

pixels_in_x          = 352
## Height of the pictures.
pixels_in_y          = 288
## Controls the quality level and the bit-rate of the code-stream.
quantization         = str((46000 + 42000) / 2) # "44000"
## Number of Temporal Resolution Levels.
TRLs                 = 4
## Number of Spatia Resolution Levels.
SRLs                 = 5
## File containing a distortion value per line. Each line corresponds
## to a frame of the sequence.
distortions           = ""

## The parser module provides an interface to Python's internal parser
## and byte-code compiler.
parser = MCTF_parser(description="Compress the texture.")
parser.GOPs(GOPs)
parser.nLayers(nLayers)
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.quantization(quantization)
parser.quantization_step(quantization_step)
parser.TRLs(TRLs)
parser.SRLs(SRLs)
parser.distortions(distortions)

## 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)
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:31,代码来源:searchSlope_byDistortion_j2k.py

示例6: MCTF_parser

## Size of a block.
block_size          = 32
## Border size or margin of a block.
border_size         = 0
## Total number of video images.
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.
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:31,代码来源:analyze_step.py

示例7: MCTF_parser

from subprocess import check_call
from subprocess import CalledProcessError
from MCTF_parser import MCTF_parser

#MOTION_CODER_NAME = "gzip"
#MOTION_CODER_NAME = "kdu_v_compress"
MCTF_MOTION_CODEC = os.environ["MCTF_MOTION_CODEC"]

block_size = 16
block_size_min = 16
GOPs = 1
pixels_in_x = 352
pixels_in_y = 288
TRLs = 5

parser = MCTF_parser(description="Compress the motion data.")
parser.block_size(block_size)
parser.block_size_min(block_size_min)
parser.GOPs(GOPs)
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.TRLs(TRLs)

args = parser.parse_known_args()[0]
if args.block_size:
    block_size = int(args.block_size)
if args.block_size_min:
    block_size_min = int(args.block_size_min)
if args.GOPs:
    GOPs = int(args.GOPs)
if args.pixels_in_x:
开发者ID:josejuansanchez,项目名称:cr_mc_j2k,代码行数:31,代码来源:motion_compress.py

示例8: MCTF_parser

from subprocess import CalledProcessError
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:
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:31,代码来源:motion_compress_j2k_sincomponents.py

示例9: MCTF_parser

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))
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:29,代码来源:transcode_COPIA_SIN_DEMUX.py

示例10: MCTF_parser

import display
import string
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:
开发者ID:josejuansanchez,项目名称:cr_mc_j2k,代码行数:31,代码来源:transcode.py

示例11: MCTF_parser

# -*- coding: iso-8859-15 -*-

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)
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:31,代码来源:texture_expand_lfb_j2k.py

示例12: MCTF_parser

from subprocess import check_call
from subprocess import CalledProcessError
from MCTF_parser import MCTF_parser

MCTF_TEXTURE_CODEC = os.environ["MCTF_TEXTURE_CODEC"]
HIGH = "high"
LOW = "low"

GOPs = 1
pixels_in_x = 352
pixels_in_y = 288
quantizations = "45000"
TRLs = 5
SRLs = 5

parser = MCTF_parser(description="Compress the texture.")
parser.GOPs(GOPs)
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.quantizations(quantizations)
parser.TRLs(TRLs)
parser.SRLs(SRLs)

args = parser.parse_known_args()[0]
if args.GOPs:
    GOPs = int(args.GOPs)
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)
if args.quantizations:
开发者ID:josejuansanchez,项目名称:cr_mc_j2k,代码行数:31,代码来源:texture_compress.py

示例13: MCTF_parser

from GOP import GOP
from subprocess import check_call
from subprocess import CalledProcessError
from MCTF_parser import MCTF_parser

MCTF_TEXTURE_CODEC = os.environ["MCTF_TEXTURE_CODEC"]
LOW = "low"
HIGH = "high"

GOPs = 1
pixels_in_x = 352
pixels_in_y = 288
TRLs = 5
SRLs = 5

parser = MCTF_parser(description="Expands the texture.")
parser.GOPs(GOPs)
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.SRLs(TRLs)
parser.TRLs(TRLs)

args = parser.parse_known_args()[0]
if args.GOPs:
    GOPs = int(args.GOPs)
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)
if args.SRLs:
    SRLs = int(args.SRLs)
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:31,代码来源:texture_expand_COPIA_SIN_LIST.py

示例14: MCTF_parser

## Subpixel motion estimation order.
subpixel_accuracy    = 0
## Number of Temporal Resolution Levels.
TRLs                 = 4
## Number of Spatial Resolution Levels.
SRLs                 = 5
## Number of layers. Logarithm controls the quality level and the
#  bit-rate of the code-stream.
nLayers              = 5
## Weight of the update step.
update_factor        = 1.0/4


## The parser module provides an interface to Python's internal parser
#  and byte-code compiler.
parser = MCTF_parser(description="Encodes a sequence of pictures.")
parser.pixels_in_x(pixels_in_x)
parser.pixels_in_y(pixels_in_y)
parser.always_B(always_B)
parser.block_overlaping(block_overlaping)
parser.block_size(block_size)
parser.block_size_min(block_size_min)
parser.border_size(border_size)
parser.GOPs(GOPs)
parser.clayers_motion(clayers_motion)
parser.quantization_step(quantization_step)
parser.quantization_motion(quantization_motion)
parser.quantization_texture(quantization_texture)
parser.search_range(search_range)
parser.subpixel_accuracy(subpixel_accuracy)
parser.TRLs(TRLs)
开发者ID:vicente-gonzalez-ruiz,项目名称:QSVC,代码行数:31,代码来源:compress.py

示例15: MCTF_parser

import display
from subprocess import check_call
from subprocess import CalledProcessError
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
SRLs = 5

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

parser.add_argument("--file", help="file that contains the LFB 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.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)
开发者ID:josejuansanchez,项目名称:cr_mc_j2k,代码行数:31,代码来源:texture_compress_lfb_mj2k.py


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