Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > b91608bcc8cdfae85c75f04c03683d58 > files > 22

lib64dirac-devel-0.9.1-1mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Dirac Video Codec</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<h1 align="center" color="#606080">
Dirac - A Video Codec
</h1>
<p align="center">
Created by the <a href="http://www.bbc.co.uk">British Broadcasting Corporation</a>.
</p>
<hr>
<!-- Generated by Doxygen 1.5.4 -->
<div class="nav">
<a class="el" href="a00226.html">dirac</a>::<a class="el" href="a00002.html">ArithCodec</a></div>
<h1>dirac::ArithCodec&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="dirac::ArithCodec" --><!-- doxytag: inherits="dirac::ArithCodecBase" -->Abstract binary arithmetic coding class.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="a00231.html">arith_codec.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for dirac::ArithCodec&lt; T &gt;:</div>
<div class="dynsection">

<p><center><img src="a00002.png" usemap="#dirac::ArithCodec< T >_map" border="0" alt=""></center>
<map name="dirac::ArithCodec< T >_map">
<area href="a00003.html" alt="dirac::ArithCodecBase" shape="rect" coords="440,0,606,24">
<area href="a00004.html" alt="dirac::BandCodec" shape="rect" coords="88,112,254,136">
<area href="a00031.html" alt="dirac::DCCodec" shape="rect" coords="264,112,430,136">
<area href="a00115.html" alt="dirac::PredModeCodec" shape="rect" coords="440,112,606,136">
<area href="a00127.html" alt="dirac::SplitModeCodec" shape="rect" coords="616,112,782,136">
<area href="a00141.html" alt="dirac::VectorElementCodec" shape="rect" coords="792,112,958,136">
<area href="a00083.html" alt="dirac::IntraDCBandCodec" shape="rect" coords="0,168,166,192">
<area href="a00085.html" alt="dirac::LFBandCodec" shape="rect" coords="176,168,342,192">
</map>
</div>

<p>
<a href="a00337.html">List of all members.</a><h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="a00002.html#feff75556eeb4759ece937e440f0b4b0">ArithCodec</a> (<a class="el" href="a00018.html">ByteIO</a> *p_byteio, size_t number_of_contexts)
<dl class="el"><dd class="mdescRight">Constructor for encoding.  <a href="#feff75556eeb4759ece937e440f0b4b0"></a><br></dl><li>virtual <a class="el" href="a00002.html#7554b390827496f6de00fdd6a8ede9d3">~ArithCodec</a> ()
<dl class="el"><dd class="mdescRight">Destructor.  <a href="#7554b390827496f6de00fdd6a8ede9d3"></a><br></dl><li>int <a class="el" href="a00002.html#13dca796e9759ef713c4d9efcd14ba19">Compress</a> (T &amp;in_data)
<dl class="el"><dd class="mdescRight">Compresses the input and returns the number of bits written.  <a href="#13dca796e9759ef713c4d9efcd14ba19"></a><br></dl><li>void <a class="el" href="a00002.html#c3b0d97af3420190de64db61d064697f">Decompress</a> (T &amp;out_data, const int num_bytes)
<dl class="el"><dd class="mdescRight">Decompresses the bitstream and writes into the output.  <a href="#c3b0d97af3420190de64db61d064697f"></a><br></dl></ul>
<h2>Protected Member Functions</h2>
<ul>
<li>virtual void <a class="el" href="a00002.html#494cce54ef4b1e29dbfa501172a4c5c5">DoWorkCode</a> (T &amp;in_data)=0
<dl class="el"><dd class="mdescRight">Does the work of actually coding the data.  <a href="#494cce54ef4b1e29dbfa501172a4c5c5"></a><br></dl><li>virtual void <a class="el" href="a00002.html#a2391df876c8b5aa1007830371f551f7">DoWorkDecode</a> (T &amp;out_data)=0
<dl class="el"><dd class="mdescRight">virtual decode-only functions ////////////////////////////  <a href="#a2391df876c8b5aa1007830371f551f7"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class T&gt;<br>
 class dirac::ArithCodec&lt; T &gt;</h3>

This is an abtract binary arithmetic encoding class, used as the base for concrete classes that encode motion vectors and subband residues. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>T</em>&nbsp;</td><td>a container (most probably, or array) type </td></tr>
  </table>
</dl>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="feff75556eeb4759ece937e440f0b4b0"></a><!-- doxytag: member="dirac::ArithCodec::ArithCodec" ref="feff75556eeb4759ece937e440f0b4b0" args="(ByteIO *p_byteio, size_t number_of_contexts)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00002.html">dirac::ArithCodec</a>&lt; T &gt;::<a class="el" href="a00002.html">ArithCodec</a>           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00018.html">ByteIO</a> *&nbsp;</td>
          <td class="paramname"> <em>p_byteio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>number_of_contexts</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates an <a class="el" href="a00002.html" title="Abstract binary arithmetic coding class.">ArithCodec</a> object to decode input based on a set of parameters. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p_byteio</em>&nbsp;</td><td>input/output for encoded bits </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>number_of_contexts</em>&nbsp;</td><td>the number of contexts used </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="7554b390827496f6de00fdd6a8ede9d3"></a><!-- doxytag: member="dirac::ArithCodec::~ArithCodec" ref="7554b390827496f6de00fdd6a8ede9d3" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="a00002.html">dirac::ArithCodec</a>&lt; T &gt;::~<a class="el" href="a00002.html">ArithCodec</a>           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor is virtual as this class is abstract. 
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="13dca796e9759ef713c4d9efcd14ba19"></a><!-- doxytag: member="dirac::ArithCodec::Compress" ref="13dca796e9759ef713c4d9efcd14ba19" args="(T &amp;in_data)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="a00002.html">dirac::ArithCodec</a>&lt; T &gt;::Compress           </td>
          <td>(</td>
          <td class="paramtype">T &amp;&nbsp;</td>
          <td class="paramname"> <em>in_data</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compress takes a type T object (a container or array) and compresses it using the abstract function <a class="el" href="a00002.html#494cce54ef4b1e29dbfa501172a4c5c5" title="Does the work of actually coding the data.">DoWorkCode()</a> which is overridden in subclasses. It returns the number of bits written. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>in_data</em>&nbsp;</td><td>the input to be compressed. Non-const, since the compression may be lossy. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="c3b0d97af3420190de64db61d064697f"></a><!-- doxytag: member="dirac::ArithCodec::Decompress" ref="c3b0d97af3420190de64db61d064697f" args="(T &amp;out_data, const int num_bytes)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="a00002.html">dirac::ArithCodec</a>&lt; T &gt;::Decompress           </td>
          <td>(</td>
          <td class="paramtype">T &amp;&nbsp;</td>
          <td class="paramname"> <em>out_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&nbsp;</td>
          <td class="paramname"> <em>num_bytes</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Decompresses the bitstream, up to the number of bytes specified and writes into the output subclasses. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>out_data</em>&nbsp;</td><td>the output into which the decompressed data is written. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>num_bytes</em>&nbsp;</td><td>the number of bytes to be read from the bitstream. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="494cce54ef4b1e29dbfa501172a4c5c5"></a><!-- doxytag: member="dirac::ArithCodec::DoWorkCode" ref="494cce54ef4b1e29dbfa501172a4c5c5" args="(T &amp;in_data)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="a00002.html">dirac::ArithCodec</a>&lt; T &gt;::DoWorkCode           </td>
          <td>(</td>
          <td class="paramtype">T &amp;&nbsp;</td>
          <td class="paramname"> <em>in_data</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="a2391df876c8b5aa1007830371f551f7"></a><!-- doxytag: member="dirac::ArithCodec::DoWorkDecode" ref="a2391df876c8b5aa1007830371f551f7" args="(T &amp;out_data)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="a00002.html">dirac::ArithCodec</a>&lt; T &gt;::DoWorkDecode           </td>
          <td>(</td>
          <td class="paramtype">T &amp;&nbsp;</td>
          <td class="paramname"> <em>out_data</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00231.html">arith_codec.h</a></ul>
<hr>
<p align="center"><small>
&copy; 2004 British Broadcasting Corporation.
Dirac code licensed under the <a href="http://www.mozilla.org/MPL/">Mozilla Public License (MPL) Version 1.1</a>.<br>
HTML documentation generated by Dimitri van Heesch's
excellent <a href="http://www.doxygen.org">Doxygen</a> tool.
</small></p>
</body>
</html>