123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Created by , GNU Texinfo 7.1 -->
- <head>
- <meta charset="utf-8">
- <title>
- FFmpeg Scaler Documentation
- </title>
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
- <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
- <link rel="stylesheet" type="text/css" href="style.min.css">
- </head>
- <body>
- <div class="container">
- <h1>
- FFmpeg Scaler Documentation
- </h1>
- <div class="top-level-extent" id="SEC_Top">
- <div class="element-contents" id="SEC_Contents">
- <h2 class="contents-heading">Table of Contents</h2>
- <div class="contents">
- <ul class="toc-numbered-mark">
- <li><a id="toc-Description" href="#Description">1 Description</a></li>
- <li><a id="toc-Scaler-Options" href="#Scaler-Options">2 Scaler Options</a></li>
- <li><a id="toc-See-Also" href="#See-Also">3 See Also</a></li>
- <li><a id="toc-Authors" href="#Authors">4 Authors</a></li>
- </ul>
- </div>
- </div>
- <ul class="mini-toc">
- <li><a href="#Description" accesskey="1">Description</a></li>
- <li><a href="#Scaler-Options" accesskey="2">Scaler Options</a></li>
- <li><a href="#See-Also" accesskey="3">See Also</a></li>
- <li><a href="#Authors" accesskey="4">Authors</a></li>
- </ul>
- <div class="chapter-level-extent" id="Description">
- <h2 class="chapter"><span>1 Description<a class="copiable-link" href="#Description"> ¶</a></span></h2>
- <p>The FFmpeg rescaler provides a high-level interface to the libswscale
- library image conversion utilities. In particular it allows one to perform
- image rescaling and pixel format conversion.
- </p>
- <a class="anchor" id="scaler_005foptions"></a></div>
- <div class="chapter-level-extent" id="Scaler-Options">
- <h2 class="chapter"><span>2 Scaler Options<a class="copiable-link" href="#Scaler-Options"> ¶</a></span></h2>
- <p>The video scaler supports the following named options.
- </p>
- <p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the
- FFmpeg tools, with a few API-only exceptions noted below.
- For programmatic use, they can be set explicitly in the
- <code class="code">SwsContext</code> options or through the <samp class="file">libavutil/opt.h</samp> API.
- </p>
- <dl class="table">
- <dd>
- <a class="anchor" id="sws_005fflags"></a></dd>
- <dt><samp class="option">sws_flags</samp></dt>
- <dd><p>Set the scaler flags. This is also used to set the scaling
- algorithm. Only a single algorithm should be selected. Default
- value is ‘<samp class="samp">bicubic</samp>’.
- </p>
- <p>It accepts the following values:
- </p><dl class="table">
- <dt>‘<samp class="samp">fast_bilinear</samp>’</dt>
- <dd><p>Select fast bilinear scaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">bilinear</samp>’</dt>
- <dd><p>Select bilinear scaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">bicubic</samp>’</dt>
- <dd><p>Select bicubic scaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">experimental</samp>’</dt>
- <dd><p>Select experimental scaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">neighbor</samp>’</dt>
- <dd><p>Select nearest neighbor rescaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">area</samp>’</dt>
- <dd><p>Select averaging area rescaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">bicublin</samp>’</dt>
- <dd><p>Select bicubic scaling algorithm for the luma component, bilinear for
- chroma components.
- </p>
- </dd>
- <dt>‘<samp class="samp">gauss</samp>’</dt>
- <dd><p>Select Gaussian rescaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">sinc</samp>’</dt>
- <dd><p>Select sinc rescaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">lanczos</samp>’</dt>
- <dd><p>Select Lanczos rescaling algorithm. The default width (alpha) is 3 and can be
- changed by setting <code class="code">param0</code>.
- </p>
- </dd>
- <dt>‘<samp class="samp">spline</samp>’</dt>
- <dd><p>Select natural bicubic spline rescaling algorithm.
- </p>
- </dd>
- <dt>‘<samp class="samp">print_info</samp>’</dt>
- <dd><p>Enable printing/debug logging.
- </p>
- </dd>
- <dt>‘<samp class="samp">accurate_rnd</samp>’</dt>
- <dd><p>Enable accurate rounding.
- </p>
- </dd>
- <dt>‘<samp class="samp">full_chroma_int</samp>’</dt>
- <dd><p>Enable full chroma interpolation.
- </p>
- </dd>
- <dt>‘<samp class="samp">full_chroma_inp</samp>’</dt>
- <dd><p>Select full chroma input.
- </p>
- </dd>
- <dt>‘<samp class="samp">bitexact</samp>’</dt>
- <dd><p>Enable bitexact output.
- </p></dd>
- </dl>
- </dd>
- <dt><samp class="option">srcw <var class="var">(API only)</var></samp></dt>
- <dd><p>Set source width.
- </p>
- </dd>
- <dt><samp class="option">srch <var class="var">(API only)</var></samp></dt>
- <dd><p>Set source height.
- </p>
- </dd>
- <dt><samp class="option">dstw <var class="var">(API only)</var></samp></dt>
- <dd><p>Set destination width.
- </p>
- </dd>
- <dt><samp class="option">dsth <var class="var">(API only)</var></samp></dt>
- <dd><p>Set destination height.
- </p>
- </dd>
- <dt><samp class="option">src_format <var class="var">(API only)</var></samp></dt>
- <dd><p>Set source pixel format (must be expressed as an integer).
- </p>
- </dd>
- <dt><samp class="option">dst_format <var class="var">(API only)</var></samp></dt>
- <dd><p>Set destination pixel format (must be expressed as an integer).
- </p>
- </dd>
- <dt><samp class="option">src_range <var class="var">(boolean)</var></samp></dt>
- <dd><p>If value is set to <code class="code">1</code>, indicates source is full range. Default value is
- <code class="code">0</code>, which indicates source is limited range.
- </p>
- </dd>
- <dt><samp class="option">dst_range <var class="var">(boolean)</var></samp></dt>
- <dd><p>If value is set to <code class="code">1</code>, enable full range for destination. Default value
- is <code class="code">0</code>, which enables limited range.
- </p>
- <a class="anchor" id="sws_005fparams"></a></dd>
- <dt><samp class="option">param0, param1</samp></dt>
- <dd><p>Set scaling algorithm parameters. The specified values are specific of
- some scaling algorithms and ignored by others. The specified values
- are floating point number values.
- </p>
- </dd>
- <dt><samp class="option">sws_dither</samp></dt>
- <dd><p>Set the dithering algorithm. Accepts one of the following
- values. Default value is ‘<samp class="samp">auto</samp>’.
- </p>
- <dl class="table">
- <dt>‘<samp class="samp">auto</samp>’</dt>
- <dd><p>automatic choice
- </p>
- </dd>
- <dt>‘<samp class="samp">none</samp>’</dt>
- <dd><p>no dithering
- </p>
- </dd>
- <dt>‘<samp class="samp">bayer</samp>’</dt>
- <dd><p>bayer dither
- </p>
- </dd>
- <dt>‘<samp class="samp">ed</samp>’</dt>
- <dd><p>error diffusion dither
- </p>
- </dd>
- <dt>‘<samp class="samp">a_dither</samp>’</dt>
- <dd><p>arithmetic dither, based using addition
- </p>
- </dd>
- <dt>‘<samp class="samp">x_dither</samp>’</dt>
- <dd><p>arithmetic dither, based using xor (more random/less apparent patterning that
- a_dither).
- </p>
- </dd>
- </dl>
- </dd>
- <dt><samp class="option">alphablend</samp></dt>
- <dd><p>Set the alpha blending to use when the input has alpha but the output does not.
- Default value is ‘<samp class="samp">none</samp>’.
- </p>
- <dl class="table">
- <dt>‘<samp class="samp">uniform_color</samp>’</dt>
- <dd><p>Blend onto a uniform background color
- </p>
- </dd>
- <dt>‘<samp class="samp">checkerboard</samp>’</dt>
- <dd><p>Blend onto a checkerboard
- </p>
- </dd>
- <dt>‘<samp class="samp">none</samp>’</dt>
- <dd><p>No blending
- </p>
- </dd>
- </dl>
- </dd>
- </dl>
- </div>
- <div class="chapter-level-extent" id="See-Also">
- <h2 class="chapter"><span>3 See Also<a class="copiable-link" href="#See-Also"> ¶</a></span></h2>
- <p><a class="url" href="ffmpeg.html">ffmpeg</a>, <a class="url" href="ffplay.html">ffplay</a>, <a class="url" href="ffprobe.html">ffprobe</a>,
- <a class="url" href="libswscale.html">libswscale</a>
- </p>
- </div>
- <div class="chapter-level-extent" id="Authors">
- <h2 class="chapter"><span>4 Authors<a class="copiable-link" href="#Authors"> ¶</a></span></h2>
- <p>The FFmpeg developers.
- </p>
- <p>For details about the authorship, see the Git history of the project
- (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command
- <code class="command">git log</code> in the FFmpeg source directory, or browsing the
- online repository at <a class="url" href="https://git.ffmpeg.org/ffmpeg">https://git.ffmpeg.org/ffmpeg</a>.
- </p>
- <p>Maintainers for the specific components are listed in the file
- <samp class="file">MAINTAINERS</samp> in the source code tree.
- </p>
- </div>
- </div>
- <p style="font-size: small;">
- This document was generated using <a class="uref" href="https://www.gnu.org/software/texinfo/"><em class="emph">makeinfo</em></a>.
- </p>
- </div>
- </body>
- </html>
|