365 lines
37 KiB
HTML
365 lines
37 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html class="writer-html5" lang="en" >
|
|||
|
<head>
|
|||
|
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
|||
|
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|||
|
<title>VSHelper4.h — VapourSynth R64 documentation</title>
|
|||
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
|
|||
|
<!--[if lt IE 9]>
|
|||
|
<script src="../_static/js/html5shiv.min.js"></script>
|
|||
|
<![endif]-->
|
|||
|
|
|||
|
<script src="../_static/jquery.js"></script>
|
|||
|
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
|||
|
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
|||
|
<script src="../_static/doctools.js"></script>
|
|||
|
<script src="../_static/sphinx_highlight.js"></script>
|
|||
|
<script src="../_static/js/theme.js"></script>
|
|||
|
<link rel="index" title="Index" href="../genindex.html" />
|
|||
|
<link rel="search" title="Search" href="../search.html" />
|
|||
|
<link rel="next" title="VSScript4.h" href="vsscript4.h.html" />
|
|||
|
<link rel="prev" title="VapourSynth4.h" href="vapoursynth4.h.html" />
|
|||
|
</head>
|
|||
|
|
|||
|
<body class="wy-body-for-nav">
|
|||
|
<div class="wy-grid-for-nav">
|
|||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|||
|
<div class="wy-side-scroll">
|
|||
|
<div class="wy-side-nav-search" >
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<a href="../index.html" class="icon icon-home">
|
|||
|
VapourSynth
|
|||
|
</a>
|
|||
|
<div class="version">
|
|||
|
R64
|
|||
|
</div>
|
|||
|
<div role="search">
|
|||
|
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
|||
|
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
|||
|
<input type="hidden" name="check_keywords" value="yes" />
|
|||
|
<input type="hidden" name="area" value="default" />
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
|||
|
<ul class="current">
|
|||
|
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
|
|||
|
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
|
|||
|
<li class="toctree-l1"><a class="reference internal" href="../gettingstarted.html">Getting Started</a></li>
|
|||
|
<li class="toctree-l1"><a class="reference internal" href="../pythonreference.html">Python Reference</a></li>
|
|||
|
<li class="toctree-l1"><a class="reference internal" href="../functions.html">Function Reference</a></li>
|
|||
|
<li class="toctree-l1"><a class="reference internal" href="../output.html">Output</a></li>
|
|||
|
<li class="toctree-l1"><a class="reference internal" href="../applications.html">Applications and Libraries</a></li>
|
|||
|
<li class="toctree-l1 current"><a class="reference internal" href="../apireference.html">VapourSynth C API Reference</a><ul class="current">
|
|||
|
<li class="toctree-l2 current"><a class="reference internal" href="../apireference.html#public-headers">Public Headers</a><ul class="current">
|
|||
|
<li class="toctree-l3"><a class="reference internal" href="vapoursynth4.h.html">VapourSynth4.h</a></li>
|
|||
|
<li class="toctree-l3 current"><a class="current reference internal" href="#">VSHelper4.h</a><ul>
|
|||
|
<li class="toctree-l4"><a class="reference internal" href="#table-of-contents">Table of contents</a></li>
|
|||
|
<li class="toctree-l4"><a class="reference internal" href="#introduction">Introduction</a></li>
|
|||
|
<li class="toctree-l4"><a class="reference internal" href="#macros">Macros</a></li>
|
|||
|
<li class="toctree-l4"><a class="reference internal" href="#functions">Functions</a></li>
|
|||
|
</ul>
|
|||
|
</li>
|
|||
|
<li class="toctree-l3"><a class="reference internal" href="vsscript4.h.html">VSScript4.h</a></li>
|
|||
|
</ul>
|
|||
|
</li>
|
|||
|
<li class="toctree-l2"><a class="reference internal" href="../apireference.html#common-pitfalls">Common Pitfalls</a></li>
|
|||
|
<li class="toctree-l2"><a class="reference internal" href="../apireference.html#reserved-frame-properties">Reserved Frame Properties</a></li>
|
|||
|
</ul>
|
|||
|
</li>
|
|||
|
</ul>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</nav>
|
|||
|
|
|||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
|||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|||
|
<a href="../index.html">VapourSynth</a>
|
|||
|
</nav>
|
|||
|
|
|||
|
<div class="wy-nav-content">
|
|||
|
<div class="rst-content">
|
|||
|
<div role="navigation" aria-label="Page navigation">
|
|||
|
<ul class="wy-breadcrumbs">
|
|||
|
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
|
|||
|
<li class="breadcrumb-item"><a href="../apireference.html">VapourSynth C API Reference</a></li>
|
|||
|
<li class="breadcrumb-item active">VSHelper4.h</li>
|
|||
|
<li class="wy-breadcrumbs-aside">
|
|||
|
<a href="../_sources/api/vshelper4.h.rst.txt" rel="nofollow"> View page source</a>
|
|||
|
</li>
|
|||
|
</ul>
|
|||
|
<hr/>
|
|||
|
</div>
|
|||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|||
|
<div itemprop="articleBody">
|
|||
|
|
|||
|
<section id="vshelper4-h">
|
|||
|
<h1>VSHelper4.h<a class="headerlink" href="#vshelper4-h" title="Permalink to this heading"></a></h1>
|
|||
|
<section id="table-of-contents">
|
|||
|
<h2>Table of contents<a class="headerlink" href="#table-of-contents" title="Permalink to this heading"></a></h2>
|
|||
|
<p><a class="reference internal" href="#introduction">Introduction</a></p>
|
|||
|
<dl>
|
|||
|
<dt><a class="reference internal" href="#macros">Macros</a></dt><dd><p><a class="reference internal" href="#vsh-std-plugin-id">VSH_STD_PLUGIN_ID</a></p>
|
|||
|
<p><a class="reference internal" href="#vsh-resize-plugin-id">VSH_RESIZE_PLUGIN_ID</a></p>
|
|||
|
<p><a class="reference internal" href="#vsh-text-plugin-id">VSH_TEXT_PLUGIN_ID</a></p>
|
|||
|
<p><a class="reference internal" href="#vs-restrict">VS_RESTRICT</a></p>
|
|||
|
<p><a class="reference internal" href="#vsh-aligned-malloc-c">VSH_ALIGNED_MALLOC</a></p>
|
|||
|
<p><a class="reference internal" href="#vsh-aligned-free-c">VSH_ALIGNED_FREE</a></p>
|
|||
|
<p><a class="reference internal" href="#vsmin">VSMIN</a></p>
|
|||
|
<p><a class="reference internal" href="#vsmax">VSMAX</a></p>
|
|||
|
</dd>
|
|||
|
<dt><a class="reference internal" href="#functions">Functions</a></dt><dd><p><a class="reference internal" href="#vsh-aligned-malloc-cpp">vsh_aligned_malloc</a></p>
|
|||
|
<p><a class="reference internal" href="#vsh-aligned-free-cpp">vsh_aligned_free</a></p>
|
|||
|
<p><a class="reference internal" href="#isconstantformat">isConstantFormat</a></p>
|
|||
|
<p><a class="reference internal" href="#issamevideoformat">isSameVideoFormat</a></p>
|
|||
|
<p><a class="reference internal" href="#issamevideopresetformat">isSameVideoPresetFormat</a></p>
|
|||
|
<p><a class="reference internal" href="#issamevideoinfo">isSameVideoInfo</a></p>
|
|||
|
<p><a class="reference internal" href="#issameaudioformat">isSameAudioFormat</a></p>
|
|||
|
<p><a class="reference internal" href="#issameaudioinfo">isSameAudioInfo</a></p>
|
|||
|
<p><a class="reference internal" href="#muldivrational">muldivRational</a></p>
|
|||
|
<p><a class="reference internal" href="#addrational">addRational</a></p>
|
|||
|
<p><a class="reference internal" href="#reducerational">reduceRational</a></p>
|
|||
|
<p><a class="reference internal" href="#int64toints">int64ToIntS</a></p>
|
|||
|
<p><a class="reference internal" href="#doubletofloats">doubleToFloatS</a></p>
|
|||
|
<p><a class="reference internal" href="#bitblt">bitblt</a></p>
|
|||
|
<p><a class="reference internal" href="#arevaliddimensions">areValidDimensions</a></p>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
</section>
|
|||
|
<section id="introduction">
|
|||
|
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this heading"></a></h2>
|
|||
|
<p>This is a collection of helpful macros and functions. Note that all functions (not macros)
|
|||
|
are either prefixed with <cite>vsh_</cite> in C mode or placed in the <cite>vsh</cite> namespace for C++. This documentation
|
|||
|
will use the C++ names for these function.</p>
|
|||
|
</section>
|
|||
|
<section id="macros">
|
|||
|
<h2>Macros<a class="headerlink" href="#macros" title="Permalink to this heading"></a></h2>
|
|||
|
<section id="vsh-std-plugin-id">
|
|||
|
<h3>VSH_STD_PLUGIN_ID<a class="headerlink" href="#vsh-std-plugin-id" title="Permalink to this heading"></a></h3>
|
|||
|
<p>Macro defined to the internal std plugin id provided for convenience.</p>
|
|||
|
</section>
|
|||
|
<section id="vsh-resize-plugin-id">
|
|||
|
<h3>VSH_RESIZE_PLUGIN_ID<a class="headerlink" href="#vsh-resize-plugin-id" title="Permalink to this heading"></a></h3>
|
|||
|
<p>Macro defined to the internal resizer plugin id provided for convenience.</p>
|
|||
|
</section>
|
|||
|
<section id="vsh-text-plugin-id">
|
|||
|
<h3>VSH_TEXT_PLUGIN_ID<a class="headerlink" href="#vsh-text-plugin-id" title="Permalink to this heading"></a></h3>
|
|||
|
<p>Macro defined to the internal std plugin id provided for convenience.</p>
|
|||
|
</section>
|
|||
|
<section id="vs-restrict">
|
|||
|
<h3>VS_RESTRICT<a class="headerlink" href="#vs-restrict" title="Permalink to this heading"></a></h3>
|
|||
|
<p>Attempts to provide a portable definition of the C99 <code class="docutils literal notranslate"><span class="pre">restrict</span></code> keyword,
|
|||
|
or its C++ counterpart.</p>
|
|||
|
</section>
|
|||
|
<section id="vsh-aligned-malloc">
|
|||
|
<span id="vsh-aligned-malloc-c"></span><h3>VSH_ALIGNED_MALLOC<a class="headerlink" href="#vsh-aligned-malloc" title="Permalink to this heading"></a></h3>
|
|||
|
<p>VSH_ALIGNED_MALLOC(pptr, size, alignment)</p>
|
|||
|
<p>Expands to _aligned_malloc() in Windows, and posix_memalign() elsewhere. Note that
|
|||
|
the arguments are in the style of posix_memalign().</p>
|
|||
|
<p><em>pptr</em> is a pointer to a pointer.</p>
|
|||
|
</section>
|
|||
|
<section id="vsh-aligned-free">
|
|||
|
<span id="vsh-aligned-free-c"></span><h3>VSH_ALIGNED_FREE<a class="headerlink" href="#vsh-aligned-free" title="Permalink to this heading"></a></h3>
|
|||
|
<p>VSH_ALIGNED_FREE(ptr)</p>
|
|||
|
<p>Expands to _aligned_free() in Windows, and free() elsewhere.</p>
|
|||
|
<p><em>ptr</em> is a pointer.</p>
|
|||
|
</section>
|
|||
|
<section id="vsmin">
|
|||
|
<h3>VSMIN<a class="headerlink" href="#vsmin" title="Permalink to this heading"></a></h3>
|
|||
|
<p>VSMIN(a, b)</p>
|
|||
|
<p>Returns the minimum of the two numbers.</p>
|
|||
|
</section>
|
|||
|
<section id="vsmax">
|
|||
|
<h3>VSMAX<a class="headerlink" href="#vsmax" title="Permalink to this heading"></a></h3>
|
|||
|
<p>VSMAX(a, b)</p>
|
|||
|
<p>Returns the maximum of the two numbers.</p>
|
|||
|
</section>
|
|||
|
</section>
|
|||
|
<section id="functions">
|
|||
|
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this heading"></a></h2>
|
|||
|
<section id="vsh-aligned-malloc-cpp">
|
|||
|
<span id="id1"></span><h3>vsh_aligned_malloc<a class="headerlink" href="#vsh-aligned-malloc-cpp" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh18vsh_aligned_mallocE6size_t6size_t">
|
|||
|
<span id="_CPPv3N3vsh18vsh_aligned_mallocE6size_t6size_t"></span><span id="_CPPv2N3vsh18vsh_aligned_mallocE6size_t6size_t"></span><span id="vsh::vsh_aligned_malloc__s.s"></span><span class="n"><span class="pre">T</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">vsh_aligned_malloc</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">size</span></span>, <span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">alignment</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh18vsh_aligned_mallocE6size_t6size_t" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>A templated aligned malloc for C++. It uses the same functions as the
|
|||
|
<a class="reference internal" href="#vsh-aligned-malloc-c">VSH_ALIGNED_MALLOC</a> macro but is easier to use.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="vsh-aligned-free-cpp">
|
|||
|
<span id="id2"></span><h3>vsh_aligned_free<a class="headerlink" href="#vsh-aligned-free-cpp" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh16vsh_aligned_freeEPv">
|
|||
|
<span id="_CPPv3N3vsh16vsh_aligned_freeEPv"></span><span id="_CPPv2N3vsh16vsh_aligned_freeEPv"></span><span id="vsh::vsh_aligned_free__voidP"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">vsh_aligned_free</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">ptr</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh16vsh_aligned_freeEPv" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>This simply uses the <a class="reference internal" href="#vsh-aligned-free-c">VSH_ALIGNED_FREE</a> macro.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="isconstantformat">
|
|||
|
<h3>isConstantFormat<a class="headerlink" href="#isconstantformat" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh16isConstantFormatEPK11VSVideoInfo">
|
|||
|
<span id="_CPPv3N3vsh16isConstantFormatEPK11VSVideoInfo"></span><span id="_CPPv2N3vsh16isConstantFormatEPK11VSVideoInfo"></span><span id="vsh::isConstantFormat__VSVideoInfoCP"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">isConstantFormat</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSVideoInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">vi</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh16isConstantFormatEPK11VSVideoInfo" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Checks if a clip’s format and dimensions are known (and therefore constant).</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="issamevideoformat">
|
|||
|
<h3>isSameVideoFormat<a class="headerlink" href="#issamevideoformat" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh17isSameVideoFormatEPK11VSVideoInfoPK11VSVideoInfo">
|
|||
|
<span id="_CPPv3N3vsh17isSameVideoFormatEPK11VSVideoInfoPK11VSVideoInfo"></span><span id="_CPPv2N3vsh17isSameVideoFormatEPK11VSVideoInfoPK11VSVideoInfo"></span><span id="vsh::isSameVideoFormat__VSVideoInfoCP.VSVideoInfoCP"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">isSameVideoFormat</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSVideoInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v1</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSVideoInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v2</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh17isSameVideoFormatEPK11VSVideoInfoPK11VSVideoInfo" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Checks if two clips have the same video format. If the format is
|
|||
|
unknown in both, it will be considered the same.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="issamevideopresetformat">
|
|||
|
<h3>isSameVideoPresetFormat<a class="headerlink" href="#issamevideopresetformat" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh23isSameVideoPresetFormatEjPK13VSVideoFormatP6VSCorePK5VSAPI">
|
|||
|
<span id="_CPPv3N3vsh23isSameVideoPresetFormatEjPK13VSVideoFormatP6VSCorePK5VSAPI"></span><span id="_CPPv2N3vsh23isSameVideoPresetFormatEjPK13VSVideoFormatP6VSCorePK5VSAPI"></span><span id="vsh::isSameVideoPresetFormat__unsigned.VSVideoFormatCP.VSCoreP.VSAPICP"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">isSameVideoPresetFormat</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">unsigned</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">presetFormat</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSVideoFormat</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v</span></span>, <span class="n"><span class="pre">VSCore</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">core</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSAPI</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">vsapi</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh23isSameVideoPresetFormatEjPK13VSVideoFormatP6VSCorePK5VSAPI" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Checks if a clip has the same video format as the preset.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="issamevideoinfo">
|
|||
|
<h3>isSameVideoInfo<a class="headerlink" href="#issamevideoinfo" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh15isSameVideoInfoEPK11VSVideoInfoPK11VSVideoInfo">
|
|||
|
<span id="_CPPv3N3vsh15isSameVideoInfoEPK11VSVideoInfoPK11VSVideoInfo"></span><span id="_CPPv2N3vsh15isSameVideoInfoEPK11VSVideoInfoPK11VSVideoInfo"></span><span id="vsh::isSameVideoInfo__VSVideoInfoCP.VSVideoInfoCP"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">isSameVideoInfo</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSVideoInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v1</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSVideoInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v2</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh15isSameVideoInfoEPK11VSVideoInfoPK11VSVideoInfo" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Checks if two clips have the same video format and dimensions. If the format is
|
|||
|
unknown in both, it will be considered the same. This is also true for the
|
|||
|
dimensions. Framerate is not taken into consideration when comparing.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="issameaudioformat">
|
|||
|
<h3>isSameAudioFormat<a class="headerlink" href="#issameaudioformat" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh17isSameAudioFormatEPK11VSAudioInfoPK11VSAudioInfo">
|
|||
|
<span id="_CPPv3N3vsh17isSameAudioFormatEPK11VSAudioInfoPK11VSAudioInfo"></span><span id="_CPPv2N3vsh17isSameAudioFormatEPK11VSAudioInfoPK11VSAudioInfo"></span><span id="vsh::isSameAudioFormat__VSAudioInfoCP.VSAudioInfoCP"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">isSameAudioFormat</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSAudioInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v1</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSAudioInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v2</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh17isSameAudioFormatEPK11VSAudioInfoPK11VSAudioInfo" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Checks if two clips have the same audio format.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="issameaudioinfo">
|
|||
|
<h3>isSameAudioInfo<a class="headerlink" href="#issameaudioinfo" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh15isSameAudioInfoEPK11VSAudioInfoPK11VSAudioInfo">
|
|||
|
<span id="_CPPv3N3vsh15isSameAudioInfoEPK11VSAudioInfoPK11VSAudioInfo"></span><span id="_CPPv2N3vsh15isSameAudioInfoEPK11VSAudioInfoPK11VSAudioInfo"></span><span id="vsh::isSameAudioInfo__VSAudioInfoCP.VSAudioInfoCP"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">isSameAudioInfo</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSAudioInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v1</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSAudioInfo</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">v2</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh15isSameAudioInfoEPK11VSAudioInfoPK11VSAudioInfo" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Checks if two clips have the same audio format and samplerate.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="muldivrational">
|
|||
|
<h3>muldivRational<a class="headerlink" href="#muldivrational" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh14muldivRationalEP7int64_tP7int64_t7int64_t7int64_t">
|
|||
|
<span id="_CPPv3N3vsh14muldivRationalEP7int64_tP7int64_t7int64_t7int64_t"></span><span id="_CPPv2N3vsh14muldivRationalEP7int64_tP7int64_t7int64_t7int64_t"></span><span id="vsh::muldivRational__int64_tP.int64_tP.int64_t.int64_t"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">muldivRational</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">num</span></span>, <span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">den</span></span>, <span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">mul</span></span>, <span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">div</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh14muldivRationalEP7int64_tP7int64_t7int64_t7int64_t" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Multiplies two rational numbers and reduces the result, i.e.
|
|||
|
<em>num</em>/<em>den</em> * <em>mul</em>/<em>div</em>. The result is stored in <em>num</em> and <em>den</em>.</p>
|
|||
|
<p>The caller must ensure that <em>div</em> is not 0.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="reducerational">
|
|||
|
<h3>reduceRational<a class="headerlink" href="#reducerational" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh14reduceRationalEP7int64_tP7int64_t">
|
|||
|
<span id="_CPPv3N3vsh14reduceRationalEP7int64_tP7int64_t"></span><span id="_CPPv2N3vsh14reduceRationalEP7int64_tP7int64_t"></span><span id="vsh::reduceRational__int64_tP.int64_tP"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">reduceRational</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">num</span></span>, <span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">den</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh14reduceRationalEP7int64_tP7int64_t" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Reduces a rational number.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="addrational">
|
|||
|
<h3>addRational<a class="headerlink" href="#addrational" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh11addRationalEP7int64_tP7int64_t7int64_t7int64_t">
|
|||
|
<span id="_CPPv3N3vsh11addRationalEP7int64_tP7int64_t7int64_t7int64_t"></span><span id="_CPPv2N3vsh11addRationalEP7int64_tP7int64_t7int64_t7int64_t"></span><span id="vsh::addRational__int64_tP.int64_tP.int64_t.int64_t"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">addRational</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">num</span></span>, <span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">den</span></span>, <span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">addnum</span></span>, <span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">addden</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh11addRationalEP7int64_tP7int64_t7int64_t7int64_t" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Adds two rational numbers and reduces the result, i.e.
|
|||
|
<em>num</em>/<em>den</em> + <em>addnum</em>/<em>addden</em>. The result is stored in <em>num</em> and <em>den</em>.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="int64toints">
|
|||
|
<h3>int64ToIntS<a class="headerlink" href="#int64toints" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh11int64ToIntSE7int64_t">
|
|||
|
<span id="_CPPv3N3vsh11int64ToIntSE7int64_t"></span><span id="_CPPv2N3vsh11int64ToIntSE7int64_t"></span><span id="vsh::int64ToIntS__int64_t"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">int64ToIntS</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">int64_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">i</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh11int64ToIntSE7int64_t" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Converts an int64_t to int with signed saturation. It’s useful to silence
|
|||
|
warnings when reading integer properties from a VSMap and to avoid unexpected behavior on int overflow.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="doubletofloats">
|
|||
|
<h3>doubleToFloatS<a class="headerlink" href="#doubletofloats" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh14doubleToFloatSEd">
|
|||
|
<span id="_CPPv3N3vsh14doubleToFloatSEd"></span><span id="_CPPv2N3vsh14doubleToFloatSEd"></span><span id="vsh::doubleToFloatS__double"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">doubleToFloatS</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">d</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh14doubleToFloatSEd" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Converts a double to float. It’s useful to silence
|
|||
|
warnings when reading double properties from a VSMap and mostly exists to mirror <a class="reference internal" href="#int64toints">int64ToIntS</a>.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="bitblt">
|
|||
|
<h3>bitblt<a class="headerlink" href="#bitblt" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh6bitbltEPviPKvi6size_t6size_t">
|
|||
|
<span id="_CPPv3N3vsh6bitbltEPviPKvi6size_t6size_t"></span><span id="_CPPv2N3vsh6bitbltEPviPKvi6size_t6size_t"></span><span id="vsh::bitblt__voidP.i.voidCP.i.s.s"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">bitblt</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">dstp</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">dst_stride</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">srcp</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">src_stride</span></span>, <span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">row_size</span></span>, <span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">height</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh6bitbltEPviPKvi6size_t6size_t" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Copies bytes from one plane to another. Basically, it is memcpy in a loop.</p>
|
|||
|
<p><em>row_size</em> is in bytes.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
<section id="arevaliddimensions">
|
|||
|
<h3>areValidDimensions<a class="headerlink" href="#arevaliddimensions" title="Permalink to this heading"></a></h3>
|
|||
|
<dl class="cpp function">
|
|||
|
<dt class="sig sig-object cpp" id="_CPPv4N3vsh18areValidDimensionsEPK8VSFormatii">
|
|||
|
<span id="_CPPv3N3vsh18areValidDimensionsEPK8VSFormatii"></span><span id="_CPPv2N3vsh18areValidDimensionsEPK8VSFormatii"></span><span id="vsh::areValidDimensions__VSFormatCP.i.i"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">vsh</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">areValidDimensions</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSFormat</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">fi</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">width</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">height</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N3vsh18areValidDimensionsEPK8VSFormatii" title="Permalink to this definition"></a><br /></dt>
|
|||
|
<dd><p>Checks if the given dimensions are valid for a particular format, with regards
|
|||
|
to chroma subsampling.</p>
|
|||
|
</dd></dl>
|
|||
|
|
|||
|
</section>
|
|||
|
</section>
|
|||
|
</section>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
|||
|
<a href="vapoursynth4.h.html" class="btn btn-neutral float-left" title="VapourSynth4.h" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
|||
|
<a href="vsscript4.h.html" class="btn btn-neutral float-right" title="VSScript4.h" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
|||
|
</div>
|
|||
|
|
|||
|
<hr/>
|
|||
|
|
|||
|
<div role="contentinfo">
|
|||
|
<p>© Copyright 2012-2023, Fredrik Mellbin.</p>
|
|||
|
</div>
|
|||
|
|
|||
|
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
|||
|
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
|||
|
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|||
|
|
|||
|
|
|||
|
</footer>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</section>
|
|||
|
</div>
|
|||
|
<script>
|
|||
|
jQuery(function () {
|
|||
|
SphinxRtdTheme.Navigation.enable(true);
|
|||
|
});
|
|||
|
</script>
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|