1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>GstVideoScaler: GStreamer Base Plugins 1.0 Library Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual"> 8<link rel="up" href="gstreamer-video.html" title="Video Library"> 9<link rel="prev" href="gst-plugins-base-libs-GstVideoResampler.html" title="GstVideoResampler"> 10<link rel="next" href="GstVideoSink.html" title="GstVideoSink"> 11<meta name="generator" content="GTK-Doc V1.28 (XML mode)"> 12<link rel="stylesheet" href="style.css" type="text/css"> 13</head> 14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> 16<td width="100%" align="left" class="shortcuts"> 17<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 18 <a href="#gst-plugins-base-libs-GstVideoScaler.description" class="shortcut">Description</a></span> 19</td> 20<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 21<td><a accesskey="u" href="gstreamer-video.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 22<td><a accesskey="p" href="gst-plugins-base-libs-GstVideoResampler.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 23<td><a accesskey="n" href="GstVideoSink.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 24</tr></table> 25<div class="refentry"> 26<a name="gst-plugins-base-libs-GstVideoScaler"></a><div class="titlepage"></div> 27<div class="refnamediv"><table width="100%"><tr> 28<td valign="top"> 29<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-GstVideoScaler.top_of_page"></a>GstVideoScaler</span></h2> 30<p>GstVideoScaler — Utility object for rescaling video frames</p> 31</td> 32<td class="gallery_image" valign="top" align="right"></td> 33</tr></table></div> 34<div class="refsect1"> 35<a name="gst-plugins-base-libs-GstVideoScaler.functions"></a><h2>Functions</h2> 36<div class="informaltable"><table class="informaltable" width="100%" border="0"> 37<colgroup> 38<col width="150px" class="functions_return"> 39<col class="functions_name"> 40</colgroup> 41<tbody> 42<tr> 43<td class="function_type"> 44<span class="returnvalue">void</span> 45</td> 46<td class="function_name"> 47<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#gst-video-scaler-2d" title="gst_video_scaler_2d ()">gst_video_scaler_2d</a> <span class="c_punctuation">()</span> 48</td> 49</tr> 50<tr> 51<td class="function_type"> 52<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="returnvalue">GstVideoScaler</span></a> * 53</td> 54<td class="function_name"> 55<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#gst-video-scaler-combine-packed-YUV" title="gst_video_scaler_combine_packed_YUV ()">gst_video_scaler_combine_packed_YUV</a> <span class="c_punctuation">()</span> 56</td> 57</tr> 58<tr> 59<td class="function_type"> 60<span class="returnvalue">void</span> 61</td> 62<td class="function_name"> 63<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#gst-video-scaler-free" title="gst_video_scaler_free ()">gst_video_scaler_free</a> <span class="c_punctuation">()</span> 64</td> 65</tr> 66<tr> 67<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> * 68</td> 69<td class="function_name"> 70<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#gst-video-scaler-get-coeff" title="gst_video_scaler_get_coeff ()">gst_video_scaler_get_coeff</a> <span class="c_punctuation">()</span> 71</td> 72</tr> 73<tr> 74<td class="function_type"> 75<span class="returnvalue">void</span> 76</td> 77<td class="function_name"> 78<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#gst-video-scaler-horizontal" title="gst_video_scaler_horizontal ()">gst_video_scaler_horizontal</a> <span class="c_punctuation">()</span> 79</td> 80</tr> 81<tr> 82<td class="function_type"> 83<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="returnvalue">GstVideoScaler</span></a> * 84</td> 85<td class="function_name"> 86<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#gst-video-scaler-new" title="gst_video_scaler_new ()">gst_video_scaler_new</a> <span class="c_punctuation">()</span> 87</td> 88</tr> 89<tr> 90<td class="function_type"> 91<span class="returnvalue">void</span> 92</td> 93<td class="function_name"> 94<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#gst-video-scaler-vertical" title="gst_video_scaler_vertical ()">gst_video_scaler_vertical</a> <span class="c_punctuation">()</span> 95</td> 96</tr> 97<tr> 98<td class="function_type"> 99<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> 100</td> 101<td class="function_name"> 102<a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#gst-video-scaler-get-max-taps" title="gst_video_scaler_get_max_taps ()">gst_video_scaler_get_max_taps</a> <span class="c_punctuation">()</span> 103</td> 104</tr> 105</tbody> 106</table></div> 107</div> 108<div class="refsect1"> 109<a name="gst-plugins-base-libs-GstVideoScaler.other"></a><h2>Types and Values</h2> 110<div class="informaltable"><table class="informaltable" width="100%" border="0"> 111<colgroup> 112<col width="150px" class="name"> 113<col class="description"> 114</colgroup> 115<tbody> 116<tr> 117<td class="datatype_keyword"> </td> 118<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler">GstVideoScaler</a></td> 119</tr> 120<tr> 121<td class="datatype_keyword">enum</td> 122<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScalerFlags" title="enum GstVideoScalerFlags">GstVideoScalerFlags</a></td> 123</tr> 124<tr> 125<td class="define_keyword">#define</td> 126<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GST-VIDEO-SCALER-OPT-DITHER-METHOD:CAPS" title="GST_VIDEO_SCALER_OPT_DITHER_METHOD">GST_VIDEO_SCALER_OPT_DITHER_METHOD</a></td> 127</tr> 128</tbody> 129</table></div> 130</div> 131<div class="refsect1"> 132<a name="gst-plugins-base-libs-GstVideoScaler.includes"></a><h2>Includes</h2> 133<pre class="synopsis">#include <gst/video/video.h> 134</pre> 135</div> 136<div class="refsect1"> 137<a name="gst-plugins-base-libs-GstVideoScaler.description"></a><h2>Description</h2> 138<p><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> is a utility object for rescaling and resampling 139video frames using various interpolation / sampling methods.</p> 140</div> 141<div class="refsect1"> 142<a name="gst-plugins-base-libs-GstVideoScaler.functions_details"></a><h2>Functions</h2> 143<div class="refsect2"> 144<a name="gst-video-scaler-2d"></a><h3>gst_video_scaler_2d ()</h3> 145<pre class="programlisting"><span class="returnvalue">void</span> 146gst_video_scaler_2d (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *hscale</code></em>, 147 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *vscale</code></em>, 148 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> format</code></em>, 149 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> src</code></em>, 150 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> src_stride</code></em>, 151 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> dest</code></em>, 152 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dest_stride</code></em>, 153 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> x</code></em>, 154 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> y</code></em>, 155 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>, 156 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);</pre> 157<p>Scale a rectangle of pixels in <em class="parameter"><code>src</code></em> 158 with <em class="parameter"><code>src_stride</code></em> 159 to <em class="parameter"><code>dest</code></em> 160 with 161<em class="parameter"><code>dest_stride</code></em> 162 using the horizontal scaler <em class="parameter"><code>hscaler</code></em> 163 and the vertical 164scaler <em class="parameter"><code>vscale</code></em> 165.</p> 166<p>One or both of <em class="parameter"><code>hscale</code></em> 167 and <em class="parameter"><code>vscale</code></em> 168 can be NULL to only perform scaling in 169one dimension or do a copy without scaling.</p> 170<p><em class="parameter"><code>x</code></em> 171 and <em class="parameter"><code>y</code></em> 172 are the coordinates in the destination image to process.</p> 173<div class="refsect3"> 174<a name="gst-video-scaler-2d.parameters"></a><h4>Parameters</h4> 175<div class="informaltable"><table class="informaltable" width="100%" border="0"> 176<colgroup> 177<col width="150px" class="parameters_name"> 178<col class="parameters_description"> 179<col width="200px" class="parameters_annotations"> 180</colgroup> 181<tbody> 182<tr> 183<td class="parameter_name"><p>hscale</p></td> 184<td class="parameter_description"><p>a horzontal <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a></p></td> 185<td class="parameter_annotations"> </td> 186</tr> 187<tr> 188<td class="parameter_name"><p>vscale</p></td> 189<td class="parameter_description"><p>a vertical <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a></p></td> 190<td class="parameter_annotations"> </td> 191</tr> 192<tr> 193<td class="parameter_name"><p>format</p></td> 194<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> for <em class="parameter"><code>srcs</code></em> 195and <em class="parameter"><code>dest</code></em> 196</p></td> 197<td class="parameter_annotations"> </td> 198</tr> 199<tr> 200<td class="parameter_name"><p>src</p></td> 201<td class="parameter_description"><p>source pixels</p></td> 202<td class="parameter_annotations"> </td> 203</tr> 204<tr> 205<td class="parameter_name"><p>src_stride</p></td> 206<td class="parameter_description"><p>source pixels stride</p></td> 207<td class="parameter_annotations"> </td> 208</tr> 209<tr> 210<td class="parameter_name"><p>dest</p></td> 211<td class="parameter_description"><p>destination pixels</p></td> 212<td class="parameter_annotations"> </td> 213</tr> 214<tr> 215<td class="parameter_name"><p>dest_stride</p></td> 216<td class="parameter_description"><p>destination pixels stride</p></td> 217<td class="parameter_annotations"> </td> 218</tr> 219<tr> 220<td class="parameter_name"><p>x</p></td> 221<td class="parameter_description"><p>the horizontal destination offset</p></td> 222<td class="parameter_annotations"> </td> 223</tr> 224<tr> 225<td class="parameter_name"><p>y</p></td> 226<td class="parameter_description"><p>the vertical destination offset</p></td> 227<td class="parameter_annotations"> </td> 228</tr> 229<tr> 230<td class="parameter_name"><p>width</p></td> 231<td class="parameter_description"><p>the number of output pixels to scale</p></td> 232<td class="parameter_annotations"> </td> 233</tr> 234<tr> 235<td class="parameter_name"><p>height</p></td> 236<td class="parameter_description"><p>the number of output lines to scale</p></td> 237<td class="parameter_annotations"> </td> 238</tr> 239</tbody> 240</table></div> 241</div> 242</div> 243<hr> 244<div class="refsect2"> 245<a name="gst-video-scaler-combine-packed-YUV"></a><h3>gst_video_scaler_combine_packed_YUV ()</h3> 246<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="returnvalue">GstVideoScaler</span></a> * 247gst_video_scaler_combine_packed_YUV (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *y_scale</code></em>, 248 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *uv_scale</code></em>, 249 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> in_format</code></em>, 250 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> out_format</code></em>);</pre> 251<p>Combine a scaler for Y and UV into one scaler for the packed <em class="parameter"><code>format</code></em> 252.</p> 253<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> 254<div class="refsect3"> 255<a name="gst-video-scaler-combine-packed-YUV.parameters"></a><h4>Parameters</h4> 256<div class="informaltable"><table class="informaltable" width="100%" border="0"> 257<colgroup> 258<col width="150px" class="parameters_name"> 259<col class="parameters_description"> 260<col width="200px" class="parameters_annotations"> 261</colgroup> 262<tbody> 263<tr> 264<td class="parameter_name"><p>y_scale</p></td> 265<td class="parameter_description"><p>a scaler for the Y component</p></td> 266<td class="parameter_annotations"> </td> 267</tr> 268<tr> 269<td class="parameter_name"><p>uv_scale</p></td> 270<td class="parameter_description"><p>a scaler for the U and V components</p></td> 271<td class="parameter_annotations"> </td> 272</tr> 273<tr> 274<td class="parameter_name"><p>in_format</p></td> 275<td class="parameter_description"><p>the input video format</p></td> 276<td class="parameter_annotations"> </td> 277</tr> 278<tr> 279<td class="parameter_name"><p>out_format</p></td> 280<td class="parameter_description"><p>the output video format</p></td> 281<td class="parameter_annotations"> </td> 282</tr> 283</tbody> 284</table></div> 285</div> 286<div class="refsect3"> 287<a name="gst-video-scaler-combine-packed-YUV.returns"></a><h4>Returns</h4> 288<p> a new horizontal videoscaler for <em class="parameter"><code>format</code></em> 289.</p> 290</div> 291<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p> 292</div> 293<hr> 294<div class="refsect2"> 295<a name="gst-video-scaler-free"></a><h3>gst_video_scaler_free ()</h3> 296<pre class="programlisting"><span class="returnvalue">void</span> 297gst_video_scaler_free (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *scale</code></em>);</pre> 298<p>Free a previously allocated <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> <em class="parameter"><code>scale</code></em> 299.</p> 300<div class="refsect3"> 301<a name="gst-video-scaler-free.parameters"></a><h4>Parameters</h4> 302<div class="informaltable"><table class="informaltable" width="100%" border="0"> 303<colgroup> 304<col width="150px" class="parameters_name"> 305<col class="parameters_description"> 306<col width="200px" class="parameters_annotations"> 307</colgroup> 308<tbody><tr> 309<td class="parameter_name"><p>scale</p></td> 310<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a></p></td> 311<td class="parameter_annotations"> </td> 312</tr></tbody> 313</table></div> 314</div> 315</div> 316<hr> 317<div class="refsect2"> 318<a name="gst-video-scaler-get-coeff"></a><h3>gst_video_scaler_get_coeff ()</h3> 319<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> * 320gst_video_scaler_get_coeff (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *scale</code></em>, 321 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> out_offset</code></em>, 322 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *in_offset</code></em>, 323 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_taps</code></em>);</pre> 324<p>For a given pixel at <em class="parameter"><code>out_offset</code></em> 325, get the first required input pixel at 326<em class="parameter"><code>in_offset</code></em> 327 and the <em class="parameter"><code>n_taps</code></em> 328 filter coefficients.</p> 329<p>Note that for interlaced content, <em class="parameter"><code>in_offset</code></em> 330 needs to be incremented with 3312 to get the next input line.</p> 332<div class="refsect3"> 333<a name="gst-video-scaler-get-coeff.parameters"></a><h4>Parameters</h4> 334<div class="informaltable"><table class="informaltable" width="100%" border="0"> 335<colgroup> 336<col width="150px" class="parameters_name"> 337<col class="parameters_description"> 338<col width="200px" class="parameters_annotations"> 339</colgroup> 340<tbody> 341<tr> 342<td class="parameter_name"><p>scale</p></td> 343<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a></p></td> 344<td class="parameter_annotations"> </td> 345</tr> 346<tr> 347<td class="parameter_name"><p>out_offset</p></td> 348<td class="parameter_description"><p>an output offset</p></td> 349<td class="parameter_annotations"> </td> 350</tr> 351<tr> 352<td class="parameter_name"><p>in_offset</p></td> 353<td class="parameter_description"><p>result input offset</p></td> 354<td class="parameter_annotations"> </td> 355</tr> 356<tr> 357<td class="parameter_name"><p>n_taps</p></td> 358<td class="parameter_description"><p>result n_taps</p></td> 359<td class="parameter_annotations"> </td> 360</tr> 361</tbody> 362</table></div> 363</div> 364<div class="refsect3"> 365<a name="gst-video-scaler-get-coeff.returns"></a><h4>Returns</h4> 366<p> an array of <em class="parameter"><code>n_tap</code></em> 367gdouble values with filter coefficients.</p> 368</div> 369</div> 370<hr> 371<div class="refsect2"> 372<a name="gst-video-scaler-horizontal"></a><h3>gst_video_scaler_horizontal ()</h3> 373<pre class="programlisting"><span class="returnvalue">void</span> 374gst_video_scaler_horizontal (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *scale</code></em>, 375 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> format</code></em>, 376 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> src</code></em>, 377 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> dest</code></em>, 378 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> dest_offset</code></em>, 379 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>);</pre> 380<p>Horizontally scale the pixels in <em class="parameter"><code>src</code></em> 381 to <em class="parameter"><code>dest</code></em> 382, starting from <em class="parameter"><code>dest_offset</code></em> 383 384for <em class="parameter"><code>width</code></em> 385 samples.</p> 386<div class="refsect3"> 387<a name="gst-video-scaler-horizontal.parameters"></a><h4>Parameters</h4> 388<div class="informaltable"><table class="informaltable" width="100%" border="0"> 389<colgroup> 390<col width="150px" class="parameters_name"> 391<col class="parameters_description"> 392<col width="200px" class="parameters_annotations"> 393</colgroup> 394<tbody> 395<tr> 396<td class="parameter_name"><p>scale</p></td> 397<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a></p></td> 398<td class="parameter_annotations"> </td> 399</tr> 400<tr> 401<td class="parameter_name"><p>format</p></td> 402<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> for <em class="parameter"><code>src</code></em> 403and <em class="parameter"><code>dest</code></em> 404</p></td> 405<td class="parameter_annotations"> </td> 406</tr> 407<tr> 408<td class="parameter_name"><p>src</p></td> 409<td class="parameter_description"><p>source pixels</p></td> 410<td class="parameter_annotations"> </td> 411</tr> 412<tr> 413<td class="parameter_name"><p>dest</p></td> 414<td class="parameter_description"><p>destination pixels</p></td> 415<td class="parameter_annotations"> </td> 416</tr> 417<tr> 418<td class="parameter_name"><p>dest_offset</p></td> 419<td class="parameter_description"><p>the horizontal destination offset</p></td> 420<td class="parameter_annotations"> </td> 421</tr> 422<tr> 423<td class="parameter_name"><p>width</p></td> 424<td class="parameter_description"><p>the number of pixels to scale</p></td> 425<td class="parameter_annotations"> </td> 426</tr> 427</tbody> 428</table></div> 429</div> 430</div> 431<hr> 432<div class="refsect2"> 433<a name="gst-video-scaler-new"></a><h3>gst_video_scaler_new ()</h3> 434<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="returnvalue">GstVideoScaler</span></a> * 435gst_video_scaler_new (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResamplerMethod" title="enum GstVideoResamplerMethod"><span class="type">GstVideoResamplerMethod</span></a> method</code></em>, 436 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScalerFlags" title="enum GstVideoScalerFlags"><span class="type">GstVideoScalerFlags</span></a> flags</code></em>, 437 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_taps</code></em>, 438 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> in_size</code></em>, 439 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> out_size</code></em>, 440 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstStructure.html#GstStructure-struct"><span class="type">GstStructure</span></a> *options</code></em>);</pre> 441<p>Make a new <em class="parameter"><code>method</code></em> 442 video scaler. <em class="parameter"><code>in_size</code></em> 443 source lines/pixels will 444be scaled to <em class="parameter"><code>out_size</code></em> 445 destination lines/pixels.</p> 446<p><em class="parameter"><code>n_taps</code></em> 447 specifies the amount of pixels to use from the source for one output 448pixel. If n_taps is 0, this function chooses a good value automatically based 449on the <em class="parameter"><code>method</code></em> 450 and <em class="parameter"><code>in_size</code></em> 451/<em class="parameter"><code>out_size</code></em> 452.</p> 453<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> 454<div class="refsect3"> 455<a name="gst-video-scaler-new.parameters"></a><h4>Parameters</h4> 456<div class="informaltable"><table class="informaltable" width="100%" border="0"> 457<colgroup> 458<col width="150px" class="parameters_name"> 459<col class="parameters_description"> 460<col width="200px" class="parameters_annotations"> 461</colgroup> 462<tbody> 463<tr> 464<td class="parameter_name"><p>method</p></td> 465<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResamplerMethod" title="enum GstVideoResamplerMethod"><span class="type">GstVideoResamplerMethod</span></a></p></td> 466<td class="parameter_annotations"> </td> 467</tr> 468<tr> 469<td class="parameter_name"><p>flags</p></td> 470<td class="parameter_description"><p><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScalerFlags" title="enum GstVideoScalerFlags"><span class="type">GstVideoScalerFlags</span></a></p></td> 471<td class="parameter_annotations"> </td> 472</tr> 473<tr> 474<td class="parameter_name"><p>n_taps</p></td> 475<td class="parameter_description"><p>number of taps to use</p></td> 476<td class="parameter_annotations"> </td> 477</tr> 478<tr> 479<td class="parameter_name"><p>in_size</p></td> 480<td class="parameter_description"><p>number of source elements</p></td> 481<td class="parameter_annotations"> </td> 482</tr> 483<tr> 484<td class="parameter_name"><p>out_size</p></td> 485<td class="parameter_description"><p>number of destination elements</p></td> 486<td class="parameter_annotations"> </td> 487</tr> 488<tr> 489<td class="parameter_name"><p>options</p></td> 490<td class="parameter_description"><p>extra options. </p></td> 491<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 492</tr> 493</tbody> 494</table></div> 495</div> 496<div class="refsect3"> 497<a name="gst-video-scaler-new.returns"></a><h4>Returns</h4> 498<p> a <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a></p> 499</div> 500</div> 501<hr> 502<div class="refsect2"> 503<a name="gst-video-scaler-vertical"></a><h3>gst_video_scaler_vertical ()</h3> 504<pre class="programlisting"><span class="returnvalue">void</span> 505gst_video_scaler_vertical (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *scale</code></em>, 506 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> format</code></em>, 507 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> src_lines[]</code></em>, 508 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> dest</code></em>, 509 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> dest_offset</code></em>, 510 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>);</pre> 511<p>Vertically combine <em class="parameter"><code>width</code></em> 512 pixels in the lines in <em class="parameter"><code>src_lines</code></em> 513 to <em class="parameter"><code>dest</code></em> 514. 515<em class="parameter"><code>dest</code></em> 516 is the location of the target line at <em class="parameter"><code>dest_offset</code></em> 517 and 518<em class="parameter"><code>srcs</code></em> 519 are the input lines for <em class="parameter"><code>dest_offset</code></em> 520, as obtained with 521<code class="function">gst_video_scaler_get_info()</code>.</p> 522<div class="refsect3"> 523<a name="gst-video-scaler-vertical.parameters"></a><h4>Parameters</h4> 524<div class="informaltable"><table class="informaltable" width="100%" border="0"> 525<colgroup> 526<col width="150px" class="parameters_name"> 527<col class="parameters_description"> 528<col width="200px" class="parameters_annotations"> 529</colgroup> 530<tbody> 531<tr> 532<td class="parameter_name"><p>scale</p></td> 533<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a></p></td> 534<td class="parameter_annotations"> </td> 535</tr> 536<tr> 537<td class="parameter_name"><p>format</p></td> 538<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> for <em class="parameter"><code>srcs</code></em> 539and <em class="parameter"><code>dest</code></em> 540</p></td> 541<td class="parameter_annotations"> </td> 542</tr> 543<tr> 544<td class="parameter_name"><p>src_lines</p></td> 545<td class="parameter_description"><p>source pixels lines</p></td> 546<td class="parameter_annotations"> </td> 547</tr> 548<tr> 549<td class="parameter_name"><p>dest</p></td> 550<td class="parameter_description"><p>destination pixels</p></td> 551<td class="parameter_annotations"> </td> 552</tr> 553<tr> 554<td class="parameter_name"><p>dest_offset</p></td> 555<td class="parameter_description"><p>the vertical destination offset</p></td> 556<td class="parameter_annotations"> </td> 557</tr> 558<tr> 559<td class="parameter_name"><p>width</p></td> 560<td class="parameter_description"><p>the number of pixels to scale</p></td> 561<td class="parameter_annotations"> </td> 562</tr> 563</tbody> 564</table></div> 565</div> 566</div> 567<hr> 568<div class="refsect2"> 569<a name="gst-video-scaler-get-max-taps"></a><h3>gst_video_scaler_get_max_taps ()</h3> 570<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> 571gst_video_scaler_get_max_taps (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> *scale</code></em>);</pre> 572<p>Get the maximum number of taps for <em class="parameter"><code>scale</code></em> 573.</p> 574<div class="refsect3"> 575<a name="gst-video-scaler-get-max-taps.parameters"></a><h4>Parameters</h4> 576<div class="informaltable"><table class="informaltable" width="100%" border="0"> 577<colgroup> 578<col width="150px" class="parameters_name"> 579<col class="parameters_description"> 580<col width="200px" class="parameters_annotations"> 581</colgroup> 582<tbody><tr> 583<td class="parameter_name"><p>scale</p></td> 584<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a></p></td> 585<td class="parameter_annotations"> </td> 586</tr></tbody> 587</table></div> 588</div> 589<div class="refsect3"> 590<a name="gst-video-scaler-get-max-taps.returns"></a><h4>Returns</h4> 591<p> the maximum number of taps</p> 592</div> 593</div> 594</div> 595<div class="refsect1"> 596<a name="gst-plugins-base-libs-GstVideoScaler.other_details"></a><h2>Types and Values</h2> 597<div class="refsect2"> 598<a name="GstVideoScaler"></a><h3>GstVideoScaler</h3> 599<pre class="programlisting">typedef struct _GstVideoScaler GstVideoScaler;</pre> 600</div> 601<hr> 602<div class="refsect2"> 603<a name="GstVideoScalerFlags"></a><h3>enum GstVideoScalerFlags</h3> 604<p>Different scale flags.</p> 605<div class="refsect3"> 606<a name="GstVideoScalerFlags.members"></a><h4>Members</h4> 607<div class="informaltable"><table class="informaltable" width="100%" border="0"> 608<colgroup> 609<col width="300px" class="enum_members_name"> 610<col class="enum_members_description"> 611<col width="200px" class="enum_members_annotations"> 612</colgroup> 613<tbody> 614<tr> 615<td class="enum_member_name"><p><a name="GST-VIDEO-SCALER-FLAG-NONE:CAPS"></a>GST_VIDEO_SCALER_FLAG_NONE</p></td> 616<td class="enum_member_description"> 617<p>no flags</p> 618</td> 619<td class="enum_member_annotations"> </td> 620</tr> 621<tr> 622<td class="enum_member_name"><p><a name="GST-VIDEO-SCALER-FLAG-INTERLACED:CAPS"></a>GST_VIDEO_SCALER_FLAG_INTERLACED</p></td> 623<td class="enum_member_description"> 624<p>Set up a scaler for interlaced content</p> 625</td> 626<td class="enum_member_annotations"> </td> 627</tr> 628</tbody> 629</table></div> 630</div> 631</div> 632<hr> 633<div class="refsect2"> 634<a name="GST-VIDEO-SCALER-OPT-DITHER-METHOD:CAPS"></a><h3>GST_VIDEO_SCALER_OPT_DITHER_METHOD</h3> 635<pre class="programlisting">#define GST_VIDEO_SCALER_OPT_DITHER_METHOD "GstVideoScaler.dither-method" 636</pre> 637<p><span class="type">GST_TYPE_VIDEO_DITHER_METHOD</span>, The dither method to use for propagating 638quatization errors.</p> 639</div> 640</div> 641</div> 642<div class="footer"> 643<hr>Generated by GTK-Doc V1.28</div> 644</body> 645</html>