<!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: vpx/vpx_decoder.h Source File</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.4 --> <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 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> </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 class="header"> <div class="headertitle"> <div class="title">vpx/vpx_decoder.h</div> </div> </div> <div class="contents"> <a href="vpx__decoder_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"> * Copyright (c) 2010 The WebM project authors. All Rights Reserved.</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * Use of this source code is governed by a BSD-style license</span> <a name="l00005"></a>00005 <span class="comment"> * that can be found in the LICENSE file in the root of the source</span> <a name="l00006"></a>00006 <span class="comment"> * tree. An additional intellectual property rights grant can be found</span> <a name="l00007"></a>00007 <span class="comment"> * in the file PATENTS. All contributing project authors may</span> <a name="l00008"></a>00008 <span class="comment"> * be found in the AUTHORS file in the root of the source tree.</span> <a name="l00009"></a>00009 <span class="comment"> */</span> <a name="l00010"></a>00010 <a name="l00011"></a>00011 <a name="l00027"></a>00027 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00028"></a>00028 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { <a name="l00029"></a>00029 <span class="preprocessor">#endif</span> <a name="l00030"></a>00030 <span class="preprocessor"></span> <a name="l00031"></a>00031 <span class="preprocessor">#ifndef VPX_DECODER_H</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define VPX_DECODER_H</span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="vpx__codec_8h.html" title="Describes the codec algorithm interface to applications.">vpx_codec.h</a>"</span> <a name="l00034"></a>00034 <a name="l00043"></a><a class="code" href="group__decoder.html#ga462b459e7ae13937e1eae1776245db12">00043</a> <span class="preprocessor">#define VPX_DECODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) </span> <a name="l00053"></a><a class="code" href="group__decoder.html#ga9e33b8ee81025d5fc3d01b0975ad5f96">00053</a> <span class="preprocessor">#define VPX_CODEC_CAP_PUT_SLICE 0x10000 </span> <a name="l00054"></a><a class="code" href="group__decoder.html#ga0ef59ca8067ac1dc8c8378042277ccc8">00054</a> <span class="preprocessor">#define VPX_CODEC_CAP_PUT_FRAME 0x20000 </span> <a name="l00055"></a><a class="code" href="group__decoder.html#ga7825ade982ab85a5583d3d8a669baa3b">00055</a> <span class="preprocessor">#define VPX_CODEC_CAP_POSTPROC 0x40000 </span> <a name="l00056"></a><a class="code" href="group__decoder.html#gac44cd9e4722e1eb32a37c3eaec8d97b9">00056</a> <span class="preprocessor">#define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000 </span> <a name="l00058"></a><a class="code" href="group__decoder.html#ga7830b3b528a9c1b2dddd4c72076b8f60">00058</a> <span class="preprocessor">#define VPX_CODEC_CAP_INPUT_PARTITION 0x100000 </span> <a name="l00068"></a><a class="code" href="group__decoder.html#ga6fe14f30254aff769412b128b29664cc">00068</a> <span class="preprocessor">#define VPX_CODEC_USE_POSTPROC 0x10000 </span> <a name="l00069"></a><a class="code" href="group__decoder.html#ga520d7005e360202f5844982fa2392581">00069</a> <span class="preprocessor">#define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000 </span> <a name="l00071"></a><a class="code" href="group__decoder.html#gae0d9ce0b24127d10b5b554fb61e3a7ca">00071</a> <span class="preprocessor">#define VPX_CODEC_USE_INPUT_PARTITION 0x40000 </span> <a name="l00081"></a><a class="code" href="structvpx__codec__stream__info.html">00081</a> <span class="preprocessor"> typedef struct vpx_codec_stream_info</span> <a name="l00082"></a>00082 <span class="preprocessor"></span> { <a name="l00083"></a><a class="code" href="structvpx__codec__stream__info.html#a8e5eb38a9042da54a20607f71591ddbf">00083</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__stream__info.html#a8e5eb38a9042da54a20607f71591ddbf">sz</a>; <a name="l00084"></a><a class="code" href="structvpx__codec__stream__info.html#a957dbfa83c93d9b3dc08498a6b97c77d">00084</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__stream__info.html#a957dbfa83c93d9b3dc08498a6b97c77d">w</a>; <a name="l00085"></a><a class="code" href="structvpx__codec__stream__info.html#af7a8b114547e434d182c722bdace63a0">00085</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__stream__info.html#af7a8b114547e434d182c722bdace63a0">h</a>; <a name="l00086"></a><a class="code" href="structvpx__codec__stream__info.html#a8c9060997f16d43219462554c882dbd3">00086</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__stream__info.html#a8c9060997f16d43219462554c882dbd3">is_kf</a>; <a name="l00087"></a>00087 } <a class="code" href="group__decoder.html#ga900420e8f7cb9c1b3070b2ba7d636974" title="Stream properties.">vpx_codec_stream_info_t</a>; <a name="l00088"></a>00088 <a name="l00089"></a>00089 <span class="comment">/* REQUIRED FUNCTIONS</span> <a name="l00090"></a>00090 <span class="comment"> *</span> <a name="l00091"></a>00091 <span class="comment"> * The following functions are required to be implemented for all decoders.</span> <a name="l00092"></a>00092 <span class="comment"> * They represent the base case functionality expected of all decoders.</span> <a name="l00093"></a>00093 <span class="comment"> */</span> <a name="l00094"></a>00094 <a name="l00095"></a>00095 <a name="l00101"></a><a class="code" href="structvpx__codec__dec__cfg.html">00101</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structvpx__codec__dec__cfg.html" title="Initialization Configurations.">vpx_codec_dec_cfg</a> <a name="l00102"></a>00102 { <a name="l00103"></a><a class="code" href="structvpx__codec__dec__cfg.html#afca69d81e99ee15e1d641a639aefb7eb">00103</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__dec__cfg.html#afca69d81e99ee15e1d641a639aefb7eb">threads</a>; <a name="l00104"></a><a class="code" href="structvpx__codec__dec__cfg.html#acf188f8a7e6c8e1d1a7f488a76f9da42">00104</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__dec__cfg.html#acf188f8a7e6c8e1d1a7f488a76f9da42">w</a>; <a name="l00105"></a><a class="code" href="structvpx__codec__dec__cfg.html#a45311c284e8371d58eb403437db5f2f9">00105</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__dec__cfg.html#a45311c284e8371d58eb403437db5f2f9">h</a>; <a name="l00106"></a>00106 } <a class="code" href="group__decoder.html#ga4a2e808eb43f1e798024b5a409c484f9" title="Initialization Configurations.">vpx_codec_dec_cfg_t</a>; <a name="l00131"></a>00131 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__decoder.html#ga26fe82cf8fd697f885935cea53be964f" title="Initialize a decoder instance.">vpx_codec_dec_init_ver</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00132"></a>00132 <a class="code" href="group__codec.html#gad654f3da60151f5dfef70aca00ef1e9e" title="Codec interface structure.">vpx_codec_iface_t</a> *iface, <a name="l00133"></a>00133 <a class="code" href="structvpx__codec__dec__cfg.html" title="Initialization Configurations.">vpx_codec_dec_cfg_t</a> *cfg, <a name="l00134"></a>00134 <a class="code" href="group__codec.html#ga3b36d5af89ddc463489fe5bde0a57877" title="Initialization-time Feature Enabling.">vpx_codec_flags_t</a> flags, <a name="l00135"></a>00135 <span class="keywordtype">int</span> ver); <a name="l00136"></a>00136 <a name="l00141"></a><a class="code" href="group__decoder.html#ga8c2f0b12f1bd4927eb3c68b01eab19d3">00141</a> <span class="preprocessor">#define vpx_codec_dec_init(ctx, iface, cfg, flags) \</span> <a name="l00142"></a>00142 <span class="preprocessor"> vpx_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION)</span> <a name="l00143"></a>00143 <span class="preprocessor"></span> <a name="l00144"></a>00144 <a name="l00162"></a>00162 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__decoder.html#gadfee4664d644175d5aac1465ef11c4b0" title="Parse stream info from a buffer.">vpx_codec_peek_stream_info</a>(<a class="code" href="group__codec.html#gad654f3da60151f5dfef70aca00ef1e9e" title="Codec interface structure.">vpx_codec_iface_t</a> *iface, <a name="l00163"></a>00163 <span class="keyword">const</span> uint8_t *data, <a name="l00164"></a>00164 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> data_sz, <a name="l00165"></a>00165 <a class="code" href="structvpx__codec__stream__info.html" title="Stream properties.">vpx_codec_stream_info_t</a> *si); <a name="l00166"></a>00166 <a name="l00167"></a>00167 <a name="l00181"></a>00181 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__decoder.html#ga552f1044d36a84e8b05ce6902e9ae8c9" title="Return information about the current stream.">vpx_codec_get_stream_info</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00182"></a>00182 <a class="code" href="structvpx__codec__stream__info.html" title="Stream properties.">vpx_codec_stream_info_t</a> *si); <a name="l00183"></a>00183 <a name="l00184"></a>00184 <a name="l00213"></a>00213 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__decoder.html#ga3441e157a7a69108bca9a069f2ee8e0d" title="Decode data.">vpx_codec_decode</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00214"></a>00214 <span class="keyword">const</span> uint8_t *data, <a name="l00215"></a>00215 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> data_sz, <a name="l00216"></a>00216 <span class="keywordtype">void</span> *user_priv, <a name="l00217"></a>00217 <span class="keywordtype">long</span> deadline); <a name="l00218"></a>00218 <a name="l00219"></a>00219 <a name="l00235"></a>00235 <a class="code" href="structvpx__image.html" title="Image Descriptor.">vpx_image_t</a> *<a class="code" href="group__decoder.html#ga0e231c3a5ce445fdb2268d741da97500" title="Decoded frames iterator.">vpx_codec_get_frame</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00236"></a>00236 <a class="code" href="group__codec.html#ga6ea348f76b1f8a1fe50e14db684146c6" title="Iterator.">vpx_codec_iter_t</a> *iter); <a name="l00237"></a>00237 <a name="l00238"></a>00238 <a name="l00253"></a><a class="code" href="group__cap__put__frame.html#ga1c3d3d07ec4f907dc426bbd6d70862ec">00253</a> <span class="keyword">typedef</span> void (*<a class="code" href="group__cap__put__frame.html#ga1c3d3d07ec4f907dc426bbd6d70862ec" title="put frame callback prototype">vpx_codec_put_frame_cb_fn_t</a>)(<span class="keywordtype">void</span> *user_priv, <a name="l00254"></a>00254 <span class="keyword">const</span> <a class="code" href="structvpx__image.html" title="Image Descriptor.">vpx_image_t</a> *img); <a name="l00255"></a>00255 <a name="l00256"></a>00256 <a name="l00272"></a>00272 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__cap__put__frame.html#ga299c2d1b265a22a680f117dd686e31ce" title="Register for notification of frame completion.">vpx_codec_register_put_frame_cb</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00273"></a>00273 <a class="code" href="group__cap__put__frame.html#ga1c3d3d07ec4f907dc426bbd6d70862ec" title="put frame callback prototype">vpx_codec_put_frame_cb_fn_t</a> cb, <a name="l00274"></a>00274 <span class="keywordtype">void</span> *user_priv); <a name="l00275"></a>00275 <a name="l00276"></a>00276 <a name="l00293"></a><a class="code" href="group__cap__put__slice.html#ga344dbbf130aa9632aee94cee1f3cef44">00293</a> <span class="keyword">typedef</span> void (*<a class="code" href="group__cap__put__slice.html#ga344dbbf130aa9632aee94cee1f3cef44" title="put slice callback prototype">vpx_codec_put_slice_cb_fn_t</a>)(<span class="keywordtype">void</span> *user_priv, <a name="l00294"></a>00294 <span class="keyword">const</span> <a class="code" href="structvpx__image.html" title="Image Descriptor.">vpx_image_t</a> *img, <a name="l00295"></a>00295 <span class="keyword">const</span> <a class="code" href="structvpx__image__rect.html" title="Representation of a rectangle on a surface.">vpx_image_rect_t</a> *valid, <a name="l00296"></a>00296 <span class="keyword">const</span> <a class="code" href="structvpx__image__rect.html" title="Representation of a rectangle on a surface.">vpx_image_rect_t</a> *update); <a name="l00297"></a>00297 <a name="l00298"></a>00298 <a name="l00314"></a>00314 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__cap__put__slice.html#gaffcc69a8134406fc653500759b696b8e" title="Register for notification of slice completion.">vpx_codec_register_put_slice_cb</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00315"></a>00315 <a class="code" href="group__cap__put__slice.html#ga344dbbf130aa9632aee94cee1f3cef44" title="put slice callback prototype">vpx_codec_put_slice_cb_fn_t</a> cb, <a name="l00316"></a>00316 <span class="keywordtype">void</span> *user_priv); <a name="l00317"></a>00317 <a name="l00318"></a>00318 <a name="l00323"></a>00323 <span class="preprocessor">#endif</span> <a name="l00324"></a>00324 <span class="preprocessor"></span> <a name="l00325"></a>00325 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00326"></a>00326 <span class="preprocessor"></span>} <a name="l00327"></a>00327 <span class="preprocessor">#endif</span> <a name="l00328"></a>00328 <span class="preprocessor"></span> <a name="l00329"></a>00329 <span class="preprocessor">#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT</span> <a name="l00330"></a>00330 <span class="preprocessor"></span><span class="preprocessor">#include "vpx_decoder_compat.h"</span> <a name="l00331"></a>00331 <span class="preprocessor">#endif</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated on Tue Aug 16 2011 for WebM VP8 Codec SDK by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>