File: theoradec_8h.html

package info (click to toggle)
libtheora 1.1.1%2Bdfsg.1-15
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 7,460 kB
  • sloc: ansic: 32,561; sh: 9,675; makefile: 744
file content (361 lines) | stat: -rw-r--r-- 29,142 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!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>libtheora: theoradec.h File Reference</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.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>theoradec.h File Reference</h1>
<p>The <code>libtheoradec</code> C decoding API.  
<a href="#_details">More...</a></p>
<code>#include &lt;stddef.h&gt;</code><br/>
<code>#include &lt;ogg/ogg.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="codec_8h_source.html">codec.h</a>&quot;</code><br/>

<p><a href="theoradec_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structth__stripe__callback.html">th_stripe_callback</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The striped decode callback data to pass to <a class="el" href="theoradec_8h.html#ac95cc9e109474b0fa4bb920ab2cfdf1e" title="Sets the striped decode callback function.">TH_DECCTL_SET_STRIPE_CB</a>.  <a href="structth__stripe__callback.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#a0d78767a326c34dbf84d5b845cba7b4a">_O_THEORA_THEORADEC_H_</a>&nbsp;&nbsp;&nbsp;(1)</td></tr>
<tr><td colspan="2"><div class="groupHeader">th_decode_ctl() codes</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp638dfd34390d0a936dbf76caf938d78d"></a><a class="anchor" id="decctlcodes"></a> These are the available request codes for <a class="el" href="group__decfuncs.html#ga1a8051958d75b1012573b6e3c8f670e1" title="Decoder control function.">th_decode_ctl()</a>. By convention, these are odd, to distinguish them from the <a class="el" href="theoraenc_8h.html#encctlcodes">encoder control codes</a>. Keep any experimental or vendor-specific values above <code>0x8000</code>. </p>
<br/><br/></div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#ab31f251c9319f2140d247585d30b3d07">TH_DECCTL_GET_PPLEVEL_MAX</a>&nbsp;&nbsp;&nbsp;(1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the maximum post-processing level.  <a href="#ab31f251c9319f2140d247585d30b3d07"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#a87774c35e1a755a84e2d705b38ebef0d">TH_DECCTL_SET_PPLEVEL</a>&nbsp;&nbsp;&nbsp;(3)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the post-processing level.  <a href="#a87774c35e1a755a84e2d705b38ebef0d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#a1e870c654d35394f0d490045df04e0f5">TH_DECCTL_SET_GRANPOS</a>&nbsp;&nbsp;&nbsp;(5)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the granule position.  <a href="#a1e870c654d35394f0d490045df04e0f5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#ac95cc9e109474b0fa4bb920ab2cfdf1e">TH_DECCTL_SET_STRIPE_CB</a>&nbsp;&nbsp;&nbsp;(7)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the striped decode callback function.  <a href="#ac95cc9e109474b0fa4bb920ab2cfdf1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#a8d5e0b9b4c8898f93f241acbeb7e7ffb">TH_DECCTL_SET_TELEMETRY_MBMODE</a>&nbsp;&nbsp;&nbsp;(9)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables telemetry and sets the macroblock display mode.  <a href="#a8d5e0b9b4c8898f93f241acbeb7e7ffb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#a829285a03d24832c583f33c6357df8aa">TH_DECCTL_SET_TELEMETRY_MV</a>&nbsp;&nbsp;&nbsp;(11)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables telemetry and sets the motion vector display mode.  <a href="#a829285a03d24832c583f33c6357df8aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#ae3e2f7674ad92fe67b63915d48c9df5b">TH_DECCTL_SET_TELEMETRY_QI</a>&nbsp;&nbsp;&nbsp;(13)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables telemetry and sets the adaptive quantization display mode.  <a href="#ae3e2f7674ad92fe67b63915d48c9df5b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#a7f43fec07486f8a5f00e92aab7d44a25">TH_DECCTL_SET_TELEMETRY_BITS</a>&nbsp;&nbsp;&nbsp;(15)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables telemetry and sets the bitstream breakdown visualization mode.  <a href="#a7f43fec07486f8a5f00e92aab7d44a25"></a><br/></td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#a25dfc8713157545abd81eda476ca4b54">th_stripe_decoded_func</a> )(void *_ctx, <a class="el" href="codec_8h.html#a343f7cfabad179cc4fe527cf06873f45">th_ycbcr_buffer</a> _buf, int _yfrag0, int _yfrag_end)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A callback function for striped decode.  <a href="#a25dfc8713157545abd81eda476ca4b54"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Decoder state</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp20ad7456b6a1ebc1cb57f3e51d4d7bc3"></a>The following data structures are opaque, and their contents are not publicly defined by this API.</p>
<p>Referring to their internals directly is unsupported, and may break without warning. </p>
<br/><br/></div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The decoder context.  <a href="#a843d70bb02563885a8d54b9c1a781729"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup information.  <a href="#ab71cd2657455cc27d6c0127c66a89f28"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Functions for decoding</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp9d29c94aa62f20426aa5ff062c7daedd"></a>You must link to <code>libtheoradec</code> if you use any of the functions in this section.</p>
<p>The functions are listed in the order they are used in a typical decode. The basic steps are:</p>
<ul>
<li>Parse the header packets by repeatedly calling <a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50" title="Decodes the header packets of a Theora stream.">th_decode_headerin()</a>.</li>
<li>Allocate a <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context.">th_dec_ctx</a> handle with <a class="el" href="group__decfuncs.html#ga0ef07a9a97849054aa606c595a2d807e" title="Allocates a decoder instance.">th_decode_alloc()</a>.</li>
<li>Call <a class="el" href="group__decfuncs.html#gadef55431b68aaa59d0d7b32b2f118f27" title="Releases all storage used for the decoder setup information.">th_setup_free()</a> to free any memory used for codec setup information.</li>
<li>Perform any additional decoder configuration with <a class="el" href="group__decfuncs.html#ga1a8051958d75b1012573b6e3c8f670e1" title="Decoder control function.">th_decode_ctl()</a>.</li>
<li>For each video data packet:<ul>
<li>Submit the packet to the decoder via <a class="el" href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb" title="Submits a packet containing encoded video data to the decoder.">th_decode_packetin()</a>.</li>
<li>Retrieve the uncompressed video data via <a class="el" href="group__decfuncs.html#gaa9cc8af63fa8540e0fc95572f259cdcb" title="Outputs the next available frame of decoded Y&#39;CbCr data.">th_decode_ycbcr_out()</a>.</li>
</ul>
</li>
<li>Call <a class="el" href="group__decfuncs.html#gafb6684ad8ba507b71112bc9de148e7d0" title="Frees an allocated decoder instance.">th_decode_free()</a> to release all decoder memory. </li>
</ul>
<br/><br/></div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50">th_decode_headerin</a> (<a class="el" href="structth__info.html">th_info</a> *_info, <a class="el" href="structth__comment.html">th_comment</a> *_tc, <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> **_setup, ogg_packet *_op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decodes the header packets of a Theora stream.  <a href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#ga0ef07a9a97849054aa606c595a2d807e">th_decode_alloc</a> (const <a class="el" href="structth__info.html">th_info</a> *_info, const <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> *_setup)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates a decoder instance.  <a href="group__decfuncs.html#ga0ef07a9a97849054aa606c595a2d807e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#gadef55431b68aaa59d0d7b32b2f118f27">th_setup_free</a> (<a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> *_setup)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Releases all storage used for the decoder setup information.  <a href="group__decfuncs.html#gadef55431b68aaa59d0d7b32b2f118f27"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#ga1a8051958d75b1012573b6e3c8f670e1">th_decode_ctl</a> (<a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *_dec, int _req, void *_buf, size_t _buf_sz)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decoder control function.  <a href="group__decfuncs.html#ga1a8051958d75b1012573b6e3c8f670e1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb">th_decode_packetin</a> (<a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *_dec, const ogg_packet *_op, ogg_int64_t *_granpos)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Submits a packet containing encoded video data to the decoder.  <a href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#gaa9cc8af63fa8540e0fc95572f259cdcb">th_decode_ycbcr_out</a> (<a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *_dec, <a class="el" href="codec_8h.html#a343f7cfabad179cc4fe527cf06873f45">th_ycbcr_buffer</a> _ycbcr)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Outputs the next available frame of decoded Y'CbCr data.  <a href="group__decfuncs.html#gaa9cc8af63fa8540e0fc95572f259cdcb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#gafb6684ad8ba507b71112bc9de148e7d0">th_decode_free</a> (<a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *_dec)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frees an allocated decoder instance.  <a href="group__decfuncs.html#gafb6684ad8ba507b71112bc9de148e7d0"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The <code>libtheoradec</code> C decoding API. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a0d78767a326c34dbf84d5b845cba7b4a"></a><!-- doxytag: member="theoradec.h::_O_THEORA_THEORADEC_H_" ref="a0d78767a326c34dbf84d5b845cba7b4a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define _O_THEORA_THEORADEC_H_&nbsp;&nbsp;&nbsp;(1)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ab31f251c9319f2140d247585d30b3d07"></a><!-- doxytag: member="theoradec.h::TH_DECCTL_GET_PPLEVEL_MAX" ref="ab31f251c9319f2140d247585d30b3d07" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TH_DECCTL_GET_PPLEVEL_MAX&nbsp;&nbsp;&nbsp;(1)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the maximum post-processing level. </p>
<p>The decoder supports a post-processing filter that can improve the appearance of the decoded images. This returns the highest level setting for this post-processor, corresponding to maximum improvement and computational expense.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>_buf</em>&nbsp;</td><td>int: The maximum post-processing level. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>TH_EFAULT</em>&nbsp;</td><td><em>_dec_ctx</em> or <em>_buf</em> is <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>TH_EINVAL</em>&nbsp;</td><td><em>_buf_sz</em> is not <code>sizeof(int)</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>TH_EIMPL</em>&nbsp;</td><td>Not supported by this implementation. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1e870c654d35394f0d490045df04e0f5"></a><!-- doxytag: member="theoradec.h::TH_DECCTL_SET_GRANPOS" ref="a1e870c654d35394f0d490045df04e0f5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TH_DECCTL_SET_GRANPOS&nbsp;&nbsp;&nbsp;(5)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the granule position. </p>
<p>Call this after a seek, before decoding the first frame, to ensure that the proper granule position is returned for all subsequent frames. If you track timestamps yourself and do not use the granule position returned by the decoder, then you need not call this function.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>_buf</em>&nbsp;</td><td><code>ogg_int64_t</code>: The granule position of the next frame. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>TH_EFAULT</em>&nbsp;</td><td><em>_dec_ctx</em> or <em>_buf</em> is <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>TH_EINVAL</em>&nbsp;</td><td><em>_buf_sz</em> is not <code>sizeof(ogg_int64_t)</code>, or the granule position is negative. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a87774c35e1a755a84e2d705b38ebef0d"></a><!-- doxytag: member="theoradec.h::TH_DECCTL_SET_PPLEVEL" ref="a87774c35e1a755a84e2d705b38ebef0d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TH_DECCTL_SET_PPLEVEL&nbsp;&nbsp;&nbsp;(3)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the post-processing level. </p>
<p>By default, post-processing is disabled.</p>
<p>Sets the level of post-processing to use when decoding the compressed stream. This must be a value between zero (off) and the maximum returned by TH_DECCTL_GET_PPLEVEL_MAX.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>_buf</em>&nbsp;</td><td>int: The new post-processing level. 0 to disable; larger values use more CPU. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>TH_EFAULT</em>&nbsp;</td><td><em>_dec_ctx</em> or <em>_buf</em> is <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>TH_EINVAL</em>&nbsp;</td><td><em>_buf_sz</em> is not <code>sizeof(int)</code>, or the post-processing level is out of bounds. The maximum post-processing level may be implementation-specific, and can be obtained via <a class="el" href="theoradec_8h.html#ab31f251c9319f2140d247585d30b3d07" title="Gets the maximum post-processing level.">TH_DECCTL_GET_PPLEVEL_MAX</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>TH_EIMPL</em>&nbsp;</td><td>Not supported by this implementation. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac95cc9e109474b0fa4bb920ab2cfdf1e"></a><!-- doxytag: member="theoradec.h::TH_DECCTL_SET_STRIPE_CB" ref="ac95cc9e109474b0fa4bb920ab2cfdf1e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TH_DECCTL_SET_STRIPE_CB&nbsp;&nbsp;&nbsp;(7)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the striped decode callback function. </p>
<p>If set, this function will be called as each piece of a frame is fully decoded in <a class="el" href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb" title="Submits a packet containing encoded video data to the decoder.">th_decode_packetin()</a>. You can pass in a <a class="el" href="structth__stripe__callback.html" title="The striped decode callback data to pass to TH_DECCTL_SET_STRIPE_CB.">th_stripe_callback</a> with <a class="el" href="structth__stripe__callback.html#a977c725680a37e3446e459f063b1f4a5" title="The callback function pointer.">th_stripe_callback::stripe_decoded</a> set to <code>NULL</code> to disable the callbacks at any point. Enabling striped decode does not prevent you from calling <a class="el" href="group__decfuncs.html#gaa9cc8af63fa8540e0fc95572f259cdcb" title="Outputs the next available frame of decoded Y&#39;CbCr data.">th_decode_ycbcr_out()</a> after the frame is fully decoded.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>_buf</em>&nbsp;</td><td><a class="el" href="structth__stripe__callback.html" title="The striped decode callback data to pass to TH_DECCTL_SET_STRIPE_CB.">th_stripe_callback</a>: The callback parameters. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>TH_EFAULT</em>&nbsp;</td><td><em>_dec_ctx</em> or <em>_buf</em> is <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>TH_EINVAL</em>&nbsp;</td><td><em>_buf_sz</em> is not <code>sizeof(th_stripe_callback)</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7f43fec07486f8a5f00e92aab7d44a25"></a><!-- doxytag: member="theoradec.h::TH_DECCTL_SET_TELEMETRY_BITS" ref="a7f43fec07486f8a5f00e92aab7d44a25" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TH_DECCTL_SET_TELEMETRY_BITS&nbsp;&nbsp;&nbsp;(15)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enables telemetry and sets the bitstream breakdown visualization mode. </p>

</div>
</div>
<a class="anchor" id="a8d5e0b9b4c8898f93f241acbeb7e7ffb"></a><!-- doxytag: member="theoradec.h::TH_DECCTL_SET_TELEMETRY_MBMODE" ref="a8d5e0b9b4c8898f93f241acbeb7e7ffb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TH_DECCTL_SET_TELEMETRY_MBMODE&nbsp;&nbsp;&nbsp;(9)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enables telemetry and sets the macroblock display mode. </p>

</div>
</div>
<a class="anchor" id="a829285a03d24832c583f33c6357df8aa"></a><!-- doxytag: member="theoradec.h::TH_DECCTL_SET_TELEMETRY_MV" ref="a829285a03d24832c583f33c6357df8aa" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TH_DECCTL_SET_TELEMETRY_MV&nbsp;&nbsp;&nbsp;(11)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enables telemetry and sets the motion vector display mode. </p>

</div>
</div>
<a class="anchor" id="ae3e2f7674ad92fe67b63915d48c9df5b"></a><!-- doxytag: member="theoradec.h::TH_DECCTL_SET_TELEMETRY_QI" ref="ae3e2f7674ad92fe67b63915d48c9df5b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TH_DECCTL_SET_TELEMETRY_QI&nbsp;&nbsp;&nbsp;(13)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enables telemetry and sets the adaptive quantization display mode. </p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a843d70bb02563885a8d54b9c1a781729"></a><!-- doxytag: member="theoradec.h::th_dec_ctx" ref="a843d70bb02563885a8d54b9c1a781729" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The decoder context. </p>

</div>
</div>
<a class="anchor" id="ab71cd2657455cc27d6c0127c66a89f28"></a><!-- doxytag: member="theoradec.h::th_setup_info" ref="ab71cd2657455cc27d6c0127c66a89f28" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Setup information. </p>
<p>This contains auxiliary information (Huffman tables and quantization parameters) decoded from the setup header by <a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50" title="Decodes the header packets of a Theora stream.">th_decode_headerin()</a> to be passed to <a class="el" href="group__decfuncs.html#ga0ef07a9a97849054aa606c595a2d807e" title="Allocates a decoder instance.">th_decode_alloc()</a>. It can be re-used to initialize any number of decoders, and can be freed via <a class="el" href="group__decfuncs.html#gadef55431b68aaa59d0d7b32b2f118f27" title="Releases all storage used for the decoder setup information.">th_setup_free()</a> at any time. </p>

</div>
</div>
<a class="anchor" id="a25dfc8713157545abd81eda476ca4b54"></a><!-- doxytag: member="theoradec.h::th_stripe_decoded_func" ref="a25dfc8713157545abd81eda476ca4b54" args=")(void *_ctx, th_ycbcr_buffer _buf, int _yfrag0, int _yfrag_end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="theoradec_8h.html#a25dfc8713157545abd81eda476ca4b54">th_stripe_decoded_func</a>)(void *_ctx, <a class="el" href="codec_8h.html#a343f7cfabad179cc4fe527cf06873f45">th_ycbcr_buffer</a> _buf, int _yfrag0, int _yfrag_end)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A callback function for striped decode. </p>
<p>This is a function pointer to an application-provided function that will be called each time a section of the image is fully decoded in <a class="el" href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb" title="Submits a packet containing encoded video data to the decoder.">th_decode_packetin()</a>. This allows the application to process the section immediately, while it is still in cache. Note that the frame is decoded bottom to top, so <em>_yfrag0</em> will steadily decrease with each call until it reaches 0, at which point the full frame is decoded. The number of fragment rows made available in each call depends on the pixel format and the number of post-processing filters enabled, and may not even be constant for the entire frame. If a non-<code>NULL</code> <em>_granpos</em> pointer is passed to <a class="el" href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb" title="Submits a packet containing encoded video data to the decoder.">th_decode_packetin()</a>, the granule position for the frame will be stored in it before the first callback is made. If an entire frame is dropped (a 0-byte packet), then no callbacks will be made at all for that frame. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>_ctx</em>&nbsp;</td><td>An application-provided context pointer. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>_buf</em>&nbsp;</td><td>The image buffer for the decoded frame. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>_yfrag0</em>&nbsp;</td><td>The Y coordinate of the first row of 8x8 fragments decoded. Multiply this by 8 to obtain the pixel row number in the luma plane. If the chroma planes are subsampled in the Y direction, this will always be divisible by two. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>_yfrag_end</em>&nbsp;</td><td>The Y coordinate of the first row of 8x8 fragments past the newly decoded section. If the chroma planes are subsampled in the Y direction, this will always be divisible by two. I.e., this section contains fragment rows <code><em>_yfrag0</em> ...<em>_yfrag_end</em> -1</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 28 Sep 2009 for libtheora by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>