Created by the British Broadcasting Corporation.
00001 /* ***** BEGIN LICENSE BLOCK ***** 00002 * 00003 * $Id: frame_compress.h,v 1.15 2007/09/03 14:52:40 asuraparaju Exp $ $Name: Dirac_0_8_0 $ 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), 00024 * Scott R Ladd, 00025 * Anuradha Suraparaju 00026 * Andrew Kennedy 00027 * 00028 * Alternatively, the contents of this file may be used under the terms of 00029 * the GNU General Public License Version 2 (the "GPL"), or the GNU Lesser 00030 * Public License Version 2.1 (the "LGPL"), in which case the provisions of 00031 * the GPL or the LGPL are applicable instead of those above. If you wish to 00032 * allow use of your version of this file only under the terms of the either 00033 * the GPL or LGPL and not to allow others to use your version of this file 00034 * under the MPL, indicate your decision by deleting the provisions above 00035 * and replace them with the notice and other provisions required by the GPL 00036 * or LGPL. If you do not delete the provisions above, a recipient may use 00037 * your version of this file under the terms of any one of the MPL, the GPL 00038 * or the LGPL. 00039 * ***** END LICENSE BLOCK ***** */ 00040 00041 00042 #ifndef _FRAME_COMPRESS_H_ 00043 #define _FRAME_COMPRESS_H_ 00044 00045 #include <libdirac_common/frame_buffer.h> 00046 #include <libdirac_common/common.h> 00047 #include <libdirac_common/motion.h> 00048 #include <libdirac_byteio/frame_byteio.h> 00049 00050 namespace dirac 00051 { 00052 00053 class MvData; 00054 00056 00061 class FrameCompressor 00062 { 00063 public: 00065 00071 FrameCompressor( EncoderParams& encp ); 00072 00074 ~FrameCompressor( ); 00075 00077 00082 bool MotionEstimate( const FrameBuffer& my_fbuffer, 00083 int fnum); 00084 00086 00092 FrameByteIO* Compress( FrameBuffer& my_fbuffer , 00093 int fnum ); 00094 00096 bool IsSkipped(){ return m_skipped; } 00097 00099 bool IsMEDataAvail() const { return m_medata_avail; } 00100 00102 const MEData* GetMEData() const; 00103 00104 private: 00106 00110 FrameCompressor( const FrameCompressor& cpy ); 00111 00113 00117 FrameCompressor& operator=(const FrameCompressor& rhs); 00118 00120 void AnalyseMEData( const MEData& ); 00121 00123 void CompressMVData(MvDataByteIO* mv_data); 00124 00125 private: 00126 00127 //member variables 00128 // a local copy of the encoder params 00129 EncoderParams& m_encparams; 00130 00131 // Pointer to the motion vector data 00132 MEData* m_me_data; 00133 00134 // True if the frame has been skipped, false otherwise 00135 bool m_skipped; 00136 00137 // True if we use global motion vectors, false otherwise 00138 bool m_use_global; 00139 00140 // True if we use block motion vectors, false otherwise 00141 bool m_use_block_mv; 00142 00143 // Prediction mode to use if we only have global motion vectors 00144 PredMode m_global_pred_mode; 00145 00146 // True if motion estimation data is available 00147 bool m_medata_avail; 00148 00149 // True if we have detected a cut 00150 bool m_is_a_cut; 00151 00152 // The proportion of intra blocks that motion estimation has found 00153 double m_intra_ratio; 00154 }; 00155 00156 } // namespace dirac 00157 00158 #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.