church_archive_script/Programs/doc/functions/video/resize.html
2023-11-29 16:12:35 +00:00

475 lines
No EOL
61 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>Resize &mdash; 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="Reverse" href="reverse.html" />
<link rel="prev" title="RemoveFrameProps" href="removeframeprops.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 current"><a class="reference internal" href="../../functions.html">Function Reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../functions.html#general-functions">General Functions</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../../functions.html#video-functions">Video Functions</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="addborders.html">AddBorders</a></li>
<li class="toctree-l3"><a class="reference internal" href="assumefps.html">AssumeFPS</a></li>
<li class="toctree-l3"><a class="reference internal" href="averageframes.html">AverageFrames</a></li>
<li class="toctree-l3"><a class="reference internal" href="binarize_binarizemask.html">Binarize/BinarizeMask</a></li>
<li class="toctree-l3"><a class="reference internal" href="blankclip.html">BlankClip</a></li>
<li class="toctree-l3"><a class="reference internal" href="boxblur.html">BoxBlur</a></li>
<li class="toctree-l3"><a class="reference internal" href="cliptoprop.html">ClipToProp</a></li>
<li class="toctree-l3"><a class="reference internal" href="convolution.html">Convolution</a></li>
<li class="toctree-l3"><a class="reference internal" href="copyframeprops.html">CopyFrameProps</a></li>
<li class="toctree-l3"><a class="reference internal" href="crop_cropabs.html">Crop/CropAbs</a></li>
<li class="toctree-l3"><a class="reference internal" href="deflate_inflate.html">Deflate/Inflate</a></li>
<li class="toctree-l3"><a class="reference internal" href="deleteframes.html">DeleteFrames</a></li>
<li class="toctree-l3"><a class="reference internal" href="doubleweave.html">DoubleWeave</a></li>
<li class="toctree-l3"><a class="reference internal" href="duplicateframes.html">DuplicateFrames</a></li>
<li class="toctree-l3"><a class="reference internal" href="expr.html">Expr</a></li>
<li class="toctree-l3"><a class="reference internal" href="flipvertical_fliphorizontal.html">FlipVertical/FlipHorizontal</a></li>
<li class="toctree-l3"><a class="reference internal" href="frameeval.html">FrameEval</a></li>
<li class="toctree-l3"><a class="reference internal" href="freezeframes.html">FreezeFrames</a></li>
<li class="toctree-l3"><a class="reference internal" href="interleave.html">Interleave</a></li>
<li class="toctree-l3"><a class="reference internal" href="invert_invertmask.html">Invert/InvertMask</a></li>
<li class="toctree-l3"><a class="reference internal" href="levels.html">Levels</a></li>
<li class="toctree-l3"><a class="reference internal" href="limiter.html">Limiter</a></li>
<li class="toctree-l3"><a class="reference internal" href="loop.html">Loop</a></li>
<li class="toctree-l3"><a class="reference internal" href="lut.html">Lut</a></li>
<li class="toctree-l3"><a class="reference internal" href="lut2.html">Lut2</a></li>
<li class="toctree-l3"><a class="reference internal" href="makediff.html">MakeDiff</a></li>
<li class="toctree-l3"><a class="reference internal" href="makefulldiff.html">MakeFullDiff</a></li>
<li class="toctree-l3"><a class="reference internal" href="maskedmerge.html">MaskedMerge</a></li>
<li class="toctree-l3"><a class="reference internal" href="median.html">Median</a></li>
<li class="toctree-l3"><a class="reference internal" href="merge.html">Merge</a></li>
<li class="toctree-l3"><a class="reference internal" href="mergediff.html">MergeDiff</a></li>
<li class="toctree-l3"><a class="reference internal" href="mergefulldiff.html">MergeFullDiff</a></li>
<li class="toctree-l3"><a class="reference internal" href="minimum_maximum.html">Minimum/Maximum</a></li>
<li class="toctree-l3"><a class="reference internal" href="modifyframe.html">ModifyFrame</a></li>
<li class="toctree-l3"><a class="reference internal" href="pemverifier.html">PEMVerifier</a></li>
<li class="toctree-l3"><a class="reference internal" href="planestats.html">PlaneStats</a></li>
<li class="toctree-l3"><a class="reference internal" href="premultiply.html">PreMultiply</a></li>
<li class="toctree-l3"><a class="reference internal" href="prewitt_sobel.html">Prewitt/Sobel</a></li>
<li class="toctree-l3"><a class="reference internal" href="proptoclip.html">PropToClip</a></li>
<li class="toctree-l3"><a class="reference internal" href="removeframeprops.html">RemoveFrameProps</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Resize</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#resize.Bilinear"><code class="docutils literal notranslate"><span class="pre">Bilinear()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#resize.Bicubic"><code class="docutils literal notranslate"><span class="pre">Bicubic()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#resize.Point"><code class="docutils literal notranslate"><span class="pre">Point()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#resize.Lanczos"><code class="docutils literal notranslate"><span class="pre">Lanczos()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#resize.Spline16"><code class="docutils literal notranslate"><span class="pre">Spline16()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#resize.Spline36"><code class="docutils literal notranslate"><span class="pre">Spline36()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#resize.Spline64"><code class="docutils literal notranslate"><span class="pre">Spline64()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#resize.Bob"><code class="docutils literal notranslate"><span class="pre">Bob()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="reverse.html">Reverse</a></li>
<li class="toctree-l3"><a class="reference internal" href="selectevery.html">SelectEvery</a></li>
<li class="toctree-l3"><a class="reference internal" href="separatefields.html">SeparateFields</a></li>
<li class="toctree-l3"><a class="reference internal" href="setfieldbased.html">SetFieldBased</a></li>
<li class="toctree-l3"><a class="reference internal" href="setframeprop.html">SetFrameProp</a></li>
<li class="toctree-l3"><a class="reference internal" href="setframeprops.html">SetFrameProps</a></li>
<li class="toctree-l3"><a class="reference internal" href="setvideocache.html">SetVideoCache</a></li>
<li class="toctree-l3"><a class="reference internal" href="shuffleplanes.html">ShufflePlanes</a></li>
<li class="toctree-l3"><a class="reference internal" href="splice.html">Splice</a></li>
<li class="toctree-l3"><a class="reference internal" href="splitplanes.html">SplitPlanes</a></li>
<li class="toctree-l3"><a class="reference internal" href="stackvertical_stackhorizontal.html">StackVertical/StackHorizontal</a></li>
<li class="toctree-l3"><a class="reference internal" href="transpose.html">Transpose</a></li>
<li class="toctree-l3"><a class="reference internal" href="trim.html">Trim</a></li>
<li class="toctree-l3"><a class="reference internal" href="turn180.html">Turn180</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../functions.html#text">Text</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../functions.html#audio-functions">Audio Functions</a></li>
</ul>
</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"><a class="reference internal" href="../../apireference.html">VapourSynth C API Reference</a></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="../../functions.html">Function Reference</a></li>
<li class="breadcrumb-item active">Resize</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/functions/video/resize.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="resize">
<h1>Resize<a class="headerlink" href="#resize" title="Permalink to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="resize.Bilinear">
<span class="sig-prename descclassname"><span class="pre">resize.</span></span><span class="sig-name descname"><span class="pre">Bilinear</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vnode</span> <span class="pre">clip</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">int</span> <span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">int</span> <span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">int</span> <span class="pre">format</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">matrix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">transfer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">primaries</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">range</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">chromaloc</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">matrix_in</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">transfer_in</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">primaries_in</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">range_in</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span> <span class="pre">chromaloc_in</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">filter_param_a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">filter_param_b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span> <span class="pre">resample_filter_uv</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">filter_param_a_uv</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">filter_param_b_uv</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span> <span class="pre">dither_type=&quot;none&quot;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span> <span class="pre">cpu_type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">src_left</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">src_top</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">src_width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">src_height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">float</span> <span class="pre">nominal_luminance</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#resize.Bilinear" title="Permalink to this definition"></a></dt>
<dt class="sig sig-object py" id="resize.Bicubic">
<span class="sig-prename descclassname"><span class="pre">resize.</span></span><span class="sig-name descname"><span class="pre">Bicubic</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vnode</span> <span class="pre">clip</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">...</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#resize.Bicubic" title="Permalink to this definition"></a></dt>
<dt class="sig sig-object py" id="resize.Point">
<span class="sig-prename descclassname"><span class="pre">resize.</span></span><span class="sig-name descname"><span class="pre">Point</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vnode</span> <span class="pre">clip</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">...</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#resize.Point" title="Permalink to this definition"></a></dt>
<dt class="sig sig-object py" id="resize.Lanczos">
<span class="sig-prename descclassname"><span class="pre">resize.</span></span><span class="sig-name descname"><span class="pre">Lanczos</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vnode</span> <span class="pre">clip</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">...</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#resize.Lanczos" title="Permalink to this definition"></a></dt>
<dt class="sig sig-object py" id="resize.Spline16">
<span class="sig-prename descclassname"><span class="pre">resize.</span></span><span class="sig-name descname"><span class="pre">Spline16</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vnode</span> <span class="pre">clip</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">...</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#resize.Spline16" title="Permalink to this definition"></a></dt>
<dt class="sig sig-object py" id="resize.Spline36">
<span class="sig-prename descclassname"><span class="pre">resize.</span></span><span class="sig-name descname"><span class="pre">Spline36</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vnode</span> <span class="pre">clip</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">...</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#resize.Spline36" title="Permalink to this definition"></a></dt>
<dt class="sig sig-object py" id="resize.Spline64">
<span class="sig-prename descclassname"><span class="pre">resize.</span></span><span class="sig-name descname"><span class="pre">Spline64</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vnode</span> <span class="pre">clip</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">...</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#resize.Spline64" title="Permalink to this definition"></a></dt>
<dt class="sig sig-object py" id="resize.Bob">
<span class="sig-prename descclassname"><span class="pre">resize.</span></span><span class="sig-name descname"><span class="pre">Bob</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vnode</span> <span class="pre">clip</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span> <span class="pre">filter=&quot;bicubic&quot;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bint</span> <span class="pre">tff</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">...</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#resize.Bob" title="Permalink to this definition"></a></dt>
<dd><p>In VapourSynth the resizers have several functions. In addition to scaling,
they also do colorspace conversions and conversions to and from the compat
formats. Resize converts a clip of known or unknown format to another clip
of known or unknown format, changing only the parameters specified by the
user. The resize filters can handle varying size and format input clips
and turn them into constant format clips.</p>
<p>If you do not know which resizer to choose, then try Bicubic. It usually
makes a good neutral default.</p>
<p><em>Bob</em> can be used as a rudimentary deinterlacer.</p>
<p>Arguments denoted as type <em>enum</em> may be specified by numerical index (see
ITU-T H.265 Annex E.3) or by name. Enums specified by name have their
argument name suffixed with “_s”. For example, a destination matrix of
BT 709 can be specified either with <code class="docutils literal notranslate"><span class="pre">matrix=1</span></code> or with <code class="docutils literal notranslate"><span class="pre">matrix_s=&quot;709&quot;</span></code>.</p>
<p>Note that <em>matrix</em> is not an optional argument when converting to YUV.
Also note that if no matrix is specified in an input YUV frames properties
then <em>matrix_in</em> also needs to be set.</p>
<p>The function will return an error if the subsampling restrictions arent
followed.</p>
<p>If you get an error like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Resize</span> <span class="n">error</span> <span class="mi">3074</span><span class="p">:</span> <span class="n">no</span> <span class="n">path</span> <span class="n">between</span> <span class="n">colorspaces</span> <span class="p">(</span><span class="mi">2</span><span class="o">/</span><span class="mi">2</span><span class="o">/</span><span class="mi">2</span> <span class="o">=&gt;</span> <span class="mi">1</span><span class="o">/</span><span class="mi">1</span><span class="o">/</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span>
<span class="n">May</span> <span class="n">need</span> <span class="n">to</span> <span class="n">specify</span> <span class="n">additional</span> <span class="n">colorspace</span> <span class="n">parameters</span><span class="o">.</span>
</pre></div>
</div>
<p>It usually means the matrix/transfer/primaries are unknown and you have to
specify the input colorspace parameters yourself. Note: 2 means “unspecified”
according to the ITU-T recommendation.</p>
<p>Resizing is performed per-field for interlaced images, as indicated by the
<em>_FieldBased</em> frame property. Source filters may sometimes mark progressive
video as interlaced, which can result in sub-optimal resampling quality
unless <em>_FieldBased</em> is cleared.</p>
<p><em>clip</em>:</p>
<blockquote>
<div><p>Accepts all kinds of input.</p>
</div></blockquote>
<p><em>width</em>, <em>height</em>:</p>
<blockquote>
<div><p>Output image dimensions.</p>
</div></blockquote>
<p><em>filter</em>:</p>
<blockquote>
<div><p>Scaling method for deinterlacing. See <em>resample_filter_uv</em> for accepted values.</p>
</div></blockquote>
<p><em>tff</em>:</p>
<blockquote>
<div><p>Field order for deinterlacing. Used when the <em>_FieldBased</em> property is not set.</p>
</div></blockquote>
<p><em>format</em>:</p>
<blockquote>
<div><p>Output format id.</p>
</div></blockquote>
<p><em>matrix</em>, <em>transfer</em>, <em>primaries</em>:</p>
<blockquote>
<div><p>Output colorspace specification. If not provided, the corresponding attributes from
the input clip will be selected, except for YCoCg and RGB color families, where the
corresponding matrix is set by default.</p>
</div></blockquote>
<p><em>range</em>:</p>
<blockquote>
<div><p>Output pixel range. For integer formats, this allows selection of the legal code
values. Even when set, out of range values (BTB/WTW) may be generated. If the input
format is of a different color family, the default range is studio/limited for YUV
and full-range for RGB.</p>
</div></blockquote>
<p><em>chromaloc</em>:</p>
<blockquote>
<div><p>Output chroma location. For subsampled formats, specifies the chroma location. If
the input format is 4:4:4 or RGB and the output is subsampled, the default location
is left-aligned, as per MPEG. Possible chroma locations (ITU-T H.265 Figure E.1):
<em>left</em>, <em>center</em>, <em>top_left</em>, <em>top</em>, <em>bottom_left</em>, <em>bottom</em></p>
</div></blockquote>
<p><em>matrix_in</em>, <em>transfer_in</em>, <em>primaries_in</em>, <em>range_in</em>, <em>chromaloc_in</em>:</p>
<blockquote>
<div><p>Input colorspace/format specification. If the corresponding frame property is set
to a value other than unspecified, the frame property is used instead of this parameter.
Default values are set for certain color families. See the equivalent output arguments
for more information.</p>
</div></blockquote>
<p><em>filter_param_a</em>, <em>filter_param_b</em>:</p>
<blockquote>
<div><p>Parameters for the scaler used for RGB and Y-channel. For the bicubic filter,
filter_param_a/b represent the “b” and “c” parameters. For the lanczos filter,
filter_param_a represents the number of taps.</p>
</div></blockquote>
<p><em>resample_filter_uv</em>:</p>
<blockquote>
<div><p>Scaling method for UV channels. It defaults to the same as for the Y-channel. The
following values can be used with <em>resample_filter_uv</em>: <em>point</em>, <em>bilinear</em>, <em>bicubic</em>,
<em>spline16</em>, <em>spline36</em>, <em>lanczos</em>.</p>
</div></blockquote>
<p><em>filter_param_a_uv</em>, <em>filter_param_b_uv</em>:</p>
<blockquote>
<div><p>Parameters for the scaler used for UV channels.</p>
</div></blockquote>
<p><em>dither_type</em>:</p>
<blockquote>
<div><p>Dithering method. Dithering is used only for conversions resulting in an integer
format. The following dithering methods are available: <em>none</em>, <em>ordered</em>, <em>random</em>,
<em>error_diffusion</em>.</p>
</div></blockquote>
<p><em>cpu_type</em>:</p>
<blockquote>
<div><p>Only used for testing.</p>
</div></blockquote>
<p><em>src_left</em>, <em>src_top</em>, <em>src_width</em>, <em>src_height</em>:</p>
<blockquote>
<div><p>Used to select the source region of the input to use. Can also be used to shift the image.
Defaults to the whole image.</p>
</div></blockquote>
<p><em>nominal_luminance</em>:</p>
<blockquote>
<div><p>Determines the physical brightness of the value 1.0. The unit is in cd/m^2.</p>
</div></blockquote>
<p>To convert to YV12:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Bicubic</span><span class="p">(</span><span class="n">clip</span><span class="o">=</span><span class="n">clip</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="n">vs</span><span class="o">.</span><span class="n">YUV420P8</span><span class="p">,</span> <span class="n">matrix_s</span><span class="o">=</span><span class="s2">&quot;709&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>To resize and convert YUV with color information frame properties to planar RGB:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Bicubic</span><span class="p">(</span><span class="n">clip</span><span class="o">=</span><span class="n">clip</span><span class="p">,</span> <span class="n">width</span><span class="o">=</span><span class="mi">1920</span><span class="p">,</span> <span class="n">height</span><span class="o">=</span><span class="mi">1080</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="n">vs</span><span class="o">.</span><span class="n">RGB24</span><span class="p">)</span>
</pre></div>
</div>
<p>To resize and convert YUV without color information frame properties to planar RGB:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Bicubic</span><span class="p">(</span><span class="n">clip</span><span class="o">=</span><span class="n">clip</span><span class="p">,</span> <span class="n">width</span><span class="o">=</span><span class="mi">1920</span><span class="p">,</span> <span class="n">height</span><span class="o">=</span><span class="mi">1080</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="n">vs</span><span class="o">.</span><span class="n">RGB24</span><span class="p">,</span> <span class="n">matrix_in_s</span><span class="o">=</span><span class="s2">&quot;709&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>The following tables list values of selected colorspace enumerations and
their abbreviated names. (Numerical value in parentheses.) For all possible values,
see ITU-T H.265.</p>
<blockquote>
<div><p>Matrix coefficients (ITU-T H.265 Table E.5):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rgb</span> <span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="n">Identity</span>
<span class="n">The</span> <span class="n">identity</span> <span class="n">matrix</span><span class="o">.</span>
<span class="n">Typically</span> <span class="n">used</span> <span class="k">for</span> <span class="n">GBR</span> <span class="p">(</span><span class="n">often</span> <span class="n">referred</span> <span class="n">to</span> <span class="k">as</span> <span class="n">RGB</span><span class="p">);</span>
<span class="n">however</span><span class="p">,</span> <span class="n">may</span> <span class="n">also</span> <span class="n">be</span> <span class="n">used</span> <span class="k">for</span> <span class="n">YZX</span> <span class="p">(</span><span class="n">often</span> <span class="n">referred</span> <span class="n">to</span> <span class="k">as</span>
<span class="n">XYZ</span><span class="p">);</span>
<span class="mi">709</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="n">KR</span> <span class="o">=</span> <span class="mf">0.2126</span><span class="p">;</span> <span class="n">KB</span> <span class="o">=</span> <span class="mf">0.0722</span>
<span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">Rec</span><span class="o">.</span> <span class="n">BT</span><span class="mf">.709</span><span class="o">-</span><span class="mi">5</span>
<span class="n">unspec</span> <span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="n">Unspecified</span>
<span class="n">Image</span> <span class="n">characteristics</span> <span class="n">are</span> <span class="n">unknown</span> <span class="ow">or</span> <span class="n">are</span> <span class="n">determined</span> <span class="n">by</span> <span class="n">the</span>
<span class="n">application</span><span class="o">.</span>
<span class="n">fcc</span> <span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="mi">470</span><span class="n">bg</span> <span class="p">(</span><span class="mi">5</span><span class="p">)</span> <span class="n">KR</span> <span class="o">=</span> <span class="mf">0.299</span><span class="p">;</span> <span class="n">KB</span> <span class="o">=</span> <span class="mf">0.114</span>
<span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">Rec</span><span class="o">.</span> <span class="n">BT</span><span class="mf">.470</span><span class="o">-</span><span class="mi">6</span> <span class="n">System</span> <span class="n">B</span><span class="p">,</span> <span class="n">G</span> <span class="p">(</span><span class="n">historical</span><span class="p">)</span>
<span class="p">(</span><span class="n">functionally</span> <span class="n">the</span> <span class="n">same</span> <span class="k">as</span> <span class="n">the</span> <span class="n">value</span> <span class="mi">6</span> <span class="p">(</span><span class="mi">170</span><span class="n">m</span><span class="p">))</span>
<span class="mi">170</span><span class="n">m</span> <span class="p">(</span><span class="mi">6</span><span class="p">)</span> <span class="n">KR</span> <span class="o">=</span> <span class="mf">0.299</span><span class="p">;</span> <span class="n">KB</span> <span class="o">=</span> <span class="mf">0.114</span>
<span class="n">SMPTE</span> <span class="mi">170</span><span class="n">M</span> <span class="p">(</span><span class="mi">2004</span><span class="p">)</span>
<span class="p">(</span><span class="n">functionally</span> <span class="n">the</span> <span class="n">same</span> <span class="k">as</span> <span class="n">the</span> <span class="n">value</span> <span class="mi">5</span> <span class="p">(</span><span class="mi">470</span><span class="n">bg</span><span class="p">))</span>
<span class="mi">240</span><span class="n">m</span> <span class="p">(</span><span class="mi">7</span><span class="p">)</span> <span class="n">SMPTE</span> <span class="mi">240</span><span class="n">M</span>
<span class="n">ycgco</span> <span class="p">(</span><span class="mi">8</span><span class="p">)</span> <span class="n">YCgCo</span>
<span class="mi">2020</span><span class="n">ncl</span> <span class="p">(</span><span class="mi">9</span><span class="p">)</span> <span class="n">KR</span> <span class="o">=</span> <span class="mf">0.2627</span><span class="p">;</span> <span class="n">KB</span> <span class="o">=</span> <span class="mf">0.0593</span>
<span class="n">Rec</span><span class="o">.</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">BT</span><span class="mf">.2020</span> <span class="n">non</span><span class="o">-</span><span class="n">constant</span> <span class="n">luminance</span> <span class="n">system</span>
<span class="mi">2020</span><span class="n">cl</span> <span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="n">KR</span> <span class="o">=</span> <span class="mf">0.2627</span><span class="p">;</span> <span class="n">KB</span> <span class="o">=</span> <span class="mf">0.0593</span>
<span class="n">Rec</span><span class="o">.</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">BT</span><span class="mf">.2020</span> <span class="n">constant</span> <span class="n">luminance</span> <span class="n">system</span>
<span class="n">chromancl</span> <span class="p">(</span><span class="mi">12</span><span class="p">)</span> <span class="n">Chromaticity</span> <span class="n">derived</span> <span class="n">non</span><span class="o">-</span><span class="n">constant</span> <span class="n">luminance</span> <span class="n">system</span>
<span class="n">chromacl</span> <span class="p">(</span><span class="mi">13</span><span class="p">)</span> <span class="n">Chromaticity</span> <span class="n">derived</span> <span class="n">constant</span> <span class="n">luminance</span> <span class="n">system</span>
<span class="n">ictcp</span> <span class="p">(</span><span class="mi">14</span><span class="p">)</span> <span class="n">ICtCp</span>
</pre></div>
</div>
<p>Transfer characteristics (ITU-T H.265 Table E.4):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">709</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="n">V</span> <span class="o">=</span> <span class="n">a</span> <span class="o">*</span> <span class="n">Lc0</span><span class="mf">.45</span> <span class="o">-</span> <span class="p">(</span> <span class="n">a</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="k">for</span> <span class="mi">1</span> <span class="o">&gt;=</span> <span class="n">Lc</span> <span class="o">&gt;=</span> <span class="n">b</span>
<span class="n">V</span> <span class="o">=</span> <span class="mf">4.500</span> <span class="o">*</span> <span class="n">Lc</span> <span class="k">for</span> <span class="n">b</span> <span class="o">&gt;</span> <span class="n">Lc</span> <span class="o">&gt;=</span> <span class="mi">0</span>
<span class="n">Rec</span><span class="o">.</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">BT</span><span class="mf">.709</span><span class="o">-</span><span class="mi">5</span>
<span class="p">(</span><span class="n">functionally</span> <span class="n">the</span> <span class="n">same</span> <span class="k">as</span> <span class="n">the</span> <span class="n">values</span> <span class="mi">6</span> <span class="p">(</span><span class="mi">601</span><span class="p">),</span>
<span class="mi">14</span> <span class="p">(</span><span class="mi">2020_10</span><span class="p">)</span> <span class="ow">and</span> <span class="mi">15</span> <span class="p">(</span><span class="mi">2020_12</span><span class="p">))</span>
<span class="n">unspec</span> <span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="n">Unspecified</span>
<span class="n">Image</span> <span class="n">characteristics</span> <span class="n">are</span> <span class="n">unknown</span> <span class="ow">or</span> <span class="n">are</span> <span class="n">determined</span> <span class="n">by</span> <span class="n">the</span>
<span class="n">application</span><span class="o">.</span>
<span class="mi">470</span><span class="n">m</span> <span class="p">(</span><span class="mi">4</span><span class="p">)</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">Rec</span><span class="o">.</span> <span class="n">BT</span><span class="mf">.470</span><span class="o">-</span><span class="mi">6</span> <span class="n">System</span> <span class="n">M</span>
<span class="mi">470</span><span class="n">bg</span> <span class="p">(</span><span class="mi">5</span><span class="p">)</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">Rec</span><span class="o">.</span> <span class="n">BT</span><span class="mf">.470</span><span class="o">-</span><span class="mi">6</span> <span class="n">System</span> <span class="n">B</span><span class="p">,</span> <span class="n">G</span> <span class="p">(</span><span class="n">historical</span><span class="p">)</span>
<span class="mi">601</span> <span class="p">(</span><span class="mi">6</span><span class="p">)</span> <span class="n">V</span> <span class="o">=</span> <span class="n">a</span> <span class="o">*</span> <span class="n">Lc0</span><span class="mf">.45</span> <span class="o">-</span> <span class="p">(</span> <span class="n">a</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="k">for</span> <span class="mi">1</span> <span class="o">&gt;=</span> <span class="n">Lc</span> <span class="o">&gt;=</span> <span class="n">b</span>
<span class="n">V</span> <span class="o">=</span> <span class="mf">4.500</span> <span class="o">*</span> <span class="n">Lc</span> <span class="k">for</span> <span class="n">b</span> <span class="o">&gt;</span> <span class="n">Lc</span> <span class="o">&gt;=</span> <span class="mi">0</span>
<span class="n">Rec</span><span class="o">.</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">BT</span><span class="mf">.601</span><span class="o">-</span><span class="mi">6</span> <span class="mi">525</span> <span class="ow">or</span> <span class="mi">625</span>
<span class="p">(</span><span class="n">functionally</span> <span class="n">the</span> <span class="n">same</span> <span class="k">as</span> <span class="n">the</span> <span class="n">values</span> <span class="mi">1</span> <span class="p">(</span><span class="mi">709</span><span class="p">),</span>
<span class="mi">14</span> <span class="p">(</span><span class="mi">2020_10</span><span class="p">)</span> <span class="ow">and</span> <span class="mi">15</span> <span class="p">(</span><span class="mi">2020_12</span><span class="p">))</span>
<span class="mi">240</span><span class="n">m</span> <span class="p">(</span><span class="mi">7</span><span class="p">)</span> <span class="n">SMPTE</span> <span class="mi">240</span><span class="n">M</span>
<span class="n">linear</span> <span class="p">(</span><span class="mi">8</span><span class="p">)</span> <span class="n">V</span> <span class="o">=</span> <span class="n">Lc</span> <span class="k">for</span> <span class="nb">all</span> <span class="n">values</span> <span class="n">of</span> <span class="n">Lc</span>
<span class="n">Linear</span> <span class="n">transfer</span> <span class="n">characteristics</span>
<span class="n">log100</span> <span class="p">(</span><span class="mi">9</span><span class="p">)</span> <span class="n">Log</span> <span class="mi">1</span><span class="p">:</span><span class="mi">100</span> <span class="n">contrast</span>
<span class="n">log316</span> <span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="n">Log</span> <span class="mi">1</span><span class="p">:</span><span class="mi">316</span> <span class="n">contrast</span>
<span class="n">xvycc</span> <span class="p">(</span><span class="mi">11</span><span class="p">)</span> <span class="n">IEC</span> <span class="mi">61966</span><span class="o">-</span><span class="mi">2</span><span class="o">-</span><span class="mi">4</span>
<span class="n">srgb</span> <span class="p">(</span><span class="mi">13</span><span class="p">)</span> <span class="n">IEC</span> <span class="mi">61966</span><span class="o">-</span><span class="mi">2</span><span class="o">-</span><span class="mi">1</span>
<span class="mi">2020_10</span> <span class="p">(</span><span class="mi">14</span><span class="p">)</span> <span class="n">V</span> <span class="o">=</span> <span class="n">a</span> <span class="o">*</span> <span class="n">Lc0</span><span class="mf">.45</span> <span class="o">-</span> <span class="p">(</span> <span class="n">a</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="k">for</span> <span class="mi">1</span> <span class="o">&gt;=</span> <span class="n">Lc</span> <span class="o">&gt;=</span> <span class="n">b</span>
<span class="n">V</span> <span class="o">=</span> <span class="mf">4.500</span> <span class="o">*</span> <span class="n">Lc</span> <span class="k">for</span> <span class="n">b</span> <span class="o">&gt;</span> <span class="n">Lc</span> <span class="o">&gt;=</span> <span class="mi">0</span>
<span class="n">Rec</span><span class="o">.</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">BT</span><span class="mf">.2020</span>
<span class="p">(</span><span class="n">functionally</span> <span class="n">the</span> <span class="n">same</span> <span class="k">as</span> <span class="n">the</span> <span class="n">values</span> <span class="mi">1</span> <span class="p">(</span><span class="mi">709</span><span class="p">),</span>
<span class="mi">6</span> <span class="p">(</span><span class="mi">601</span><span class="p">)</span> <span class="ow">and</span> <span class="mi">15</span> <span class="p">(</span><span class="mi">2020_12</span><span class="p">))</span>
<span class="mi">2020_12</span> <span class="p">(</span><span class="mi">15</span><span class="p">)</span> <span class="n">V</span> <span class="o">=</span> <span class="n">a</span> <span class="o">*</span> <span class="n">Lc0</span><span class="mf">.45</span> <span class="o">-</span> <span class="p">(</span> <span class="n">a</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="k">for</span> <span class="mi">1</span> <span class="o">&gt;=</span> <span class="n">Lc</span> <span class="o">&gt;=</span> <span class="n">b</span>
<span class="n">V</span> <span class="o">=</span> <span class="mf">4.500</span> <span class="o">*</span> <span class="n">Lc</span> <span class="k">for</span> <span class="n">b</span> <span class="o">&gt;</span> <span class="n">Lc</span> <span class="o">&gt;=</span> <span class="mi">0</span>
<span class="n">Rec</span><span class="o">.</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">BT</span><span class="mf">.2020</span>
<span class="p">(</span><span class="n">functionally</span> <span class="n">the</span> <span class="n">same</span> <span class="k">as</span> <span class="n">the</span> <span class="n">values</span> <span class="mi">1</span> <span class="p">(</span><span class="mi">709</span><span class="p">),</span>
<span class="mi">6</span> <span class="p">(</span><span class="mi">601</span><span class="p">)</span> <span class="ow">and</span> <span class="mi">14</span> <span class="p">(</span><span class="mi">2020_10</span><span class="p">))</span>
<span class="n">st2084</span> <span class="p">(</span><span class="mi">16</span><span class="p">)</span> <span class="n">SMPTE</span> <span class="n">ST</span> <span class="mi">2084</span>
<span class="n">std</span><span class="o">-</span><span class="n">b67</span> <span class="p">(</span><span class="mi">18</span><span class="p">)</span> <span class="n">ARIB</span> <span class="n">std</span><span class="o">-</span><span class="n">b67</span>
</pre></div>
</div>
<p>Color primaries (ITU-T H.265 Table E.3):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">709</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="n">primary</span> <span class="n">x</span> <span class="n">y</span>
<span class="n">green</span> <span class="mf">0.300</span> <span class="mf">0.600</span>
<span class="n">blue</span> <span class="mf">0.150</span> <span class="mf">0.060</span>
<span class="n">red</span> <span class="mf">0.640</span> <span class="mf">0.330</span>
<span class="n">white</span> <span class="n">D65</span> <span class="mf">0.3127</span> <span class="mf">0.3290</span>
<span class="n">Rec</span><span class="o">.</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">BT</span><span class="mf">.709</span><span class="o">-</span><span class="mi">5</span>
<span class="n">unspec</span> <span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="n">Unspecified</span>
<span class="n">Image</span> <span class="n">characteristics</span> <span class="n">are</span> <span class="n">unknown</span> <span class="ow">or</span> <span class="n">are</span> <span class="n">determined</span> <span class="n">by</span> <span class="n">the</span>
<span class="n">application</span><span class="o">.</span>
<span class="mi">470</span><span class="n">m</span> <span class="p">(</span><span class="mi">4</span><span class="p">)</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">Rec</span><span class="o">.</span> <span class="n">BT</span><span class="mf">.470</span><span class="o">-</span><span class="mi">6</span> <span class="n">System</span> <span class="n">M</span>
<span class="mi">470</span><span class="n">bg</span> <span class="p">(</span><span class="mi">5</span><span class="p">)</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">Rec</span><span class="o">.</span> <span class="n">BT</span><span class="mf">.470</span><span class="o">-</span><span class="mi">6</span> <span class="n">System</span> <span class="n">B</span><span class="p">,</span> <span class="n">G</span> <span class="p">(</span><span class="n">historical</span><span class="p">)</span>
<span class="mi">170</span><span class="n">m</span> <span class="p">(</span><span class="mi">6</span><span class="p">)</span> <span class="n">primary</span> <span class="n">x</span> <span class="n">y</span>
<span class="n">green</span> <span class="mf">0.310</span> <span class="mf">0.595</span>
<span class="n">blue</span> <span class="mf">0.155</span> <span class="mf">0.070</span>
<span class="n">red</span> <span class="mf">0.630</span> <span class="mf">0.340</span>
<span class="n">white</span> <span class="n">D65</span> <span class="mf">0.3127</span> <span class="mf">0.3290</span>
<span class="n">SMPTE</span> <span class="mi">170</span><span class="n">M</span> <span class="p">(</span><span class="mi">2004</span><span class="p">)</span>
<span class="p">(</span><span class="n">functionally</span> <span class="n">the</span> <span class="n">same</span> <span class="k">as</span> <span class="n">the</span> <span class="n">value</span> <span class="mi">7</span> <span class="p">(</span><span class="mi">240</span><span class="n">m</span><span class="p">))</span>
<span class="mi">240</span><span class="n">m</span> <span class="p">(</span><span class="mi">7</span><span class="p">)</span> <span class="n">primary</span> <span class="n">x</span> <span class="n">y</span>
<span class="n">green</span> <span class="mf">0.310</span> <span class="mf">0.595</span>
<span class="n">blue</span> <span class="mf">0.155</span> <span class="mf">0.070</span>
<span class="n">red</span> <span class="mf">0.630</span> <span class="mf">0.340</span>
<span class="n">white</span> <span class="n">D65</span> <span class="mf">0.3127</span> <span class="mf">0.3290</span>
<span class="n">SMPTE</span> <span class="mi">240</span><span class="n">M</span> <span class="p">(</span><span class="mi">1999</span><span class="p">)</span>
<span class="p">(</span><span class="n">functionally</span> <span class="n">the</span> <span class="n">same</span> <span class="k">as</span> <span class="n">the</span> <span class="n">value</span> <span class="mi">6</span> <span class="p">(</span><span class="mi">170</span><span class="n">m</span><span class="p">))</span>
<span class="n">film</span> <span class="p">(</span><span class="mi">8</span><span class="p">)</span>
<span class="mi">2020</span> <span class="p">(</span><span class="mi">9</span><span class="p">)</span> <span class="n">primary</span> <span class="n">x</span> <span class="n">y</span>
<span class="n">green</span> <span class="mf">0.170</span> <span class="mf">0.797</span>
<span class="n">blue</span> <span class="mf">0.131</span> <span class="mf">0.046</span>
<span class="n">red</span> <span class="mf">0.708</span> <span class="mf">0.292</span>
<span class="n">white</span> <span class="n">D65</span> <span class="mf">0.3127</span> <span class="mf">0.3290</span>
<span class="n">Rec</span><span class="o">.</span> <span class="n">ITU</span><span class="o">-</span><span class="n">R</span> <span class="n">BT</span><span class="mf">.2020</span>
<span class="n">st428</span> <span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="n">Commonly</span> <span class="n">known</span> <span class="k">as</span> <span class="n">xyz</span>
<span class="n">xyz</span> <span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="n">Alias</span> <span class="k">for</span> <span class="n">st428</span>
<span class="n">st431</span><span class="o">-</span><span class="mi">2</span> <span class="p">(</span><span class="mi">11</span><span class="p">)</span> <span class="n">DCI</span><span class="o">-</span><span class="n">P3</span> <span class="k">with</span> <span class="n">traditional</span> <span class="n">white</span> <span class="n">point</span>
<span class="n">st432</span><span class="o">-</span><span class="mi">1</span> <span class="p">(</span><span class="mi">12</span><span class="p">)</span> <span class="n">DCI</span><span class="o">-</span><span class="n">P3</span>
<span class="n">jedec</span><span class="o">-</span><span class="n">p22</span> <span class="p">(</span><span class="mi">22</span><span class="p">)</span> <span class="n">E</span><span class="o">.</span><span class="n">B</span><span class="o">.</span><span class="n">U</span><span class="o">.</span> <span class="n">STANDARD</span> <span class="n">FOR</span> <span class="n">CHROMATICITY</span> <span class="n">TOLERANCES</span> <span class="n">FOR</span> <span class="n">STUDIO</span> <span class="n">MONITORS</span> <span class="p">(</span><span class="mi">3213</span><span class="o">-</span><span class="n">E</span><span class="p">)</span>
<span class="n">Also</span> <span class="n">known</span> <span class="k">as</span> <span class="n">JEDEC</span> <span class="n">P22</span>
</pre></div>
</div>
<p>Pixel range (ITU-T H.265 Eq E-4 to E-15):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">limited</span> <span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="n">Studio</span> <span class="p">(</span><span class="n">TV</span><span class="p">)</span> <span class="n">legal</span> <span class="nb">range</span><span class="p">,</span> <span class="mi">16</span><span class="o">-</span><span class="mi">235</span> <span class="ow">in</span> <span class="mi">8</span> <span class="n">bits</span><span class="o">.</span>
<span class="n">Y</span> <span class="o">=</span> <span class="n">Clip1Y</span><span class="p">(</span> <span class="n">Round</span><span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span> <span class="n">BitDepthY</span> <span class="o">-</span> <span class="mi">8</span> <span class="p">)</span> <span class="p">)</span> <span class="o">*</span>
<span class="p">(</span> <span class="mi">219</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;Y + 16 ) ) )</span>
<span class="n">Cb</span> <span class="o">=</span> <span class="n">Clip1C</span><span class="p">(</span> <span class="n">Round</span><span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span> <span class="n">BitDepthC</span> <span class="o">-</span> <span class="mi">8</span> <span class="p">)</span> <span class="p">)</span> <span class="o">*</span>
<span class="p">(</span> <span class="mi">224</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;PB + 128 ) ) )</span>
<span class="n">Cr</span> <span class="o">=</span> <span class="n">Clip1C</span><span class="p">(</span> <span class="n">Round</span><span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span> <span class="n">BitDepthC</span> <span class="o">-</span> <span class="mi">8</span> <span class="p">)</span> <span class="p">)</span> <span class="o">*</span>
<span class="p">(</span> <span class="mi">224</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;PR + 128 ) ) )</span>
<span class="n">R</span> <span class="o">=</span> <span class="n">Clip1Y</span><span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span> <span class="n">BitDepthY</span> <span class="o">-</span> <span class="mi">8</span> <span class="p">)</span> <span class="p">)</span> <span class="o">*</span>
<span class="p">(</span> <span class="mi">219</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;R + 16 ) )</span>
<span class="n">G</span> <span class="o">=</span> <span class="n">Clip1Y</span><span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span> <span class="n">BitDepthY</span> <span class="o">-</span> <span class="mi">8</span> <span class="p">)</span> <span class="p">)</span> <span class="o">*</span>
<span class="p">(</span> <span class="mi">219</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;G + 16 ) )</span>
<span class="n">B</span> <span class="o">=</span> <span class="n">Clip1Y</span><span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span> <span class="n">BitDepthY</span> <span class="o">-</span> <span class="mi">8</span> <span class="p">)</span> <span class="p">)</span> <span class="o">*</span>
<span class="p">(</span> <span class="mi">219</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;B + 16 ) )</span>
<span class="n">full</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="n">Full</span> <span class="p">(</span><span class="n">PC</span><span class="p">)</span> <span class="n">dynamic</span> <span class="nb">range</span><span class="p">,</span> <span class="mi">0</span><span class="o">-</span><span class="mi">255</span> <span class="ow">in</span> <span class="mi">8</span> <span class="n">bits</span><span class="o">.</span>
<span class="n">Y</span> <span class="o">=</span> <span class="n">Clip1Y</span><span class="p">(</span> <span class="n">Round</span><span class="p">(</span> <span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">BitDepthY</span> <span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;Y ) )</span>
<span class="n">Cb</span> <span class="o">=</span> <span class="n">Clip1C</span><span class="p">(</span> <span class="n">Round</span><span class="p">(</span> <span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">BitDepthC</span> <span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;PB +</span>
<span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span> <span class="n">BitDepthC</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="p">)</span> <span class="p">)</span> <span class="p">)</span>
<span class="n">Cr</span> <span class="o">=</span> <span class="n">Clip1C</span><span class="p">(</span> <span class="n">Round</span><span class="p">(</span> <span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">BitDepthC</span> <span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;PR +</span>
<span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="p">(</span> <span class="n">BitDepthC</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="p">)</span> <span class="p">)</span> <span class="p">)</span>
<span class="n">R</span> <span class="o">=</span> <span class="n">Clip1Y</span><span class="p">(</span> <span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">BitDepthY</span> <span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;R )</span>
<span class="n">G</span> <span class="o">=</span> <span class="n">Clip1Y</span><span class="p">(</span> <span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">BitDepthY</span> <span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;G )</span>
<span class="n">B</span> <span class="o">=</span> <span class="n">Clip1Y</span><span class="p">(</span> <span class="p">(</span> <span class="p">(</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">BitDepthY</span> <span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">)</span> <span class="o">*</span> <span class="n">E</span><span class="s1">&#39;B )</span>
</pre></div>
</div>
</div></blockquote>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="removeframeprops.html" class="btn btn-neutral float-left" title="RemoveFrameProps" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="reverse.html" class="btn btn-neutral float-right" title="Reverse" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; 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>