Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > f250c16c2b84c9364a2f35a71121aaa2 > files > 400

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 -->
<h1>wavelet_utils.h</h1><a href="a00233.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* ***** BEGIN LICENSE BLOCK *****</span>
<a name="l00002"></a>00002 <span class="comment">*</span>
<a name="l00003"></a>00003 <span class="comment">* $Id: wavelet_utils.h,v 1.32 2008/10/20 04:21:02 asuraparaju Exp $ $Name: Dirac_1_0_2 $</span>
<a name="l00004"></a>00004 <span class="comment">*</span>
<a name="l00005"></a>00005 <span class="comment">* Version: MPL 1.1/GPL 2.0/LGPL 2.1</span>
<a name="l00006"></a>00006 <span class="comment">*</span>
<a name="l00007"></a>00007 <span class="comment">* The contents of this file are subject to the Mozilla Public License</span>
<a name="l00008"></a>00008 <span class="comment">* Version 1.1 (the "License"); you may not use this file except in compliance</span>
<a name="l00009"></a>00009 <span class="comment">* with the License. You may obtain a copy of the License at</span>
<a name="l00010"></a>00010 <span class="comment">* http://www.mozilla.org/MPL/</span>
<a name="l00011"></a>00011 <span class="comment">*</span>
<a name="l00012"></a>00012 <span class="comment">* Software distributed under the License is distributed on an "AS IS" basis,</span>
<a name="l00013"></a>00013 <span class="comment">* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for</span>
<a name="l00014"></a>00014 <span class="comment">* the specific language governing rights and limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment">*</span>
<a name="l00016"></a>00016 <span class="comment">* The Original Code is BBC Research and Development code.</span>
<a name="l00017"></a>00017 <span class="comment">*</span>
<a name="l00018"></a>00018 <span class="comment">* The Initial Developer of the Original Code is the British Broadcasting</span>
<a name="l00019"></a>00019 <span class="comment">* Corporation.</span>
<a name="l00020"></a>00020 <span class="comment">* Portions created by the Initial Developer are Copyright (C) 2004.</span>
<a name="l00021"></a>00021 <span class="comment">* All Rights Reserved.</span>
<a name="l00022"></a>00022 <span class="comment">*</span>
<a name="l00023"></a>00023 <span class="comment">* Contributor(s): Thomas Davies (Original Author),</span>
<a name="l00024"></a>00024 <span class="comment">*                 Scott R Ladd</span>
<a name="l00025"></a>00025 <span class="comment">*                 Anuradha Suraparaju</span>
<a name="l00026"></a>00026 <span class="comment">*</span>
<a name="l00027"></a>00027 <span class="comment">* Alternatively, the contents of this file may be used under the terms of</span>
<a name="l00028"></a>00028 <span class="comment">* the GNU General Public License Version 2 (the "GPL"), or the GNU Lesser</span>
<a name="l00029"></a>00029 <span class="comment">* Public License Version 2.1 (the "LGPL"), in which case the provisions of</span>
<a name="l00030"></a>00030 <span class="comment">* the GPL or the LGPL are applicable instead of those above. If you wish to</span>
<a name="l00031"></a>00031 <span class="comment">* allow use of your version of this file only under the terms of the either</span>
<a name="l00032"></a>00032 <span class="comment">* the GPL or LGPL and not to allow others to use your version of this file</span>
<a name="l00033"></a>00033 <span class="comment">* under the MPL, indicate your decision by deleting the provisions above</span>
<a name="l00034"></a>00034 <span class="comment">* and replace them with the notice and other provisions required by the GPL</span>
<a name="l00035"></a>00035 <span class="comment">* or LGPL. If you do not delete the provisions above, a recipient may use</span>
<a name="l00036"></a>00036 <span class="comment">* your version of this file under the terms of any one of the MPL, the GPL</span>
<a name="l00037"></a>00037 <span class="comment">* or the LGPL.</span>
<a name="l00038"></a>00038 <span class="comment">* ***** END LICENSE BLOCK ***** */</span>
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="preprocessor">#ifndef _WAVELET_UTILS_H_</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define _WAVELET_UTILS_H_</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;<a class="code" href="a00162.html">libdirac_common/arrays.h</a>&gt;</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include &lt;<a class="code" href="a00171.html">libdirac_common/common.h</a>&gt;</span>
<a name="l00045"></a>00045 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;cmath&gt;</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="comment">//utilities for subband and wavelet transforms</span>
<a name="l00050"></a>00050 <span class="comment">//Includes fast transform using lifting</span>
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="keyword">namespace </span>dirac
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 
<a name="l00055"></a>00055     <span class="keyword">class </span>PicArray;
<a name="l00056"></a>00056     <span class="keyword">class </span>Subband;
<a name="l00057"></a>00057 
<a name="l00059"></a><a class="code" href="a00017.html">00059</a>     <span class="keyword">class </span><a class="code" href="a00017.html" title="Class for encapsulating metadata concerning a block of coefficients in a subband...">CodeBlock</a>
<a name="l00060"></a>00060     {
<a name="l00061"></a>00061 
<a name="l00062"></a><a class="code" href="a00017.html#06553a2d51f5bf51b6e52411f8468dc9">00062</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00140.html" title="Class encapsulating all the metadata relating to a wavelet subband.">Subband</a>;
<a name="l00063"></a>00063 
<a name="l00064"></a>00064     <span class="keyword">public</span>:
<a name="l00066"></a>00066         <span class="comment">/*</span>
<a name="l00067"></a>00067 <span class="comment">            Default constructor - sets all dimensions to zero</span>
<a name="l00068"></a>00068 <span class="comment">        */</span>
<a name="l00069"></a>00069         <a class="code" href="a00017.html#b4469709d72a9e1eaa28e60071d2a359" title="Constructor.">CodeBlock</a>();
<a name="l00070"></a>00070 
<a name="l00072"></a>00072         <span class="comment">/*</span>
<a name="l00073"></a>00073 <span class="comment">            Initialise the code block</span>
<a name="l00074"></a>00074 <span class="comment">            \param    xstart  the x-coord of the first coefficient in the block</span>
<a name="l00075"></a>00075 <span class="comment">            \param    xend    one past the last coefficient, horizontally</span>
<a name="l00076"></a>00076 <span class="comment">            \param    ystart  the y-coord of the first coefficient in the block</span>
<a name="l00077"></a>00077 <span class="comment">            \param    yend    one past the last coefficient, vertically</span>
<a name="l00078"></a>00078 <span class="comment">        */</span>
<a name="l00079"></a>00079         <a class="code" href="a00017.html#b4469709d72a9e1eaa28e60071d2a359" title="Constructor.">CodeBlock</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> xstart , <span class="keyword">const</span> <span class="keywordtype">int</span> ystart , <span class="keyword">const</span> <span class="keywordtype">int</span> xend , <span class="keyword">const</span> <span class="keywordtype">int</span> yend);
<a name="l00080"></a>00080 
<a name="l00082"></a><a class="code" href="a00017.html#d29586b1da996d684b668c8fdadc22b8">00082</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#d29586b1da996d684b668c8fdadc22b8" title="Returns the horizontal start of the block.">Xstart</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00017.html#53a11ceb9ef437bb47ed475ac7330f61">m_xstart</a>; }
<a name="l00083"></a>00083 
<a name="l00085"></a><a class="code" href="a00017.html#2a8695fd23ab673a6c181f17b5269bad">00085</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#2a8695fd23ab673a6c181f17b5269bad" title="Returns the vertical start of the block.">Ystart</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00017.html#73261f7c61211e838abdcdec18fc8321">m_ystart</a>; }
<a name="l00086"></a>00086 
<a name="l00088"></a><a class="code" href="a00017.html#57d4bdd88e79ea08588cb85e263584b0">00088</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#57d4bdd88e79ea08588cb85e263584b0" title="Returns one past the last coefficient coord, horizontally.">Xend</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00017.html#18fa8b0a57b8048a15b76269f32f7cbe">m_xend</a>; }
<a name="l00089"></a>00089 
<a name="l00091"></a><a class="code" href="a00017.html#21ae1a27a7cd1ca67ecf6f041a8b1601">00091</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#21ae1a27a7cd1ca67ecf6f041a8b1601" title="Returns one past the last coefficient coord, vertically.">Yend</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00017.html#bf57603f9dd2fa2fe4de7e074c833ce1">m_yend</a>; }
<a name="l00092"></a>00092 
<a name="l00094"></a><a class="code" href="a00017.html#432aae41873539c2649db7f9830fc6fa">00094</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#432aae41873539c2649db7f9830fc6fa" title="Returns the width of the code block.">Xl</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00017.html#17d62f31e30172ad314f314aca2089a7">m_xl</a>; }
<a name="l00095"></a>00095 
<a name="l00097"></a><a class="code" href="a00017.html#3ffee72e8969ee37858c08d5d24785f8">00097</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#3ffee72e8969ee37858c08d5d24785f8" title="Returns the height of the code block.">Yl</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00017.html#70d204ebb00ee9e5ffad3e4d64ff9c05">m_yl</a>; }
<a name="l00098"></a>00098 
<a name="l00100"></a><a class="code" href="a00017.html#227d0ecbcbae22f038ec3076f3a20869">00100</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#227d0ecbcbae22f038ec3076f3a20869" title="Returns the quantisation index associated to the code block.">QuantIndex</a>()<span class="keyword"> const</span>{ <span class="keywordflow">return</span> <a class="code" href="a00017.html#368e0a89375a0794652dea29898bf332">m_quantindex</a>; }
<a name="l00101"></a>00101 
<a name="l00103"></a><a class="code" href="a00017.html#2b4173339cb786ae598641cdcb8a3b95">00103</a>         <span class="keywordtype">bool</span> <a class="code" href="a00017.html#2b4173339cb786ae598641cdcb8a3b95" title="Returns true if the code-block is skipped, false if not.">Skipped</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00017.html#2bd95c1782a56d7b29c4d0b395b9221a">m_skipped</a>; }
<a name="l00104"></a>00104 
<a name="l00106"></a><a class="code" href="a00017.html#6614957f28682587ac1bead8fd72b0e9">00106</a>         <span class="keywordtype">void</span> <a class="code" href="a00017.html#6614957f28682587ac1bead8fd72b0e9" title="Sets the quantisation index.">SetQuantIndex</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> quantindex ){ <a class="code" href="a00017.html#368e0a89375a0794652dea29898bf332">m_quantindex</a> = quantindex; }
<a name="l00107"></a>00107 
<a name="l00109"></a><a class="code" href="a00017.html#515e97829c56e110dbae85cc82605560">00109</a>         <span class="keywordtype">void</span> <a class="code" href="a00017.html#515e97829c56e110dbae85cc82605560" title="Sets whether the code block is skipped or not.">SetSkip</a>( <span class="keywordtype">bool</span> skip ){ <a class="code" href="a00017.html#2bd95c1782a56d7b29c4d0b395b9221a">m_skipped</a> = skip; }
<a name="l00110"></a>00110 
<a name="l00111"></a>00111     <span class="keyword">private</span>:
<a name="l00112"></a>00112 
<a name="l00114"></a>00114         <span class="comment">/*</span>
<a name="l00115"></a>00115 <span class="comment">            Initialise the code block</span>
<a name="l00116"></a>00116 <span class="comment">            \param    xstart  the x-coord of the first coefficient in the block</span>
<a name="l00117"></a>00117 <span class="comment">            \param    xend    one past the last coefficient, horizontally</span>
<a name="l00118"></a>00118 <span class="comment">            \param    ystart  the y-coord of the first coefficient in the block</span>
<a name="l00119"></a>00119 <span class="comment">            \param    yend    one past the last coefficient, vertically</span>
<a name="l00120"></a>00120 <span class="comment">        */</span>
<a name="l00121"></a>00121         <span class="keywordtype">void</span> <a class="code" href="a00017.html#63733c162643772aaf7b2afec8ae91f8" title="Initialise the code block.">Init</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> xstart , <span class="keyword">const</span> <span class="keywordtype">int</span> ystart , <span class="keyword">const</span> <span class="keywordtype">int</span> xend , <span class="keyword">const</span> <span class="keywordtype">int</span> yend );
<a name="l00122"></a>00122 
<a name="l00123"></a>00123     <span class="keyword">private</span>:
<a name="l00124"></a>00124 
<a name="l00125"></a><a class="code" href="a00017.html#53a11ceb9ef437bb47ed475ac7330f61">00125</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#53a11ceb9ef437bb47ed475ac7330f61">m_xstart</a>;
<a name="l00126"></a><a class="code" href="a00017.html#73261f7c61211e838abdcdec18fc8321">00126</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#73261f7c61211e838abdcdec18fc8321">m_ystart</a>;
<a name="l00127"></a><a class="code" href="a00017.html#18fa8b0a57b8048a15b76269f32f7cbe">00127</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#18fa8b0a57b8048a15b76269f32f7cbe">m_xend</a>;
<a name="l00128"></a><a class="code" href="a00017.html#bf57603f9dd2fa2fe4de7e074c833ce1">00128</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#bf57603f9dd2fa2fe4de7e074c833ce1">m_yend</a>;
<a name="l00129"></a><a class="code" href="a00017.html#17d62f31e30172ad314f314aca2089a7">00129</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#17d62f31e30172ad314f314aca2089a7">m_xl</a>;
<a name="l00130"></a><a class="code" href="a00017.html#70d204ebb00ee9e5ffad3e4d64ff9c05">00130</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#70d204ebb00ee9e5ffad3e4d64ff9c05">m_yl</a>;
<a name="l00131"></a>00131 
<a name="l00132"></a><a class="code" href="a00017.html#368e0a89375a0794652dea29898bf332">00132</a>         <span class="keywordtype">int</span> <a class="code" href="a00017.html#368e0a89375a0794652dea29898bf332">m_quantindex</a>;
<a name="l00133"></a>00133 
<a name="l00134"></a><a class="code" href="a00017.html#2bd95c1782a56d7b29c4d0b395b9221a">00134</a>         <span class="keywordtype">bool</span> <a class="code" href="a00017.html#2bd95c1782a56d7b29c4d0b395b9221a">m_skipped</a>;
<a name="l00135"></a>00135     };
<a name="l00136"></a>00136 
<a name="l00137"></a>00137 
<a name="l00139"></a><a class="code" href="a00140.html">00139</a>     <span class="keyword">class </span><a class="code" href="a00140.html" title="Class encapsulating all the metadata relating to a wavelet subband.">Subband</a>
<a name="l00140"></a>00140     {
<a name="l00141"></a>00141     <span class="keyword">public</span>:
<a name="l00142"></a>00142 
<a name="l00144"></a>00144         <a class="code" href="a00140.html#1d298130dd40f5fb4f8669a7aff5681d" title="Default constructor.">Subband</a>();
<a name="l00145"></a>00145 
<a name="l00147"></a>00147 
<a name="l00155"></a>00155         <a class="code" href="a00140.html#1d298130dd40f5fb4f8669a7aff5681d" title="Default constructor.">Subband</a>(<span class="keywordtype">int</span> xpos, <span class="keywordtype">int</span> ypos, <span class="keywordtype">int</span> xlen, <span class="keywordtype">int</span> ylen);
<a name="l00156"></a>00156 
<a name="l00158"></a>00158 
<a name="l00167"></a>00167         <a class="code" href="a00140.html#1d298130dd40f5fb4f8669a7aff5681d" title="Default constructor.">Subband</a>(<span class="keywordtype">int</span> xpos, <span class="keywordtype">int</span> ypos, <span class="keywordtype">int</span> xlen, <span class="keywordtype">int</span> ylen, <span class="keywordtype">int</span> d);
<a name="l00168"></a>00168 
<a name="l00170"></a>00170         <a class="code" href="a00140.html#c751213e81a0788bca25764815a0f196" title="Destructor.">~Subband</a>();
<a name="l00171"></a>00171 
<a name="l00172"></a>00172         <span class="comment">//Default (shallow) copy constructor and operator= used</span>
<a name="l00173"></a>00173 
<a name="l00175"></a><a class="code" href="a00140.html#aa46a732e19b7ae6426c8252fd0bdef4">00175</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#aa46a732e19b7ae6426c8252fd0bdef4" title="Return the width of the subband.">Xl</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#afe10fd1da9a507c421e418161b94f41">m_xl</a>;}
<a name="l00176"></a>00176 
<a name="l00178"></a><a class="code" href="a00140.html#a4f0c047d7037ba24e6a65f8f3336f49">00178</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#a4f0c047d7037ba24e6a65f8f3336f49" title="Return the horizontal position of the subband.">Xp</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#d0a1a4ba3e72507c4da2e67f289e9a10">m_xp</a>;}
<a name="l00179"></a>00179 
<a name="l00181"></a><a class="code" href="a00140.html#1872a51b50fcf9e974306da97a155542">00181</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#1872a51b50fcf9e974306da97a155542" title="Return the height of the subband.">Yl</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#0c93e5c545858dd3ebc40611e65b7214">m_yl</a>;}
<a name="l00182"></a>00182 
<a name="l00184"></a><a class="code" href="a00140.html#eec29297e79ad3c5c4cca318a50f14c8">00184</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#eec29297e79ad3c5c4cca318a50f14c8" title="Return the vertical position of the subband.">Yp</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#3867589432f87445724ddee92d8527db">m_yp</a>;}
<a name="l00185"></a>00185 
<a name="l00187"></a><a class="code" href="a00140.html#890433f85c821c8fd4c86f2cdadd4db3">00187</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#890433f85c821c8fd4c86f2cdadd4db3" title="Return the index of the maximum bit of the largest coefficient.">Max</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#61c85537ae1c9dab11237f050827e519">m_max_bit</a>;}
<a name="l00188"></a>00188 
<a name="l00190"></a><a class="code" href="a00140.html#fdd9b798e9487946c681b2a4df339bca">00190</a>         <span class="keywordtype">double</span> <a class="code" href="a00140.html#fdd9b798e9487946c681b2a4df339bca" title="Return the subband perceptual weight.">Wt</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#59108b344360d7dbf14ae7dc265d5826">m_wt</a>;}
<a name="l00191"></a>00191 
<a name="l00193"></a><a class="code" href="a00140.html#c977c4a1f12335715c4514cd7854e023">00193</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#c977c4a1f12335715c4514cd7854e023" title="Return the depth of the subband in the transform.">Depth</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#1a1694aa721ba5fc44dd96d7e0e8dff4">m_depth</a>;}
<a name="l00194"></a>00194 
<a name="l00196"></a><a class="code" href="a00140.html#89bcb84c915c7098996920c9bd8e00d7">00196</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#89bcb84c915c7098996920c9bd8e00d7" title="Return the scale of the subband, viewed as a subsampled version of the picture.">Scale</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> ( 1&lt;&lt;<a class="code" href="a00140.html#1a1694aa721ba5fc44dd96d7e0e8dff4">m_depth</a> );}
<a name="l00197"></a>00197 
<a name="l00199"></a><a class="code" href="a00140.html#320f0c478eff2480911a6d6b60621e96">00199</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#320f0c478eff2480911a6d6b60621e96" title="Return a quantisation index.">QuantIndex</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#51bce77a9c3a12225710c1098ad09cf6">m_qindex</a>;}
<a name="l00200"></a>00200 
<a name="l00202"></a><a class="code" href="a00140.html#57f9ca5349d5041555d2d4337a3b4b56">00202</a>         <span class="keywordtype">bool</span> <a class="code" href="a00140.html#57f9ca5349d5041555d2d4337a3b4b56" title="Return a flag indicating whether we have separate quantisers for each code block...">UsingMultiQuants</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#aff6778630198fd9af3ba1fac392eef2">m_multi_quants</a>; }
<a name="l00203"></a>00203 
<a name="l00205"></a><a class="code" href="a00140.html#8a3a67ee8da65906c3c2ca1fe25218ee">00205</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#8a3a67ee8da65906c3c2ca1fe25218ee" title="Return the index of the parent subband.">Parent</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#e5a46093f6df59e5164408abf0f47941">m_parent</a>;}
<a name="l00206"></a>00206 
<a name="l00208"></a><a class="code" href="a00140.html#ea04460641897984b1573563679eebbd">00208</a>         <span class="keyword">const</span> std::vector&lt;int&gt;&amp; <a class="code" href="a00140.html#ea04460641897984b1573563679eebbd" title="Return the indices of any child subbands.">Children</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#92eedd46532b44c29f2b96e7a29cbd54">m_children</a>;}
<a name="l00209"></a>00209 
<a name="l00211"></a><a class="code" href="a00140.html#f90b8db61e1e466ee0803e1a2123b58f">00211</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#f90b8db61e1e466ee0803e1a2123b58f" title="Return the index of a specific child band.">Child</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> n)<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00140.html#92eedd46532b44c29f2b96e7a29cbd54">m_children</a>[n];}
<a name="l00212"></a>00212 
<a name="l00214"></a><a class="code" href="a00140.html#60f50afe1783de534e74bcaebaa05fc7">00214</a>         <a class="code" href="a00145.html">TwoDArray&lt;CodeBlock&gt;</a>&amp; <a class="code" href="a00140.html#60f50afe1783de534e74bcaebaa05fc7" title="Return the code blocks.">GetCodeBlocks</a>(){ <span class="keywordflow">return</span> <a class="code" href="a00140.html#c1002c2d143689279bf757d2b00edc89">m_code_block_array</a>; }
<a name="l00215"></a>00215 
<a name="l00217"></a><a class="code" href="a00140.html#819b890f79b465cf42095fe48f74bc0d">00217</a>         <span class="keyword">const</span> <a class="code" href="a00145.html">TwoDArray&lt;CodeBlock&gt;</a>&amp; <a class="code" href="a00140.html#819b890f79b465cf42095fe48f74bc0d" title="Return the code blocks.">GetCodeBlocks</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00140.html#c1002c2d143689279bf757d2b00edc89">m_code_block_array</a>; }
<a name="l00218"></a>00218 
<a name="l00220"></a><a class="code" href="a00140.html#623f0de56e2bf7418866bfa058d96da2">00220</a>         <span class="keywordtype">bool</span> <a class="code" href="a00140.html#623f0de56e2bf7418866bfa058d96da2" title="Returns true if subband is skipped, false if not.">Skipped</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00140.html#7edcb27b706ec7bf3e1bcb6e73783106">m_skipped</a>; }
<a name="l00221"></a>00221 
<a name="l00223"></a>00223         <span class="keywordtype">void</span> <a class="code" href="a00140.html#fde0166fbecbe0a65d558572f0e835e2" title="Set the perceptual weight.">SetWt</a>( <span class="keyword">const</span> <span class="keywordtype">float</span> w );
<a name="l00224"></a>00224 
<a name="l00226"></a><a class="code" href="a00140.html#4c06b8d3e6a1f0807da9d8e49775f2e3">00226</a>         <span class="keywordtype">void</span> <a class="code" href="a00140.html#4c06b8d3e6a1f0807da9d8e49775f2e3" title="Set the parent index.">SetParent</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> p ){ <a class="code" href="a00140.html#e5a46093f6df59e5164408abf0f47941">m_parent</a>=p; }
<a name="l00227"></a>00227 
<a name="l00229"></a><a class="code" href="a00140.html#ad960850ac68606453a21d1dd34668e2">00229</a>         <span class="keywordtype">void</span> <a class="code" href="a00140.html#ad960850ac68606453a21d1dd34668e2" title="Set the subband depth.">SetDepth</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> d ){ <a class="code" href="a00140.html#1a1694aa721ba5fc44dd96d7e0e8dff4">m_depth</a>=d;}
<a name="l00230"></a>00230 
<a name="l00232"></a><a class="code" href="a00140.html#1d8ee61da208d1dd585036a4d4078e1d">00232</a>         <span class="keywordtype">void</span> <a class="code" href="a00140.html#1d8ee61da208d1dd585036a4d4078e1d" title="Set the index of the maximum bit of the largest coefficient.">SetMax</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> m ){ <a class="code" href="a00140.html#61c85537ae1c9dab11237f050827e519">m_max_bit</a>=m; };
<a name="l00233"></a>00233 
<a name="l00235"></a>00235         <span class="keywordtype">void</span> <a class="code" href="a00140.html#86f22dd51e08c0e9fdfc88f77f0a0a81" title="Set the number of (spatial) quantisers in the subband. Creates code block structure...">SetNumBlocks</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> ynum , <span class="keyword">const</span> <span class="keywordtype">int</span> xnum );
<a name="l00236"></a>00236 
<a name="l00238"></a><a class="code" href="a00140.html#6142de98a589ac502191ce83d54edb44">00238</a>         <span class="keywordtype">void</span> <a class="code" href="a00140.html#6142de98a589ac502191ce83d54edb44" title="Set the quantisation index.">SetQuantIndex</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> idx){ <a class="code" href="a00140.html#51bce77a9c3a12225710c1098ad09cf6">m_qindex</a> = idx; }
<a name="l00239"></a>00239 
<a name="l00241"></a><a class="code" href="a00140.html#bd8218d1d203bcaf708a6450c1e10a76">00241</a>         <span class="keywordtype">void</span> <a class="code" href="a00140.html#bd8218d1d203bcaf708a6450c1e10a76" title="Set the number of (spatial) quantisers in the subband. Creates code block structure...">SetUsingMultiQuants</a>( <span class="keyword">const</span> <span class="keywordtype">bool</span> multi){ <a class="code" href="a00140.html#aff6778630198fd9af3ba1fac392eef2">m_multi_quants</a> = multi; }
<a name="l00242"></a>00242 
<a name="l00244"></a><a class="code" href="a00140.html#d6773f02e4668a7dd55bb0d1d3716107">00244</a>         <span class="keywordtype">void</span> <a class="code" href="a00140.html#d6773f02e4668a7dd55bb0d1d3716107" title="Set whether the subband is skipped or not.">SetSkip</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> skip ){ <a class="code" href="a00140.html#7edcb27b706ec7bf3e1bcb6e73783106">m_skipped</a> = skip; }
<a name="l00245"></a>00245 
<a name="l00246"></a>00246     <span class="keyword">private</span>:
<a name="l00247"></a>00247         <span class="comment">// subband bounds</span>
<a name="l00248"></a><a class="code" href="a00140.html#3867589432f87445724ddee92d8527db">00248</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#d0a1a4ba3e72507c4da2e67f289e9a10">m_xp</a> , <a class="code" href="a00140.html#3867589432f87445724ddee92d8527db">m_yp</a> , <a class="code" href="a00140.html#afe10fd1da9a507c421e418161b94f41">m_xl</a> , <a class="code" href="a00140.html#0c93e5c545858dd3ebc40611e65b7214">m_yl</a>;
<a name="l00249"></a>00249 
<a name="l00250"></a>00250         <span class="comment">// perceptual weight for quantisation</span>
<a name="l00251"></a><a class="code" href="a00140.html#59108b344360d7dbf14ae7dc265d5826">00251</a>         <span class="keywordtype">double</span> <a class="code" href="a00140.html#59108b344360d7dbf14ae7dc265d5826">m_wt</a>;
<a name="l00252"></a>00252 
<a name="l00253"></a>00253         <span class="comment">// depth in the transform</span>
<a name="l00254"></a><a class="code" href="a00140.html#1a1694aa721ba5fc44dd96d7e0e8dff4">00254</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#1a1694aa721ba5fc44dd96d7e0e8dff4">m_depth</a>;
<a name="l00255"></a>00255 
<a name="l00256"></a>00256         <span class="comment">// quantiser index</span>
<a name="l00257"></a><a class="code" href="a00140.html#51bce77a9c3a12225710c1098ad09cf6">00257</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#51bce77a9c3a12225710c1098ad09cf6">m_qindex</a>;
<a name="l00258"></a>00258 
<a name="l00259"></a>00259         <span class="comment">// position of parent in a subband list</span>
<a name="l00260"></a><a class="code" href="a00140.html#e5a46093f6df59e5164408abf0f47941">00260</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#e5a46093f6df59e5164408abf0f47941">m_parent</a>;
<a name="l00261"></a>00261 
<a name="l00262"></a>00262         <span class="comment">// positions of children in the subband list</span>
<a name="l00263"></a><a class="code" href="a00140.html#92eedd46532b44c29f2b96e7a29cbd54">00263</a>         std::vector&lt;int&gt; <a class="code" href="a00140.html#92eedd46532b44c29f2b96e7a29cbd54">m_children</a>;
<a name="l00264"></a>00264 
<a name="l00265"></a>00265         <span class="comment">// position of the MSB of the largest absolute value</span>
<a name="l00266"></a><a class="code" href="a00140.html#61c85537ae1c9dab11237f050827e519">00266</a>         <span class="keywordtype">int</span> <a class="code" href="a00140.html#61c85537ae1c9dab11237f050827e519">m_max_bit</a>;
<a name="l00267"></a>00267 
<a name="l00268"></a>00268         <span class="comment">// The code blocks</span>
<a name="l00269"></a><a class="code" href="a00140.html#c1002c2d143689279bf757d2b00edc89">00269</a>         <a class="code" href="a00145.html">TwoDArray&lt;CodeBlock&gt;</a> <a class="code" href="a00140.html#c1002c2d143689279bf757d2b00edc89">m_code_block_array</a>;
<a name="l00270"></a>00270 
<a name="l00271"></a>00271         <span class="comment">// A flag indicating whether we're using one qf for each code block</span>
<a name="l00272"></a><a class="code" href="a00140.html#aff6778630198fd9af3ba1fac392eef2">00272</a>         <span class="keywordtype">bool</span> <a class="code" href="a00140.html#aff6778630198fd9af3ba1fac392eef2">m_multi_quants</a>;
<a name="l00273"></a>00273 
<a name="l00274"></a>00274         <span class="comment">// Whether the subband is skipped or not</span>
<a name="l00275"></a><a class="code" href="a00140.html#7edcb27b706ec7bf3e1bcb6e73783106">00275</a>         <span class="keywordtype">bool</span> <a class="code" href="a00140.html#7edcb27b706ec7bf3e1bcb6e73783106">m_skipped</a>;
<a name="l00276"></a>00276     };
<a name="l00277"></a>00277 
<a name="l00279"></a><a class="code" href="a00142.html">00279</a>     <span class="keyword">class </span><a class="code" href="a00142.html" title="A class encapulating all the subbands produced by a transform.">SubbandList</a>
<a name="l00280"></a>00280     {
<a name="l00281"></a>00281     <span class="keyword">public</span>:
<a name="l00283"></a><a class="code" href="a00142.html#8c88c233907374705d6326ed92f58f25">00283</a>         <a class="code" href="a00142.html#8c88c233907374705d6326ed92f58f25" title="Constructor.">SubbandList</a>(){}
<a name="l00284"></a>00284 
<a name="l00286"></a><a class="code" href="a00142.html#d0d0e2f4d752fe35830cc8feecd8e99b">00286</a>         <a class="code" href="a00142.html#d0d0e2f4d752fe35830cc8feecd8e99b" title="Destructor.">~SubbandList</a>(){}
<a name="l00287"></a>00287 
<a name="l00288"></a>00288         <span class="comment">//Default (shallow) copy constructor and operator= used</span>
<a name="l00290"></a>00290 <span class="comment"></span>        <span class="keywordtype">void</span> <a class="code" href="a00142.html#be021fbb7991f3fc71b1b709c7c09852" title="Initialise the list.">Init</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> depth,<span class="keyword">const</span> <span class="keywordtype">int</span> xlen,<span class="keyword">const</span> <span class="keywordtype">int</span> ylen);
<a name="l00291"></a>00291 
<a name="l00293"></a><a class="code" href="a00142.html#b2854b1a2225a7352849c032fe3f9a92">00293</a>         <span class="keywordtype">int</span> <a class="code" href="a00142.html#b2854b1a2225a7352849c032fe3f9a92" title="Return the length of the subband list.">Length</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00142.html#167fb438179076bb9a8525e00ec41523">bands</a>.size();}
<a name="l00294"></a>00294 
<a name="l00296"></a><a class="code" href="a00142.html#b45845c7135b76c36a099e32b0751a6f">00296</a>         <a class="code" href="a00140.html" title="Class encapsulating all the metadata relating to a wavelet subband.">Subband</a>&amp; <a class="code" href="a00142.html#b45845c7135b76c36a099e32b0751a6f" title="Return the subband at position n (1&amp;lt;=n&amp;lt;=length).">operator()</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> n){<span class="keywordflow">return</span> <a class="code" href="a00142.html#167fb438179076bb9a8525e00ec41523">bands</a>[n-1];}
<a name="l00297"></a>00297 
<a name="l00299"></a><a class="code" href="a00142.html#af26c146ce1b187e2eb4b2298831839e">00299</a>         <span class="keyword">const</span> <a class="code" href="a00140.html" title="Class encapsulating all the metadata relating to a wavelet subband.">Subband</a>&amp; <a class="code" href="a00142.html#af26c146ce1b187e2eb4b2298831839e" title="Return the subband at position n (1&amp;lt;=n&amp;lt;=length).">operator()</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> n)<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00142.html#167fb438179076bb9a8525e00ec41523">bands</a>[n-1];}
<a name="l00300"></a>00300 
<a name="l00302"></a><a class="code" href="a00142.html#432ea85eae8503dba3805bcef16c2e7f">00302</a>         <span class="keywordtype">void</span> <a class="code" href="a00142.html#432ea85eae8503dba3805bcef16c2e7f" title="Add a band to the list.">AddBand</a>(<span class="keyword">const</span> <a class="code" href="a00140.html" title="Class encapsulating all the metadata relating to a wavelet subband.">Subband</a>&amp; b){<a class="code" href="a00142.html#167fb438179076bb9a8525e00ec41523">bands</a>.push_back(b);}
<a name="l00303"></a>00303 
<a name="l00305"></a><a class="code" href="a00142.html#d831463e1f627e5f8fc0d84d2f547d3a">00305</a>         <span class="keywordtype">void</span> <a class="code" href="a00142.html#d831463e1f627e5f8fc0d84d2f547d3a" title="Remove all the bands from the list.">Clear</a>(){<a class="code" href="a00142.html#167fb438179076bb9a8525e00ec41523">bands</a>.clear();}
<a name="l00306"></a>00306 
<a name="l00307"></a>00307     <span class="keyword">private</span>:
<a name="l00308"></a>00308 
<a name="l00310"></a>00310         <span class="keywordtype">float</span> <a class="code" href="a00142.html#3cf2b54b1bd10ac1e62372e89ebace46" title="Given x and y spatial frequencies in cycles per degree, returns a weighting value...">PerceptualWeight</a>( <span class="keyword">const</span> <span class="keywordtype">float</span> xf , <span class="keyword">const</span> <span class="keywordtype">float</span> yf , <span class="keyword">const</span> <a class="code" href="a00234.html#39dd89c4c7484412efd87d41548271cd" title="Types of picture component.">CompSort</a> cs);
<a name="l00311"></a>00311 
<a name="l00312"></a>00312     <span class="keyword">private</span>:
<a name="l00313"></a><a class="code" href="a00142.html#167fb438179076bb9a8525e00ec41523">00313</a>         std::vector&lt;Subband&gt; <a class="code" href="a00142.html#167fb438179076bb9a8525e00ec41523">bands</a>;
<a name="l00314"></a>00314     };
<a name="l00315"></a>00315  
<a name="l00316"></a>00316     <span class="keyword">class </span><a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>;   
<a name="l00318"></a><a class="code" href="a00151.html">00318</a>         <span class="keyword">class </span><a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>
<a name="l00319"></a>00319         {
<a name="l00320"></a>00320 
<a name="l00321"></a>00321         <span class="keyword">public</span>:
<a name="l00322"></a>00322 
<a name="l00323"></a><a class="code" href="a00151.html#d5df67625ddd6a1ed86ec3ee93e316c1">00323</a>             <a class="code" href="a00151.html#d5df67625ddd6a1ed86ec3ee93e316c1">VHFilter</a>(){}
<a name="l00324"></a>00324 
<a name="l00325"></a><a class="code" href="a00151.html#44ef6b1fc18b3bd00f42e5b2dc0584f9">00325</a>             <span class="keyword">virtual</span> <a class="code" href="a00151.html#44ef6b1fc18b3bd00f42e5b2dc0584f9">~VHFilter</a>(){}
<a name="l00326"></a>00326 
<a name="l00328"></a>00328             <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00151.html#01d7dd6e1c3fdac88ca23ee783504418" title="Split a subband into 4.">Split</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data)=0;
<a name="l00329"></a>00329 
<a name="l00331"></a>00331             <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00151.html#5109a961eaae47c216ab05ce5c280841" title="Create a single band from 4 quadrant bands.">Synth</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data)=0;
<a name="l00332"></a>00332 
<a name="l00334"></a>00334             <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00151.html#10cc8209defb69140066f368e6389af9" title="Return the value of the additional bitshift.">GetShift</a>() <span class="keyword">const</span> =0;
<a name="l00335"></a>00335 
<a name="l00336"></a>00336         <span class="keyword">protected</span>:
<a name="l00337"></a>00337 
<a name="l00339"></a>00339             <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00151.html#212dd5a5b10801baccb9da9f606fee8b" title="Interleave data from separate subbands into even and odd positions for in-place calculation...">Interleave</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data );
<a name="l00340"></a>00340 
<a name="l00341"></a>00341 
<a name="l00343"></a>00343             <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00151.html#a7aecfcb882d4c2bb36808467c50e98c" title="De-interleave data even and odd positions into separate subbands - called by Split...">DeInterleave</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data );
<a name="l00344"></a>00344 
<a name="l00346"></a>00346             <span class="keywordtype">void</span> <a class="code" href="a00151.html#b5c3394842675f5cd3ca18901e17f8d0" title="Shift all vals in Row by &amp;#39;shift&amp;#39; bits to the left to increase accuracy by...">ShiftRowLeft</a>(<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a> *row, <span class="keywordtype">int</span> length, <span class="keywordtype">int</span> shift);
<a name="l00347"></a>00347 
<a name="l00349"></a>00349             <span class="keywordtype">void</span> <a class="code" href="a00151.html#bc383ddfc57e21c7828f823097539ae0" title="Shift all vals in Row by &amp;#39;shift&amp;#39; bits to the right to counter the shift in...">ShiftRowRight</a>(<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a> *row, <span class="keywordtype">int</span> length, <span class="keywordtype">int</span> shift);
<a name="l00350"></a>00350         };
<a name="l00351"></a>00351 
<a name="l00353"></a><a class="code" href="a00152.html">00353</a>         <span class="keyword">class </span><a class="code" href="a00152.html" title="Class to do Daubechies (9,7) filtering operations.">VHFilterDAUB9_7</a> : <span class="keyword">public</span> <a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>
<a name="l00354"></a>00354         {
<a name="l00355"></a>00355 
<a name="l00356"></a>00356         <span class="keyword">public</span>:
<a name="l00357"></a>00357 
<a name="l00359"></a>00359             <span class="keywordtype">void</span> <a class="code" href="a00152.html#366313fecb85edfa9f67ba009867fc3a" title="Split a subband into 4.">Split</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00360"></a>00360 
<a name="l00362"></a>00362             <span class="keywordtype">void</span> <a class="code" href="a00152.html#bfb7d77806e6b94bb89e6801eb453d18" title="Create a single band from 4 quadrant bands.">Synth</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00363"></a>00363 
<a name="l00365"></a><a class="code" href="a00152.html#33d31b748f342cccee0d4a88a3e2ffa6">00365</a>             <span class="keywordtype">int</span> <a class="code" href="a00152.html#33d31b748f342cccee0d4a88a3e2ffa6" title="Return the value of the additional bitshift.">GetShift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 1;}
<a name="l00366"></a>00366 
<a name="l00367"></a>00367 
<a name="l00368"></a>00368         };
<a name="l00369"></a>00369 
<a name="l00371"></a><a class="code" href="a00158.html">00371</a>         <span class="keyword">class </span><a class="code" href="a00158.html" title="Class to do (5,3) wavelet filtering operations.">VHFilterLEGALL5_3</a> : <span class="keyword">public</span> <a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>
<a name="l00372"></a>00372         {
<a name="l00373"></a>00373 
<a name="l00374"></a>00374         <span class="keyword">public</span>:
<a name="l00375"></a>00375 
<a name="l00377"></a>00377             <span class="keywordtype">void</span> <a class="code" href="a00158.html#d6279c0d46b01251290c5057c7728e25" title="Split a subband into 4.">Split</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00378"></a>00378 
<a name="l00380"></a>00380             <span class="keywordtype">void</span> <a class="code" href="a00158.html#b0d1f74dc265caeb27b64ae5a1fb17b0" title="Create a single band from 4 quadrant bands.">Synth</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00381"></a>00381 
<a name="l00383"></a><a class="code" href="a00158.html#aa31f2c5d1979f4ca611eeb0f9fe8755">00383</a>             <span class="keywordtype">int</span> <a class="code" href="a00158.html#aa31f2c5d1979f4ca611eeb0f9fe8755" title="Return the value of the additional bitshift.">GetShift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 1;}
<a name="l00384"></a>00384 
<a name="l00385"></a>00385 
<a name="l00386"></a>00386 <span class="preprocessor">#ifdef HAVE_MMX</span>
<a name="l00387"></a>00387 <span class="preprocessor"></span>            <span class="keyword">inline</span> <span class="keywordtype">void</span> HorizSynth (<span class="keywordtype">int</span> xp, <span class="keywordtype">int</span> xl, <span class="keywordtype">int</span> ystart, <span class="keywordtype">int</span> yend, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a> &amp;coeff_data);
<a name="l00388"></a>00388 <span class="preprocessor">#endif</span>
<a name="l00389"></a>00389 <span class="preprocessor"></span>
<a name="l00390"></a>00390         };
<a name="l00391"></a>00391 
<a name="l00393"></a><a class="code" href="a00154.html">00393</a>         <span class="keyword">class </span><a class="code" href="a00154.html" title="A short filter that&amp;#39;s actually close to Daubechies (9,7) but with just two lifting...">VHFilterDD9_7</a> : <span class="keyword">public</span> <a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>
<a name="l00394"></a>00394         {
<a name="l00395"></a>00395 
<a name="l00396"></a>00396         <span class="keyword">public</span>:
<a name="l00397"></a>00397 
<a name="l00399"></a>00399             <span class="keywordtype">void</span> <a class="code" href="a00154.html#8a55c42bd177658998b680da0adf989a" title="Split a subband into 4.">Split</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00400"></a>00400 
<a name="l00402"></a>00402             <span class="keywordtype">void</span> <a class="code" href="a00154.html#a8c400129e6a5e48c0f8af744772c4a8" title="Create a single band from 4 quadrant bands.">Synth</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00403"></a>00403 
<a name="l00405"></a><a class="code" href="a00154.html#a8d66498718878a86e896c4ef3c48af8">00405</a>             <span class="keywordtype">int</span> <a class="code" href="a00154.html#a8d66498718878a86e896c4ef3c48af8" title="Return the value of the additional bitshift.">GetShift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 1;}
<a name="l00406"></a>00406         };
<a name="l00407"></a>00407 
<a name="l00408"></a>00408 
<a name="l00410"></a><a class="code" href="a00153.html">00410</a>         <span class="keyword">class </span><a class="code" href="a00153.html" title="An extension of DD9_7, with a better low-pass filter but more computation.">VHFilterDD13_7</a> : <span class="keyword">public</span> <a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>
<a name="l00411"></a>00411         {
<a name="l00412"></a>00412 
<a name="l00413"></a>00413         <span class="keyword">public</span>:
<a name="l00414"></a>00414 
<a name="l00416"></a>00416             <span class="keywordtype">void</span> <a class="code" href="a00153.html#32eec4dd99147b672642efc7f56f7aa4" title="Split a subband into 4.">Split</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00417"></a>00417 
<a name="l00419"></a>00419             <span class="keywordtype">void</span> <a class="code" href="a00153.html#deb30b262bcbbab0cfb9703d0ab64bb3" title="Create a single band from 4 quadrant bands.">Synth</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00420"></a>00420 
<a name="l00422"></a><a class="code" href="a00153.html#5e8a9f3cead6212137d71b12e659c059">00422</a>             <span class="keywordtype">int</span> <a class="code" href="a00153.html#5e8a9f3cead6212137d71b12e659c059" title="Return the value of the additional bitshift.">GetShift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 1;}
<a name="l00423"></a>00423 
<a name="l00424"></a>00424         };
<a name="l00425"></a>00425 
<a name="l00427"></a><a class="code" href="a00155.html">00427</a>         <span class="keyword">class </span><a class="code" href="a00155.html" title="Class to do Haar wavelet filtering operations.">VHFilterHAAR0</a> : <span class="keyword">public</span> <a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>
<a name="l00428"></a>00428         {
<a name="l00429"></a>00429 
<a name="l00430"></a>00430         <span class="keyword">public</span>:
<a name="l00431"></a>00431 
<a name="l00433"></a>00433             <span class="keywordtype">void</span> <a class="code" href="a00155.html#bd18842cfa4f73188057203f4669d0bf" title="Split a subband into 4.">Split</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00434"></a>00434 
<a name="l00436"></a>00436             <span class="keywordtype">void</span> <a class="code" href="a00155.html#ecfe9631b972138fb3f3793130d5dd70" title="Create a single band from 4 quadrant bands.">Synth</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00437"></a>00437 
<a name="l00439"></a><a class="code" href="a00155.html#bec1b9f078e12a695a2f0c53d291a026">00439</a>             <span class="keywordtype">int</span> <a class="code" href="a00155.html#bec1b9f078e12a695a2f0c53d291a026" title="Return the value of the additional bitshift.">GetShift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 0;}
<a name="l00440"></a>00440 
<a name="l00441"></a>00441 
<a name="l00442"></a>00442         };
<a name="l00443"></a>00443 
<a name="l00445"></a><a class="code" href="a00156.html">00445</a>         <span class="keyword">class </span><a class="code" href="a00156.html" title="Class to do Haar wavelet filtering operations with a single shift per level.">VHFilterHAAR1</a> : <span class="keyword">public</span> <a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>
<a name="l00446"></a>00446         {
<a name="l00447"></a>00447 
<a name="l00448"></a>00448         <span class="keyword">public</span>:
<a name="l00449"></a>00449 
<a name="l00451"></a>00451             <span class="keywordtype">void</span> <a class="code" href="a00156.html#2426abcae6bc9d0725535ac3059b06cd" title="Split a subband into 4.">Split</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00452"></a>00452 
<a name="l00454"></a>00454             <span class="keywordtype">void</span> <a class="code" href="a00156.html#cfd5df13204a3026c0477e1ab390273a" title="Create a single band from 4 quadrant bands.">Synth</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00455"></a>00455 
<a name="l00457"></a><a class="code" href="a00156.html#99a0059fe7087c29a6b7d6e326645c0f">00457</a>             <span class="keywordtype">int</span> <a class="code" href="a00156.html#99a0059fe7087c29a6b7d6e326645c0f" title="Return the value of the additional bitshift.">GetShift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 1;}
<a name="l00458"></a>00458 
<a name="l00459"></a>00459         };
<a name="l00460"></a>00460 
<a name="l00461"></a>00461 
<a name="l00463"></a><a class="code" href="a00157.html">00463</a>         <span class="keyword">class </span><a class="code" href="a00157.html" title="Class to do Haar wavelet filtering operations with a double shift per level.">VHFilterHAAR2</a> : <span class="keyword">public</span> <a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>
<a name="l00464"></a>00464         {
<a name="l00465"></a>00465 
<a name="l00466"></a>00466         <span class="keyword">public</span>:
<a name="l00467"></a>00467 
<a name="l00469"></a>00469             <span class="keywordtype">void</span> <a class="code" href="a00157.html#8b51733cb0e7fb56c99bc6a1cabf705d" title="Split a subband into 4.">Split</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00470"></a>00470 
<a name="l00472"></a>00472             <span class="keywordtype">void</span> <a class="code" href="a00157.html#14b4ca1c0075352d7fe6d5b790a6cf3d" title="Create a single band from 4 quadrant bands.">Synth</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> xp, <span class="keyword">const</span> <span class="keywordtype">int</span> yp, <span class="keyword">const</span> <span class="keywordtype">int</span> xl, <span class="keyword">const</span> <span class="keywordtype">int</span> yl, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00473"></a>00473 
<a name="l00475"></a><a class="code" href="a00157.html#85159766671c866104997256bf346b2e">00475</a>             <span class="keywordtype">double</span> <a class="code" href="a00157.html#85159766671c866104997256bf346b2e" title="Return a correction factor to compensate for non-unity power gain of low-pass filter...">GetLowFactor</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 1.414213562;}
<a name="l00476"></a>00476 
<a name="l00478"></a><a class="code" href="a00157.html#451861167859c5040b0d10dda4a30678">00478</a>             <span class="keywordtype">double</span> <a class="code" href="a00157.html#451861167859c5040b0d10dda4a30678" title="Return a correction factor to compensate for non-unity power gain of high-pass filter...">GetHighFactor</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0.707106781;}
<a name="l00479"></a>00479 
<a name="l00481"></a><a class="code" href="a00157.html#3411f87d890aa41ee86f72de30ec3a41">00481</a>             <span class="keywordtype">int</span> <a class="code" href="a00157.html#3411f87d890aa41ee86f72de30ec3a41" title="Return the value of the additional bitshift.">GetShift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 2;}
<a name="l00482"></a>00482 
<a name="l00483"></a>00483         };
<a name="l00484"></a>00484 
<a name="l00485"></a>00485 
<a name="l00486"></a>00486 
<a name="l00487"></a>00487         <span class="comment">// Lifting steps used in the filters</span>
<a name="l00488"></a>00488 
<a name="l00490"></a>00490         <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> shift&gt;
<a name="l00491"></a><a class="code" href="a00119.html">00491</a>         <span class="keyword">class </span><a class="code" href="a00119.html" title="Class to do two-tap prediction lifting step.">PredictStepShift</a>
<a name="l00492"></a>00492         {
<a name="l00493"></a>00493 
<a name="l00494"></a>00494         <span class="keyword">public</span>:
<a name="l00495"></a>00495 
<a name="l00497"></a><a class="code" href="a00119.html#f4942f64f99fa092651faebf0b3272dc">00497</a>             <a class="code" href="a00119.html#f4942f64f99fa092651faebf0b3272dc" title="Constructor.">PredictStepShift</a>(){}
<a name="l00498"></a>00498 
<a name="l00499"></a>00499             <span class="comment">// Assume default copy constructor, assignment= and destructor //</span>
<a name="l00500"></a>00500 
<a name="l00502"></a>00502             <span class="comment">/*</span>
<a name="l00503"></a>00503 <span class="comment">                Do the filtering.</span>
<a name="l00504"></a>00504 <span class="comment">                \param   in_val   the value being predicted</span>
<a name="l00505"></a>00505 <span class="comment">                \param   val1   the first value being used for prediction</span>
<a name="l00506"></a>00506 <span class="comment">                \param   val2   the second value being used for prediction</span>
<a name="l00507"></a>00507 <span class="comment">            */</span>
<a name="l00508"></a><a class="code" href="a00119.html#609d866766f47db539f71691073bbca2">00508</a>             <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00119.html#609d866766f47db539f71691073bbca2" title="Do the filtering.">Filter</a>(<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; in_val, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val1, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val2)<span class="keyword"> const</span>
<a name="l00509"></a>00509 <span class="keyword">            </span>{
<a name="l00510"></a>00510                 in_val -= (( val1 + val2 + (1&lt;&lt;(shift-1)) ) &gt;&gt;shift );
<a name="l00511"></a>00511             }
<a name="l00512"></a>00512 
<a name="l00513"></a>00513         };
<a name="l00514"></a>00514 
<a name="l00516"></a>00516         <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> shift&gt;
<a name="l00517"></a><a class="code" href="a00149.html">00517</a>         <span class="keyword">class </span><a class="code" href="a00149.html" title="Class to do two-tap updating lifting step.">UpdateStepShift</a>
<a name="l00518"></a>00518         {
<a name="l00519"></a>00519 
<a name="l00520"></a>00520         <span class="keyword">public</span>:
<a name="l00522"></a><a class="code" href="a00149.html#97c690ae1901e2a60102495c04877de6">00522</a>             <a class="code" href="a00149.html#97c690ae1901e2a60102495c04877de6" title="Constructor.">UpdateStepShift</a>(){}
<a name="l00523"></a>00523 
<a name="l00525"></a>00525             <span class="comment">/*</span>
<a name="l00526"></a>00526 <span class="comment">                Do the filtering.</span>
<a name="l00527"></a>00527 <span class="comment">                \param   in_val   the value being updated</span>
<a name="l00528"></a>00528 <span class="comment">                \param   val1   the first value being used for updating</span>
<a name="l00529"></a>00529 <span class="comment">                \param   val2   the second value being used for updating</span>
<a name="l00530"></a>00530 <span class="comment">            */</span>
<a name="l00531"></a><a class="code" href="a00149.html#e6da6c462ec5926a66d1f28a6ab7813f">00531</a>             <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00149.html#e6da6c462ec5926a66d1f28a6ab7813f" title="Do the filtering.">Filter</a>(<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; in_val, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val1, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val2)<span class="keyword"> const</span>
<a name="l00532"></a>00532 <span class="keyword">            </span>{
<a name="l00533"></a>00533                 in_val += ( ( val1 + val2 + (1&lt;&lt;(shift-1)) ) &gt;&gt;shift );
<a name="l00534"></a>00534             }
<a name="l00535"></a>00535 
<a name="l00536"></a>00536         };
<a name="l00537"></a>00537 
<a name="l00539"></a>00539         <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> shift , <span class="keywordtype">int</span> tap1, <span class="keywordtype">int</span> tap2&gt;
<a name="l00540"></a><a class="code" href="a00118.html">00540</a>         <span class="keyword">class </span><a class="code" href="a00118.html" title="Class to do symmetric four-tap prediction lifting step.">PredictStepFourTap</a>
<a name="l00541"></a>00541         {
<a name="l00542"></a>00542         <span class="keyword">public</span>:
<a name="l00543"></a>00543 
<a name="l00545"></a><a class="code" href="a00118.html#ece127841c702c24f69d2009b3b0b557">00545</a>             <a class="code" href="a00118.html#ece127841c702c24f69d2009b3b0b557" title="Constructor.">PredictStepFourTap</a>(){}
<a name="l00546"></a>00546 
<a name="l00547"></a>00547             <span class="comment">// Assume default copy constructor, assignment= and destructor //</span>
<a name="l00548"></a>00548 
<a name="l00550"></a><a class="code" href="a00118.html#3ccff46384b6db6f474f6707c274caa4">00550</a>             <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00118.html#3ccff46384b6db6f474f6707c274caa4" title="Do the filtering.">Filter</a>(<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; in_val, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val1, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val2 ,
<a name="l00551"></a>00551                                                   <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val3, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val4 )<span class="keyword"> const</span>
<a name="l00552"></a>00552 <span class="keyword">            </span>{
<a name="l00553"></a>00553                 in_val -= ( tap1*( val1 + val2 ) + tap2*( val3 + val4 ) + (1&lt;&lt;(shift-1)))&gt;&gt;shift;
<a name="l00554"></a>00554             }
<a name="l00555"></a>00555         };
<a name="l00556"></a>00556 
<a name="l00558"></a>00558         <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> shift , <span class="keywordtype">int</span> tap1 , <span class="keywordtype">int</span> tap2&gt;
<a name="l00559"></a><a class="code" href="a00148.html">00559</a>         <span class="keyword">class </span><a class="code" href="a00148.html" title="Class to do symmetric four-tap update lifting step.">UpdateStepFourTap</a>
<a name="l00560"></a>00560         {
<a name="l00561"></a>00561 
<a name="l00562"></a>00562         <span class="keyword">public</span>:
<a name="l00564"></a><a class="code" href="a00148.html#aee3bd9d6210cd6282d052841d048920">00564</a>             <a class="code" href="a00148.html#aee3bd9d6210cd6282d052841d048920" title="Constructor.">UpdateStepFourTap</a>(){}
<a name="l00565"></a>00565 
<a name="l00567"></a><a class="code" href="a00148.html#7da7c5ad7b6a5405da666a3c74c6c192">00567</a>             <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00148.html#7da7c5ad7b6a5405da666a3c74c6c192" title="Do the filtering.">Filter</a>(<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; in_val, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val1, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val2 ,
<a name="l00568"></a>00568                                                   <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val3, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val4 )<span class="keyword"> const</span>
<a name="l00569"></a>00569 <span class="keyword">            </span>{
<a name="l00570"></a>00570                 in_val += ( tap1*( val1 + val2 ) + tap2*( val3 + val4 ) + (1&lt;&lt;(shift-1)) )&gt;&gt;shift;
<a name="l00571"></a>00571             }
<a name="l00572"></a>00572         };
<a name="l00573"></a>00573 
<a name="l00575"></a><a class="code" href="a00117.html">00575</a>         <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> gain&gt; <span class="keyword">class </span><a class="code" href="a00117.html" title="Class to do two-tap prediction lifting step for Daubechies (9,7).">PredictStep97</a>
<a name="l00576"></a>00576         {
<a name="l00577"></a>00577         <span class="keyword">public</span>:
<a name="l00578"></a>00578 
<a name="l00580"></a><a class="code" href="a00117.html#5b5e6c6ce875ff7a944440976dea3c89">00580</a>             <a class="code" href="a00117.html#5b5e6c6ce875ff7a944440976dea3c89" title="Constructor.">PredictStep97</a>(){}
<a name="l00581"></a>00581 
<a name="l00582"></a>00582             <span class="comment">// Assume default copy constructor, assignment= and destructor //</span>
<a name="l00583"></a>00583 
<a name="l00585"></a>00585             <span class="comment">/*</span>
<a name="l00586"></a>00586 <span class="comment">                Do the filtering.</span>
<a name="l00587"></a>00587 <span class="comment">                \param   in_val   the value being predicted</span>
<a name="l00588"></a>00588 <span class="comment">                \param   val1   the first value being used for prediction</span>
<a name="l00589"></a>00589 <span class="comment">                \param   val2   the second value being used for prediction</span>
<a name="l00590"></a>00590 <span class="comment">            */</span>
<a name="l00591"></a><a class="code" href="a00117.html#f999e69b96612fb176b90431bbc6e01f">00591</a>             <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00117.html#f999e69b96612fb176b90431bbc6e01f" title="Do the filtering.">Filter</a>(<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; in_val, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val1, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val2)<span class="keyword"> const</span>
<a name="l00592"></a>00592 <span class="keyword">            </span>{
<a name="l00593"></a>00593                 in_val -= <span class="keyword">static_cast&lt;</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a> <span class="keyword">&gt;</span>( (gain * <span class="keyword">static_cast&lt;</span> <span class="keywordtype">int</span> <span class="keyword">&gt;</span>( val1 + val2 )) &gt;&gt;12 );
<a name="l00594"></a>00594             }
<a name="l00595"></a>00595         };
<a name="l00596"></a>00596 
<a name="l00598"></a><a class="code" href="a00147.html">00598</a>         <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> gain&gt; <span class="keyword">class </span><a class="code" href="a00147.html" title="Class to do two-tap update lifting step for Daubechies (9,7).">UpdateStep97</a>
<a name="l00599"></a>00599         {
<a name="l00600"></a>00600 
<a name="l00601"></a>00601         <span class="keyword">public</span>:
<a name="l00603"></a><a class="code" href="a00147.html#e40a407ed5720fdd96cfa0790a52dbee">00603</a>             <a class="code" href="a00147.html#e40a407ed5720fdd96cfa0790a52dbee" title="Constructor.">UpdateStep97</a>(){}
<a name="l00604"></a>00604 
<a name="l00606"></a>00606             <span class="comment">/*</span>
<a name="l00607"></a>00607 <span class="comment">                Do the filtering.</span>
<a name="l00608"></a>00608 <span class="comment">                \param   in_val   the value being updated</span>
<a name="l00609"></a>00609 <span class="comment">                \param   val1   the first value being used for updating</span>
<a name="l00610"></a>00610 <span class="comment">                \param   val2   the second value being used for updating</span>
<a name="l00611"></a>00611 <span class="comment">            */</span>
<a name="l00612"></a><a class="code" href="a00147.html#1970fbe380faa6a2c04fb63d30af7f87">00612</a>             <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00147.html#1970fbe380faa6a2c04fb63d30af7f87" title="Do the filtering.">Filter</a>(<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; in_val, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val1, <span class="keyword">const</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&amp; val2)<span class="keyword"> const</span>
<a name="l00613"></a>00613 <span class="keyword">            </span>{
<a name="l00614"></a>00614                 in_val += <span class="keyword">static_cast&lt;</span> <a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a> <span class="keyword">&gt;</span>( (gain * <span class="keyword">static_cast&lt;</span> <span class="keywordtype">int</span> <span class="keyword">&gt;</span>( val1 + val2 )) &gt;&gt;12 );
<a name="l00615"></a>00615             }
<a name="l00616"></a>00616         };   
<a name="l00617"></a>00617     
<a name="l00619"></a>00619 
<a name="l00622"></a><a class="code" href="a00021.html">00622</a>     <span class="keyword">class </span><a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>: <span class="keyword">public</span> <a class="code" href="a00145.html" title="A template class for two-dimensional arrays.">TwoDArray</a>&lt;CoeffType&gt;
<a name="l00623"></a>00623     {
<a name="l00624"></a>00624     <span class="keyword">public</span>:
<a name="l00626"></a>00626 
<a name="l00629"></a><a class="code" href="a00021.html#9a1ae666dd08aad45e6c640105a7a321">00629</a>         <a class="code" href="a00021.html#9a1ae666dd08aad45e6c640105a7a321" title="Default constructor.">CoeffArray</a>(): <a class="code" href="a00145.html" title="A template class for two-dimensional arrays.">TwoDArray</a>&lt;<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&gt;(){}
<a name="l00630"></a>00630 
<a name="l00632"></a>00632 
<a name="l00636"></a><a class="code" href="a00021.html#7a4037c3ce9ac9ae6a6af71462e49ac9">00636</a>         <a class="code" href="a00021.html#9a1ae666dd08aad45e6c640105a7a321" title="Default constructor.">CoeffArray</a>(<span class="keywordtype">int</span> height, <span class="keywordtype">int</span> width, <a class="code" href="a00234.html#39dd89c4c7484412efd87d41548271cd" title="Types of picture component.">CompSort</a> cs=<a class="code" href="a00234.html#39dd89c4c7484412efd87d41548271cdd577a36e277061ea45fb4060c222887b">Y_COMP</a>):
<a name="l00637"></a>00637             <a class="code" href="a00145.html" title="A template class for two-dimensional arrays.">TwoDArray</a>&lt;<a class="code" href="a00234.html#00c36803f51328ff862631abde5071c5" title="Type of wavelet coefficient data (should be larger than ValueType).">CoeffType</a>&gt;(height, width), <a class="code" href="a00021.html#22ce5a9af41041517c767fc8bc426e8a">m_csort</a>(cs){}
<a name="l00638"></a>00638 
<a name="l00639"></a>00639         <span class="comment">//copy constructor and assignment= derived by inheritance</span>
<a name="l00640"></a>00640 
<a name="l00642"></a><a class="code" href="a00021.html#c3704aebda8bd837bdba740753fc28e6">00642</a>         <a class="code" href="a00021.html#c3704aebda8bd837bdba740753fc28e6" title="Destructor.">~CoeffArray</a>(){}
<a name="l00643"></a>00643 
<a name="l00645"></a><a class="code" href="a00021.html#caa83247c3d460be6c0fc5cd3764591a">00645</a>         <span class="keyword">const</span> <a class="code" href="a00234.html#39dd89c4c7484412efd87d41548271cd" title="Types of picture component.">CompSort</a>&amp; <a class="code" href="a00021.html#caa83247c3d460be6c0fc5cd3764591a" title="Return which component is stored.">CSort</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00021.html#22ce5a9af41041517c767fc8bc426e8a">m_csort</a>;}
<a name="l00646"></a>00646 
<a name="l00648"></a><a class="code" href="a00021.html#6023b26024d40a2cc595cb037e95a48c">00648</a>         <span class="keywordtype">void</span> <a class="code" href="a00021.html#6023b26024d40a2cc595cb037e95a48c" title="Set the type of component being stored.">SetCSort</a>(<span class="keyword">const</span> <a class="code" href="a00234.html#39dd89c4c7484412efd87d41548271cd" title="Types of picture component.">CompSort</a> cs){ <a class="code" href="a00021.html#22ce5a9af41041517c767fc8bc426e8a">m_csort</a> = cs; }
<a name="l00649"></a>00649 
<a name="l00651"></a><a class="code" href="a00021.html#764272e03b7ebd6f2efce209e034d6e0">00651</a>         <a class="code" href="a00142.html" title="A class encapulating all the subbands produced by a transform.">SubbandList</a>&amp; <a class="code" href="a00021.html#764272e03b7ebd6f2efce209e034d6e0" title="Returns the set of subbands.">BandList</a>(){<span class="keywordflow">return</span> <a class="code" href="a00021.html#11235fb3b65494135732e244d8ed4db2">m_band_list</a>;}
<a name="l00652"></a>00652 
<a name="l00654"></a><a class="code" href="a00021.html#a6c1fc875dc268149872472956d615d2">00654</a>         <span class="keyword">const</span> <a class="code" href="a00142.html" title="A class encapulating all the subbands produced by a transform.">SubbandList</a>&amp; <a class="code" href="a00021.html#a6c1fc875dc268149872472956d615d2" title="Returns the set of subbands.">BandList</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00021.html#11235fb3b65494135732e244d8ed4db2">m_band_list</a>;}
<a name="l00655"></a>00655 
<a name="l00657"></a>00657 
<a name="l00662"></a>00662         <span class="keywordtype">void</span> <a class="code" href="a00021.html#25117d997711db3f1a02f9ceb16cab45" title="Sets the subband weights.">SetBandWeights</a> (<span class="keyword">const</span> <a class="code" href="a00063.html" title="Parameters for the encoding process.">EncoderParams</a>&amp; encparams,
<a name="l00663"></a>00663                                  <span class="keyword">const</span> <a class="code" href="a00113.html" title="Parameters for initialising picture class objects.">PictureParams</a>&amp; pparams,
<a name="l00664"></a>00664                                  <span class="keyword">const</span> <a class="code" href="a00234.html#39dd89c4c7484412efd87d41548271cd" title="Types of picture component.">CompSort</a> csort,
<a name="l00665"></a>00665                  <span class="keyword">const</span> <span class="keywordtype">float</span> cpd_scale_factor);
<a name="l00666"></a>00666 
<a name="l00667"></a>00667         <span class="keyword">private</span>:
<a name="l00668"></a>00668 
<a name="l00669"></a><a class="code" href="a00021.html#22ce5a9af41041517c767fc8bc426e8a">00669</a>         <a class="code" href="a00234.html#39dd89c4c7484412efd87d41548271cd" title="Types of picture component.">CompSort</a> <a class="code" href="a00021.html#22ce5a9af41041517c767fc8bc426e8a">m_csort</a>;
<a name="l00670"></a>00670 
<a name="l00671"></a>00671         <span class="comment">// The subband list to be used for conventional transform apps</span>
<a name="l00672"></a><a class="code" href="a00021.html#11235fb3b65494135732e244d8ed4db2">00672</a>         <a class="code" href="a00142.html" title="A class encapulating all the subbands produced by a transform.">SubbandList</a> <a class="code" href="a00021.html#11235fb3b65494135732e244d8ed4db2">m_band_list</a>;
<a name="l00673"></a>00673 
<a name="l00674"></a>00674         <span class="keyword">private</span>:
<a name="l00675"></a>00675 
<a name="l00677"></a>00677         <span class="keywordtype">float</span> <a class="code" href="a00021.html#80f60e53a1578acd15ca7a3546fa6f08" title="Given x and y spatial frequencies in cycles per degree, returns a weighting value...">PerceptualWeight</a>(<span class="keywordtype">float</span> xf,<span class="keywordtype">float</span> yf,<a class="code" href="a00234.html#39dd89c4c7484412efd87d41548271cd" title="Types of picture component.">CompSort</a> cs);
<a name="l00678"></a>00678 
<a name="l00679"></a>00679     };
<a name="l00680"></a>00680 
<a name="l00682"></a>00682 
<a name="l00686"></a><a class="code" href="a00159.html">00686</a>     <span class="keyword">class </span><a class="code" href="a00159.html" title="A class to do wavelet transforms.">WaveletTransform</a>
<a name="l00687"></a>00687     {
<a name="l00688"></a>00688     <span class="keyword">public</span>:
<a name="l00690"></a>00690         <a class="code" href="a00159.html#f149f703155dbe93d96cd9d69f0cb81a" title="Constructor.">WaveletTransform</a>(<span class="keywordtype">int</span> d = 4, <a class="code" href="a00172.html#cb32bc58ece3811ce3ce9aa0375a67a4">WltFilter</a> f = <a class="code" href="a00172.html#cb32bc58ece3811ce3ce9aa0375a67a4efc07370bf10cd73141d66d7c6be2f88">DAUB9_7</a>);
<a name="l00691"></a>00691 
<a name="l00693"></a>00693         <span class="keyword">virtual</span> <a class="code" href="a00159.html#11fdcc2a3ebf9a89c95bef2ff0db98bb" title="Destructor.">~WaveletTransform</a>();
<a name="l00694"></a>00694 
<a name="l00696"></a>00696 
<a name="l00702"></a>00702         <span class="keywordtype">void</span> <a class="code" href="a00159.html#1cce596a13fda8b342a3670aafa4d2a7" title="Transforms the data to and from the wavelet domain.">Transform</a>(<span class="keyword">const</span> <a class="code" href="a00234.html#c972efbebbe042dd142790f520369d9c" title="Forward or backward.">Direction</a> d, <a class="code" href="a00107.html" title="A class for picture component data.">PicArray</a>&amp; pic_data, <a class="code" href="a00021.html" title="A class for wavelet coefficient data.">CoeffArray</a>&amp; coeff_data);
<a name="l00703"></a>00703 
<a name="l00704"></a>00704     <span class="keyword">private</span>:
<a name="l00705"></a>00705 
<a name="l00706"></a>00706 
<a name="l00707"></a>00707     <span class="keyword">private</span>:
<a name="l00708"></a>00708 
<a name="l00709"></a>00709         <span class="comment">// Private variables</span>
<a name="l00710"></a>00710 
<a name="l00712"></a><a class="code" href="a00159.html#50eb51dd507883ef463ecb607a1ffb78">00712</a>         <span class="keywordtype">int</span> <a class="code" href="a00159.html#50eb51dd507883ef463ecb607a1ffb78" title="Depth of the transform.">m_depth</a>;
<a name="l00713"></a>00713 
<a name="l00715"></a><a class="code" href="a00159.html#95b5b2e110ebf759ce116bb2b935be34">00715</a>         <a class="code" href="a00172.html#cb32bc58ece3811ce3ce9aa0375a67a4">WltFilter</a> <a class="code" href="a00159.html#95b5b2e110ebf759ce116bb2b935be34" title="The (vertical and horizontal) wavelet filter set to be used.">m_filt_sort</a>;
<a name="l00716"></a>00716 
<a name="l00718"></a><a class="code" href="a00159.html#f8dd650ea3346056ba1db78c6271abec">00718</a>         <a class="code" href="a00151.html" title="A virtual parent class to do vertical and horizontal splitting with wavelet filters...">VHFilter</a>* <a class="code" href="a00159.html#f8dd650ea3346056ba1db78c6271abec" title="A class to do the vertical and horizontal filtering required.">m_vhfilter</a>;
<a name="l00719"></a>00719 
<a name="l00720"></a>00720     <span class="keyword">private</span>:
<a name="l00721"></a>00721         <span class="comment">// Private functions</span>
<a name="l00723"></a>00723 <span class="comment"></span>        <a class="code" href="a00159.html#f149f703155dbe93d96cd9d69f0cb81a" title="Constructor.">WaveletTransform</a>(<span class="keyword">const</span> <a class="code" href="a00159.html" title="A class to do wavelet transforms.">WaveletTransform</a>&amp; cpy);
<a name="l00724"></a>00724 
<a name="l00726"></a>00726         <a class="code" href="a00159.html" title="A class to do wavelet transforms.">WaveletTransform</a>&amp; <a class="code" href="a00159.html#cf8c9fb33b4f2391267164f3d28f5c1b" title="Private, bodyless copy operator=: class should not be assigned.">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00159.html" title="A class to do wavelet transforms.">WaveletTransform</a>&amp; rhs);
<a name="l00727"></a>00727 
<a name="l00728"></a>00728    };
<a name="l00729"></a>00729 }<span class="comment">// end namespace dirac</span>
<a name="l00730"></a>00730 
<a name="l00731"></a>00731 <span class="preprocessor">#endif</span>
</pre></div></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>