<!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_encoder.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_encoder.h</div> </div> </div> <div class="contents"> <a href="vpx__encoder_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_ENCODER_H</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define VPX_ENCODER_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="l00035"></a>00035 <a name="l00044"></a><a class="code" href="group__encoder.html#gaa4f0b52293c08ba672429c3a03648b9d">00044</a> <span class="preprocessor">#define VPX_ENCODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) </span> <a name="l00056"></a><a class="code" href="group__encoder.html#ga398803f408d6f71aae730b5ee7793e1c">00056</a> <span class="preprocessor">#define VPX_CODEC_CAP_PSNR 0x10000 </span> <a name="l00063"></a><a class="code" href="group__encoder.html#ga69768adb51faa28d98870cbc77e9ea93">00063</a> <span class="preprocessor">#define VPX_CODEC_CAP_OUTPUT_PARTITION 0x20000</span> <a name="l00064"></a>00064 <span class="preprocessor"></span> <a name="l00065"></a>00065 <a name="l00073"></a><a class="code" href="group__encoder.html#ga57bb9eb1881c7e4bf86580660a5e40a0">00073</a> <span class="preprocessor">#define VPX_CODEC_USE_PSNR 0x10000 </span> <a name="l00074"></a><a class="code" href="group__encoder.html#gac26cd92b3719953aa0fbb0ff8c1d9c8d">00074</a> <span class="preprocessor">#define VPX_CODEC_USE_OUTPUT_PARTITION 0x20000 </span> <a name="l00082"></a><a class="code" href="structvpx__fixed__buf.html">00082</a> <span class="preprocessor"> typedef struct vpx_fixed_buf</span> <a name="l00083"></a>00083 <span class="preprocessor"></span> { <a name="l00084"></a><a class="code" href="structvpx__fixed__buf.html#ac93e43ae3fcc1023dca86d37016ae3f0">00084</a> <span class="keywordtype">void</span> *<a class="code" href="structvpx__fixed__buf.html#ac93e43ae3fcc1023dca86d37016ae3f0">buf</a>; <a name="l00085"></a><a class="code" href="structvpx__fixed__buf.html#a43d7f8247ed9752f65f0a7639817ae84">00085</a> <span class="keywordtype">size_t</span> <a class="code" href="structvpx__fixed__buf.html#a43d7f8247ed9752f65f0a7639817ae84">sz</a>; <a name="l00086"></a>00086 } <a class="code" href="group__encoder.html#ga21fab7dd28065f349c97165501223764" title="Generic fixed size buffer structure.">vpx_fixed_buf_t</a>; <a name="l00094"></a><a class="code" href="group__encoder.html#ga7e711b0a71c65aef8f0faea8bd57b05f">00094</a> <span class="keyword">typedef</span> int64_t <a class="code" href="group__encoder.html#ga7e711b0a71c65aef8f0faea8bd57b05f" title="Time Stamp Type.">vpx_codec_pts_t</a>; <a name="l00095"></a>00095 <a name="l00096"></a>00096 <a name="l00104"></a><a class="code" href="group__encoder.html#gaac8ee319b9a6175f6946f59437c7ae4b">00104</a> <span class="keyword">typedef</span> uint32_t <a class="code" href="group__encoder.html#gaac8ee319b9a6175f6946f59437c7ae4b" title="Compressed Frame Flags.">vpx_codec_frame_flags_t</a>; <a name="l00105"></a><a class="code" href="group__encoder.html#ga7a896eb3bc74f33419e6a9812c60e4c9">00105</a> <span class="preprocessor">#define VPX_FRAME_IS_KEY 0x1 </span> <a name="l00106"></a><a class="code" href="group__encoder.html#gab899503032065a30ac6864b4c89626a9">00106</a> <span class="preprocessor">#define VPX_FRAME_IS_DROPPABLE 0x2 </span> <a name="l00109"></a><a class="code" href="group__encoder.html#ga060d7e881d249bdb6e1a29b42e559685">00109</a> <span class="preprocessor">#define VPX_FRAME_IS_INVISIBLE 0x4 </span> <a name="l00111"></a><a class="code" href="group__encoder.html#gafb9f7dbf9b8a764c521d8b12c0e6959d">00111</a> <span class="preprocessor">#define VPX_FRAME_IS_FRAGMENT 0x8 </span> <a name="l00120"></a><a class="code" href="group__encoder.html#ga77e0e1fff62556a4f4d54c84467a41f3">00120</a> <span class="preprocessor"> typedef uint32_t vpx_codec_er_flags_t;</span> <a name="l00121"></a><a class="code" href="group__encoder.html#ga651e80c00662995ac9151bb7433db3e5">00121</a> <span class="preprocessor"></span><span class="preprocessor">#define VPX_ERROR_RESILIENT_DEFAULT 0x1 </span> <a name="l00123"></a><a class="code" href="group__encoder.html#gac9b4ca99f12504d951589fac6854fc09">00123</a> <span class="preprocessor">#define VPX_ERROR_RESILIENT_PARTITIONS 0x2 </span> <a name="l00138"></a><a class="code" href="group__encoder.html#ga28a79375279536526552af3a83d2ed72">00138</a> <span class="preprocessor"> enum vpx_codec_cx_pkt_kind</span> <a name="l00139"></a>00139 <span class="preprocessor"></span> { <a name="l00140"></a><a class="code" href="group__encoder.html#gga28a79375279536526552af3a83d2ed72a2261aae5594289400e812fb1e6b6b0cc">00140</a> <a class="code" href="group__encoder.html#gga28a79375279536526552af3a83d2ed72a2261aae5594289400e812fb1e6b6b0cc">VPX_CODEC_CX_FRAME_PKT</a>, <a name="l00141"></a><a class="code" href="group__encoder.html#gga28a79375279536526552af3a83d2ed72a77cd8b95d9891bcce36117f5f31994fd">00141</a> <a class="code" href="group__encoder.html#gga28a79375279536526552af3a83d2ed72a77cd8b95d9891bcce36117f5f31994fd">VPX_CODEC_STATS_PKT</a>, <a name="l00142"></a><a class="code" href="group__encoder.html#gga28a79375279536526552af3a83d2ed72a11eefa1328e6d22eb7c844645a260628">00142</a> <a class="code" href="group__encoder.html#gga28a79375279536526552af3a83d2ed72a11eefa1328e6d22eb7c844645a260628">VPX_CODEC_PSNR_PKT</a>, <a name="l00143"></a><a class="code" href="group__encoder.html#gga28a79375279536526552af3a83d2ed72a7b54c122969397b1926de853d28b3c80">00143</a> <a class="code" href="group__encoder.html#gga28a79375279536526552af3a83d2ed72a7b54c122969397b1926de853d28b3c80">VPX_CODEC_CUSTOM_PKT</a> = 256 <a name="l00144"></a>00144 }; <a name="l00145"></a>00145 <a name="l00146"></a>00146 <a name="l00152"></a><a class="code" href="structvpx__codec__cx__pkt.html">00152</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structvpx__codec__cx__pkt.html" title="Encoder output packet.">vpx_codec_cx_pkt</a> <a name="l00153"></a>00153 { <a name="l00154"></a><a class="code" href="structvpx__codec__cx__pkt.html#a41f395b39516343c1329a4a85a0084f2">00154</a> <span class="keyword">enum</span> <a class="code" href="group__encoder.html#ga28a79375279536526552af3a83d2ed72" title="Encoder output packet variants.">vpx_codec_cx_pkt_kind</a> <a class="code" href="structvpx__codec__cx__pkt.html#a41f395b39516343c1329a4a85a0084f2">kind</a>; <a name="l00155"></a>00155 <span class="keyword">union</span> <a name="l00156"></a>00156 { <a name="l00157"></a>00157 <span class="keyword">struct</span> <a name="l00158"></a>00158 { <a name="l00159"></a><a class="code" href="structvpx__codec__cx__pkt.html#a9e1db068593b6037e70b05b5239784d2">00159</a> <span class="keywordtype">void</span> *<a class="code" href="structvpx__codec__cx__pkt.html#a9e1db068593b6037e70b05b5239784d2">buf</a>; <a name="l00160"></a><a class="code" href="structvpx__codec__cx__pkt.html#a857321ba2dc65e81c430d14c36a542d9">00160</a> <span class="keywordtype">size_t</span> <a class="code" href="structvpx__codec__cx__pkt.html#a857321ba2dc65e81c430d14c36a542d9">sz</a>; <a name="l00161"></a><a class="code" href="structvpx__codec__cx__pkt.html#aa75fe039fe6b47fb25d20684864bef12">00161</a> vpx_codec_pts_t <a class="code" href="structvpx__codec__cx__pkt.html#aa75fe039fe6b47fb25d20684864bef12">pts</a>; <a name="l00163"></a><a class="code" href="structvpx__codec__cx__pkt.html#afb8d9069980e759d97d2eb9fae7e5e06">00163</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structvpx__codec__cx__pkt.html#afb8d9069980e759d97d2eb9fae7e5e06">duration</a>; <a name="l00165"></a><a class="code" href="structvpx__codec__cx__pkt.html#a3876fe0306342611465e9c15c6c4ae2f">00165</a> vpx_codec_frame_flags_t <a class="code" href="structvpx__codec__cx__pkt.html#a3876fe0306342611465e9c15c6c4ae2f">flags</a>; <a name="l00166"></a><a class="code" href="structvpx__codec__cx__pkt.html#aaffee6af93af238ca7a145fb56c6d6f7">00166</a> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__cx__pkt.html#aaffee6af93af238ca7a145fb56c6d6f7">partition_id</a>; <a name="l00173"></a>00173 } <a class="code" href="structvpx__codec__cx__pkt.html#a81e33bf4408a3983abb16492fee359ff">frame</a>; <a name="l00174"></a><a class="code" href="structvpx__codec__cx__pkt.html#a53db8576979fa7335e478eb849b256f1">00174</a> <span class="keyword">struct </span><a class="code" href="structvpx__fixed__buf.html" title="Generic fixed size buffer structure.">vpx_fixed_buf</a> <a class="code" href="structvpx__codec__cx__pkt.html#a53db8576979fa7335e478eb849b256f1">twopass_stats</a>; <a name="l00175"></a>00175 <span class="keyword">struct </span>vpx_psnr_pkt <a name="l00176"></a>00176 { <a name="l00177"></a><a class="code" href="structvpx__codec__cx__pkt.html#a4d3fc7eb2d19c5913c6f3f474e5cf77b">00177</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__cx__pkt.html#a4d3fc7eb2d19c5913c6f3f474e5cf77b">samples</a>[4]; <a name="l00178"></a><a class="code" href="structvpx__codec__cx__pkt.html#ad65e918d3f26743cc7a8898b88bcb397">00178</a> uint64_t <a class="code" href="structvpx__codec__cx__pkt.html#ad65e918d3f26743cc7a8898b88bcb397">sse</a>[4]; <a name="l00179"></a><a class="code" href="structvpx__codec__cx__pkt.html#a63744aeceb50355d6402d55309c151b6">00179</a> <span class="keywordtype">double</span> <a class="code" href="structvpx__codec__cx__pkt.html#a63744aeceb50355d6402d55309c151b6">psnr</a>[4]; <a name="l00180"></a>00180 } <a class="code" href="structvpx__codec__cx__pkt.html#a63744aeceb50355d6402d55309c151b6">psnr</a>; <a name="l00181"></a><a class="code" href="structvpx__codec__cx__pkt.html#acc7ee91ea9c907aea7c3b953324f7c26">00181</a> <span class="keyword">struct </span><a class="code" href="structvpx__fixed__buf.html" title="Generic fixed size buffer structure.">vpx_fixed_buf</a> <a class="code" href="structvpx__codec__cx__pkt.html#acc7ee91ea9c907aea7c3b953324f7c26">raw</a>; <a name="l00183"></a>00183 <span class="comment">/* This packet size is fixed to allow codecs to extend this</span> <a name="l00184"></a>00184 <span class="comment"> * interface without having to manage storage for raw packets,</span> <a name="l00185"></a>00185 <span class="comment"> * i.e., if it's smaller than 128 bytes, you can store in the</span> <a name="l00186"></a>00186 <span class="comment"> * packet list directly.</span> <a name="l00187"></a>00187 <span class="comment"> */</span> <a name="l00188"></a><a class="code" href="structvpx__codec__cx__pkt.html#a49a0ba012fdabd49bff8069dfacf6ced">00188</a> <span class="keywordtype">char</span> <a class="code" href="structvpx__codec__cx__pkt.html#a49a0ba012fdabd49bff8069dfacf6ced">pad</a>[128 - <span class="keyword">sizeof</span>(<span class="keyword">enum</span> <a class="code" href="group__encoder.html#ga28a79375279536526552af3a83d2ed72" title="Encoder output packet variants.">vpx_codec_cx_pkt_kind</a>)]; <a name="l00189"></a>00189 } <a class="code" href="structvpx__codec__cx__pkt.html#a7f97b060a23b7e89fe5b885c0074f696">data</a>; <a name="l00190"></a>00190 } <a class="code" href="group__encoder.html#ga3f711e17fbefac545e8959ef5a023556" title="Encoder output packet.">vpx_codec_cx_pkt_t</a>; <a name="l00197"></a><a class="code" href="structvpx__rational.html">00197</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structvpx__rational.html" title="Rational Number.">vpx_rational</a> <a name="l00198"></a>00198 { <a name="l00199"></a><a class="code" href="structvpx__rational.html#ae7774f21a22c9bef3aa73156c79f4731">00199</a> <span class="keywordtype">int</span> <a class="code" href="structvpx__rational.html#ae7774f21a22c9bef3aa73156c79f4731">num</a>; <a name="l00200"></a><a class="code" href="structvpx__rational.html#a29dd2ab4001377b3aa21885ef969759f">00200</a> <span class="keywordtype">int</span> <a class="code" href="structvpx__rational.html#a29dd2ab4001377b3aa21885ef969759f">den</a>; <a name="l00201"></a>00201 } <a class="code" href="group__encoder.html#ga2c08c6d71202024f17a5aef71a3d13e5" title="Rational Number.">vpx_rational_t</a>; <a name="l00205"></a><a class="code" href="group__encoder.html#ga476c5417f9c15a1dc5d3f68fa44c493f">00205</a> <span class="keyword">enum</span> <a class="code" href="group__encoder.html#ga476c5417f9c15a1dc5d3f68fa44c493f" title="Multi-pass Encoding Pass.">vpx_enc_pass</a> <a name="l00206"></a>00206 { <a name="l00207"></a><a class="code" href="group__encoder.html#gga476c5417f9c15a1dc5d3f68fa44c493fa7b6943a41868e8e26a77e9500f139ca1">00207</a> <a class="code" href="group__encoder.html#gga476c5417f9c15a1dc5d3f68fa44c493fa7b6943a41868e8e26a77e9500f139ca1">VPX_RC_ONE_PASS</a>, <a name="l00208"></a><a class="code" href="group__encoder.html#gga476c5417f9c15a1dc5d3f68fa44c493faa0765945345b160905f3b762986dae3b">00208</a> <a class="code" href="group__encoder.html#gga476c5417f9c15a1dc5d3f68fa44c493faa0765945345b160905f3b762986dae3b">VPX_RC_FIRST_PASS</a>, <a name="l00209"></a><a class="code" href="group__encoder.html#gga476c5417f9c15a1dc5d3f68fa44c493fa65da543b956d6a9b1f301ab8cc90d3a7">00209</a> <a class="code" href="group__encoder.html#gga476c5417f9c15a1dc5d3f68fa44c493fa65da543b956d6a9b1f301ab8cc90d3a7">VPX_RC_LAST_PASS</a> <a name="l00210"></a>00210 }; <a name="l00211"></a>00211 <a name="l00212"></a>00212 <a name="l00214"></a><a class="code" href="group__encoder.html#gaf50e74d91be4cae6f70dfeba5b7410d2">00214</a> <span class="keyword">enum</span> <a class="code" href="group__encoder.html#gaf50e74d91be4cae6f70dfeba5b7410d2" title="Rate control mode.">vpx_rc_mode</a> <a name="l00215"></a>00215 { <a name="l00216"></a><a class="code" href="group__encoder.html#ggaf50e74d91be4cae6f70dfeba5b7410d2ab8fbe4441ed3f31a167c8194e8a64f87">00216</a> <a class="code" href="group__encoder.html#ggaf50e74d91be4cae6f70dfeba5b7410d2ab8fbe4441ed3f31a167c8194e8a64f87">VPX_VBR</a>, <a name="l00217"></a><a class="code" href="group__encoder.html#ggaf50e74d91be4cae6f70dfeba5b7410d2a8b02853cb35790d60cc171a11f6c268a">00217</a> <a class="code" href="group__encoder.html#ggaf50e74d91be4cae6f70dfeba5b7410d2a8b02853cb35790d60cc171a11f6c268a">VPX_CBR</a>, <a name="l00218"></a><a class="code" href="group__encoder.html#ggaf50e74d91be4cae6f70dfeba5b7410d2a5f2fd02b55c67d62bfd79380bcb03f63">00218</a> <a class="code" href="group__encoder.html#ggaf50e74d91be4cae6f70dfeba5b7410d2a5f2fd02b55c67d62bfd79380bcb03f63">VPX_CQ</a> <a name="l00219"></a>00219 }; <a name="l00220"></a>00220 <a name="l00221"></a>00221 <a name="l00230"></a><a class="code" href="group__encoder.html#ga9f461802aa4db35c04a8b23837987f40">00230</a> <span class="keyword">enum</span> <a class="code" href="group__encoder.html#ga9f461802aa4db35c04a8b23837987f40" title="Keyframe placement mode.">vpx_kf_mode</a> <a name="l00231"></a>00231 { <a name="l00232"></a><a class="code" href="group__encoder.html#gga9f461802aa4db35c04a8b23837987f40a6bd87eea515c65661a5241a0f01e44a6">00232</a> <a class="code" href="group__encoder.html#gga9f461802aa4db35c04a8b23837987f40a6bd87eea515c65661a5241a0f01e44a6">VPX_KF_FIXED</a>, <a name="l00233"></a><a class="code" href="group__encoder.html#gga9f461802aa4db35c04a8b23837987f40ab1b423e78f72e77d2dce755d6c9652f8">00233</a> <a class="code" href="group__encoder.html#gga9f461802aa4db35c04a8b23837987f40ab1b423e78f72e77d2dce755d6c9652f8">VPX_KF_AUTO</a>, <a name="l00234"></a><a class="code" href="group__encoder.html#gga9f461802aa4db35c04a8b23837987f40a56513f60cbf3434ca0092173005d0ab2">00234</a> <a class="code" href="group__encoder.html#gga9f461802aa4db35c04a8b23837987f40a56513f60cbf3434ca0092173005d0ab2">VPX_KF_DISABLED</a> = 0 <a name="l00235"></a>00235 }; <a name="l00236"></a>00236 <a name="l00237"></a>00237 <a name="l00245"></a><a class="code" href="group__encoder.html#ga99e4a3c966f0de19fe1aa626bd860366">00245</a> <span class="keyword">typedef</span> <span class="keywordtype">long</span> <a class="code" href="group__encoder.html#ga99e4a3c966f0de19fe1aa626bd860366" title="Encoded Frame Flags.">vpx_enc_frame_flags_t</a>; <a name="l00246"></a><a class="code" href="group__encoder.html#ga4c4f4e3cbb5225d2c6c050e2d1e948fa">00246</a> <span class="preprocessor">#define VPX_EFLAG_FORCE_KF (1<<0) </span> <a name="l00255"></a><a class="code" href="structvpx__codec__enc__cfg.html">00255</a> <span class="preprocessor"> typedef struct vpx_codec_enc_cfg</span> <a name="l00256"></a>00256 <span class="preprocessor"></span> { <a name="l00257"></a>00257 <span class="comment">/*</span> <a name="l00258"></a>00258 <span class="comment"> * generic settings (g)</span> <a name="l00259"></a>00259 <span class="comment"> */</span> <a name="l00260"></a>00260 <a name="l00268"></a><a class="code" href="structvpx__codec__enc__cfg.html#a5bcf7fc1efc4890de351e3c6fe252355">00268</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a5bcf7fc1efc4890de351e3c6fe252355" title="Algorithm specific "usage" value.">g_usage</a>; <a name="l00269"></a>00269 <a name="l00270"></a>00270 <a name="l00277"></a><a class="code" href="structvpx__codec__enc__cfg.html#aff9d8d458c45c95dd542603210ba2b8b">00277</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#aff9d8d458c45c95dd542603210ba2b8b" title="Maximum number of threads to use.">g_threads</a>; <a name="l00278"></a>00278 <a name="l00279"></a>00279 <a name="l00288"></a><a class="code" href="structvpx__codec__enc__cfg.html#a3d7fe3a8b237338c094d5a956a41804d">00288</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a3d7fe3a8b237338c094d5a956a41804d" title="Bitstream profile to use.">g_profile</a>; <a name="l00299"></a><a class="code" href="structvpx__codec__enc__cfg.html#a5c165f5b41ca1158f2883983a2b7709c">00299</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a5c165f5b41ca1158f2883983a2b7709c" title="Width of the frame.">g_w</a>; <a name="l00300"></a>00300 <a name="l00301"></a>00301 <a name="l00309"></a><a class="code" href="structvpx__codec__enc__cfg.html#a4132bd89ce85bce7c08f2cc3b6f2b82e">00309</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a4132bd89ce85bce7c08f2cc3b6f2b82e" title="Height of the frame.">g_h</a>; <a name="l00310"></a>00310 <a name="l00311"></a>00311 <a name="l00324"></a><a class="code" href="structvpx__codec__enc__cfg.html#a6498d378e4c29ef3e22258289e481087">00324</a> <span class="keyword">struct </span><a class="code" href="structvpx__rational.html" title="Rational Number.">vpx_rational</a> g_timebase; <a name="l00325"></a>00325 <a name="l00326"></a>00326 <a name="l00333"></a><a class="code" href="structvpx__codec__enc__cfg.html#a4e17173b66ca0d7dfba9978625d7ba76">00333</a> <a class="code" href="group__encoder.html#ga77e0e1fff62556a4f4d54c84467a41f3" title="Error Resilient flags.">vpx_codec_er_flags_t</a> <a class="code" href="structvpx__codec__enc__cfg.html#a4e17173b66ca0d7dfba9978625d7ba76" title="Enable error resilient modes.">g_error_resilient</a>; <a name="l00334"></a>00334 <a name="l00335"></a>00335 <a name="l00341"></a><a class="code" href="structvpx__codec__enc__cfg.html#a70d62d87aae7d1168746577f14a6dccf">00341</a> <span class="keyword">enum</span> <a class="code" href="group__encoder.html#ga476c5417f9c15a1dc5d3f68fa44c493f" title="Multi-pass Encoding Pass.">vpx_enc_pass</a> <a class="code" href="structvpx__codec__enc__cfg.html#a70d62d87aae7d1168746577f14a6dccf" title="Multi-pass Encoding Mode.">g_pass</a>; <a name="l00342"></a>00342 <a name="l00343"></a>00343 <a name="l00356"></a><a class="code" href="structvpx__codec__enc__cfg.html#a992668d9e30305f3f7ab2672ea31a890">00356</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a992668d9e30305f3f7ab2672ea31a890" title="Allow lagged encoding.">g_lag_in_frames</a>; <a name="l00357"></a>00357 <a name="l00358"></a>00358 <a name="l00359"></a>00359 <span class="comment">/*</span> <a name="l00360"></a>00360 <span class="comment"> * rate control settings (rc)</span> <a name="l00361"></a>00361 <span class="comment"> */</span> <a name="l00362"></a>00362 <a name="l00379"></a><a class="code" href="structvpx__codec__enc__cfg.html#a619269f9a6904de58c4790e6806a3905">00379</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a619269f9a6904de58c4790e6806a3905" title="Temporal resampling configuration, if supported by the codec.">rc_dropframe_thresh</a>; <a name="l00380"></a>00380 <a name="l00381"></a>00381 <a name="l00389"></a><a class="code" href="structvpx__codec__enc__cfg.html#a02a4e2f18fb0fdfff44df8b0d9a99d6c">00389</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a02a4e2f18fb0fdfff44df8b0d9a99d6c" title="Enable/disable spatial resampling, if supported by the codec.">rc_resize_allowed</a>; <a name="l00390"></a>00390 <a name="l00391"></a>00391 <a name="l00398"></a><a class="code" href="structvpx__codec__enc__cfg.html#a855599c0660f31dfcab4a64996b4f6ad">00398</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a855599c0660f31dfcab4a64996b4f6ad" title="Spatial resampling up watermark.">rc_resize_up_thresh</a>; <a name="l00399"></a>00399 <a name="l00400"></a>00400 <a name="l00407"></a><a class="code" href="structvpx__codec__enc__cfg.html#a1be7bd7b0eaf1e99b5e4028c37c65488">00407</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a1be7bd7b0eaf1e99b5e4028c37c65488" title="Spatial resampling down watermark.">rc_resize_down_thresh</a>; <a name="l00408"></a>00408 <a name="l00409"></a>00409 <a name="l00418"></a><a class="code" href="structvpx__codec__enc__cfg.html#a99c415edb6c6f909a095a57c3430a116">00418</a> <span class="keyword">enum</span> <a class="code" href="group__encoder.html#gaf50e74d91be4cae6f70dfeba5b7410d2" title="Rate control mode.">vpx_rc_mode</a> <a class="code" href="structvpx__codec__enc__cfg.html#a99c415edb6c6f909a095a57c3430a116" title="Rate control algorithm to use.">rc_end_usage</a>; <a name="l00419"></a>00419 <a name="l00420"></a>00420 <a name="l00426"></a><a class="code" href="structvpx__codec__enc__cfg.html#a618616a07d9d8883c544731957b56f3c">00426</a> <span class="keyword">struct </span><a class="code" href="structvpx__fixed__buf.html" title="Generic fixed size buffer structure.">vpx_fixed_buf</a> rc_twopass_stats_in; <a name="l00427"></a>00427 <a name="l00428"></a>00428 <a name="l00433"></a><a class="code" href="structvpx__codec__enc__cfg.html#ab8339685175d66710f482706cc9f0aed">00433</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#ab8339685175d66710f482706cc9f0aed" title="Target data rate.">rc_target_bitrate</a>; <a name="l00434"></a>00434 <a name="l00435"></a>00435 <a name="l00436"></a>00436 <span class="comment">/*</span> <a name="l00437"></a>00437 <span class="comment"> * quantizer settings</span> <a name="l00438"></a>00438 <span class="comment"> */</span> <a name="l00439"></a>00439 <a name="l00440"></a>00440 <a name="l00449"></a><a class="code" href="structvpx__codec__enc__cfg.html#a1324600e3c63faaa7717e85cf6509dd9">00449</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a1324600e3c63faaa7717e85cf6509dd9" title="Minimum (Best Quality) Quantizer.">rc_min_quantizer</a>; <a name="l00450"></a>00450 <a name="l00451"></a>00451 <a name="l00460"></a><a class="code" href="structvpx__codec__enc__cfg.html#a8abdd985d317b720e142335887d737df">00460</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a8abdd985d317b720e142335887d737df" title="Maximum (Worst Quality) Quantizer.">rc_max_quantizer</a>; <a name="l00461"></a>00461 <a name="l00462"></a>00462 <a name="l00463"></a>00463 <span class="comment">/*</span> <a name="l00464"></a>00464 <span class="comment"> * bitrate tolerance</span> <a name="l00465"></a>00465 <span class="comment"> */</span> <a name="l00466"></a>00466 <a name="l00467"></a>00467 <a name="l00478"></a><a class="code" href="structvpx__codec__enc__cfg.html#ad279fbb0a9fe9395340913161e28651a">00478</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#ad279fbb0a9fe9395340913161e28651a" title="Rate control adaptation undershoot control.">rc_undershoot_pct</a>; <a name="l00479"></a>00479 <a name="l00480"></a>00480 <a name="l00491"></a><a class="code" href="structvpx__codec__enc__cfg.html#a4f2fbd015c1b1f395cc4a4b03d4ead5f">00491</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a4f2fbd015c1b1f395cc4a4b03d4ead5f" title="Rate control adaptation overshoot control.">rc_overshoot_pct</a>; <a name="l00492"></a>00492 <a name="l00493"></a>00493 <a name="l00494"></a>00494 <span class="comment">/*</span> <a name="l00495"></a>00495 <span class="comment"> * decoder buffer model parameters</span> <a name="l00496"></a>00496 <span class="comment"> */</span> <a name="l00497"></a>00497 <a name="l00498"></a>00498 <a name="l00508"></a><a class="code" href="structvpx__codec__enc__cfg.html#a61866272bb588cd86d28834f420430f0">00508</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a61866272bb588cd86d28834f420430f0" title="Decoder Buffer Size.">rc_buf_sz</a>; <a name="l00509"></a>00509 <a name="l00510"></a>00510 <a name="l00518"></a><a class="code" href="structvpx__codec__enc__cfg.html#aa9e4d6405994ef42d61d478cf6e0d5e0">00518</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#aa9e4d6405994ef42d61d478cf6e0d5e0" title="Decoder Buffer Initial Size.">rc_buf_initial_sz</a>; <a name="l00519"></a>00519 <a name="l00520"></a>00520 <a name="l00528"></a><a class="code" href="structvpx__codec__enc__cfg.html#aafde485867e040a58504ad796e79e47f">00528</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#aafde485867e040a58504ad796e79e47f" title="Decoder Buffer Optimal Size.">rc_buf_optimal_sz</a>; <a name="l00529"></a>00529 <a name="l00530"></a>00530 <a name="l00531"></a>00531 <span class="comment">/*</span> <a name="l00532"></a>00532 <span class="comment"> * 2 pass rate control parameters</span> <a name="l00533"></a>00533 <span class="comment"> */</span> <a name="l00534"></a>00534 <a name="l00535"></a>00535 <a name="l00544"></a><a class="code" href="structvpx__codec__enc__cfg.html#a21c21ff097890dc3a450731c9b504cf4">00544</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a21c21ff097890dc3a450731c9b504cf4" title="Two-pass mode CBR/VBR bias.">rc_2pass_vbr_bias_pct</a>; <a name="l00552"></a><a class="code" href="structvpx__codec__enc__cfg.html#a21eb9fce0844ae07b617bf3f0a25f5a5">00552</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a21eb9fce0844ae07b617bf3f0a25f5a5" title="Two-pass mode per-GOP minimum bitrate.">rc_2pass_vbr_minsection_pct</a>; <a name="l00553"></a>00553 <a name="l00554"></a>00554 <a name="l00560"></a><a class="code" href="structvpx__codec__enc__cfg.html#ab5212050b71b2d9f4dc663caa496949e">00560</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#ab5212050b71b2d9f4dc663caa496949e" title="Two-pass mode per-GOP maximum bitrate.">rc_2pass_vbr_maxsection_pct</a>; <a name="l00561"></a>00561 <a name="l00562"></a>00562 <a name="l00563"></a>00563 <span class="comment">/*</span> <a name="l00564"></a>00564 <span class="comment"> * keyframing settings (kf)</span> <a name="l00565"></a>00565 <span class="comment"> */</span> <a name="l00566"></a>00566 <a name="l00573"></a><a class="code" href="structvpx__codec__enc__cfg.html#a491d67f061dcdb13f60c017563e9d788">00573</a> <span class="keyword">enum</span> <a class="code" href="group__encoder.html#ga9f461802aa4db35c04a8b23837987f40" title="Keyframe placement mode.">vpx_kf_mode</a> <a class="code" href="structvpx__codec__enc__cfg.html#a491d67f061dcdb13f60c017563e9d788" title="Keyframe placement mode.">kf_mode</a>; <a name="l00574"></a>00574 <a name="l00575"></a>00575 <a name="l00583"></a><a class="code" href="structvpx__codec__enc__cfg.html#a0a7b5444ecb09745cbe8d5af17553846">00583</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#a0a7b5444ecb09745cbe8d5af17553846" title="Keyframe minimum interval.">kf_min_dist</a>; <a name="l00584"></a>00584 <a name="l00585"></a>00585 <a name="l00593"></a><a class="code" href="structvpx__codec__enc__cfg.html#ae018440136e271743376730413d25a9b">00593</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structvpx__codec__enc__cfg.html#ae018440136e271743376730413d25a9b" title="Keyframe maximum interval.">kf_max_dist</a>; <a name="l00594"></a>00594 <a name="l00595"></a>00595 } <a class="code" href="group__encoder.html#ga946236c809e493b31a815d82db1e59db" title="Encoder configuration structure.">vpx_codec_enc_cfg_t</a>; <a name="l00620"></a>00620 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__encoder.html#ga6ed21b96c481c0b6e1b543ef958a57a4" title="Initialize an encoder instance.">vpx_codec_enc_init_ver</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00621"></a>00621 <a class="code" href="group__codec.html#gad654f3da60151f5dfef70aca00ef1e9e" title="Codec interface structure.">vpx_codec_iface_t</a> *iface, <a name="l00622"></a>00622 <a class="code" href="structvpx__codec__enc__cfg.html" title="Encoder configuration structure.">vpx_codec_enc_cfg_t</a> *cfg, <a name="l00623"></a>00623 <a class="code" href="group__codec.html#ga3b36d5af89ddc463489fe5bde0a57877" title="Initialization-time Feature Enabling.">vpx_codec_flags_t</a> flags, <a name="l00624"></a>00624 <span class="keywordtype">int</span> ver); <a name="l00625"></a>00625 <a name="l00626"></a>00626 <a name="l00631"></a><a class="code" href="group__encoder.html#ga3d490a2a9a6acd7c9ef82a603155f3cf">00631</a> <span class="preprocessor">#define vpx_codec_enc_init(ctx, iface, cfg, flags) \</span> <a name="l00632"></a>00632 <span class="preprocessor"> vpx_codec_enc_init_ver(ctx, iface, cfg, flags, VPX_ENCODER_ABI_VERSION)</span> <a name="l00633"></a>00633 <span class="preprocessor"></span> <a name="l00634"></a>00634 <a name="l00654"></a>00654 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__encoder.html#ga9ab8c79623312e9c5d5405d66a788f59" title="Get a default configuration.">vpx_codec_enc_config_default</a>(<a class="code" href="group__codec.html#gad654f3da60151f5dfef70aca00ef1e9e" title="Codec interface structure.">vpx_codec_iface_t</a> *iface, <a name="l00655"></a>00655 <a class="code" href="structvpx__codec__enc__cfg.html" title="Encoder configuration structure.">vpx_codec_enc_cfg_t</a> *cfg, <a name="l00656"></a>00656 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> usage); <a name="l00657"></a>00657 <a name="l00658"></a>00658 <a name="l00673"></a>00673 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__encoder.html#gabbc036b1fbc1288485df5562a989da9b" title="Set or change configuration.">vpx_codec_enc_config_set</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00674"></a>00674 <span class="keyword">const</span> <a class="code" href="structvpx__codec__enc__cfg.html" title="Encoder configuration structure.">vpx_codec_enc_cfg_t</a> *cfg); <a name="l00675"></a>00675 <a name="l00676"></a>00676 <a name="l00688"></a>00688 <a class="code" href="structvpx__fixed__buf.html" title="Generic fixed size buffer structure.">vpx_fixed_buf_t</a> *<a class="code" href="group__encoder.html#ga512eb105fef18bebb02e134e4cbc82ff" title="Get global stream headers.">vpx_codec_get_global_headers</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx); <a name="l00689"></a>00689 <a name="l00690"></a>00690 <a name="l00691"></a><a class="code" href="group__encoder.html#ga04253cc9ec1146d72fa8bb86bcf32144">00691</a> <span class="preprocessor">#define VPX_DL_REALTIME (1) </span> <a name="l00693"></a><a class="code" href="group__encoder.html#ga5d00a9f9e10b9f49ca91e72c1f01c9fd">00693</a> <span class="preprocessor">#define VPX_DL_GOOD_QUALITY (1000000) </span> <a name="l00695"></a><a class="code" href="group__encoder.html#gab350573bea112f2fdf8e5677db3ac0da">00695</a> <span class="preprocessor">#define VPX_DL_BEST_QUALITY (0) </span> <a name="l00733"></a>00733 <span class="preprocessor"> vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx,</span> <a name="l00734"></a>00734 <span class="preprocessor"></span> <span class="keyword">const</span> <a class="code" href="structvpx__image.html" title="Image Descriptor.">vpx_image_t</a> *img, <a name="l00735"></a>00735 vpx_codec_pts_t pts, <a name="l00736"></a>00736 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> duration, <a name="l00737"></a>00737 vpx_enc_frame_flags_t flags, <a name="l00738"></a>00738 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> deadline); <a name="l00739"></a>00739 <a name="l00740"></a>00740 <a name="l00784"></a>00784 <a class="code" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2" title="Algorithm return codes.">vpx_codec_err_t</a> <a class="code" href="group__encoder.html#gae9f8f75978a1ebcf1f358964b55ecb9e" title="Set compressed data output buffer.">vpx_codec_set_cx_data_buf</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00785"></a>00785 <span class="keyword">const</span> <a class="code" href="structvpx__fixed__buf.html" title="Generic fixed size buffer structure.">vpx_fixed_buf_t</a> *<a class="code" href="structvpx__fixed__buf.html#ac93e43ae3fcc1023dca86d37016ae3f0">buf</a>, <a name="l00786"></a>00786 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pad_before, <a name="l00787"></a>00787 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pad_after); <a name="l00788"></a>00788 <a name="l00789"></a>00789 <a name="l00813"></a>00813 <span class="keyword">const</span> <a class="code" href="structvpx__codec__cx__pkt.html" title="Encoder output packet.">vpx_codec_cx_pkt_t</a> *<a class="code" href="group__encoder.html#gae81cab25d66cf3bc59f1f75f8a5af720" title="Encoded data iterator.">vpx_codec_get_cx_data</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx, <a name="l00814"></a>00814 <a class="code" href="group__codec.html#ga6ea348f76b1f8a1fe50e14db684146c6" title="Iterator.">vpx_codec_iter_t</a> *iter); <a name="l00815"></a>00815 <a name="l00816"></a>00816 <a name="l00829"></a>00829 <span class="keyword">const</span> <a class="code" href="structvpx__image.html" title="Image Descriptor.">vpx_image_t</a> *<a class="code" href="group__encoder.html#ga250aee4536aa2475e85cf61c9710c963" title="Get Preview Frame.">vpx_codec_get_preview_frame</a>(<a class="code" href="structvpx__codec__ctx.html" title="Codec context structure.">vpx_codec_ctx_t</a> *ctx); <a name="l00830"></a>00830 <a name="l00831"></a>00831 <a name="l00834"></a>00834 <span class="preprocessor">#endif</span> <a name="l00835"></a>00835 <span class="preprocessor"></span><span class="preprocessor">#ifdef __cplusplus</span> <a name="l00836"></a>00836 <span class="preprocessor"></span>} <a name="l00837"></a>00837 <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>