codec_8h.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <title>libtheora: codec.h File Reference</title>
  6. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  7. <link href="doxygen.css" rel="stylesheet" type="text/css"/>
  8. </head>
  9. <body>
  10. <!-- Generated by Doxygen 1.6.1 -->
  11. <div class="navigation" id="top">
  12. <div class="tabs">
  13. <ul>
  14. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  15. <li><a href="modules.html"><span>Modules</span></a></li>
  16. <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
  17. <li class="current"><a href="files.html"><span>Files</span></a></li>
  18. </ul>
  19. </div>
  20. <div class="tabs">
  21. <ul>
  22. <li><a href="files.html"><span>File&nbsp;List</span></a></li>
  23. <li><a href="globals.html"><span>Globals</span></a></li>
  24. </ul>
  25. </div>
  26. </div>
  27. <div class="contents">
  28. <h1>codec.h File Reference</h1>
  29. <p>The shared <code>libtheoradec</code> and <code>libtheoraenc</code> C API.
  30. <a href="#_details">More...</a></p>
  31. <code>#include &lt;ogg/ogg.h&gt;</code><br/>
  32. <p><a href="codec_8h_source.html">Go to the source code of this file.</a></p>
  33. <table border="0" cellpadding="0" cellspacing="0">
  34. <tr><td colspan="2"><h2>Data Structures</h2></td></tr>
  35. <tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structth__img__plane.html">th_img_plane</a></td></tr>
  36. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A buffer for a single color plane in an uncompressed image. <a href="structth__img__plane.html#_details">More...</a><br/></td></tr>
  37. <tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structth__info.html">th_info</a></td></tr>
  38. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Theora bitstream information. <a href="structth__info.html#_details">More...</a><br/></td></tr>
  39. <tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structth__comment.html">th_comment</a></td></tr>
  40. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The comment information. <a href="structth__comment.html#_details">More...</a><br/></td></tr>
  41. <tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structth__quant__ranges.html">th_quant_ranges</a></td></tr>
  42. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A set of <em>qi</em> ranges. <a href="structth__quant__ranges.html#_details">More...</a><br/></td></tr>
  43. <tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structth__quant__info.html">th_quant_info</a></td></tr>
  44. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A complete set of quantization parameters. <a href="structth__quant__info.html#_details">More...</a><br/></td></tr>
  45. <tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structth__huff__code.html">th_huff_code</a></td></tr>
  46. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A Huffman code for a Theora DCT token. <a href="structth__huff__code.html#_details">More...</a><br/></td></tr>
  47. <tr><td colspan="2"><h2>Defines</h2></td></tr>
  48. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a15352a6a862d25ab00a8f06ea65ee75b">_O_THEORA_CODEC_H_</a>&nbsp;&nbsp;&nbsp;(1)</td></tr>
  49. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a49bf449eae33c5320f0c308f32c6ae42">TH_NHUFFMAN_TABLES</a>&nbsp;&nbsp;&nbsp;(80)</td></tr>
  50. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The number of Huffman tables used by Theora. <a href="#a49bf449eae33c5320f0c308f32c6ae42"></a><br/></td></tr>
  51. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a2a44f48084e76a58cae48fb5d47cd422">TH_NDCT_TOKENS</a>&nbsp;&nbsp;&nbsp;(32)</td></tr>
  52. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The number of DCT token values in each table. <a href="#a2a44f48084e76a58cae48fb5d47cd422"></a><br/></td></tr>
  53. <tr><td colspan="2"><div class="groupHeader">Return codes</div></td></tr>
  54. <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp800007e5fae550658ee577ca16693452"></a> </p>
  55. <br/><br/></div></td></tr>
  56. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a4d8d8e34fc5ec39ffa05d61a310a0407">TH_EFAULT</a>&nbsp;&nbsp;&nbsp;(-1)</td></tr>
  57. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An invalid pointer was provided. <a href="#a4d8d8e34fc5ec39ffa05d61a310a0407"></a><br/></td></tr>
  58. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#afbbd9f19fbf292aeb62a37792cecb870">TH_EINVAL</a>&nbsp;&nbsp;&nbsp;(-10)</td></tr>
  59. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An invalid argument was provided. <a href="#afbbd9f19fbf292aeb62a37792cecb870"></a><br/></td></tr>
  60. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#af00f7ecc5242d12a717202537324a510">TH_EBADHEADER</a>&nbsp;&nbsp;&nbsp;(-20)</td></tr>
  61. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The contents of the header were incomplete, invalid, or unexpected. <a href="#af00f7ecc5242d12a717202537324a510"></a><br/></td></tr>
  62. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a3dc08a00a9aba231be398f3e31726d9c">TH_ENOTFORMAT</a>&nbsp;&nbsp;&nbsp;(-21)</td></tr>
  63. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The header does not belong to a Theora stream. <a href="#a3dc08a00a9aba231be398f3e31726d9c"></a><br/></td></tr>
  64. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#ac3a45ef2b24f75259258edc481e3a122">TH_EVERSION</a>&nbsp;&nbsp;&nbsp;(-22)</td></tr>
  65. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The bitstream version is too high. <a href="#ac3a45ef2b24f75259258edc481e3a122"></a><br/></td></tr>
  66. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a921c47accc17841f220af5a6afb79efe">TH_EIMPL</a>&nbsp;&nbsp;&nbsp;(-23)</td></tr>
  67. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The specified function is not implemented. <a href="#a921c47accc17841f220af5a6afb79efe"></a><br/></td></tr>
  68. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a6efb84e9c2213a8840003eee2847b27f">TH_EBADPACKET</a>&nbsp;&nbsp;&nbsp;(-24)</td></tr>
  69. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">There were errors in the video data packet. <a href="#a6efb84e9c2213a8840003eee2847b27f"></a><br/></td></tr>
  70. <tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#ab10e7b64f17a02707fc9348ea9832d09">TH_DUPFRAME</a>&nbsp;&nbsp;&nbsp;(1)</td></tr>
  71. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The decoded packet represented a dropped frame. <a href="#ab10e7b64f17a02707fc9348ea9832d09"></a><br/></td></tr>
  72. <tr><td colspan="2"><h2>Typedefs</h2></td></tr>
  73. <tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structth__img__plane.html">th_img_plane</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a343f7cfabad179cc4fe527cf06873f45">th_ycbcr_buffer</a> [3]</td></tr>
  74. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A complete image buffer for an uncompressed frame. <a href="#a343f7cfabad179cc4fe527cf06873f45"></a><br/></td></tr>
  75. <tr><td class="memItemLeft" align="right" valign="top">typedef unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a6a1426d16beef8a311d7f0e9d2e96326">th_quant_base</a> [64]</td></tr>
  76. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A single base matrix. <a href="#a6a1426d16beef8a311d7f0e9d2e96326"></a><br/></td></tr>
  77. <tr><td colspan="2"><h2>Enumerations</h2></td></tr>
  78. <tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a4ce7a695ce353b1582d29b6c1ddf31a0">th_colorspace</a> { <a class="el" href="codec_8h.html#a4ce7a695ce353b1582d29b6c1ddf31a0adb9a17a3283c8d490652e507db2427cf">TH_CS_UNSPECIFIED</a>,
  79. <a class="el" href="codec_8h.html#a4ce7a695ce353b1582d29b6c1ddf31a0a1a19346bbfb8192baa4c185df73d3397">TH_CS_ITU_REC_470M</a>,
  80. <a class="el" href="codec_8h.html#a4ce7a695ce353b1582d29b6c1ddf31a0a009021d50836ddb0ec6004a2803775fe">TH_CS_ITU_REC_470BG</a>,
  81. <a class="el" href="codec_8h.html#a4ce7a695ce353b1582d29b6c1ddf31a0a0fa8ea07f583ee57943520ddb2f6e62e">TH_CS_NSPACES</a>
  82. }</td></tr>
  83. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The currently defined color space tags. </p>
  84. <a href="codec_8h.html#a4ce7a695ce353b1582d29b6c1ddf31a0">More...</a><br/></td></tr>
  85. <tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="codec_8h.html#a5c9e7f2f0c7ed209c9ca3ed0abd328bc">th_pixel_fmt</a> { <br/>
  86. &nbsp;&nbsp;<a class="el" href="codec_8h.html#a5c9e7f2f0c7ed209c9ca3ed0abd328bcafed7ad7ee4345930255827bff6055162">TH_PF_420</a>,
  87. <a class="el" href="codec_8h.html#a5c9e7f2f0c7ed209c9ca3ed0abd328bca9e60af0159d42b20806d7eb4a8b833e6">TH_PF_RSVD</a>,
  88. <a class="el" href="codec_8h.html#a5c9e7f2f0c7ed209c9ca3ed0abd328bca0271d01babf2f51512479f4a6245b9fa">TH_PF_422</a>,
  89. <a class="el" href="codec_8h.html#a5c9e7f2f0c7ed209c9ca3ed0abd328bca2ac50ac048ea75501a5e0f99a63c8c86">TH_PF_444</a>,
  90. <br/>
  91. &nbsp;&nbsp;<a class="el" href="codec_8h.html#a5c9e7f2f0c7ed209c9ca3ed0abd328bca2d6d78b9df1df086bb60f32f963a31eb">TH_PF_NFORMATS</a>
  92. <br/>
  93. }</td></tr>
  94. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The currently defined pixel format tags. </p>
  95. <a href="codec_8h.html#a5c9e7f2f0c7ed209c9ca3ed0abd328bc">More...</a><br/></td></tr>
  96. <tr><td colspan="2"><h2>Functions</h2></td></tr>
  97. <tr><td colspan="2"><div class="groupHeader">Basic shared functions</div></td></tr>
  98. <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb625c22fa07613c734f71c378fe32d7a"></a> </p>
  99. <br/><br/></div></td></tr>
  100. <tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga04846066738d9f2024fc9961162b2dbc">th_version_string</a> (void)</td></tr>
  101. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves a human-readable string to identify the library vendor and version. <a href="group__basefuncs.html#ga04846066738d9f2024fc9961162b2dbc"></a><br/></td></tr>
  102. <tr><td class="memItemLeft" align="right" valign="top">ogg_uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#gab723a75c0f95b3eb817f7f769846016b">th_version_number</a> (void)</td></tr>
  103. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the library version number. <a href="group__basefuncs.html#gab723a75c0f95b3eb817f7f769846016b"></a><br/></td></tr>
  104. <tr><td class="memItemLeft" align="right" valign="top">ogg_int64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga95b10e76fc4c05d0240ea2dfd9fd62bd">th_granule_frame</a> (void *_encdec, ogg_int64_t _granpos)</td></tr>
  105. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a granule position to an absolute frame index, starting at <code>0</code>. <a href="group__basefuncs.html#ga95b10e76fc4c05d0240ea2dfd9fd62bd"></a><br/></td></tr>
  106. <tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga707e1e281de788af0df39ef00f3fb432">th_granule_time</a> (void *_encdec, ogg_int64_t _granpos)</td></tr>
  107. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a granule position to an absolute time in seconds. <a href="group__basefuncs.html#ga707e1e281de788af0df39ef00f3fb432"></a><br/></td></tr>
  108. <tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga02f3f38261a9b39452d8a5e6f8737cc1">th_packet_isheader</a> (ogg_packet *_op)</td></tr>
  109. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines whether a Theora packet is a header or not. <a href="group__basefuncs.html#ga02f3f38261a9b39452d8a5e6f8737cc1"></a><br/></td></tr>
  110. <tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#gafe95cfd06f0fef413266c9168a66248a">th_packet_iskeyframe</a> (ogg_packet *_op)</td></tr>
  111. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines whether a theora packet is a key frame or not. <a href="group__basefuncs.html#gafe95cfd06f0fef413266c9168a66248a"></a><br/></td></tr>
  112. <tr><td colspan="2"><div class="groupHeader">Functions for manipulating header data</div></td></tr>
  113. <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp14ef5f819e97c870c128539ed1f334e3"></a> </p>
  114. <br/><br/></div></td></tr>
  115. <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga430d9c605816a6ca0bdce3a0b965b926">th_info_init</a> (<a class="el" href="structth__info.html">th_info</a> *_info)</td></tr>
  116. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes a <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> structure. <a href="group__basefuncs.html#ga430d9c605816a6ca0bdce3a0b965b926"></a><br/></td></tr>
  117. <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#gab3d6441ab4a4969859ef5fd78a9e3c1c">th_info_clear</a> (<a class="el" href="structth__info.html">th_info</a> *_info)</td></tr>
  118. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clears a <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> structure. <a href="group__basefuncs.html#gab3d6441ab4a4969859ef5fd78a9e3c1c"></a><br/></td></tr>
  119. <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga6c8ab25988e7ea9d7b1e31a54cf58f09">th_comment_init</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc)</td></tr>
  120. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize a <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. <a href="group__basefuncs.html#ga6c8ab25988e7ea9d7b1e31a54cf58f09"></a><br/></td></tr>
  121. <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga19a1f7b8032db957df151a34e5ac9272">th_comment_add</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc, char *_comment)</td></tr>
  122. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a comment to an initialized <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. <a href="group__basefuncs.html#ga19a1f7b8032db957df151a34e5ac9272"></a><br/></td></tr>
  123. <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga6c5edc201ca220a30787ca6c1ddcaeaf">th_comment_add_tag</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc, char *_tag, char *_val)</td></tr>
  124. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a comment to an initialized <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. <a href="group__basefuncs.html#ga6c5edc201ca220a30787ca6c1ddcaeaf"></a><br/></td></tr>
  125. <tr><td class="memItemLeft" align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga33c8b4f57a03217636d704c2ebb211fa">th_comment_query</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc, char *_tag, int _count)</td></tr>
  126. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Look up a comment value by its tag. <a href="group__basefuncs.html#ga33c8b4f57a03217636d704c2ebb211fa"></a><br/></td></tr>
  127. <tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga81d518dc4426f63ceaedcbe2668679fc">th_comment_query_count</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc, char *_tag)</td></tr>
  128. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Look up the number of instances of a tag. <a href="group__basefuncs.html#ga81d518dc4426f63ceaedcbe2668679fc"></a><br/></td></tr>
  129. <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#gae736c1afa514947a3feb223143af95e3">th_comment_clear</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc)</td></tr>
  130. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clears a <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. <a href="group__basefuncs.html#gae736c1afa514947a3feb223143af95e3"></a><br/></td></tr>
  131. </table>
  132. <hr/><a name="_details"></a><h2>Detailed Description</h2>
  133. <p>The shared <code>libtheoradec</code> and <code>libtheoraenc</code> C API. </p>
  134. <p>You don't need to include this directly. </p>
  135. <hr/><h2>Define Documentation</h2>
  136. <a class="anchor" id="a15352a6a862d25ab00a8f06ea65ee75b"></a><!-- doxytag: member="codec.h::_O_THEORA_CODEC_H_" ref="a15352a6a862d25ab00a8f06ea65ee75b" args="" -->
  137. <div class="memitem">
  138. <div class="memproto">
  139. <table class="memname">
  140. <tr>
  141. <td class="memname">#define _O_THEORA_CODEC_H_&nbsp;&nbsp;&nbsp;(1)</td>
  142. </tr>
  143. </table>
  144. </div>
  145. <div class="memdoc">
  146. </div>
  147. </div>
  148. <a class="anchor" id="ab10e7b64f17a02707fc9348ea9832d09"></a><!-- doxytag: member="codec.h::TH_DUPFRAME" ref="ab10e7b64f17a02707fc9348ea9832d09" args="" -->
  149. <div class="memitem">
  150. <div class="memproto">
  151. <table class="memname">
  152. <tr>
  153. <td class="memname">#define TH_DUPFRAME&nbsp;&nbsp;&nbsp;(1)</td>
  154. </tr>
  155. </table>
  156. </div>
  157. <div class="memdoc">
  158. <p>The decoded packet represented a dropped frame. </p>
  159. <p>The player can continue to display the current frame, as the contents of the decoded frame buffer have not changed. </p>
  160. </div>
  161. </div>
  162. <a class="anchor" id="af00f7ecc5242d12a717202537324a510"></a><!-- doxytag: member="codec.h::TH_EBADHEADER" ref="af00f7ecc5242d12a717202537324a510" args="" -->
  163. <div class="memitem">
  164. <div class="memproto">
  165. <table class="memname">
  166. <tr>
  167. <td class="memname">#define TH_EBADHEADER&nbsp;&nbsp;&nbsp;(-20)</td>
  168. </tr>
  169. </table>
  170. </div>
  171. <div class="memdoc">
  172. <p>The contents of the header were incomplete, invalid, or unexpected. </p>
  173. </div>
  174. </div>
  175. <a class="anchor" id="a6efb84e9c2213a8840003eee2847b27f"></a><!-- doxytag: member="codec.h::TH_EBADPACKET" ref="a6efb84e9c2213a8840003eee2847b27f" args="" -->
  176. <div class="memitem">
  177. <div class="memproto">
  178. <table class="memname">
  179. <tr>
  180. <td class="memname">#define TH_EBADPACKET&nbsp;&nbsp;&nbsp;(-24)</td>
  181. </tr>
  182. </table>
  183. </div>
  184. <div class="memdoc">
  185. <p>There were errors in the video data packet. </p>
  186. </div>
  187. </div>
  188. <a class="anchor" id="a4d8d8e34fc5ec39ffa05d61a310a0407"></a><!-- doxytag: member="codec.h::TH_EFAULT" ref="a4d8d8e34fc5ec39ffa05d61a310a0407" args="" -->
  189. <div class="memitem">
  190. <div class="memproto">
  191. <table class="memname">
  192. <tr>
  193. <td class="memname">#define TH_EFAULT&nbsp;&nbsp;&nbsp;(-1)</td>
  194. </tr>
  195. </table>
  196. </div>
  197. <div class="memdoc">
  198. <p>An invalid pointer was provided. </p>
  199. </div>
  200. </div>
  201. <a class="anchor" id="a921c47accc17841f220af5a6afb79efe"></a><!-- doxytag: member="codec.h::TH_EIMPL" ref="a921c47accc17841f220af5a6afb79efe" args="" -->
  202. <div class="memitem">
  203. <div class="memproto">
  204. <table class="memname">
  205. <tr>
  206. <td class="memname">#define TH_EIMPL&nbsp;&nbsp;&nbsp;(-23)</td>
  207. </tr>
  208. </table>
  209. </div>
  210. <div class="memdoc">
  211. <p>The specified function is not implemented. </p>
  212. </div>
  213. </div>
  214. <a class="anchor" id="afbbd9f19fbf292aeb62a37792cecb870"></a><!-- doxytag: member="codec.h::TH_EINVAL" ref="afbbd9f19fbf292aeb62a37792cecb870" args="" -->
  215. <div class="memitem">
  216. <div class="memproto">
  217. <table class="memname">
  218. <tr>
  219. <td class="memname">#define TH_EINVAL&nbsp;&nbsp;&nbsp;(-10)</td>
  220. </tr>
  221. </table>
  222. </div>
  223. <div class="memdoc">
  224. <p>An invalid argument was provided. </p>
  225. </div>
  226. </div>
  227. <a class="anchor" id="a3dc08a00a9aba231be398f3e31726d9c"></a><!-- doxytag: member="codec.h::TH_ENOTFORMAT" ref="a3dc08a00a9aba231be398f3e31726d9c" args="" -->
  228. <div class="memitem">
  229. <div class="memproto">
  230. <table class="memname">
  231. <tr>
  232. <td class="memname">#define TH_ENOTFORMAT&nbsp;&nbsp;&nbsp;(-21)</td>
  233. </tr>
  234. </table>
  235. </div>
  236. <div class="memdoc">
  237. <p>The header does not belong to a Theora stream. </p>
  238. </div>
  239. </div>
  240. <a class="anchor" id="ac3a45ef2b24f75259258edc481e3a122"></a><!-- doxytag: member="codec.h::TH_EVERSION" ref="ac3a45ef2b24f75259258edc481e3a122" args="" -->
  241. <div class="memitem">
  242. <div class="memproto">
  243. <table class="memname">
  244. <tr>
  245. <td class="memname">#define TH_EVERSION&nbsp;&nbsp;&nbsp;(-22)</td>
  246. </tr>
  247. </table>
  248. </div>
  249. <div class="memdoc">
  250. <p>The bitstream version is too high. </p>
  251. </div>
  252. </div>
  253. <a class="anchor" id="a2a44f48084e76a58cae48fb5d47cd422"></a><!-- doxytag: member="codec.h::TH_NDCT_TOKENS" ref="a2a44f48084e76a58cae48fb5d47cd422" args="" -->
  254. <div class="memitem">
  255. <div class="memproto">
  256. <table class="memname">
  257. <tr>
  258. <td class="memname">#define TH_NDCT_TOKENS&nbsp;&nbsp;&nbsp;(32)</td>
  259. </tr>
  260. </table>
  261. </div>
  262. <div class="memdoc">
  263. <p>The number of DCT token values in each table. </p>
  264. </div>
  265. </div>
  266. <a class="anchor" id="a49bf449eae33c5320f0c308f32c6ae42"></a><!-- doxytag: member="codec.h::TH_NHUFFMAN_TABLES" ref="a49bf449eae33c5320f0c308f32c6ae42" args="" -->
  267. <div class="memitem">
  268. <div class="memproto">
  269. <table class="memname">
  270. <tr>
  271. <td class="memname">#define TH_NHUFFMAN_TABLES&nbsp;&nbsp;&nbsp;(80)</td>
  272. </tr>
  273. </table>
  274. </div>
  275. <div class="memdoc">
  276. <p>The number of Huffman tables used by Theora. </p>
  277. </div>
  278. </div>
  279. <hr/><h2>Typedef Documentation</h2>
  280. <a class="anchor" id="a6a1426d16beef8a311d7f0e9d2e96326"></a><!-- doxytag: member="codec.h::th_quant_base" ref="a6a1426d16beef8a311d7f0e9d2e96326" args="[64]" -->
  281. <div class="memitem">
  282. <div class="memproto">
  283. <table class="memname">
  284. <tr>
  285. <td class="memname">typedef unsigned char <a class="el" href="codec_8h.html#a6a1426d16beef8a311d7f0e9d2e96326">th_quant_base</a>[64]</td>
  286. </tr>
  287. </table>
  288. </div>
  289. <div class="memdoc">
  290. <p>A single base matrix. </p>
  291. </div>
  292. </div>
  293. <a class="anchor" id="a343f7cfabad179cc4fe527cf06873f45"></a><!-- doxytag: member="codec.h::th_ycbcr_buffer" ref="a343f7cfabad179cc4fe527cf06873f45" args="[3]" -->
  294. <div class="memitem">
  295. <div class="memproto">
  296. <table class="memname">
  297. <tr>
  298. <td class="memname">typedef <a class="el" href="structth__img__plane.html">th_img_plane</a> <a class="el" href="codec_8h.html#a343f7cfabad179cc4fe527cf06873f45">th_ycbcr_buffer</a>[3]</td>
  299. </tr>
  300. </table>
  301. </div>
  302. <div class="memdoc">
  303. <p>A complete image buffer for an uncompressed frame. </p>
  304. <p>The chroma planes may be decimated by a factor of two in either direction, as indicated by <a class="el" href="structth__info.html#a2301388ef3755c41ab12fd144c1fc54e" title="The pixel format.">th_info::pixel_fmt</a>. The width and height of the Y' plane must be multiples of 16. They may need to be cropped for display, using the rectangle specified by <a class="el" href="structth__info.html#a5b3f834bcf141564e7bb14f49101870f" title="The X offset of the displayed picture.">th_info::pic_x</a>, <a class="el" href="structth__info.html#a8aacc575cab2dfe3735001c2ad32aa14" title="The Y offset of the displayed picture.">th_info::pic_y</a>, <a class="el" href="structth__info.html#a5048edf77b141dd3e9a92ca85e317345" title="The displayed picture width.">th_info::pic_width</a>, and <a class="el" href="structth__info.html#a775178474283c5990ba73f9ba7f6b88b" title="The displayed picture height.">th_info::pic_height</a>. All samples are 8 bits. </p>
  305. <dl class="note"><dt><b>Note:</b></dt><dd>The term YUV often used to describe a colorspace is ambiguous. The exact parameters of the RGB to YUV conversion process aside, in many contexts the U and V channels actually have opposite meanings. To avoid this confusion, we are explicit: the name of the color channels are Y'CbCr, and they appear in that order, always. The prime symbol denotes that the Y channel is non-linear. Cb and Cr stand for "Chroma blue" and "Chroma red", respectively. </dd></dl>
  306. </div>
  307. </div>
  308. <hr/><h2>Enumeration Type Documentation</h2>
  309. <a class="anchor" id="a4ce7a695ce353b1582d29b6c1ddf31a0"></a><!-- doxytag: member="codec.h::th_colorspace" ref="a4ce7a695ce353b1582d29b6c1ddf31a0" args="" -->
  310. <div class="memitem">
  311. <div class="memproto">
  312. <table class="memname">
  313. <tr>
  314. <td class="memname">enum <a class="el" href="codec_8h.html#a4ce7a695ce353b1582d29b6c1ddf31a0">th_colorspace</a></td>
  315. </tr>
  316. </table>
  317. </div>
  318. <div class="memdoc">
  319. <p>The currently defined color space tags. </p>
  320. <p>See <a href="http://www.theora.org/doc/Theora.pdf">the Theora specification</a>, Chapter 4, for exact details on the meaning of each of these color spaces. </p>
  321. <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
  322. <tr><td valign="top"><em><a class="anchor" id="a4ce7a695ce353b1582d29b6c1ddf31a0adb9a17a3283c8d490652e507db2427cf"></a><!-- doxytag: member="TH_CS_UNSPECIFIED" ref="a4ce7a695ce353b1582d29b6c1ddf31a0adb9a17a3283c8d490652e507db2427cf" args="" -->TH_CS_UNSPECIFIED</em>&nbsp;</td><td>
  323. <p>The color space was not specified at the encoder. </p>
  324. <p>It may be conveyed by an external means. </p>
  325. </td></tr>
  326. <tr><td valign="top"><em><a class="anchor" id="a4ce7a695ce353b1582d29b6c1ddf31a0a1a19346bbfb8192baa4c185df73d3397"></a><!-- doxytag: member="TH_CS_ITU_REC_470M" ref="a4ce7a695ce353b1582d29b6c1ddf31a0a1a19346bbfb8192baa4c185df73d3397" args="" -->TH_CS_ITU_REC_470M</em>&nbsp;</td><td>
  327. <p>A color space designed for NTSC content. </p>
  328. </td></tr>
  329. <tr><td valign="top"><em><a class="anchor" id="a4ce7a695ce353b1582d29b6c1ddf31a0a009021d50836ddb0ec6004a2803775fe"></a><!-- doxytag: member="TH_CS_ITU_REC_470BG" ref="a4ce7a695ce353b1582d29b6c1ddf31a0a009021d50836ddb0ec6004a2803775fe" args="" -->TH_CS_ITU_REC_470BG</em>&nbsp;</td><td>
  330. <p>A color space designed for PAL/SECAM content. </p>
  331. </td></tr>
  332. <tr><td valign="top"><em><a class="anchor" id="a4ce7a695ce353b1582d29b6c1ddf31a0a0fa8ea07f583ee57943520ddb2f6e62e"></a><!-- doxytag: member="TH_CS_NSPACES" ref="a4ce7a695ce353b1582d29b6c1ddf31a0a0fa8ea07f583ee57943520ddb2f6e62e" args="" -->TH_CS_NSPACES</em>&nbsp;</td><td>
  333. <p>The total number of currently defined color spaces. </p>
  334. </td></tr>
  335. </table>
  336. </dd>
  337. </dl>
  338. </div>
  339. </div>
  340. <a class="anchor" id="a5c9e7f2f0c7ed209c9ca3ed0abd328bc"></a><!-- doxytag: member="codec.h::th_pixel_fmt" ref="a5c9e7f2f0c7ed209c9ca3ed0abd328bc" args="" -->
  341. <div class="memitem">
  342. <div class="memproto">
  343. <table class="memname">
  344. <tr>
  345. <td class="memname">enum <a class="el" href="codec_8h.html#a5c9e7f2f0c7ed209c9ca3ed0abd328bc">th_pixel_fmt</a></td>
  346. </tr>
  347. </table>
  348. </div>
  349. <div class="memdoc">
  350. <p>The currently defined pixel format tags. </p>
  351. <p>See <a href="http://www.theora.org/doc/Theora.pdf">the Theora specification</a>, Section 4.4, for details on the precise sample locations. </p>
  352. <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
  353. <tr><td valign="top"><em><a class="anchor" id="a5c9e7f2f0c7ed209c9ca3ed0abd328bcafed7ad7ee4345930255827bff6055162"></a><!-- doxytag: member="TH_PF_420" ref="a5c9e7f2f0c7ed209c9ca3ed0abd328bcafed7ad7ee4345930255827bff6055162" args="" -->TH_PF_420</em>&nbsp;</td><td>
  354. <p>Chroma decimation by 2 in both the X and Y directions (4:2:0). </p>
  355. <p>The Cb and Cr chroma planes are half the width and half the height of the luma plane. </p>
  356. </td></tr>
  357. <tr><td valign="top"><em><a class="anchor" id="a5c9e7f2f0c7ed209c9ca3ed0abd328bca9e60af0159d42b20806d7eb4a8b833e6"></a><!-- doxytag: member="TH_PF_RSVD" ref="a5c9e7f2f0c7ed209c9ca3ed0abd328bca9e60af0159d42b20806d7eb4a8b833e6" args="" -->TH_PF_RSVD</em>&nbsp;</td><td>
  358. <p>Currently reserved. </p>
  359. </td></tr>
  360. <tr><td valign="top"><em><a class="anchor" id="a5c9e7f2f0c7ed209c9ca3ed0abd328bca0271d01babf2f51512479f4a6245b9fa"></a><!-- doxytag: member="TH_PF_422" ref="a5c9e7f2f0c7ed209c9ca3ed0abd328bca0271d01babf2f51512479f4a6245b9fa" args="" -->TH_PF_422</em>&nbsp;</td><td>
  361. <p>Chroma decimation by 2 in the X direction (4:2:2). </p>
  362. <p>The Cb and Cr chroma planes are half the width of the luma plane, but full height. </p>
  363. </td></tr>
  364. <tr><td valign="top"><em><a class="anchor" id="a5c9e7f2f0c7ed209c9ca3ed0abd328bca2ac50ac048ea75501a5e0f99a63c8c86"></a><!-- doxytag: member="TH_PF_444" ref="a5c9e7f2f0c7ed209c9ca3ed0abd328bca2ac50ac048ea75501a5e0f99a63c8c86" args="" -->TH_PF_444</em>&nbsp;</td><td>
  365. <p>No chroma decimation (4:4:4). </p>
  366. <p>The Cb and Cr chroma planes are full width and full height. </p>
  367. </td></tr>
  368. <tr><td valign="top"><em><a class="anchor" id="a5c9e7f2f0c7ed209c9ca3ed0abd328bca2d6d78b9df1df086bb60f32f963a31eb"></a><!-- doxytag: member="TH_PF_NFORMATS" ref="a5c9e7f2f0c7ed209c9ca3ed0abd328bca2d6d78b9df1df086bb60f32f963a31eb" args="" -->TH_PF_NFORMATS</em>&nbsp;</td><td>
  369. <p>The total number of currently defined pixel formats. </p>
  370. </td></tr>
  371. </table>
  372. </dd>
  373. </dl>
  374. </div>
  375. </div>
  376. </div>
  377. <hr size="1"/><address style="text-align: right;"><small>Generated on 28 Sep 2009 for libtheora by&nbsp;
  378. <a href="http://www.doxygen.org/index.html">
  379. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
  380. </body>
  381. </html>