You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ffmpeg-scaler.html 8.4KB

пре 1 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta charset="utf-8">
  6. <title>
  7. FFmpeg Scaler Documentation
  8. </title>
  9. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  10. <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  11. <link rel="stylesheet" type="text/css" href="style.min.css">
  12. </head>
  13. <body>
  14. <div class="container">
  15. <h1>
  16. FFmpeg Scaler Documentation
  17. </h1>
  18. <div align="center">
  19. </div>
  20. <a name="SEC_Top"></a>
  21. <div class="Contents_element" id="SEC_Contents">
  22. <h2 class="contents-heading">Table of Contents</h2>
  23. <div class="contents">
  24. <ul class="no-bullet">
  25. <li><a id="toc-Description" href="#Description">1 Description</a></li>
  26. <li><a id="toc-Scaler-Options" href="#Scaler-Options">2 Scaler Options</a></li>
  27. <li><a id="toc-See-Also" href="#See-Also">3 See Also</a></li>
  28. <li><a id="toc-Authors" href="#Authors">4 Authors</a></li>
  29. </ul>
  30. </div>
  31. </div>
  32. <a name="Description"></a>
  33. <h2 class="chapter">1 Description<span class="pull-right"><a class="anchor hidden-xs" href="#Description" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Description" aria-hidden="true">TOC</a></span></h2>
  34. <p>The FFmpeg rescaler provides a high-level interface to the libswscale
  35. library image conversion utilities. In particular it allows one to perform
  36. image rescaling and pixel format conversion.
  37. </p>
  38. <span id="scaler_005foptions"></span><a name="Scaler-Options"></a>
  39. <h2 class="chapter">2 Scaler Options<span class="pull-right"><a class="anchor hidden-xs" href="#Scaler-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Scaler-Options" aria-hidden="true">TOC</a></span></h2>
  40. <p>The video scaler supports the following named options.
  41. </p>
  42. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  43. FFmpeg tools, with a few API-only exceptions noted below.
  44. For programmatic use, they can be set explicitly in the
  45. <code>SwsContext</code> options or through the <samp>libavutil/opt.h</samp> API.
  46. </p>
  47. <dl compact="compact">
  48. <dd>
  49. <span id="sws_005fflags"></span></dd>
  50. <dt><span><samp>sws_flags</samp></span></dt>
  51. <dd><p>Set the scaler flags. This is also used to set the scaling
  52. algorithm. Only a single algorithm should be selected. Default
  53. value is &lsquo;<samp>bicubic</samp>&rsquo;.
  54. </p>
  55. <p>It accepts the following values:
  56. </p><dl compact="compact">
  57. <dt><span>&lsquo;<samp>fast_bilinear</samp>&rsquo;</span></dt>
  58. <dd><p>Select fast bilinear scaling algorithm.
  59. </p>
  60. </dd>
  61. <dt><span>&lsquo;<samp>bilinear</samp>&rsquo;</span></dt>
  62. <dd><p>Select bilinear scaling algorithm.
  63. </p>
  64. </dd>
  65. <dt><span>&lsquo;<samp>bicubic</samp>&rsquo;</span></dt>
  66. <dd><p>Select bicubic scaling algorithm.
  67. </p>
  68. </dd>
  69. <dt><span>&lsquo;<samp>experimental</samp>&rsquo;</span></dt>
  70. <dd><p>Select experimental scaling algorithm.
  71. </p>
  72. </dd>
  73. <dt><span>&lsquo;<samp>neighbor</samp>&rsquo;</span></dt>
  74. <dd><p>Select nearest neighbor rescaling algorithm.
  75. </p>
  76. </dd>
  77. <dt><span>&lsquo;<samp>area</samp>&rsquo;</span></dt>
  78. <dd><p>Select averaging area rescaling algorithm.
  79. </p>
  80. </dd>
  81. <dt><span>&lsquo;<samp>bicublin</samp>&rsquo;</span></dt>
  82. <dd><p>Select bicubic scaling algorithm for the luma component, bilinear for
  83. chroma components.
  84. </p>
  85. </dd>
  86. <dt><span>&lsquo;<samp>gauss</samp>&rsquo;</span></dt>
  87. <dd><p>Select Gaussian rescaling algorithm.
  88. </p>
  89. </dd>
  90. <dt><span>&lsquo;<samp>sinc</samp>&rsquo;</span></dt>
  91. <dd><p>Select sinc rescaling algorithm.
  92. </p>
  93. </dd>
  94. <dt><span>&lsquo;<samp>lanczos</samp>&rsquo;</span></dt>
  95. <dd><p>Select Lanczos rescaling algorithm. The default width (alpha) is 3 and can be
  96. changed by setting <code>param0</code>.
  97. </p>
  98. </dd>
  99. <dt><span>&lsquo;<samp>spline</samp>&rsquo;</span></dt>
  100. <dd><p>Select natural bicubic spline rescaling algorithm.
  101. </p>
  102. </dd>
  103. <dt><span>&lsquo;<samp>print_info</samp>&rsquo;</span></dt>
  104. <dd><p>Enable printing/debug logging.
  105. </p>
  106. </dd>
  107. <dt><span>&lsquo;<samp>accurate_rnd</samp>&rsquo;</span></dt>
  108. <dd><p>Enable accurate rounding.
  109. </p>
  110. </dd>
  111. <dt><span>&lsquo;<samp>full_chroma_int</samp>&rsquo;</span></dt>
  112. <dd><p>Enable full chroma interpolation.
  113. </p>
  114. </dd>
  115. <dt><span>&lsquo;<samp>full_chroma_inp</samp>&rsquo;</span></dt>
  116. <dd><p>Select full chroma input.
  117. </p>
  118. </dd>
  119. <dt><span>&lsquo;<samp>bitexact</samp>&rsquo;</span></dt>
  120. <dd><p>Enable bitexact output.
  121. </p></dd>
  122. </dl>
  123. </dd>
  124. <dt><span><samp>srcw <var>(API only)</var></samp></span></dt>
  125. <dd><p>Set source width.
  126. </p>
  127. </dd>
  128. <dt><span><samp>srch <var>(API only)</var></samp></span></dt>
  129. <dd><p>Set source height.
  130. </p>
  131. </dd>
  132. <dt><span><samp>dstw <var>(API only)</var></samp></span></dt>
  133. <dd><p>Set destination width.
  134. </p>
  135. </dd>
  136. <dt><span><samp>dsth <var>(API only)</var></samp></span></dt>
  137. <dd><p>Set destination height.
  138. </p>
  139. </dd>
  140. <dt><span><samp>src_format <var>(API only)</var></samp></span></dt>
  141. <dd><p>Set source pixel format (must be expressed as an integer).
  142. </p>
  143. </dd>
  144. <dt><span><samp>dst_format <var>(API only)</var></samp></span></dt>
  145. <dd><p>Set destination pixel format (must be expressed as an integer).
  146. </p>
  147. </dd>
  148. <dt><span><samp>src_range <var>(boolean)</var></samp></span></dt>
  149. <dd><p>If value is set to <code>1</code>, indicates source is full range. Default value is
  150. <code>0</code>, which indicates source is limited range.
  151. </p>
  152. </dd>
  153. <dt><span><samp>dst_range <var>(boolean)</var></samp></span></dt>
  154. <dd><p>If value is set to <code>1</code>, enable full range for destination. Default value
  155. is <code>0</code>, which enables limited range.
  156. </p>
  157. <span id="sws_005fparams"></span></dd>
  158. <dt><span><samp>param0, param1</samp></span></dt>
  159. <dd><p>Set scaling algorithm parameters. The specified values are specific of
  160. some scaling algorithms and ignored by others. The specified values
  161. are floating point number values.
  162. </p>
  163. </dd>
  164. <dt><span><samp>sws_dither</samp></span></dt>
  165. <dd><p>Set the dithering algorithm. Accepts one of the following
  166. values. Default value is &lsquo;<samp>auto</samp>&rsquo;.
  167. </p>
  168. <dl compact="compact">
  169. <dt><span>&lsquo;<samp>auto</samp>&rsquo;</span></dt>
  170. <dd><p>automatic choice
  171. </p>
  172. </dd>
  173. <dt><span>&lsquo;<samp>none</samp>&rsquo;</span></dt>
  174. <dd><p>no dithering
  175. </p>
  176. </dd>
  177. <dt><span>&lsquo;<samp>bayer</samp>&rsquo;</span></dt>
  178. <dd><p>bayer dither
  179. </p>
  180. </dd>
  181. <dt><span>&lsquo;<samp>ed</samp>&rsquo;</span></dt>
  182. <dd><p>error diffusion dither
  183. </p>
  184. </dd>
  185. <dt><span>&lsquo;<samp>a_dither</samp>&rsquo;</span></dt>
  186. <dd><p>arithmetic dither, based using addition
  187. </p>
  188. </dd>
  189. <dt><span>&lsquo;<samp>x_dither</samp>&rsquo;</span></dt>
  190. <dd><p>arithmetic dither, based using xor (more random/less apparent patterning that
  191. a_dither).
  192. </p>
  193. </dd>
  194. </dl>
  195. </dd>
  196. <dt><span><samp>alphablend</samp></span></dt>
  197. <dd><p>Set the alpha blending to use when the input has alpha but the output does not.
  198. Default value is &lsquo;<samp>none</samp>&rsquo;.
  199. </p>
  200. <dl compact="compact">
  201. <dt><span>&lsquo;<samp>uniform_color</samp>&rsquo;</span></dt>
  202. <dd><p>Blend onto a uniform background color
  203. </p>
  204. </dd>
  205. <dt><span>&lsquo;<samp>checkerboard</samp>&rsquo;</span></dt>
  206. <dd><p>Blend onto a checkerboard
  207. </p>
  208. </dd>
  209. <dt><span>&lsquo;<samp>none</samp>&rsquo;</span></dt>
  210. <dd><p>No blending
  211. </p>
  212. </dd>
  213. </dl>
  214. </dd>
  215. </dl>
  216. <a name="See-Also"></a>
  217. <h2 class="chapter">3 See Also<span class="pull-right"><a class="anchor hidden-xs" href="#See-Also" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-See-Also" aria-hidden="true">TOC</a></span></h2>
  218. <p><a href="ffmpeg.html">ffmpeg</a>, <a href="ffplay.html">ffplay</a>, <a href="ffprobe.html">ffprobe</a>,
  219. <a href="libswscale.html">libswscale</a>
  220. </p>
  221. <a name="Authors"></a>
  222. <h2 class="chapter">4 Authors<span class="pull-right"><a class="anchor hidden-xs" href="#Authors" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Authors" aria-hidden="true">TOC</a></span></h2>
  223. <p>The FFmpeg developers.
  224. </p>
  225. <p>For details about the authorship, see the Git history of the project
  226. (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command
  227. <code>git log</code> in the FFmpeg source directory, or browsing the
  228. online repository at <a href="https://git.ffmpeg.org/ffmpeg">https://git.ffmpeg.org/ffmpeg</a>.
  229. </p>
  230. <p>Maintainers for the specific components are listed in the file
  231. <samp>MAINTAINERS</samp> in the source code tree.
  232. </p>
  233. <p style="font-size: small;">
  234. This document was generated using <a href="https://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
  235. </p>
  236. </div>
  237. </body>
  238. </html>