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: libavutil/pixdesc.h Source File</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 class="current"><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 id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">libavutil/pixdesc.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="pixdesc_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * pixel format descriptor</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at></span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This file is part of FFmpeg.</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * FFmpeg is free software; you can redistribute it and/or</span>
<a name="l00008"></a>00008 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00009"></a>00009 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00010"></a>00010 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00011"></a>00011 <span class="comment"> *</span>
<a name="l00012"></a>00012 <span class="comment"> * FFmpeg is distributed in the hope that it will be useful,</span>
<a name="l00013"></a>00013 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00014"></a>00014 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00015"></a>00015 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00016"></a>00016 <span class="comment"> *</span>
<a name="l00017"></a>00017 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00018"></a>00018 <span class="comment"> * License along with FFmpeg; if not, write to the Free Software</span>
<a name="l00019"></a>00019 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span>
<a name="l00020"></a>00020 <span class="comment"> */</span>
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="preprocessor">#ifndef AVUTIL_PIXDESC_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define AVUTIL_PIXDESC_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#include <inttypes.h></span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="attributes_8h.html" title="Macro definitions for various function/variable attributes.">attributes.h</a>"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="pixfmt_8h.html" title="pixel format definitions">pixfmt.h</a>"</span>
<a name="l00029"></a>00029
<a name="l00030"></a><a class="code" href="structAVComponentDescriptor.html">00030</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVComponentDescriptor.html">AVComponentDescriptor</a> {<span class="comment"></span>
<a name="l00031"></a>00031 <span class="comment"> /**</span>
<a name="l00032"></a>00032 <span class="comment"> * Which of the 4 planes contains the component.</span>
<a name="l00033"></a>00033 <span class="comment"> */</span>
<a name="l00034"></a><a class="code" href="structAVComponentDescriptor.html#af04062021a495e4e7281daf56d0dc5f2">00034</a> uint16_t <a class="code" href="structAVComponentDescriptor.html#af04062021a495e4e7281daf56d0dc5f2" title="Which of the 4 planes contains the component.">plane</a> : 2;
<a name="l00035"></a>00035 <span class="comment"></span>
<a name="l00036"></a>00036 <span class="comment"> /**</span>
<a name="l00037"></a>00037 <span class="comment"> * Number of elements between 2 horizontally consecutive pixels minus 1.</span>
<a name="l00038"></a>00038 <span class="comment"> * Elements are bits for bitstream formats, bytes otherwise.</span>
<a name="l00039"></a>00039 <span class="comment"> */</span>
<a name="l00040"></a><a class="code" href="structAVComponentDescriptor.html#ac1e0fdc2d6f0e4968ab2dbfde2e931fd">00040</a> uint16_t <a class="code" href="structAVComponentDescriptor.html#ac1e0fdc2d6f0e4968ab2dbfde2e931fd" title="Number of elements between 2 horizontally consecutive pixels minus 1.">step_minus1</a> : 3;
<a name="l00041"></a>00041 <span class="comment"></span>
<a name="l00042"></a>00042 <span class="comment"> /**</span>
<a name="l00043"></a>00043 <span class="comment"> * Number of elements before the component of the first pixel plus 1.</span>
<a name="l00044"></a>00044 <span class="comment"> * Elements are bits for bitstream formats, bytes otherwise.</span>
<a name="l00045"></a>00045 <span class="comment"> */</span>
<a name="l00046"></a><a class="code" href="structAVComponentDescriptor.html#ad6df400869e3f23db136d4cdccd09ba9">00046</a> uint16_t <a class="code" href="structAVComponentDescriptor.html#ad6df400869e3f23db136d4cdccd09ba9" title="Number of elements before the component of the first pixel plus 1.">offset_plus1</a> : 3;
<a name="l00047"></a>00047 <span class="comment"></span>
<a name="l00048"></a>00048 <span class="comment"> /**</span>
<a name="l00049"></a>00049 <span class="comment"> * Number of least significant bits that must be shifted away</span>
<a name="l00050"></a>00050 <span class="comment"> * to get the value.</span>
<a name="l00051"></a>00051 <span class="comment"> */</span>
<a name="l00052"></a><a class="code" href="structAVComponentDescriptor.html#ad487b67c4c15c59f2963f1454e41861c">00052</a> uint16_t <a class="code" href="structAVComponentDescriptor.html#ad487b67c4c15c59f2963f1454e41861c" title="Number of least significant bits that must be shifted away to get the value.">shift</a> : 3;
<a name="l00053"></a>00053 <span class="comment"></span>
<a name="l00054"></a>00054 <span class="comment"> /**</span>
<a name="l00055"></a>00055 <span class="comment"> * Number of bits in the component minus 1.</span>
<a name="l00056"></a>00056 <span class="comment"> */</span>
<a name="l00057"></a><a class="code" href="structAVComponentDescriptor.html#adfa5d36597fa267a289df19f5b342810">00057</a> uint16_t <a class="code" href="structAVComponentDescriptor.html#adfa5d36597fa267a289df19f5b342810" title="Number of bits in the component minus 1.">depth_minus1</a> : 4;
<a name="l00058"></a>00058 } <a class="code" href="structAVComponentDescriptor.html">AVComponentDescriptor</a>;
<a name="l00059"></a>00059 <span class="comment"></span>
<a name="l00060"></a>00060 <span class="comment">/**</span>
<a name="l00061"></a>00061 <span class="comment"> * Descriptor that unambiguously describes how the bits of a pixel are</span>
<a name="l00062"></a>00062 <span class="comment"> * stored in the up to 4 data planes of an image. It also stores the</span>
<a name="l00063"></a>00063 <span class="comment"> * subsampling factors and number of components.</span>
<a name="l00064"></a>00064 <span class="comment"> *</span>
<a name="l00065"></a>00065 <span class="comment"> * @note This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV</span>
<a name="l00066"></a>00066 <span class="comment"> * and all the YUV variants) AVPixFmtDescriptor just stores how values</span>
<a name="l00067"></a>00067 <span class="comment"> * are stored not what these values represent.</span>
<a name="l00068"></a>00068 <span class="comment"> */</span>
<a name="l00069"></a><a class="code" href="structAVPixFmtDescriptor.html">00069</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> {
<a name="l00070"></a><a class="code" href="structAVPixFmtDescriptor.html#a10736c3f1288eb87b23ede3ffdefb435">00070</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structAVPixFmtDescriptor.html#a10736c3f1288eb87b23ede3ffdefb435">name</a>;
<a name="l00071"></a><a class="code" href="structAVPixFmtDescriptor.html#ae83de203f97288c9f4070212a5eac5de">00071</a> uint8_t <a class="code" href="structAVPixFmtDescriptor.html#ae83de203f97288c9f4070212a5eac5de" title="The number of components each pixel has, (1-4)">nb_components</a>; <span class="comment">///< The number of components each pixel has, (1-4)</span>
<a name="l00072"></a>00072 <span class="comment"></span><span class="comment"></span>
<a name="l00073"></a>00073 <span class="comment"> /**</span>
<a name="l00074"></a>00074 <span class="comment"> * Amount to shift the luma width right to find the chroma width.</span>
<a name="l00075"></a>00075 <span class="comment"> * For YV12 this is 1 for example.</span>
<a name="l00076"></a>00076 <span class="comment"> * chroma_width = -((-luma_width) >> log2_chroma_w)</span>
<a name="l00077"></a>00077 <span class="comment"> * The note above is needed to ensure rounding up.</span>
<a name="l00078"></a>00078 <span class="comment"> * This value only refers to the chroma components.</span>
<a name="l00079"></a>00079 <span class="comment"> */</span>
<a name="l00080"></a><a class="code" href="structAVPixFmtDescriptor.html#a4abca4534188ff94627e88c0d8362058">00080</a> uint8_t <a class="code" href="structAVPixFmtDescriptor.html#a4abca4534188ff94627e88c0d8362058" title="Amount to shift the luma width right to find the chroma width.">log2_chroma_w</a>; <span class="comment">///< chroma_width = -((-luma_width )>>log2_chroma_w)</span>
<a name="l00081"></a>00081 <span class="comment"></span><span class="comment"></span>
<a name="l00082"></a>00082 <span class="comment"> /**</span>
<a name="l00083"></a>00083 <span class="comment"> * Amount to shift the luma height right to find the chroma height.</span>
<a name="l00084"></a>00084 <span class="comment"> * For YV12 this is 1 for example.</span>
<a name="l00085"></a>00085 <span class="comment"> * chroma_height= -((-luma_height) >> log2_chroma_h)</span>
<a name="l00086"></a>00086 <span class="comment"> * The note above is needed to ensure rounding up.</span>
<a name="l00087"></a>00087 <span class="comment"> * This value only refers to the chroma components.</span>
<a name="l00088"></a>00088 <span class="comment"> */</span>
<a name="l00089"></a><a class="code" href="structAVPixFmtDescriptor.html#abea8ed308fe00644fc066a00018afa95">00089</a> uint8_t <a class="code" href="structAVPixFmtDescriptor.html#abea8ed308fe00644fc066a00018afa95" title="Amount to shift the luma height right to find the chroma height.">log2_chroma_h</a>;
<a name="l00090"></a><a class="code" href="structAVPixFmtDescriptor.html#a6da04fdde7dcfd348dede45c6a68c229">00090</a> uint8_t <a class="code" href="structAVPixFmtDescriptor.html#a6da04fdde7dcfd348dede45c6a68c229">flags</a>;
<a name="l00091"></a>00091 <span class="comment"></span>
<a name="l00092"></a>00092 <span class="comment"> /**</span>
<a name="l00093"></a>00093 <span class="comment"> * Parameters that describe how pixels are packed.</span>
<a name="l00094"></a>00094 <span class="comment"> * If the format has 2 or 4 components, then alpha is last.</span>
<a name="l00095"></a>00095 <span class="comment"> * If the format has 1 or 2 components, then luma is 0.</span>
<a name="l00096"></a>00096 <span class="comment"> * If the format has 3 or 4 components:</span>
<a name="l00097"></a>00097 <span class="comment"> * if the RGB flag is set then 0 is red, 1 is green and 2 is blue;</span>
<a name="l00098"></a>00098 <span class="comment"> * otherwise 0 is luma, 1 is chroma-U and 2 is chroma-V.</span>
<a name="l00099"></a>00099 <span class="comment"> */</span>
<a name="l00100"></a><a class="code" href="structAVPixFmtDescriptor.html#a17569c9349766c3b5201b33f84f19a25">00100</a> <a class="code" href="structAVComponentDescriptor.html">AVComponentDescriptor</a> <a class="code" href="structAVPixFmtDescriptor.html#a17569c9349766c3b5201b33f84f19a25" title="Parameters that describe how pixels are packed.">comp</a>[4];
<a name="l00101"></a>00101 <span class="comment"></span>
<a name="l00102"></a>00102 <span class="comment"> /**</span>
<a name="l00103"></a>00103 <span class="comment"> * Alternative comma-separated names.</span>
<a name="l00104"></a>00104 <span class="comment"> */</span>
<a name="l00105"></a><a class="code" href="structAVPixFmtDescriptor.html#a85163c36645d2f372a4e98b314fa964b">00105</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structAVPixFmtDescriptor.html#a85163c36645d2f372a4e98b314fa964b" title="Alternative comma-separated names.">alias</a>;
<a name="l00106"></a>00106 } <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a>;
<a name="l00107"></a>00107 <span class="comment"></span>
<a name="l00108"></a>00108 <span class="comment">/**</span>
<a name="l00109"></a>00109 <span class="comment"> * Pixel format is big-endian.</span>
<a name="l00110"></a>00110 <span class="comment"> */</span>
<a name="l00111"></a><a class="code" href="pixdesc_8h.html#ac7c7d0be16fb9b6f05b3e0d463cd037b">00111</a> <span class="preprocessor">#define AV_PIX_FMT_FLAG_BE (1 << 0)</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00113"></a>00113 <span class="comment"> * Pixel format has a palette in data[1], values are indexes in this palette.</span>
<a name="l00114"></a>00114 <span class="comment"> */</span>
<a name="l00115"></a><a class="code" href="pixdesc_8h.html#af30af160970132a3a31c4738629e4495">00115</a> <span class="preprocessor">#define AV_PIX_FMT_FLAG_PAL (1 << 1)</span>
<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00117"></a>00117 <span class="comment"> * All values of a component are bit-wise packed end to end.</span>
<a name="l00118"></a>00118 <span class="comment"> */</span>
<a name="l00119"></a><a class="code" href="pixdesc_8h.html#a0c6b423a11928d3ec5d2cd3f3b64ee81">00119</a> <span class="preprocessor">#define AV_PIX_FMT_FLAG_BITSTREAM (1 << 2)</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00121"></a>00121 <span class="comment"> * Pixel format is an HW accelerated format.</span>
<a name="l00122"></a>00122 <span class="comment"> */</span>
<a name="l00123"></a><a class="code" href="pixdesc_8h.html#a76f6211b2404231bd7d206ebf4ae46f6">00123</a> <span class="preprocessor">#define AV_PIX_FMT_FLAG_HWACCEL (1 << 3)</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00125"></a>00125 <span class="comment"> * At least one pixel component is not in the first data plane.</span>
<a name="l00126"></a>00126 <span class="comment"> */</span>
<a name="l00127"></a><a class="code" href="pixdesc_8h.html#ab2dcf0e479980cad6c8477d5a53a3638">00127</a> <span class="preprocessor">#define AV_PIX_FMT_FLAG_PLANAR (1 << 4)</span>
<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00129"></a>00129 <span class="comment"> * The pixel format contains RGB-like data (as opposed to YUV/grayscale).</span>
<a name="l00130"></a>00130 <span class="comment"> */</span>
<a name="l00131"></a><a class="code" href="pixdesc_8h.html#a4c4e95f659b1e131480c1e98d70c57de">00131</a> <span class="preprocessor">#define AV_PIX_FMT_FLAG_RGB (1 << 5)</span>
<a name="l00132"></a>00132 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00133"></a>00133 <span class="comment">/**</span>
<a name="l00134"></a>00134 <span class="comment"> * The pixel format is "pseudo-paletted". This means that it contains a</span>
<a name="l00135"></a>00135 <span class="comment"> * fixed palette in the 2nd plane but the palette is fixed/constant for each</span>
<a name="l00136"></a>00136 <span class="comment"> * PIX_FMT. This allows interpreting the data as if it was PAL8, which can</span>
<a name="l00137"></a>00137 <span class="comment"> * in some cases be simpler. Or the data can be interpreted purely based on</span>
<a name="l00138"></a>00138 <span class="comment"> * the pixel format without using the palette.</span>
<a name="l00139"></a>00139 <span class="comment"> * An example of a pseudo-paletted format is AV_PIX_FMT_GRAY8</span>
<a name="l00140"></a>00140 <span class="comment"> */</span>
<a name="l00141"></a><a class="code" href="pixdesc_8h.html#ac6da04f0acd85424801bedcdd949c97d">00141</a> <span class="preprocessor">#define AV_PIX_FMT_FLAG_PSEUDOPAL (1 << 6)</span>
<a name="l00142"></a>00142 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00143"></a>00143 <span class="comment">/**</span>
<a name="l00144"></a>00144 <span class="comment"> * The pixel format has an alpha channel. This is set on all formats that</span>
<a name="l00145"></a>00145 <span class="comment"> * support alpha in some way. The exception is AV_PIX_FMT_PAL8, which can</span>
<a name="l00146"></a>00146 <span class="comment"> * carry alpha as part of the palette. Details are explained in the</span>
<a name="l00147"></a>00147 <span class="comment"> * AVPixelFormat enum, and are also encoded in the corresponding</span>
<a name="l00148"></a>00148 <span class="comment"> * AVPixFmtDescriptor.</span>
<a name="l00149"></a>00149 <span class="comment"> *</span>
<a name="l00150"></a>00150 <span class="comment"> * The alpha is always straight, never pre-multiplied.</span>
<a name="l00151"></a>00151 <span class="comment"> *</span>
<a name="l00152"></a>00152 <span class="comment"> * If a codec or a filter does not support alpha, it should set all alpha to</span>
<a name="l00153"></a>00153 <span class="comment"> * opaque, or use the equivalent pixel formats without alpha component, e.g.</span>
<a name="l00154"></a>00154 <span class="comment"> * AV_PIX_FMT_RGB0 (or AV_PIX_FMT_RGB24 etc.) instead of AV_PIX_FMT_RGBA.</span>
<a name="l00155"></a>00155 <span class="comment"> */</span>
<a name="l00156"></a><a class="code" href="pixdesc_8h.html#a06924ef0ebf07d8742ff8994e3a948bf">00156</a> <span class="preprocessor">#define AV_PIX_FMT_FLAG_ALPHA (1 << 7)</span>
<a name="l00157"></a>00157 <span class="preprocessor"></span>
<a name="l00158"></a>00158 <span class="preprocessor">#if FF_API_PIX_FMT</span>
<a name="l00159"></a>00159 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00160"></a>00160 <span class="comment"> * @deprecated use the AV_PIX_FMT_FLAG_* flags</span>
<a name="l00161"></a>00161 <span class="comment"> */</span>
<a name="l00162"></a>00162 <span class="preprocessor">#define PIX_FMT_BE AV_PIX_FMT_FLAG_BE</span>
<a name="l00163"></a>00163 <span class="preprocessor"></span><span class="preprocessor">#define PIX_FMT_PAL AV_PIX_FMT_FLAG_PAL</span>
<a name="l00164"></a>00164 <span class="preprocessor"></span><span class="preprocessor">#define PIX_FMT_BITSTREAM AV_PIX_FMT_FLAG_BITSTREAM</span>
<a name="l00165"></a>00165 <span class="preprocessor"></span><span class="preprocessor">#define PIX_FMT_HWACCEL AV_PIX_FMT_FLAG_HWACCEL</span>
<a name="l00166"></a>00166 <span class="preprocessor"></span><span class="preprocessor">#define PIX_FMT_PLANAR AV_PIX_FMT_FLAG_PLANAR</span>
<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="preprocessor">#define PIX_FMT_RGB AV_PIX_FMT_FLAG_RGB</span>
<a name="l00168"></a>00168 <span class="preprocessor"></span><span class="preprocessor">#define PIX_FMT_PSEUDOPAL AV_PIX_FMT_FLAG_PSEUDOPAL</span>
<a name="l00169"></a>00169 <span class="preprocessor"></span><span class="preprocessor">#define PIX_FMT_ALPHA AV_PIX_FMT_FLAG_ALPHA</span>
<a name="l00170"></a>00170 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00171"></a>00171 <span class="preprocessor"></span>
<a name="l00172"></a>00172 <span class="preprocessor">#if FF_API_PIX_FMT_DESC</span>
<a name="l00173"></a>00173 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00174"></a>00174 <span class="comment"> * The array of all the pixel format descriptors.</span>
<a name="l00175"></a>00175 <span class="comment"> */</span>
<a name="l00176"></a>00176 <span class="keyword">extern</span> <a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a> <span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> av_pix_fmt_descriptors[];
<a name="l00177"></a>00177 <span class="preprocessor">#endif</span>
<a name="l00178"></a>00178 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00179"></a>00179 <span class="comment">/**</span>
<a name="l00180"></a>00180 <span class="comment"> * Read a line from an image, and write the values of the</span>
<a name="l00181"></a>00181 <span class="comment"> * pixel format component c to dst.</span>
<a name="l00182"></a>00182 <span class="comment"> *</span>
<a name="l00183"></a>00183 <span class="comment"> * @param data the array containing the pointers to the planes of the image</span>
<a name="l00184"></a>00184 <span class="comment"> * @param linesize the array containing the linesizes of the image</span>
<a name="l00185"></a>00185 <span class="comment"> * @param desc the pixel format descriptor for the image</span>
<a name="l00186"></a>00186 <span class="comment"> * @param x the horizontal coordinate of the first pixel to read</span>
<a name="l00187"></a>00187 <span class="comment"> * @param y the vertical coordinate of the first pixel to read</span>
<a name="l00188"></a>00188 <span class="comment"> * @param w the width of the line to read, that is the number of</span>
<a name="l00189"></a>00189 <span class="comment"> * values to write to dst</span>
<a name="l00190"></a>00190 <span class="comment"> * @param read_pal_component if not zero and the format is a paletted</span>
<a name="l00191"></a>00191 <span class="comment"> * format writes the values corresponding to the palette</span>
<a name="l00192"></a>00192 <span class="comment"> * component c in data[1] to dst, rather than the palette indexes in</span>
<a name="l00193"></a>00193 <span class="comment"> * data[0]. The behavior is undefined if the format is not paletted.</span>
<a name="l00194"></a>00194 <span class="comment"> */</span>
<a name="l00195"></a>00195 <span class="keywordtype">void</span> <a class="code" href="pixdesc_8h.html#a8f9e6735f65eec892931823f55280bd3" title="Read a line from an image, and write the values of the pixel format component c to dst...">av_read_image_line</a>(uint16_t *dst, <span class="keyword">const</span> uint8_t *data[4],
<a name="l00196"></a>00196 <span class="keyword">const</span> <span class="keywordtype">int</span> linesize[4], <span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> *desc,
<a name="l00197"></a>00197 <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> c, <span class="keywordtype">int</span> w, <span class="keywordtype">int</span> read_pal_component);
<a name="l00198"></a>00198 <span class="comment"></span>
<a name="l00199"></a>00199 <span class="comment">/**</span>
<a name="l00200"></a>00200 <span class="comment"> * Write the values from src to the pixel format component c of an</span>
<a name="l00201"></a>00201 <span class="comment"> * image line.</span>
<a name="l00202"></a>00202 <span class="comment"> *</span>
<a name="l00203"></a>00203 <span class="comment"> * @param src array containing the values to write</span>
<a name="l00204"></a>00204 <span class="comment"> * @param data the array containing the pointers to the planes of the</span>
<a name="l00205"></a>00205 <span class="comment"> * image to write into. It is supposed to be zeroed.</span>
<a name="l00206"></a>00206 <span class="comment"> * @param linesize the array containing the linesizes of the image</span>
<a name="l00207"></a>00207 <span class="comment"> * @param desc the pixel format descriptor for the image</span>
<a name="l00208"></a>00208 <span class="comment"> * @param x the horizontal coordinate of the first pixel to write</span>
<a name="l00209"></a>00209 <span class="comment"> * @param y the vertical coordinate of the first pixel to write</span>
<a name="l00210"></a>00210 <span class="comment"> * @param w the width of the line to write, that is the number of</span>
<a name="l00211"></a>00211 <span class="comment"> * values to write to the image line</span>
<a name="l00212"></a>00212 <span class="comment"> */</span>
<a name="l00213"></a>00213 <span class="keywordtype">void</span> <a class="code" href="pixdesc_8h.html#a899e2c005100bb2169096bb672e46310" title="Write the values from src to the pixel format component c of an image line.">av_write_image_line</a>(<span class="keyword">const</span> uint16_t *src, uint8_t *data[4],
<a name="l00214"></a>00214 <span class="keyword">const</span> <span class="keywordtype">int</span> linesize[4], <span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> *desc,
<a name="l00215"></a>00215 <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> c, <span class="keywordtype">int</span> w);
<a name="l00216"></a>00216 <span class="comment"></span>
<a name="l00217"></a>00217 <span class="comment">/**</span>
<a name="l00218"></a>00218 <span class="comment"> * Return the pixel format corresponding to name.</span>
<a name="l00219"></a>00219 <span class="comment"> *</span>
<a name="l00220"></a>00220 <span class="comment"> * If there is no pixel format with name name, then looks for a</span>
<a name="l00221"></a>00221 <span class="comment"> * pixel format with the name corresponding to the native endian</span>
<a name="l00222"></a>00222 <span class="comment"> * format of name.</span>
<a name="l00223"></a>00223 <span class="comment"> * For example in a little-endian system, first looks for "gray16",</span>
<a name="l00224"></a>00224 <span class="comment"> * then for "gray16le".</span>
<a name="l00225"></a>00225 <span class="comment"> *</span>
<a name="l00226"></a>00226 <span class="comment"> * Finally if no pixel format has been found, returns AV_PIX_FMT_NONE.</span>
<a name="l00227"></a>00227 <span class="comment"> */</span>
<a name="l00228"></a>00228 <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="pixdesc_8h.html#a925ef18d69c24c3be8c53d5a7dc0660e" title="Return the pixel format corresponding to name.">av_get_pix_fmt</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00229"></a>00229 <span class="comment"></span>
<a name="l00230"></a>00230 <span class="comment">/**</span>
<a name="l00231"></a>00231 <span class="comment"> * Return the short name for a pixel format, NULL in case pix_fmt is</span>
<a name="l00232"></a>00232 <span class="comment"> * unknown.</span>
<a name="l00233"></a>00233 <span class="comment"> *</span>
<a name="l00234"></a>00234 <span class="comment"> * @see av_get_pix_fmt(), av_get_pix_fmt_string()</span>
<a name="l00235"></a>00235 <span class="comment"> */</span>
<a name="l00236"></a>00236 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="pixdesc_8h.html#ab92e2a8a9b58c982560c49df9f01e47e" title="Return the short name for a pixel format, NULL in case pix_fmt is unknown.">av_get_pix_fmt_name</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>);
<a name="l00237"></a>00237 <span class="comment"></span>
<a name="l00238"></a>00238 <span class="comment">/**</span>
<a name="l00239"></a>00239 <span class="comment"> * Print in buf the string corresponding to the pixel format with</span>
<a name="l00240"></a>00240 <span class="comment"> * number pix_fmt, or a header if pix_fmt is negative.</span>
<a name="l00241"></a>00241 <span class="comment"> *</span>
<a name="l00242"></a>00242 <span class="comment"> * @param buf the buffer where to write the string</span>
<a name="l00243"></a>00243 <span class="comment"> * @param buf_size the size of buf</span>
<a name="l00244"></a>00244 <span class="comment"> * @param pix_fmt the number of the pixel format to print the</span>
<a name="l00245"></a>00245 <span class="comment"> * corresponding info string, or a negative value to print the</span>
<a name="l00246"></a>00246 <span class="comment"> * corresponding header.</span>
<a name="l00247"></a>00247 <span class="comment"> */</span>
<a name="l00248"></a>00248 <span class="keywordtype">char</span> *<a class="code" href="pixdesc_8h.html#a2fe7fead602bb1e47832abb978d6ceac" title="Print in buf the string corresponding to the pixel format with number pix_fmt, or a header if pix_fmt...">av_get_pix_fmt_string</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> buf_size,
<a name="l00249"></a>00249 <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>);
<a name="l00250"></a>00250 <span class="comment"></span>
<a name="l00251"></a>00251 <span class="comment">/**</span>
<a name="l00252"></a>00252 <span class="comment"> * Return the number of bits per pixel used by the pixel format</span>
<a name="l00253"></a>00253 <span class="comment"> * described by pixdesc. Note that this is not the same as the number</span>
<a name="l00254"></a>00254 <span class="comment"> * of bits per sample.</span>
<a name="l00255"></a>00255 <span class="comment"> *</span>
<a name="l00256"></a>00256 <span class="comment"> * The returned number of bits refers to the number of bits actually</span>
<a name="l00257"></a>00257 <span class="comment"> * used for storing the pixel information, that is padding bits are</span>
<a name="l00258"></a>00258 <span class="comment"> * not counted.</span>
<a name="l00259"></a>00259 <span class="comment"> */</span>
<a name="l00260"></a>00260 <span class="keywordtype">int</span> <a class="code" href="pixdesc_8h.html#a7b24a65f6bf07585396da3bd301799b2" title="Return the number of bits per pixel used by the pixel format described by pixdesc.">av_get_bits_per_pixel</a>(<span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> *pixdesc);
<a name="l00261"></a>00261 <span class="comment"></span>
<a name="l00262"></a>00262 <span class="comment">/**</span>
<a name="l00263"></a>00263 <span class="comment"> * Return the number of bits per pixel for the pixel format</span>
<a name="l00264"></a>00264 <span class="comment"> * described by pixdesc, including any padding or unused bits.</span>
<a name="l00265"></a>00265 <span class="comment"> */</span>
<a name="l00266"></a>00266 <span class="keywordtype">int</span> <a class="code" href="pixdesc_8h.html#a89cf35c5ef18c9e996c7784e1a893b9e" title="Return the number of bits per pixel for the pixel format described by pixdesc, including any padding ...">av_get_padded_bits_per_pixel</a>(<span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> *pixdesc);
<a name="l00267"></a>00267 <span class="comment"></span>
<a name="l00268"></a>00268 <span class="comment">/**</span>
<a name="l00269"></a>00269 <span class="comment"> * @return a pixel format descriptor for provided pixel format or NULL if</span>
<a name="l00270"></a>00270 <span class="comment"> * this pixel format is unknown.</span>
<a name="l00271"></a>00271 <span class="comment"> */</span>
<a name="l00272"></a>00272 <span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> *<a class="code" href="pixdesc_8h.html#afe0c3e8aef5173de28bbdaea4298f5f0">av_pix_fmt_desc_get</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>);
<a name="l00273"></a>00273 <span class="comment"></span>
<a name="l00274"></a>00274 <span class="comment">/**</span>
<a name="l00275"></a>00275 <span class="comment"> * Iterate over all pixel format descriptors known to libavutil.</span>
<a name="l00276"></a>00276 <span class="comment"> *</span>
<a name="l00277"></a>00277 <span class="comment"> * @param prev previous descriptor. NULL to get the first descriptor.</span>
<a name="l00278"></a>00278 <span class="comment"> *</span>
<a name="l00279"></a>00279 <span class="comment"> * @return next descriptor or NULL after the last descriptor</span>
<a name="l00280"></a>00280 <span class="comment"> */</span>
<a name="l00281"></a>00281 <span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> *<a class="code" href="pixdesc_8h.html#a110de37b82f3a2602d5c6a3e4babc7a8" title="Iterate over all pixel format descriptors known to libavutil.">av_pix_fmt_desc_next</a>(<span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> *prev);
<a name="l00282"></a>00282 <span class="comment"></span>
<a name="l00283"></a>00283 <span class="comment">/**</span>
<a name="l00284"></a>00284 <span class="comment"> * @return an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc</span>
<a name="l00285"></a>00285 <span class="comment"> * is not a valid pointer to a pixel format descriptor.</span>
<a name="l00286"></a>00286 <span class="comment"> */</span>
<a name="l00287"></a>00287 <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="pixdesc_8h.html#a01dfb93fb0e28e789922e9199a4fdb14">av_pix_fmt_desc_get_id</a>(<span class="keyword">const</span> <a class="code" href="structAVPixFmtDescriptor.html" title="Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...">AVPixFmtDescriptor</a> *desc);
<a name="l00288"></a>00288 <span class="comment"></span>
<a name="l00289"></a>00289 <span class="comment">/**</span>
<a name="l00290"></a>00290 <span class="comment"> * Utility function to access log2_chroma_w log2_chroma_h from</span>
<a name="l00291"></a>00291 <span class="comment"> * the pixel format AVPixFmtDescriptor.</span>
<a name="l00292"></a>00292 <span class="comment"> *</span>
<a name="l00293"></a>00293 <span class="comment"> * See av_get_chroma_sub_sample() for a function that asserts a</span>
<a name="l00294"></a>00294 <span class="comment"> * valid pixel format instead of returning an error code.</span>
<a name="l00295"></a>00295 <span class="comment"> * Its recommended that you use avcodec_get_chroma_sub_sample unless</span>
<a name="l00296"></a>00296 <span class="comment"> * you do check the return code!</span>
<a name="l00297"></a>00297 <span class="comment"> *</span>
<a name="l00298"></a>00298 <span class="comment"> * @param[in] pix_fmt the pixel format</span>
<a name="l00299"></a>00299 <span class="comment"> * @param[out] h_shift store log2_chroma_w</span>
<a name="l00300"></a>00300 <span class="comment"> * @param[out] v_shift store log2_chroma_h</span>
<a name="l00301"></a>00301 <span class="comment"> *</span>
<a name="l00302"></a>00302 <span class="comment"> * @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format</span>
<a name="l00303"></a>00303 <span class="comment"> */</span>
<a name="l00304"></a>00304 <span class="keywordtype">int</span> <a class="code" href="pixdesc_8h.html#a76e011cf53b51ea14a002a206f6ca05d" title="Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.">av_pix_fmt_get_chroma_sub_sample</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>,
<a name="l00305"></a>00305 <span class="keywordtype">int</span> *h_shift, <span class="keywordtype">int</span> *v_shift);
<a name="l00306"></a>00306 <span class="comment"></span>
<a name="l00307"></a>00307 <span class="comment">/**</span>
<a name="l00308"></a>00308 <span class="comment"> * @return number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a</span>
<a name="l00309"></a>00309 <span class="comment"> * valid pixel format.</span>
<a name="l00310"></a>00310 <span class="comment"> */</span>
<a name="l00311"></a>00311 <span class="keywordtype">int</span> <a class="code" href="pixdesc_8h.html#a118df1d607abd7484f874b3d7ea8823a">av_pix_fmt_count_planes</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>);
<a name="l00312"></a>00312 <span class="comment"></span>
<a name="l00313"></a>00313 <span class="comment">/**</span>
<a name="l00314"></a>00314 <span class="comment"> * Utility function to swap the endianness of a pixel format.</span>
<a name="l00315"></a>00315 <span class="comment"> *</span>
<a name="l00316"></a>00316 <span class="comment"> * @param[in] pix_fmt the pixel format</span>
<a name="l00317"></a>00317 <span class="comment"> *</span>
<a name="l00318"></a>00318 <span class="comment"> * @return pixel format with swapped endianness if it exists,</span>
<a name="l00319"></a>00319 <span class="comment"> * otherwise AV_PIX_FMT_NONE</span>
<a name="l00320"></a>00320 <span class="comment"> */</span>
<a name="l00321"></a>00321 <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="pixdesc_8h.html#ac2e098ff3b5373af99be8ea954c4f72e" title="Utility function to swap the endianness of a pixel format.">av_pix_fmt_swap_endianness</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="demuxing__decoding_8c.html#a7331e302ea7bb48e0b605a069576e135">pix_fmt</a>);
<a name="l00322"></a>00322
<a name="l00323"></a><a class="code" href="pixdesc_8h.html#a445e6541dde2408332c216b8d0accb2d">00323</a> <span class="preprocessor">#define FF_LOSS_RESOLUTION 0x0001 </span><span class="comment">/**< loss due to resolution change */</span>
<a name="l00324"></a><a class="code" href="pixdesc_8h.html#a979c0713dde53e85a56a83c8094f30a9">00324</a> <span class="preprocessor">#define FF_LOSS_DEPTH 0x0002 </span><span class="comment">/**< loss due to color depth change */</span>
<a name="l00325"></a><a class="code" href="pixdesc_8h.html#a4701dd352b2a194eaed493399ccdca47">00325</a> <span class="preprocessor">#define FF_LOSS_COLORSPACE 0x0004 </span><span class="comment">/**< loss due to color space conversion */</span>
<a name="l00326"></a><a class="code" href="pixdesc_8h.html#a5e5683a0c698af4701cc768f2944b6f4">00326</a> <span class="preprocessor">#define FF_LOSS_ALPHA 0x0008 </span><span class="comment">/**< loss of alpha bits */</span>
<a name="l00327"></a><a class="code" href="pixdesc_8h.html#ae4dedba75cbb41704ce6794f966f10a6">00327</a> <span class="preprocessor">#define FF_LOSS_COLORQUANT 0x0010 </span><span class="comment">/**< loss due to color quantization */</span>
<a name="l00328"></a><a class="code" href="pixdesc_8h.html#a769162ddb5b87080ab7a39291837f832">00328</a> <span class="preprocessor">#define FF_LOSS_CHROMA 0x0020 </span><span class="comment">/**< loss of chroma (e.g. RGB to gray conversion) */</span>
<a name="l00329"></a>00329 <span class="comment"></span>
<a name="l00330"></a>00330 <span class="comment">/**</span>
<a name="l00331"></a>00331 <span class="comment"> * Compute what kind of losses will occur when converting from one specific</span>
<a name="l00332"></a>00332 <span class="comment"> * pixel format to another.</span>
<a name="l00333"></a>00333 <span class="comment"> * When converting from one pixel format to another, information loss may occur.</span>
<a name="l00334"></a>00334 <span class="comment"> * For example, when converting from RGB24 to GRAY, the color information will</span>
<a name="l00335"></a>00335 <span class="comment"> * be lost. Similarly, other losses occur when converting from some formats to</span>
<a name="l00336"></a>00336 <span class="comment"> * other formats. These losses can involve loss of chroma, but also loss of</span>
<a name="l00337"></a>00337 <span class="comment"> * resolution, loss of color depth, loss due to the color space conversion, loss</span>
<a name="l00338"></a>00338 <span class="comment"> * of the alpha bits or loss due to color quantization.</span>
<a name="l00339"></a>00339 <span class="comment"> * av_get_fix_fmt_loss() informs you about the various types of losses</span>
<a name="l00340"></a>00340 <span class="comment"> * which will occur when converting from one pixel format to another.</span>
<a name="l00341"></a>00341 <span class="comment"> *</span>
<a name="l00342"></a>00342 <span class="comment"> * @param[in] dst_pix_fmt destination pixel format</span>
<a name="l00343"></a>00343 <span class="comment"> * @param[in] src_pix_fmt source pixel format</span>
<a name="l00344"></a>00344 <span class="comment"> * @param[in] has_alpha Whether the source pixel format alpha channel is used.</span>
<a name="l00345"></a>00345 <span class="comment"> * @return Combination of flags informing you what kind of losses will occur</span>
<a name="l00346"></a>00346 <span class="comment"> * (maximum loss for an invalid dst_pix_fmt).</span>
<a name="l00347"></a>00347 <span class="comment"> */</span>
<a name="l00348"></a>00348 <span class="keywordtype">int</span> <a class="code" href="pixdesc_8h.html#a69ba6ef97543b19a15236a513e56dffe" title="Compute what kind of losses will occur when converting from one specific pixel format to another...">av_get_pix_fmt_loss</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> dst_pix_fmt,
<a name="l00349"></a>00349 <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> src_pix_fmt,
<a name="l00350"></a>00350 <span class="keywordtype">int</span> has_alpha);
<a name="l00351"></a>00351 <span class="comment"></span>
<a name="l00352"></a>00352 <span class="comment">/**</span>
<a name="l00353"></a>00353 <span class="comment"> * Compute what kind of losses will occur when converting from one specific</span>
<a name="l00354"></a>00354 <span class="comment"> * pixel format to another.</span>
<a name="l00355"></a>00355 <span class="comment"> * When converting from one pixel format to another, information loss may occur.</span>
<a name="l00356"></a>00356 <span class="comment"> * For example, when converting from RGB24 to GRAY, the color information will</span>
<a name="l00357"></a>00357 <span class="comment"> * be lost. Similarly, other losses occur when converting from some formats to</span>
<a name="l00358"></a>00358 <span class="comment"> * other formats. These losses can involve loss of chroma, but also loss of</span>
<a name="l00359"></a>00359 <span class="comment"> * resolution, loss of color depth, loss due to the color space conversion, loss</span>
<a name="l00360"></a>00360 <span class="comment"> * of the alpha bits or loss due to color quantization.</span>
<a name="l00361"></a>00361 <span class="comment"> * av_get_fix_fmt_loss() informs you about the various types of losses</span>
<a name="l00362"></a>00362 <span class="comment"> * which will occur when converting from one pixel format to another.</span>
<a name="l00363"></a>00363 <span class="comment"> *</span>
<a name="l00364"></a>00364 <span class="comment"> * @param[in] dst_pix_fmt destination pixel format</span>
<a name="l00365"></a>00365 <span class="comment"> * @param[in] src_pix_fmt source pixel format</span>
<a name="l00366"></a>00366 <span class="comment"> * @param[in] has_alpha Whether the source pixel format alpha channel is used.</span>
<a name="l00367"></a>00367 <span class="comment"> * @return Combination of flags informing you what kind of losses will occur</span>
<a name="l00368"></a>00368 <span class="comment"> * (maximum loss for an invalid dst_pix_fmt).</span>
<a name="l00369"></a>00369 <span class="comment"> */</span>
<a name="l00370"></a>00370 <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> <a class="code" href="pixdesc_8h.html#a875f1e7a15d882d4cd9d38dde093939b" title="Compute what kind of losses will occur when converting from one specific pixel format to another...">av_find_best_pix_fmt_of_2</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> dst_pix_fmt1, <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> dst_pix_fmt2,
<a name="l00371"></a>00371 <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> src_pix_fmt, <span class="keywordtype">int</span> has_alpha, <span class="keywordtype">int</span> *loss_ptr);
<a name="l00372"></a>00372 <span class="comment"></span>
<a name="l00373"></a>00373 <span class="comment">/**</span>
<a name="l00374"></a>00374 <span class="comment"> * @return the name for provided color range or NULL if unknown.</span>
<a name="l00375"></a>00375 <span class="comment"> */</span>
<a name="l00376"></a>00376 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="pixdesc_8h.html#a590decf389632dd3af095f3096a92caf">av_color_range_name</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a3da0bf691418bc22c4bcbe6583ad589a" title="MPEG vs JPEG YUV range.">AVColorRange</a> range);
<a name="l00377"></a>00377 <span class="comment"></span>
<a name="l00378"></a>00378 <span class="comment">/**</span>
<a name="l00379"></a>00379 <span class="comment"> * @return the name for provided color primaries or NULL if unknown.</span>
<a name="l00380"></a>00380 <span class="comment"> */</span>
<a name="l00381"></a>00381 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="pixdesc_8h.html#a811dbb6cf48bbcd66a1243bdd6d89909">av_color_primaries_name</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#ad384ee5a840bafd73daef08e6d9cafe7" title="Chromaticity coordinates of the source primaries.">AVColorPrimaries</a> primaries);
<a name="l00382"></a>00382 <span class="comment"></span>
<a name="l00383"></a>00383 <span class="comment">/**</span>
<a name="l00384"></a>00384 <span class="comment"> * @return the name for provided color transfer or NULL if unknown.</span>
<a name="l00385"></a>00385 <span class="comment"> */</span>
<a name="l00386"></a>00386 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="pixdesc_8h.html#a2ebc788f298dc96bc647ebcdeeb5d0b2">av_color_transfer_name</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#ad4791ea14975f098b649db7fcd731ce6" title="Color Transfer Characteristic.">AVColorTransferCharacteristic</a> transfer);
<a name="l00387"></a>00387 <span class="comment"></span>
<a name="l00388"></a>00388 <span class="comment">/**</span>
<a name="l00389"></a>00389 <span class="comment"> * @return the name for provided color space or NULL if unknown.</span>
<a name="l00390"></a>00390 <span class="comment"> */</span>
<a name="l00391"></a>00391 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="pixdesc_8h.html#a7a5b3f4d128f0a0112b4a91f75055339">av_color_space_name</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#aff71a069509a1ad3ff54d53a1c894c85" title="YUV colorspace type.">AVColorSpace</a> space);
<a name="l00392"></a>00392 <span class="comment"></span>
<a name="l00393"></a>00393 <span class="comment">/**</span>
<a name="l00394"></a>00394 <span class="comment"> * @return the name for provided chroma location or NULL if unknown.</span>
<a name="l00395"></a>00395 <span class="comment"> */</span>
<a name="l00396"></a>00396 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="pixdesc_8h.html#a3b2ac1ac88c1fe89c049057c150b437a">av_chroma_location_name</a>(<span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a1f86ed1b6a420faccacf77c98db6c1ff" title="Location of chroma samples.">AVChromaLocation</a> location);
<a name="l00397"></a>00397
<a name="l00398"></a>00398 <span class="preprocessor">#endif </span><span class="comment">/* AVUTIL_PIXDESC_H */</span>
</pre></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>