<!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>seq_decompress.h</h1><a href="a00226.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: seq_decompress.h,v 1.13 2008/05/02 06:05:04 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">* Andrew Kennedy</span> <a name="l00027"></a>00027 <span class="comment">*</span> <a name="l00028"></a>00028 <span class="comment">* Alternatively, the contents of this file may be used under the terms of</span> <a name="l00029"></a>00029 <span class="comment">* the GNU General Public License Version 2 (the "GPL"), or the GNU Lesser</span> <a name="l00030"></a>00030 <span class="comment">* Public License Version 2.1 (the "LGPL"), in which case the provisions of</span> <a name="l00031"></a>00031 <span class="comment">* the GPL or the LGPL are applicable instead of those above. If you wish to</span> <a name="l00032"></a>00032 <span class="comment">* allow use of your version of this file only under the terms of the either</span> <a name="l00033"></a>00033 <span class="comment">* the GPL or LGPL and not to allow others to use your version of this file</span> <a name="l00034"></a>00034 <span class="comment">* under the MPL, indicate your decision by deleting the provisions above</span> <a name="l00035"></a>00035 <span class="comment">* and replace them with the notice and other provisions required by the GPL</span> <a name="l00036"></a>00036 <span class="comment">* or LGPL. If you do not delete the provisions above, a recipient may use</span> <a name="l00037"></a>00037 <span class="comment">* your version of this file under the terms of any one of the MPL, the GPL</span> <a name="l00038"></a>00038 <span class="comment">* or the LGPL.</span> <a name="l00039"></a>00039 <span class="comment">* ***** END LICENSE BLOCK ***** */</span> <a name="l00040"></a>00040 <a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="preprocessor">#ifndef _SEQ_DECOMPRESS_H_</span> <a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define _SEQ_DECOMPRESS_H_</span> <a name="l00044"></a>00044 <span class="preprocessor"></span> <a name="l00046"></a>00046 <span class="comment">//---------------------------------------//</span> <a name="l00047"></a>00047 <span class="comment">//Class to manage decompressing sequences//</span> <a name="l00048"></a>00048 <span class="comment">//---------------------------------------//</span> <a name="l00050"></a>00050 <span class="comment"></span> <a name="l00051"></a>00051 <span class="preprocessor">#include "<a class="code" href="a00171.html">libdirac_common/common.h</a>"</span> <a name="l00052"></a>00052 <span class="preprocessor">#include "<a class="code" href="a00210.html">libdirac_byteio/parseunit_byteio.h</a>"</span> <a name="l00053"></a>00053 <span class="preprocessor">#include <iostream></span> <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="keyword">namespace </span>dirac <a name="l00056"></a>00056 { <a name="l00057"></a>00057 <span class="keyword">class </span>PictureBuffer; <a name="l00058"></a>00058 <span class="keyword">class </span>Picture; <a name="l00059"></a>00059 <span class="keyword">class </span>PictureDecompressor; <a name="l00060"></a>00060 <a name="l00062"></a>00062 <a name="l00065"></a><a class="code" href="a00129.html">00065</a> <span class="keyword">class </span><a class="code" href="a00129.html" title="Decompresses a sequence of pictures from a stream.">SequenceDecompressor</a>{ <a name="l00066"></a>00066 <span class="keyword">public</span>: <a name="l00067"></a>00067 <a name="l00069"></a>00069 <a name="l00075"></a>00075 <a class="code" href="a00129.html#f066ae8da71555200b85c2bc3813b78f" title="Constructor.">SequenceDecompressor</a>(<a class="code" href="a00105.html" title="Represents a collection of data in a Dirac bytestream that can be parsed as a self-contained...">ParseUnitByteIO</a>& parseunit, <span class="keywordtype">bool</span> verbosity); <a name="l00076"></a>00076 <a name="l00078"></a>00078 <a name="l00081"></a>00081 <a class="code" href="a00129.html#4d624108eb2ac54563a7bcdb8fc7d901" title="Destructor.">~SequenceDecompressor</a>(); <a name="l00082"></a>00082 <a name="l00084"></a>00084 <a name="l00087"></a>00087 <span class="keywordtype">void</span> <a class="code" href="a00129.html#a9ac1e3963efb227f25e35df29a53aef" title="Marks beginning of a new AccessUnit.">NewAccessUnit</a>(<a class="code" href="a00105.html" title="Represents a collection of data in a Dirac bytestream that can be parsed as a self-contained...">ParseUnitByteIO</a>& parseunit_byteio); <a name="l00088"></a>00088 <a name="l00089"></a>00089 <a name="l00091"></a>00091 <a name="l00105"></a>00105 <span class="keyword">const</span> <a class="code" href="a00108.html" title="A class for encapsulating all the data relating to a picture.">Picture</a>* <a class="code" href="a00129.html#cf5a6fbe329fa2c2d1ff0c032a47614f" title="Decompress the next picture in sequence.">DecompressNextPicture</a>(<a class="code" href="a00105.html" title="Represents a collection of data in a Dirac bytestream that can be parsed as a self-contained...">ParseUnitByteIO</a>* p_parseunit_byteio); <a name="l00106"></a>00106 <a name="l00108"></a>00108 <span class="keyword">const</span> <a class="code" href="a00108.html" title="A class for encapsulating all the data relating to a picture.">Picture</a>* <a class="code" href="a00129.html#686d20f3c73a0bd64b0f2dbc3bd53e3f" title="Get the next picture available for display.">GetNextPicture</a>(); <a name="l00109"></a>00109 <a name="l00111"></a>00111 <span class="keyword">const</span> <a class="code" href="a00113.html" title="Parameters for initialising picture class objects.">PictureParams</a>* <a class="code" href="a00129.html#bc6437403884db11668eaa67d515a209" title="Get the next picture parameters.">GetNextPictureParams</a>() <span class="keyword">const</span>; <a name="l00113"></a>00113 <a name="l00118"></a>00118 <span class="keywordtype">bool</span> <a class="code" href="a00129.html#729eb31d783f07aa484f5dbc154d175b" title="Determine if decompression is complete.">Finished</a>(); <a name="l00120"></a>00120 <a name="l00125"></a><a class="code" href="a00129.html#9f1b091ebb3e5e7cd6ef3b1ff379c47f">00125</a> <a class="code" href="a00103.html" title="Parameters relating to the complexity of encoder/decoder.">ParseParams</a> & <a class="code" href="a00129.html#9f1b091ebb3e5e7cd6ef3b1ff379c47f" title="Interrogates for parse parameters.">GetParseParams</a>() { <span class="keywordflow">return</span> <a class="code" href="a00129.html#a1017afa7e0ab1a3071e64ebf28db038" title="The parse parameters obtained from the stream header.">m_parse_params</a>; } <a name="l00126"></a>00126 <a name="l00127"></a>00127 <a name="l00129"></a>00129 <a name="l00134"></a><a class="code" href="a00129.html#22d231592d2334844844a05c0151a19e">00134</a> <a class="code" href="a00131.html" title="Parameters relating to the source material being encoded/decoded.">SourceParams</a> & <a class="code" href="a00129.html#22d231592d2334844844a05c0151a19e" title="Interrogates for source parameters.">GetSourceParams</a>() { <span class="keywordflow">return</span> <a class="code" href="a00129.html#2bd7b646b067c79cf6211c9cfd4047d9" title="The source parameters obtained from the stream header.">m_srcparams</a>; } <a name="l00135"></a>00135 <a name="l00136"></a>00136 <a name="l00138"></a>00138 <a name="l00143"></a><a class="code" href="a00129.html#6a5c4147a958848dad1a8720f1622d00">00143</a> <a class="code" href="a00029.html" title="Parameters for the decoding process.">DecoderParams</a> & <a class="code" href="a00129.html#6a5c4147a958848dad1a8720f1622d00" title="Interrogates for coding parameters.">GetDecoderParams</a>() { <span class="keywordflow">return</span> <a class="code" href="a00129.html#5876c6441588f102f7366717cf0e94fb" title="Parameters for the decompression, as provided in constructor.">m_decparams</a>; } <a name="l00144"></a>00144 <span class="keyword">private</span>: <a name="l00146"></a>00146 <a name="l00151"></a>00151 <a class="code" href="a00129.html#f066ae8da71555200b85c2bc3813b78f" title="Constructor.">SequenceDecompressor</a>(<span class="keyword">const</span> <a class="code" href="a00129.html" title="Decompresses a sequence of pictures from a stream.">SequenceDecompressor</a>& cpy); <a name="l00152"></a>00152 <a name="l00154"></a>00154 <a name="l00159"></a>00159 <a class="code" href="a00129.html" title="Decompresses a sequence of pictures from a stream.">SequenceDecompressor</a>& <a class="code" href="a00129.html#84bdbde871d12886001016911f69ee85" title="Assignment = is private and body-less.">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00129.html" title="Decompresses a sequence of pictures from a stream.">SequenceDecompressor</a>& rhs); <a name="l00160"></a>00160 <a name="l00161"></a>00161 <a name="l00162"></a>00162 <span class="comment">//Member variables</span> <a name="l00163"></a>00163 <a name="l00165"></a><a class="code" href="a00129.html#362e9c829b57a41c743c0622e9a16e5a">00165</a> <span class="keywordtype">bool</span> <a class="code" href="a00129.html#362e9c829b57a41c743c0622e9a16e5a" title="Completion flag, returned via the Finished method.">m_all_done</a>; <a name="l00167"></a><a class="code" href="a00129.html#5876c6441588f102f7366717cf0e94fb">00167</a> <a class="code" href="a00029.html" title="Parameters for the decoding process.">DecoderParams</a> <a class="code" href="a00129.html#5876c6441588f102f7366717cf0e94fb" title="Parameters for the decompression, as provided in constructor.">m_decparams</a>; <a name="l00169"></a><a class="code" href="a00129.html#a1017afa7e0ab1a3071e64ebf28db038">00169</a> <a class="code" href="a00103.html" title="Parameters relating to the complexity of encoder/decoder.">ParseParams</a> <a class="code" href="a00129.html#a1017afa7e0ab1a3071e64ebf28db038" title="The parse parameters obtained from the stream header.">m_parse_params</a>; <a name="l00171"></a><a class="code" href="a00129.html#2bd7b646b067c79cf6211c9cfd4047d9">00171</a> <a class="code" href="a00131.html" title="Parameters relating to the source material being encoded/decoded.">SourceParams</a> <a class="code" href="a00129.html#2bd7b646b067c79cf6211c9cfd4047d9" title="The source parameters obtained from the stream header.">m_srcparams</a>; <a name="l00173"></a><a class="code" href="a00129.html#347a479026d5ef27dc8cb80a89145636">00173</a> <a class="code" href="a00109.html" title="Holds pictures both for reference and to overcome reordering delay.">PictureBuffer</a>* <a class="code" href="a00129.html#347a479026d5ef27dc8cb80a89145636" title="A picture buffer used for local storage of pictures whilst pending re-ordering or...">m_pbuffer</a>; <a name="l00175"></a><a class="code" href="a00129.html#d6177fff507e8d0fb8ef243ee8bfcc23">00175</a> <span class="keywordtype">int</span> <a class="code" href="a00129.html#d6177fff507e8d0fb8ef243ee8bfcc23" title="Number of the picture in coded order which is to be decoded.">m_current_code_pnum</a>; <a name="l00177"></a><a class="code" href="a00129.html#33251d6ce13fcfb1fdcad88105b0c73e">00177</a> <span class="keywordtype">int</span> <a class="code" href="a00129.html#33251d6ce13fcfb1fdcad88105b0c73e" title="A delay so that we don&#39;t display what we haven&#39;t decoded.">m_delay</a>; <a name="l00179"></a><a class="code" href="a00129.html#a0347a0422ec6ad7bb3831a47902db15">00179</a> <span class="keywordtype">int</span> <a class="code" href="a00129.html#a0347a0422ec6ad7bb3831a47902db15" title="Index, in display order, of the last picture read.">m_last_picture_read</a>; <a name="l00181"></a><a class="code" href="a00129.html#6033bb19885d61a4d352f92bbdd84fa4">00181</a> <span class="keywordtype">int</span> <a class="code" href="a00129.html#6033bb19885d61a4d352f92bbdd84fa4" title="Index, in display order of the picture to be displayed next - computed from delay...">m_show_pnum</a>; <a name="l00183"></a><a class="code" href="a00129.html#05e6cff5b10f4b5468932a555f62f6d0">00183</a> <a class="code" href="a00112.html" title="Compress a single image picture.">PictureDecompressor</a> *<a class="code" href="a00129.html#05e6cff5b10f4b5468932a555f62f6d0" title="Picture decompressor object.">m_pdecoder</a>; <a name="l00185"></a><a class="code" href="a00129.html#35b1ac8c224293d56d704203c41b4941">00185</a> <span class="keywordtype">int</span> <a class="code" href="a00129.html#35b1ac8c224293d56d704203c41b4941" title="Highest picture-num processed - for tracking end-of-sequence.">m_highest_pnum</a>; <a name="l00186"></a>00186 }; <a name="l00187"></a>00187 <a name="l00188"></a>00188 } <span class="comment">// namespace dirac</span> <a name="l00189"></a>00189 <a name="l00190"></a>00190 <span class="preprocessor">#endif</span> </pre></div></div> <hr> <p align="center"><small> © 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>