Repository URL to install this package:
Version:
7:2.7.1-1ubuntu3 ▾
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>FFmpeg: Image related</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">FFmpeg
 <span id="projectnumber">2.7.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Image related</div> </div>
<div class="ingroups"><a class="el" href="group__lavu__misc.html">Other</a></div></div><!--header-->
<div class="contents">
<p><a class="el" href="structAVPicture.html" title="Picture data structure.">AVPicture</a> types, pixel formats and basic image planes manipulation.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#gae6cbcab1f70d8e476757f1c1f5a0a78e">AVPictureType</a> { <br/>
  <a class="el" href="group__lavu__picture.html#ggae6cbcab1f70d8e476757f1c1f5a0a78ea33183189d771e3325ccdd36fa980b6f6">AV_PICTURE_TYPE_NONE</a> = 0,
<a class="el" href="group__lavu__picture.html#ggae6cbcab1f70d8e476757f1c1f5a0a78ea02be39f151a8ace7a65c86e13053e817">AV_PICTURE_TYPE_I</a>,
<a class="el" href="group__lavu__picture.html#ggae6cbcab1f70d8e476757f1c1f5a0a78eaa6fc0479507a03f173f07fc75dab2193">AV_PICTURE_TYPE_P</a>,
<a class="el" href="group__lavu__picture.html#ggae6cbcab1f70d8e476757f1c1f5a0a78ead22f8968e99bc48897c3f4ac29e82dae">AV_PICTURE_TYPE_B</a>,
<br/>
  <a class="el" href="group__lavu__picture.html#ggae6cbcab1f70d8e476757f1c1f5a0a78eac279237c3b09bb9f7ece0675658e65ad">AV_PICTURE_TYPE_S</a>,
<a class="el" href="group__lavu__picture.html#ggae6cbcab1f70d8e476757f1c1f5a0a78eaa7199b8035cf5a076a05a7fcf6dfc7fe">AV_PICTURE_TYPE_SI</a>,
<a class="el" href="group__lavu__picture.html#ggae6cbcab1f70d8e476757f1c1f5a0a78ea83789bae2515a1ce384a88f074244e4e">AV_PICTURE_TYPE_SP</a>,
<a class="el" href="group__lavu__picture.html#ggae6cbcab1f70d8e476757f1c1f5a0a78ea71f9f194b0cbe86778cb6df41b867cf3">AV_PICTURE_TYPE_BI</a>
<br/>
}</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#gacbf2ea8b2b89924c890ef8ec10a3d922">av_get_picture_type_char</a> (enum <a class="el" href="group__lavu__picture.html#gae6cbcab1f70d8e476757f1c1f5a0a78e">AVPictureType</a> pict_type)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return a single letter to describe the given picture type pict_type. <a href="#gacbf2ea8b2b89924c890ef8ec10a3d922"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#gad3af84de3a86a9ebb71715e3c0ebf627">av_image_fill_max_pixsteps</a> (int max_pixsteps[4], int max_pixstep_comps[4], const <a class="el" href="structAVPixFmtDescriptor.html">AVPixFmtDescriptor</a> *pixdesc)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the max pixel step for each plane of an image with a format described by pixdesc. <a href="#gad3af84de3a86a9ebb71715e3c0ebf627"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga8eddd074d5eb6a235591013675ac1055">av_image_get_linesize</a> (enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> <a class="el" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>, int <a class="el" href="demuxing__decoding_8c.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, int plane)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the size of an image line with format pix_fmt and width width for the plane plane. <a href="#ga8eddd074d5eb6a235591013675ac1055"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#gaccd7fda79188060dadb28408223946ef">av_image_fill_linesizes</a> (int linesizes[4], enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> <a class="el" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>, int <a class="el" href="demuxing__decoding_8c.html#a2474a5474cbff19523a51eb1de01cda4">width</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fill plane linesizes for an image with pixel format pix_fmt and width width. <a href="#gaccd7fda79188060dadb28408223946ef"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga4513d36f527c1476e89845631d975542">av_image_fill_pointers</a> (uint8_t *data[4], enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> <a class="el" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>, int <a class="el" href="demuxing__decoding_8c.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>, uint8_t *ptr, const int linesizes[4])</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fill plane data pointers for an image with pixel format pix_fmt and height height. <a href="#ga4513d36f527c1476e89845631d975542"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga841e0a89a642e24141af1918a2c10448">av_image_alloc</a> (uint8_t *pointers[4], int linesizes[4], int w, int h, enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> <a class="el" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>, int align)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordingly. <a href="#ga841e0a89a642e24141af1918a2c10448"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga735cb949320867e9c2fffcb327d0ece2">av_image_copy_plane</a> (uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int <a class="el" href="demuxing__decoding_8c.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy image plane from src to dst. <a href="#ga735cb949320867e9c2fffcb327d0ece2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga6b5a267e202daadf81cbde6584055d1e">av_image_copy</a> (uint8_t *dst_data[4], int dst_linesizes[4], const uint8_t *src_data[4], const int src_linesizes[4], enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> <a class="el" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>, int <a class="el" href="demuxing__decoding_8c.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, int <a class="el" href="demuxing__decoding_8c.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy image in src_data to dst_data. <a href="#ga6b5a267e202daadf81cbde6584055d1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga5b6ead346a70342ae8a303c16d2b3629">av_image_fill_arrays</a> (uint8_t *dst_data[4], int dst_linesize[4], const uint8_t *src, enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> <a class="el" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>, int <a class="el" href="demuxing__decoding_8c.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, int <a class="el" href="demuxing__decoding_8c.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>, int align)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Setup the data pointers and linesizes based on the specified image parameters and the provided array. <a href="#ga5b6ead346a70342ae8a303c16d2b3629"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga24a67963c3ae0054a2a4bab35930e694">av_image_get_buffer_size</a> (enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> <a class="el" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>, int <a class="el" href="demuxing__decoding_8c.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, int <a class="el" href="demuxing__decoding_8c.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>, int align)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the size in bytes of the amount of data required to store an image with the given parameters. <a href="#ga24a67963c3ae0054a2a4bab35930e694"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga6f8576f1ef0c2d9a9f7c5ac7f9a28c52">av_image_copy_to_buffer</a> (uint8_t *dst, int dst_size, const uint8_t *const src_data[4], const int src_linesize[4], enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> <a class="el" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>, int <a class="el" href="demuxing__decoding_8c.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, int <a class="el" href="demuxing__decoding_8c.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>, int align)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy image data from an image into a buffer. <a href="#ga6f8576f1ef0c2d9a9f7c5ac7f9a28c52"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#ga3a867b6180ddad1e0c382ef0c5940b8e">av_image_check_size</a> (unsigned int w, unsigned int h, int log_offset, void *log_ctx)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Check if the given dimension of an image is valid, meaning that all bytes of the image can be addressed with a signed int. <a href="#ga3a867b6180ddad1e0c382ef0c5940b8e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__lavu__picture.html#gada0f86cd0051ff8b9eef214e83e7ad1f">av_image_check_sar</a> (unsigned int w, unsigned int h, <a class="el" href="structAVRational.html">AVRational</a> sar)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Check if the given sample aspect ratio of an image is valid. <a href="#gada0f86cd0051ff8b9eef214e83e7ad1f"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p><a class="el" href="structAVPicture.html" title="Picture data structure.">AVPicture</a> types, pixel formats and basic image planes manipulation. </p>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gae6cbcab1f70d8e476757f1c1f5a0a78e"></a><!-- doxytag: member="avutil.h::AVPictureType" ref="gae6cbcab1f70d8e476757f1c1f5a0a78e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__lavu__picture.html#gae6cbcab1f70d8e476757f1c1f5a0a78e">AVPictureType</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggae6cbcab1f70d8e476757f1c1f5a0a78ea33183189d771e3325ccdd36fa980b6f6"></a><!-- doxytag: member="AV_PICTURE_TYPE_NONE" ref="ggae6cbcab1f70d8e476757f1c1f5a0a78ea33183189d771e3325ccdd36fa980b6f6" args="" -->AV_PICTURE_TYPE_NONE</em> </td><td>
<p>Undefined. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae6cbcab1f70d8e476757f1c1f5a0a78ea02be39f151a8ace7a65c86e13053e817"></a><!-- doxytag: member="AV_PICTURE_TYPE_I" ref="ggae6cbcab1f70d8e476757f1c1f5a0a78ea02be39f151a8ace7a65c86e13053e817" args="" -->AV_PICTURE_TYPE_I</em> </td><td>
<p>Intra. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae6cbcab1f70d8e476757f1c1f5a0a78eaa6fc0479507a03f173f07fc75dab2193"></a><!-- doxytag: member="AV_PICTURE_TYPE_P" ref="ggae6cbcab1f70d8e476757f1c1f5a0a78eaa6fc0479507a03f173f07fc75dab2193" args="" -->AV_PICTURE_TYPE_P</em> </td><td>
<p>Predicted. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae6cbcab1f70d8e476757f1c1f5a0a78ead22f8968e99bc48897c3f4ac29e82dae"></a><!-- doxytag: member="AV_PICTURE_TYPE_B" ref="ggae6cbcab1f70d8e476757f1c1f5a0a78ead22f8968e99bc48897c3f4ac29e82dae" args="" -->AV_PICTURE_TYPE_B</em> </td><td>
<p>Bi-dir predicted. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae6cbcab1f70d8e476757f1c1f5a0a78eac279237c3b09bb9f7ece0675658e65ad"></a><!-- doxytag: member="AV_PICTURE_TYPE_S" ref="ggae6cbcab1f70d8e476757f1c1f5a0a78eac279237c3b09bb9f7ece0675658e65ad" args="" -->AV_PICTURE_TYPE_S</em> </td><td>
<p>S(GMC)-VOP MPEG4. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae6cbcab1f70d8e476757f1c1f5a0a78eaa7199b8035cf5a076a05a7fcf6dfc7fe"></a><!-- doxytag: member="AV_PICTURE_TYPE_SI" ref="ggae6cbcab1f70d8e476757f1c1f5a0a78eaa7199b8035cf5a076a05a7fcf6dfc7fe" args="" -->AV_PICTURE_TYPE_SI</em> </td><td>
<p>Switching Intra. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae6cbcab1f70d8e476757f1c1f5a0a78ea83789bae2515a1ce384a88f074244e4e"></a><!-- doxytag: member="AV_PICTURE_TYPE_SP" ref="ggae6cbcab1f70d8e476757f1c1f5a0a78ea83789bae2515a1ce384a88f074244e4e" args="" -->AV_PICTURE_TYPE_SP</em> </td><td>
<p>Switching Predicted. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae6cbcab1f70d8e476757f1c1f5a0a78ea71f9f194b0cbe86778cb6df41b867cf3"></a><!-- doxytag: member="AV_PICTURE_TYPE_BI" ref="ggae6cbcab1f70d8e476757f1c1f5a0a78ea71f9f194b0cbe86778cb6df41b867cf3" args="" -->AV_PICTURE_TYPE_BI</em> </td><td>
<p>BI type. </p>
</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="avutil_8h_source.html#l00265">265</a> of file <a class="el" href="avutil_8h_source.html">avutil.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gacbf2ea8b2b89924c890ef8ec10a3d922"></a><!-- doxytag: member="avutil.h::av_get_picture_type_char" ref="gacbf2ea8b2b89924c890ef8ec10a3d922" args="(enum AVPictureType pict_type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char <a class="el" href="group__lavu__picture.html#gacbf2ea8b2b89924c890ef8ec10a3d922">av_get_picture_type_char</a> </td>
<td>(</td>
<td class="paramtype">enum <a class="el" href="group__lavu__picture.html#gae6cbcab1f70d8e476757f1c1f5a0a78e">AVPictureType</a> </td>
<td class="paramname"><em>pict_type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return a single letter to describe the given picture type pict_type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pict_type</td><td>the picture type </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a single character representing the picture type, '?' if pict_type is unknown </dd></dl>
</div>
</div>
<a class="anchor" id="gad3af84de3a86a9ebb71715e3c0ebf627"></a><!-- doxytag: member="imgutils.h::av_image_fill_max_pixsteps" ref="gad3af84de3a86a9ebb71715e3c0ebf627" args="(int max_pixsteps[4], int max_pixstep_comps[4], const AVPixFmtDescriptor *pixdesc)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__lavu__picture.html#gad3af84de3a86a9ebb71715e3c0ebf627">av_image_fill_max_pixsteps</a> </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>max_pixsteps</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>max_pixstep_comps</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structAVPixFmtDescriptor.html">AVPixFmtDescriptor</a> * </td>
<td class="paramname"><em>pixdesc</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Compute the max pixel step for each plane of an image with a format described by pixdesc. </p>
<p>The pixel step is the distance in bytes between the first byte of the group of bytes which describe a pixel component and the first byte of the successive group in the same plane for the same component.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">max_pixsteps</td><td>an array which is filled with the max pixel step for each plane. Since a plane may contain different pixel components, the computed max_pixsteps[plane] is relative to the component in the plane with the max pixel step. </td></tr>
<tr><td class="paramname">max_pixstep_comps</td><td>an array which is filled with the component for each plane which has the max pixel step. May be NULL. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga8eddd074d5eb6a235591013675ac1055"></a><!-- doxytag: member="imgutils.h::av_image_get_linesize" ref="ga8eddd074d5eb6a235591013675ac1055" args="(enum AVPixelFormat pix_fmt, int width, int plane)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#ga8eddd074d5eb6a235591013675ac1055">av_image_get_linesize</a> </td>
<td>(</td>
<td class="paramtype">enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> </td>
<td class="paramname"><em>pix_fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>plane</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Compute the size of an image line with format pix_fmt and width width for the plane plane. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the computed size in bytes </dd></dl>
</div>
</div>
<a class="anchor" id="gaccd7fda79188060dadb28408223946ef"></a><!-- doxytag: member="imgutils.h::av_image_fill_linesizes" ref="gaccd7fda79188060dadb28408223946ef" args="(int linesizes[4], enum AVPixelFormat pix_fmt, int width)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#gaccd7fda79188060dadb28408223946ef">av_image_fill_linesizes</a> </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>linesizes</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> </td>
<td class="paramname"><em>pix_fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>width</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Fill plane linesizes for an image with pixel format pix_fmt and width width. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">linesizes</td><td>array to be filled with the linesize for each plane </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>>= 0 in case of success, a negative error code otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="ga4513d36f527c1476e89845631d975542"></a><!-- doxytag: member="imgutils.h::av_image_fill_pointers" ref="ga4513d36f527c1476e89845631d975542" args="(uint8_t *data[4], enum AVPixelFormat pix_fmt, int height, uint8_t *ptr, const int linesizes[4])" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#ga4513d36f527c1476e89845631d975542">av_image_fill_pointers</a> </td>
<td>(</td>
<td class="paramtype">uint8_t * </td>
<td class="paramname"><em>data</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> </td>
<td class="paramname"><em>pix_fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t * </td>
<td class="paramname"><em>ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int </td>
<td class="paramname"><em>linesizes</em>[4] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Fill plane data pointers for an image with pixel format pix_fmt and height height. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>pointers array to be filled with the pointer for each image plane </td></tr>
<tr><td class="paramname">ptr</td><td>the pointer to a buffer which will contain the image </td></tr>
<tr><td class="paramname">linesizes</td><td>the array containing the linesize for each plane, should be filled by <a class="el" href="group__lavu__picture.html#gaccd7fda79188060dadb28408223946ef" title="Fill plane linesizes for an image with pixel format pix_fmt and width width.">av_image_fill_linesizes()</a> </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the size in bytes required for the image buffer, a negative error code in case of failure </dd></dl>
</div>
</div>
<a class="anchor" id="ga841e0a89a642e24141af1918a2c10448"></a><!-- doxytag: member="imgutils.h::av_image_alloc" ref="ga841e0a89a642e24141af1918a2c10448" args="(uint8_t *pointers[4], int linesizes[4], int w, int h, enum AVPixelFormat pix_fmt, int align)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#ga841e0a89a642e24141af1918a2c10448">av_image_alloc</a> </td>
<td>(</td>
<td class="paramtype">uint8_t * </td>
<td class="paramname"><em>pointers</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>linesizes</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> </td>
<td class="paramname"><em>pix_fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>align</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordingly. </p>
<p>The allocated image buffer has to be freed by using av_freep(&pointers[0]).</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">align</td><td>the value to use for buffer size alignment </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the size in bytes required for the image buffer, a negative error code in case of failure </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="decoding_encoding_8c-example.html#a69">decoding_encoding.c</a>, <a class="el" href="demuxing_decoding_8c-example.html#a82">demuxing_decoding.c</a>, and <a class="el" href="scaling_video_8c-example.html#a11">scaling_video.c</a>.</dd>
</dl>
<p>Referenced by <a class="el" href="demuxing__decoding_8c_source.html#l00226">main()</a>, and <a class="el" href="decoding__encoding_8c_source.html#l00347">video_encode_example()</a>.</p>
</div>
</div>
<a class="anchor" id="ga735cb949320867e9c2fffcb327d0ece2"></a><!-- doxytag: member="imgutils.h::av_image_copy_plane" ref="ga735cb949320867e9c2fffcb327d0ece2" args="(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__lavu__picture.html#ga735cb949320867e9c2fffcb327d0ece2">av_image_copy_plane</a> </td>
<td>(</td>
<td class="paramtype">uint8_t * </td>
<td class="paramname"><em>dst</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>dst_linesize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t * </td>
<td class="paramname"><em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>src_linesize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>bytewidth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>height</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Copy image plane from src to dst. </p>
<p>That is, copy "height" number of lines of "bytewidth" bytes each. The first byte of each successive line is separated by *_linesize bytes.</p>
<p>bytewidth must be contained by both absolute values of dst_linesize and src_linesize, otherwise the function behavior is undefined.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dst_linesize</td><td>linesize for the image plane in dst </td></tr>
<tr><td class="paramname">src_linesize</td><td>linesize for the image plane in src </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga6b5a267e202daadf81cbde6584055d1e"></a><!-- doxytag: member="imgutils.h::av_image_copy" ref="ga6b5a267e202daadf81cbde6584055d1e" args="(uint8_t *dst_data[4], int dst_linesizes[4], const uint8_t *src_data[4], const int src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__lavu__picture.html#ga6b5a267e202daadf81cbde6584055d1e">av_image_copy</a> </td>
<td>(</td>
<td class="paramtype">uint8_t * </td>
<td class="paramname"><em>dst_data</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>dst_linesizes</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t * </td>
<td class="paramname"><em>src_data</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int </td>
<td class="paramname"><em>src_linesizes</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> </td>
<td class="paramname"><em>pix_fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>height</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Copy image in src_data to dst_data. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dst_linesizes</td><td>linesizes for the image in dst_data </td></tr>
<tr><td class="paramname">src_linesizes</td><td>linesizes for the image in src_data </td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demuxing_decoding_8c-example.html#a44">demuxing_decoding.c</a>.</dd>
</dl>
<p>Referenced by <a class="el" href="demuxing__decoding_8c_source.html#l00070">decode_packet()</a>.</p>
</div>
</div>
<a class="anchor" id="ga5b6ead346a70342ae8a303c16d2b3629"></a><!-- doxytag: member="imgutils.h::av_image_fill_arrays" ref="ga5b6ead346a70342ae8a303c16d2b3629" args="(uint8_t *dst_data[4], int dst_linesize[4], const uint8_t *src, enum AVPixelFormat pix_fmt, int width, int height, int align)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#ga5b6ead346a70342ae8a303c16d2b3629">av_image_fill_arrays</a> </td>
<td>(</td>
<td class="paramtype">uint8_t * </td>
<td class="paramname"><em>dst_data</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>dst_linesize</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t * </td>
<td class="paramname"><em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> </td>
<td class="paramname"><em>pix_fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>align</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setup the data pointers and linesizes based on the specified image parameters and the provided array. </p>
<p>The fields of the given image are filled in by using the src address which points to the image data buffer. Depending on the specified pixel format, one or multiple image data pointers and line sizes will be set. If a planar format is specified, several pointers will be set pointing to the different picture planes and the line sizes of the different planes will be stored in the lines_sizes array. Call with src == NULL to get the required size for the src buffer.</p>
<p>To allocate the buffer and fill in the dst_data and dst_linesize in one call, use <a class="el" href="group__lavu__picture.html#ga841e0a89a642e24141af1918a2c10448" title="Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordi...">av_image_alloc()</a>.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dst_data</td><td>data pointers to be filled in </td></tr>
<tr><td class="paramname">dst_linesizes</td><td>linesizes for the image in dst_data to be filled in </td></tr>
<tr><td class="paramname">src</td><td>buffer which will contain or contains the actual image data, can be NULL </td></tr>
<tr><td class="paramname">pix_fmt</td><td>the pixel format of the image </td></tr>
<tr><td class="paramname">width</td><td>the width of the image in pixels </td></tr>
<tr><td class="paramname">height</td><td>the height of the image in pixels </td></tr>
<tr><td class="paramname">align</td><td>the value used in src for linesize alignment </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the size in bytes required for src, a negative error code in case of failure </dd></dl>
</div>
</div>
<a class="anchor" id="ga24a67963c3ae0054a2a4bab35930e694"></a><!-- doxytag: member="imgutils.h::av_image_get_buffer_size" ref="ga24a67963c3ae0054a2a4bab35930e694" args="(enum AVPixelFormat pix_fmt, int width, int height, int align)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#ga24a67963c3ae0054a2a4bab35930e694">av_image_get_buffer_size</a> </td>
<td>(</td>
<td class="paramtype">enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> </td>
<td class="paramname"><em>pix_fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>align</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the size in bytes of the amount of data required to store an image with the given parameters. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">align</td><td>the assumed linesize alignment </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga6f8576f1ef0c2d9a9f7c5ac7f9a28c52"></a><!-- doxytag: member="imgutils.h::av_image_copy_to_buffer" ref="ga6f8576f1ef0c2d9a9f7c5ac7f9a28c52" args="(uint8_t *dst, int dst_size, const uint8_t *const src_data[4], const int src_linesize[4], enum AVPixelFormat pix_fmt, int width, int height, int align)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#ga6f8576f1ef0c2d9a9f7c5ac7f9a28c52">av_image_copy_to_buffer</a> </td>
<td>(</td>
<td class="paramtype">uint8_t * </td>
<td class="paramname"><em>dst</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>dst_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *const </td>
<td class="paramname"><em>src_data</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int </td>
<td class="paramname"><em>src_linesize</em>[4], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">enum <a class="el" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> </td>
<td class="paramname"><em>pix_fmt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>align</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Copy image data from an image into a buffer. </p>
<p><a class="el" href="group__lavu__picture.html#ga24a67963c3ae0054a2a4bab35930e694" title="Return the size in bytes of the amount of data required to store an image with the given parameters...">av_image_get_buffer_size()</a> can be used to compute the required size for the buffer to fill.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dst</td><td>a buffer into which picture data will be copied </td></tr>
<tr><td class="paramname">dst_size</td><td>the size in bytes of dst </td></tr>
<tr><td class="paramname">src_data</td><td>pointers containing the source image data </td></tr>
<tr><td class="paramname">src_linesizes</td><td>linesizes for the image in src_data </td></tr>
<tr><td class="paramname">pix_fmt</td><td>the pixel format of the source image </td></tr>
<tr><td class="paramname">width</td><td>the width of the source image in pixels </td></tr>
<tr><td class="paramname">height</td><td>the height of the source image in pixels </td></tr>
<tr><td class="paramname">align</td><td>the assumed linesize alignment for dst </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of bytes written to dst, or a negative value (error code) on error </dd></dl>
</div>
</div>
<a class="anchor" id="ga3a867b6180ddad1e0c382ef0c5940b8e"></a><!-- doxytag: member="imgutils.h::av_image_check_size" ref="ga3a867b6180ddad1e0c382ef0c5940b8e" args="(unsigned int w, unsigned int h, int log_offset, void *log_ctx)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#ga3a867b6180ddad1e0c382ef0c5940b8e">av_image_check_size</a> </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>log_offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>log_ctx</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Check if the given dimension of an image is valid, meaning that all bytes of the image can be addressed with a signed int. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">w</td><td>the width of the picture </td></tr>
<tr><td class="paramname">h</td><td>the height of the picture </td></tr>
<tr><td class="paramname">log_offset</td><td>the offset to sum to the log level for logging with log_ctx </td></tr>
<tr><td class="paramname">log_ctx</td><td>the parent logging context, it may be NULL </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>>= 0 if valid, a negative error code otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="gada0f86cd0051ff8b9eef214e83e7ad1f"></a><!-- doxytag: member="imgutils.h::av_image_check_sar" ref="gada0f86cd0051ff8b9eef214e83e7ad1f" args="(unsigned int w, unsigned int h, AVRational sar)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__lavu__picture.html#gada0f86cd0051ff8b9eef214e83e7ad1f">av_image_check_sar</a> </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structAVRational.html">AVRational</a> </td>
<td class="paramname"><em>sar</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Check if the given sample aspect ratio of an image is valid. </p>
<p>It is considered invalid if the denominator is 0 or if applying the ratio to the image size would make the smaller dimension less than 1. If the sar numerator is 0, it is considered unknown and will return as valid.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">w</td><td>width of the image </td></tr>
<tr><td class="paramname">h</td><td>height of the image </td></tr>
<tr><td class="paramname">sar</td><td>sample aspect ratio of the image </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if valid, a negative AVERROR code otherwise </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>