# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# frame_compress.h

Go to the documentation of this file.

    00001 /* ***** BEGIN LICENSE BLOCK *****
    00002 *
    00003 * $Id: frame_compress.h,v 1.11 2006/04/20 10:41:57 asuraparaju Exp $ $Name: Dirac_0_6_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( );
    00076
    00084         FrameByteIO* Compress(  FrameBuffer& fbuffer ,
    00085                                 const FrameBuffer& orig_buffer ,
    00086                                 int fnum ,
    00087                                 int au_fnum);
    00088
    00090         bool IsSkipped(){ return m_skipped; }
    00091
    00093         bool IsMEDataAvail() const { return m_medata_avail; }
    00094
    00096         const MEData* GetMEData() const;
    00097
    00098     private:
    00100
    00104         FrameCompressor( const FrameCompressor& cpy );
    00105
    00107
    00111         FrameCompressor& operator=(const FrameCompressor& rhs);
    00112
    00114         void AnalyseMEData( const MEData& );
    00115
    00116     private:
    00117
    00118         //member variables
    00119         // a local copy of the encoder params
    00120         EncoderParams& m_encparams;
    00121
    00122         // Pointer to the motion vector data
    00123         MEData* m_me_data;
    00124
    00125         // True if the frame has been skipped, false otherwise
    00126         bool m_skipped;
    00127
    00128         // True if we use global motion vectors, false otherwise
    00129         bool m_use_global;
    00130
    00131         // True if we use block motion vectors, false otherwise
    00132         bool m_use_block_mv;
    00133
    00134         // Prediction mode to use if we only have global motion vectors
    00135         PredMode m_global_pred_mode;
    00136
    00137         // True if motion estimation data is available
    00138         bool m_medata_avail;
    00139
    00140         // True if we have detected a cut
    00141         bool m_is_a_cut;
    00142
    00143         // The proportion of intra blocks that motion estimation has found
    00144         double m_intra_ratio;
    00145     };
    00146
    00147 } // namespace dirac
    00148
    00149 #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.