Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > media > main-release > by-pkgid > f250c16c2b84c9364a2f35a71121aaa2 > files > 19

lib64dirac-devel-1.0.2-2mdv2010.0.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.9 -->
  <div class="navpath"><a class="el" href="a00234.html">dirac</a>::<a class="el" href="a00001.html">ArithCodec</a>
  </div>
<div class="contents">
<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="a00161_source.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="a00001.png" usemap="#dirac::ArithCodec< T >_map" border="0" alt=""></center>
<map name="dirac::ArithCodec< T >_map">
<area href="a00002.html" alt="dirac::ArithCodecBase" shape="rect" coords="0,0,142,24">
</map>
</div>

<p>
<a href="a00276.html">List of all members.</a><h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="a00001.html#feff75556eeb4759ece937e440f0b4b0">ArithCodec</a> (<a class="el" href="a00016.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="a00001.html#7554b390827496f6de00fdd6a8ede9d3">~ArithCodec</a> ()
<dl class="el"><dd class="mdescRight">Destructor.  <a href="#7554b390827496f6de00fdd6a8ede9d3"></a><br></dl><li>int <a class="el" href="a00001.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="a00001.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="a00001.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="a00001.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="a00001.html">dirac::ArithCodec</a>&lt; T &gt;::<a class="el" href="a00001.html">ArithCodec</a>           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00016.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><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates an <a class="el" href="a00001.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="a00001.html">dirac::ArithCodec</a>&lt; T &gt;::~<a class="el" href="a00001.html">ArithCodec</a>           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><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="a00001.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><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="a00001.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>

<p>References <a class="el" href="a00002.html#612441c07cdee30c7246539f7fe3199e">dirac::ArithCodecBase::ByteCount()</a>, <a class="el" href="a00001.html#494cce54ef4b1e29dbfa501172a4c5c5">dirac::ArithCodec&lt; T &gt;::DoWorkCode()</a>, <a class="el" href="a00002.html#dd48e1c11a630d1465cba01e5e7524a6">dirac::ArithCodecBase::FlushEncoder()</a>, and <a class="el" href="a00002.html#13417bf951850754890a945d1fff5901">dirac::ArithCodecBase::InitEncoder()</a>.</p>

</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="a00001.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><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>

<p>References <a class="el" href="a00001.html#a2391df876c8b5aa1007830371f551f7">dirac::ArithCodec&lt; T &gt;::DoWorkDecode()</a>, and <a class="el" href="a00002.html#c45185be0b16e6e105708e1c790c23d3">dirac::ArithCodecBase::InitDecoder()</a>.</p>

</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="a00001.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><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Implemented in <a class="el" href="a00079.html#f0fe3814042ee758a6988d7b5e997101">dirac::IntraDCBandCodec</a>, <a class="el" href="a00133.html#ae1b120581c9a74a46f054a6686d9774">dirac::SplitModeCodec</a>, <a class="el" href="a00120.html#2a8c09e3517638950f9b1a2665643141">dirac::PredModeCodec</a>, <a class="el" href="a00150.html#f98b9900902d429d6a56083e352b3a06">dirac::VectorElementCodec</a>, <a class="el" href="a00028.html#91b910d38e4dcdde15041d030c0176ac">dirac::DCCodec</a>, and <a class="el" href="a00074.html#fbe9e6a13374a7b030ae28397b84395f">dirac::GenericBandCodec&lt; ArithCodec&lt; CoeffArray &gt; &gt;</a>.</p>

<p>Referenced by <a class="el" href="a00161_source.html#l00440">dirac::ArithCodec&lt; T &gt;::Compress()</a>.</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="a00001.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><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Implemented in <a class="el" href="a00079.html#310cf073898fe6f4c6ac46a88e87086b">dirac::IntraDCBandCodec</a>, <a class="el" href="a00133.html#0be72a115c443634fad95ca852e957ee">dirac::SplitModeCodec</a>, <a class="el" href="a00120.html#964d87be96eb3f286cb2a9e393b0cd9a">dirac::PredModeCodec</a>, <a class="el" href="a00150.html#f1974005e0af77e3ee5e2266bdcf5e98">dirac::VectorElementCodec</a>, <a class="el" href="a00028.html#4fb55e90869987525e25ed29398d1fd3">dirac::DCCodec</a>, and <a class="el" href="a00074.html#2db4a20896bde64fcae2c6fe35583078">dirac::GenericBandCodec&lt; ArithCodec&lt; CoeffArray &gt; &gt;</a>.</p>

<p>Referenced by <a class="el" href="a00161_source.html#l00449">dirac::ArithCodec&lt; T &gt;::Decompress()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00161_source.html">arith_codec.h</a></ul>
</div>
<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>