Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > a3df0d9d8542dc1f46770d317f9f7add > files > 90

libvpx-devel-0.9.6-1.fc15.i686.rpm

<!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"/>
<title>WebM VP8 Codec SDK: Decoding</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">WebM VP8 Codec SDK</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="usage.html">Usage</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<h1>Decoding </h1>  </div>
</div>
<div class="contents">
<div class="textblock"><p>The <a class="el" href="group__decoder.html#ga3441e157a7a69108bca9a069f2ee8e0d" title="Decode data.">vpx_codec_decode()</a> function is at the core of the decode loop. It processes packets of compressed data passed by the application, producing decoded images. The decoder expects packets to comprise exactly one image frame of data. Packets <a class="el" href="rfc2119.html#MUST">MUST</a> be passed in decode order. If the application wishes to associate some data with the frame, the <code>user_priv</code> member may be set. The <code>deadline</code> parameter controls the amount of time in microseconds the decoder should spend working on the frame. This is typically used to support adaptive <a class="el" href="usage_decode.html#usage_postproc">Postprocessing</a> based on the amount of free CPU time. For more information on the <code>deadline</code> parameter, see <a class="el" href="usage.html#usage_deadline">Deadline</a>.</p>
<p><a class="el" href="samples.html">Sample Code</a></p>
<h2><a class="anchor" id="usage_cb"></a>
Callback Based Decoding</h2>
<p>There are two methods for the application to access decoded frame data. Some codecs support asynchronous (callback-based) decoding <a class="el" href="usage.html#usage_features">Features</a> that allow the application to register a callback to be invoked by the decoder when decoded data becomes available. Decoders are not required to support this feature, however. Like all <a class="el" href="usage.html#usage_features">Features</a>, support can be determined by calling <a class="el" href="group__codec.html#ga43adff58759093401235fb99247c82b8" title="Get the capabilities of an algorithm.">vpx_codec_get_caps()</a>. Callbacks are available in both frame-based and slice-based variants. Frame based callbacks conform to the signature of <a class="el" href="group__cap__put__frame.html#ga1c3d3d07ec4f907dc426bbd6d70862ec" title="put frame callback prototype">vpx_codec_put_frame_cb_fn_t</a> and are invoked once the entire frame has been decoded. Slice based callbacks conform to the signature of <a class="el" href="group__cap__put__slice.html#ga344dbbf130aa9632aee94cee1f3cef44" title="put slice callback prototype">vpx_codec_put_slice_cb_fn_t</a> and are invoked after a subsection of the frame is decoded. For example, a slice callback could be issued for each macroblock row. However, the number and size of slices to return is implementation specific. Also, the image data passed in a slice callback is not necessarily in the same memory segment as the data will be when it is assembled into a full frame. For this reason, the application <a class="el" href="rfc2119.html#MUST">MUST</a> examine the rectangles that describe what data is valid to access and what data has been updated in this call. For all their additional complexity, slice based decoding callbacks provide substantial speed gains to the overall application in some cases, due to improved cache behavior.</p>
<h2><a class="anchor" id="usage_frame_iter"></a>
Frame Iterator Based Decoding</h2>
<p>If the codec does not support callback based decoding, or the application chooses not to make use of that feature, decoded frames are made available through the <a class="el" href="group__decoder.html#ga0e231c3a5ce445fdb2268d741da97500" title="Decoded frames iterator.">vpx_codec_get_frame()</a> iterator. The application initializes the iterator storage (of type <a class="el" href="group__codec.html#ga6ea348f76b1f8a1fe50e14db684146c6" title="Iterator.">vpx_codec_iter_t</a>) to NULL, then calls vpx_codec_get_frame repeatedly until it returns NULL, indicating that all images have been returned. This process may result in zero, one, or many frames that are ready for display, depending on the codec.</p>
<h2><a class="anchor" id="usage_postproc"></a>
Postprocessing</h2>
<p>Postprocessing is a process that is applied after a frame is decoded to enhance the image's appearance by removing artifacts introduced in the compression process. It is not required to properly decode the frame, and is generally done only when there is enough spare CPU time to execute the required filters. Codecs may support a number of different postprocessing filters, and the available filters may differ from platform to platform. Embedded devices often do not have enough CPU to implement postprocessing in software. The filter selection is generally handled automatically by the codec, depending on the amount of time remaining before hitting the user-specified <a class="el" href="usage.html#usage_deadline">Deadline</a> after decoding the frame. </p>
</div></div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Mar 10 2011 for WebM VP8 Codec SDK by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>