gps/GPSResources/tcpmp 0.73/mpc/libmusepack/docs/html/mpc__decoder_8c.html

289 lines
14 KiB
HTML
Executable File

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libmusepack: src/mpc_decoder.c File Reference</title>
<link href="custom.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000002.html">src</a></div>
<h1>mpc_decoder.c File Reference</h1><code>#include "<a class="el" href="musepack_8h-source.html">musepack/musepack.h</a>"</code><br>
<code>#include "musepack/internal.h"</code><br>
<code>#include "<a class="el" href="requant_8h-source.html">musepack/requant.h</a>"</code><br>
<code>#include "<a class="el" href="huffman_8h-source.html">musepack/huffman.h</a>"</code><br>
<p>
<a href="mpc__decoder_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0" doxytag="mpc_decoder.c::MPC_MULTIPLY_SCF"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>MPC_MULTIPLY_SCF</b>(CcVal, SCF_idx)&nbsp;&nbsp;&nbsp;MPC_MULTIPLY(CcVal, d-&gt;SCF[SCF_idx])</td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <br>
&nbsp;&nbsp;<b>EQ_TAP</b> = 13,
<b>DELAY</b> = ((EQ_TAP + 1) / 2),
<b>FIR_BANDS</b> = 4,
<b>MEMSIZE</b> = MPC_DECODER_MEMSIZE,
<br>
&nbsp;&nbsp;<b>MEMSIZE2</b> = (MEMSIZE/2),
<b>MEMMASK</b> = (MEMSIZE-1)
<br>
}</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="mpc_decoder.c::mpc_decoder_init_huffman_sv6"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>mpc_decoder_init_huffman_sv6</b> (mpc_decoder *d)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9" doxytag="mpc_decoder.c::mpc_decoder_init_huffman_sv7"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>mpc_decoder_init_huffman_sv7</b> (mpc_decoder *d)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="mpc_decoder.c::mpc_decoder_read_bitstream_sv6"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>mpc_decoder_read_bitstream_sv6</b> (mpc_decoder *d)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a11" doxytag="mpc_decoder.c::mpc_decoder_read_bitstream_sv7"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>mpc_decoder_read_bitstream_sv7</b> (mpc_decoder *d)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12" doxytag="mpc_decoder.c::mpc_decoder_update_buffer"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>mpc_decoder_update_buffer</b> (mpc_decoder *d, mpc_uint32_t RING)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13" doxytag="mpc_decoder.c::mpc_decoder_seek_sample"></a>
BOOL&nbsp;</td><td class="memItemRight" valign="bottom"><b>mpc_decoder_seek_sample</b> (mpc_decoder *d, mpc_int64_t destsample)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a14" doxytag="mpc_decoder.c::mpc_decoder_requantisierung"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>mpc_decoder_requantisierung</b> (mpc_decoder *d, const mpc_int32_t Last_Band)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mpc__decoder_8c.html#a23">mpc_decoder_resort_huff_tables</a> (const mpc_uint32_t elements, <a class="el" href="structhuffman__type__t.html">HuffmanTyp</a> *Table, const mpc_int32_t offset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sorts huffman-tables by codeword. <a href="#a23"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">mpc_uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mpc__decoder_8c.html#a32">mpc_decoder_decode</a> (mpc_decoder *d, MPC_SAMPLE_FORMAT *buffer, mpc_uint32_t *vbr_update_acc, mpc_uint32_t *vbr_update_bits)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mpc__decoder_8c.html#a33">mpc_decoder_setup</a> (mpc_decoder *d, mpc_reader *r)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">BOOL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mpc__decoder_8c.html#a35">mpc_decoder_initialize</a> (mpc_decoder *d, mpc_streaminfo *si)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a38" doxytag="mpc_decoder.c::mpc_decoder_seek_seconds"></a>
BOOL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mpc__decoder_8c.html#a38">mpc_decoder_seek_seconds</a> (mpc_decoder *d, double seconds)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Seeks to specified position in seconds in the source stream. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Core decoding routines and logic.
<p>
Definition in file <a class="el" href="mpc__decoder_8c-source.html">mpc_decoder.c</a>.<hr><h2>Function Documentation</h2>
<a class="anchor" name="a32" doxytag="mpc_decoder.c::mpc_decoder_decode"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">mpc_uint32_t mpc_decoder_decode </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">mpc_decoder *&nbsp;</td>
<td class="mdname" nowrap> <em>d</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>MPC_SAMPLE_FORMAT *&nbsp;</td>
<td class="mdname" nowrap> <em>buffer</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>mpc_uint32_t *&nbsp;</td>
<td class="mdname" nowrap> <em>vbr_update_acc</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>mpc_uint32_t *&nbsp;</td>
<td class="mdname" nowrap> <em>vbr_update_bits</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Actually reads data from previously initialized stream. Call this iteratively to decode the mpc stream. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>destination buffer for decoded samples </td></tr>
<tr><td valign="top"></td><td valign="top"><em>vbr_update_acc</em>&nbsp;</td><td></td></tr>
</table>
</dl>
<dl compact><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>document me</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>vbr_update_bits</em>&nbsp;</td><td></td></tr>
</table>
</dl>
<dl compact><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>document me</dd></dl>
<dl compact><dt><b>Returns:</b></dt><dd>-1 if an error is encountered <p>
0 if the stream has been completely decoded successfully and there are no more samples <p>
&gt; 0 to indicate the number of bytes that were actually read from the stream. </dd></dl>
<p>
Definition at line <a class="el" href="mpc__decoder_8c-source.html#l00422">422</a> of file <a class="el" href="mpc__decoder_8c-source.html">mpc_decoder.c</a>. </td>
</tr>
</table>
<a class="anchor" name="a35" doxytag="mpc_decoder.c::mpc_decoder_initialize"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">BOOL mpc_decoder_initialize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">mpc_decoder *&nbsp;</td>
<td class="mdname" nowrap> <em>d</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>mpc_streaminfo *&nbsp;</td>
<td class="mdname" nowrap> <em>si</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Initializes mpc decoder with the supplied stream info parameters. Call this next after calling mpc_decoder_setup. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>si</em>&nbsp;</td><td>streaminfo structure indicating format of source stream </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>TRUE if decoder was initalized successfully, FALSE otherwise </dd></dl>
<p>
Definition at line <a class="el" href="mpc__decoder_8c-source.html#l01194">1194</a> of file <a class="el" href="mpc__decoder_8c-source.html">mpc_decoder.c</a>. </td>
</tr>
</table>
<a class="anchor" name="a23" doxytag="mpc_decoder.c::mpc_decoder_resort_huff_tables"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void mpc_decoder_resort_huff_tables </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const mpc_uint32_t&nbsp;</td>
<td class="mdname" nowrap> <em>elements</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structhuffman__type__t.html">HuffmanTyp</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>Table</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>const mpc_int32_t&nbsp;</td>
<td class="mdname" nowrap> <em>offset</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sorts huffman-tables by codeword.
<p>
offset resulting value. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>elements</em>&nbsp;</td><td></td></tr>
<tr><td valign="top"></td><td valign="top"><em>Table</em>&nbsp;</td><td>table to sort </td></tr>
<tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>offset of resulting sort </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="mpc__decoder_8c-source.html#l00187">187</a> of file <a class="el" href="mpc__decoder_8c-source.html">mpc_decoder.c</a>. </td>
</tr>
</table>
<a class="anchor" name="a33" doxytag="mpc_decoder.c::mpc_decoder_setup"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void mpc_decoder_setup </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">mpc_decoder *&nbsp;</td>
<td class="mdname" nowrap> <em>d</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>mpc_reader *&nbsp;</td>
<td class="mdname" nowrap> <em>r</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets up decoder library. Call this first when preparing to decode an mpc stream. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>r</em>&nbsp;</td><td>reader that will supply raw data to the decoder </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="mpc__decoder_8c-source.html#l01108">1108</a> of file <a class="el" href="mpc__decoder_8c-source.html">mpc_decoder.c</a>. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sat Jan 22 09:34:07 2005 for libmusepack by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>
</body>
</html>