Dirac - A Video Codec

Created by the British Broadcasting Corporation.


mvdata_byteio.h

Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002 *
00003 * $Id: mvdata_byteio.h,v 1.2 2007/04/11 08:08:49 tjdwave Exp $ $Name: Dirac_0_9_1 $
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): Anuradha Suraparaju (Original Author)
00024 *                 Andrew Kennedy
00025 *
00026 * Alternatively, the contents of this file may be used under the terms of
00027 * the GNU General Public License Version 2 (the "GPL"), or the GNU Lesser
00028 * Public License Version 2.1 (the "LGPL"), in which case the provisions of
00029 * the GPL or the LGPL are applicable instead of those above. If you wish to
00030 * allow use of your version of this file only under the terms of the either
00031 * the GPL or LGPL and not to allow others to use your version of this file
00032 * under the MPL, indicate your decision by deleting the provisions above
00033 * and replace them with the notice and other provisions required by the GPL
00034 * or LGPL. If you do not delete the provisions above, a recipient may use
00035 * your version of this file under the terms of any one of the MPL, the GPL
00036 * or the LGPL.
00037 * ***** END LICENSE BLOCK ***** */
00038 
00042 #ifndef MV_DATA_BYTEIO_H
00043 #define MV_DATA_BYTEIO_H
00044 
00045 
00046 // DIRAC INCLUDES
00047 #include <libdirac_common/common.h>              // EncParams
00048 
00049 //LOCAL INCLUDES
00050 #include <libdirac_byteio/byteio.h>              // Parent class
00051 #include <libdirac_byteio/mvdataelement_byteio.h>// Member byteio class
00052 
00053 
00054 namespace dirac
00055 {
00056              
00060     class MvDataByteIO : public ByteIO
00061     {
00062     public:
00063 
00069         MvDataByteIO(FrameParams& fparams,
00070                         CodecParams& c_params);
00071 
00078         MvDataByteIO(ByteIO &byte_io, FrameParams& fparams,
00079                         CodecParams& c_params);
00080 
00084         virtual ~MvDataByteIO();
00085 
00090         void CollateByteStats(DiracByteStats& dirac_byte_stats);
00091 
00095         void Output();
00096 
00100         void Input();
00101 
00102 
00106         virtual const std::string GetBytes();
00107 
00111         MvDataElementByteIO*  SplitModeData() { return &m_splitmode_data; };
00112         
00116         MvDataElementByteIO*  PredModeData() { return &m_predmode_data; };
00117 
00121         MvDataElementByteIO*  MV1HorizData() { return &m_mv1hblock_data; };
00122         
00126         MvDataElementByteIO*  MV1VertData() { return &m_mv1vblock_data; };
00127 
00131         MvDataElementByteIO*  MV2HorizData() { return &m_mv2hblock_data; };
00132                 
00136         MvDataElementByteIO*  MV2VertData() { return &m_mv2vblock_data; };
00137         
00141         MvDataElementByteIO*  YDCData() { return &m_ydcblock_data; }; 
00142         
00146         MvDataElementByteIO*  UDCData() { return &m_udcblock_data; }; 
00147         
00151         MvDataElementByteIO*  VDCData() { return &m_vdcblock_data; }; 
00152 
00156         int GetSize() const;
00157 
00158     protected:
00159     
00160 
00161     private:
00165         void InputBlockParams();
00166 
00170         void InputMVPrecision();
00171 
00175         void InputGlobalMotionParams();
00176 
00180         void InputFramePredictionMode();
00181 
00185         void InputFrameWeights();
00186 
00190         void OutputBlockParams();
00191 
00195         void OutputMVPrecision();
00196 
00200         void OutputGlobalMotionParams();
00201 
00205         void OutputFramePredictionMode();
00206 
00210         void OutputFrameWeights();
00211 
00215         FrameParams&   m_fparams;
00216 
00220         CodecParams& m_cparams;
00221         
00225         const CodecParams m_default_cparams;
00226 
00230         MvDataElementByteIO m_splitmode_data;
00231         
00235         MvDataElementByteIO m_predmode_data;
00236         
00240         MvDataElementByteIO m_mv1hblock_data;
00241         
00245         MvDataElementByteIO m_mv1vblock_data;
00246         
00250         MvDataElementByteIO m_mv2hblock_data;
00251         
00255         MvDataElementByteIO m_mv2vblock_data;
00256                 
00260         MvDataElementByteIO m_ydcblock_data;
00261         
00265         MvDataElementByteIO m_udcblock_data;
00266         
00270         MvDataElementByteIO m_vdcblock_data;
00271     };
00272 
00273 } // namespace dirac
00274 
00275 #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.