Created by the British Broadcasting Corporation.
00001 /* ***** BEGIN LICENSE BLOCK ***** 00002 * 00003 * $Id: seq_compress.h,v 1.10 2004/08/25 16:47:37 asuraparaju Exp $ $Name: Dirac_0_4_3 $ 00004 * 00005 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 00006 * 00007 * The contents of this file are subject to the Mozilla Public License 00008 * Version 1.1 (the "License"); you may not use this file except in compliance 00009 * with the License. You may obtain a copy of the License at 00010 * http://www.mozilla.org/MPL/ 00011 * 00012 * Software distributed under the License is distributed on an "AS IS" basis, 00013 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 00014 * the specific language governing rights and limitations under the License. 00015 * 00016 * The Original Code is BBC Research and Development code. 00017 * 00018 * The Initial Developer of the Original Code is the British Broadcasting 00019 * Corporation. 00020 * Portions created by the Initial Developer are Copyright (C) 2004. 00021 * All Rights Reserved. 00022 * 00023 * Contributor(s): Thomas Davies (Original Author), Scott R Ladd 00024 * 00025 * Alternatively, the contents of this file may be used under the terms of 00026 * the GNU General Public License Version 2 (the "GPL"), or the GNU Lesser 00027 * Public License Version 2.1 (the "LGPL"), in which case the provisions of 00028 * the GPL or the LGPL are applicable instead of those above. If you wish to 00029 * allow use of your version of this file only under the terms of the either 00030 * the GPL or LGPL and not to allow others to use your version of this file 00031 * under the MPL, indicate your decision by deleting the provisions above 00032 * and replace them with the notice and other provisions required by the GPL 00033 * or LGPL. If you do not delete the provisions above, a recipient may use 00034 * your version of this file under the terms of any one of the MPL, the GPL 00035 * or the LGPL. 00036 * ***** END LICENSE BLOCK ***** */ 00037 00038 #ifndef _SEQ_COMPRESS_H_ 00039 #define _SEQ_COMPRESS_H_ 00040 00042 //-------------------------------------// 00043 //Class to manage compressing sequences// 00044 //-------------------------------------// 00046 00047 #include <libdirac_common/common.h> 00048 #include <libdirac_common/frame_buffer.h> 00049 #include <libdirac_common/pic_io.h> 00050 #include <libdirac_encoder/quality_monitor.h> 00051 #include <fstream> 00052 00054 00059 class SequenceCompressor{ 00060 public: 00062 00069 SequenceCompressor(PicInput* pin, std::ofstream* outfile, EncoderParams& encp); 00070 00072 00075 ~SequenceCompressor(); 00076 00078 00093 Frame & CompressNextFrame(); 00094 00096 00100 bool Finished(){return m_all_done;} 00101 00102 00103 private: 00105 00109 SequenceCompressor(const SequenceCompressor& cpy); 00110 00112 00116 SequenceCompressor& operator=(const SequenceCompressor& rhs); 00117 00119 00124 void WriteStreamHeader(); 00125 00127 00131 int CodedToDisplay(const int fnum); 00132 00134 void MakeSequenceReport(); 00135 00137 void MakeFrameReport(); 00138 00140 bool m_all_done; 00141 00143 00147 bool m_just_finished; 00148 00150 EncoderParams& m_encparams; 00151 00153 PicInput* m_pic_in; 00154 00156 FrameBuffer* m_fbuffer; 00157 00159 FrameBuffer* m_origbuffer; 00160 00161 //state variables for CompressNextFrame 00162 00164 int m_current_display_fnum; 00165 00167 int m_current_code_fnum; 00168 00170 int m_show_fnum; 00171 00173 int m_last_frame_read; 00174 00176 int m_delay; 00177 00179 QualityMonitor m_qmonitor; 00180 }; 00181 00182 #endif
© 2004 British Broadcasting Corporation.
Dirac code licensed under the Mozilla Public License (MPL) Version 1.1.
HTML documentation generated by Dimitri van Heesch's
excellent Doxygen tool.