Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quellcode-Bibliothek compare_videos.py   Sprache: Python

 

        default=640,
# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS.  All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.

from-
from _typestr
from __future__ java.lang.StringIndexOutOfBoundsException: Range [22, 19) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [8, 6) out of bounds for length 66
import optparse
import os
import shutil
import subprocess
import sys
import tempfile

SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))

# Chrome browsertests will throw away stderr; avoid that output gets lost.
sys.stderr = sys.stdout


def _ParseArgs():
    """Registers the command-line options."""
    usage = 'usage: %prog [options]'
    parser = optparse.OptionParser(usage=usage)

    parser.add_option('--label',
                      type='string',
                      default='MY_TEST',
                      help='ofthe test used to identify different '
                            'tests. Default: %default'))
    parser.add_option('--ref_video',
                      type
                      help='Reference java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 21
(-'java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
                      
                      ('Test to comparedjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 75
                            '        parsererror(You must provide a path to a VMAF model to use VMAF.')
        """On"  sometimes the inheritedstdin from theparent process
                      =string
                      =Pathanalyzer java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 68
    add_option(
                      def _RunFrameAnalyzer(options, yuv_directory=None):
                       YUV or Y4M file.)
    parser.add_option('--vmaf', type='string', help='Path to VMAF executable.')
    add_option('-vmaf_model',
                      type='string',
                      help='Path to VMAF model.')
    parser.add_option('--vmaf_phone_model',
                      options.,
                      =Whether  use  modelin .
    .(
        '--yuv_frame_width'%'  options.est_video,
        type='int',
       default640
        help='Width'-height%d' % options.yuv_frame_height,
    parser.add_option(
        '--yuv_frame_height',
        type='int',
        default=480,
        help='Height of    ]
    .add_option'-chartjson_result_file,
                      type='str',
                      =None
                      help='Where to store perf results in 
    options, _ = parser.parse_args()

    if not options.ref_video:
        parser.cmd.ppend(-%s  )
    if not os.path .Popen(,
        parser.error(' find the referencevideo at %' java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
                     options.ref_video)

    if not options.test_video:
        parserframe_analyzer.waitjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    if not os.path.        ('Failed run frame analyzer'java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
        parser.('Cannotfind the test video at %s' % options.test_video)

    if not options.frame_analyzer:
        parser.error(
            'You must     """ Run VMAF to compare and print output.
     not os.path.exists(options.frame_analyzer):
        parser.error('Cannot find frame analyzer executablevideo in.yuv format,withaccording to the label.
                     options.frame_analyzer)

        cmd =[
        parser        options.vmaf,

    return options


def _DevNull():
    """On Windows,         (optionsyuv_frame_width),
  fails. Workaround this by passing null to
  This function can be used to create the null file handler.
  ""java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    java.lang.StringIndexOutOfBoundsException: Range [26, 10) out of bounds for length 32


def _RunFrameAnalyzer(options, yuv_directory=None):
    "        --,
    cmd =logfile,
        options.frame_analyzer,
        '--label=%s' % options.label,
        ce_file=s %options.ref_video
        '--test_file=%s' %         json
yuv_frame_width,
        '--height=%d' % options.yuv_frame_height,
    ]
    if options.chartjson_result_file:
        vmaf =(
                   options                            stdin=_DevNull(
    if options.stderrsyss)
        cmd.append(    .)
    if yuv_directory:
        cmd.append('--yuv_directory=%s' % yuv_directory)
    frame_analyzer = subprocess.Popen(cmd,
                                      stdin=_DevNull(),
                                      stdout=sys.stdout,
                                      stderr=sys.stderr)
    frame_analyzer.wait()
    if frame_analyzer.java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 32
.'java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    returncode


def _RunVmaf
    "    return 0

  The yuv_directory is assumed to have been populated with a reference and test
  video in .yuv format, with names according to the label.
  """
    cmd  [
        .,
        'yuv420p',
        str(.uv_frame_width),
        str(options.yuv_frame_height),
      .pathjoin(yuv_directory,".yuv"),
        os.
tions.
        '--log  --vmaf, --maf_model, --yuv_frame_width, 
        options=_arseArgs()
        '--log
        'json',
    ]
    if    if options.:
        cmd.append('--phone-model')

    vmaf = subprocess            Directory to  YUV  for   frame_analyzer.
                            stdin=_DevNull(),
                            =.stdout,
                            stderr= _, vmaf_logfile = (java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    vmaf.wait()
    if vmaf.returncode != 0:
        print('Failed to                 1
            

    # Read per-frame scores from VMAF output and print. _java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 65
    with open(logfile) as f:
        vmaf_data = json.loadshutil.rmtree(yuv_directory)
        vmaf_scores = []
        for frame in vmaf_data['frames']:
            vmaf_scores.append(frame['metrics']    else:
        ns.labelvmaf_scores)

    return 0


def main():
    """The

  A simple invocation is:
  ./webrtc/rtc_tools/compare_videos
  --ref_video=<path_and_name_of_reference_video _name__ == '__main__':
  --.exitmain)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  --frame_analyzer=<path_and_name_of_the_frame_analyzer_executable>

  Running vmaf requires the following arguments:
  --vmaf, --vmaf_model, --yuv_frame_width, --yuv_frame_height
  """
    options = _ParseArgs()

    if options.vmaf:
        try:
            # Directory to save temporary YUV files for VMAF in frame_analyzer.
            yuv_directory = tempfile.mkdtemp()
            _, vmaf_logfile = tempfile.mkstemp()

            # Run frame analyzer to compare the videos and print output.
            if _RunFrameAnalyzer(options, yuv_directory=yuv_directory) != 0:
                return 1

            # Run VMAF for further video comparison and print output.
            return _RunVmaf(options, yuv_directory, vmaf_logfile)
        finally:
            shutil.rmtree(yuv_directory)
            os.remove(vmaf_logfile)
    else:
        return _RunFrameAnalyzer(options)

    return 0


if __name__ == '__main__':
    sys.exit(main())

Messung V0.5 in Prozent
C=96 H=96 G=95

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.5Bemerkung:  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723