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.5 2008/09/10 12:28:46 asuraparaju Exp $ $Name: Dirac_1_0_2 $
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 {
00059     class MvDataByteIO : public ByteIO
00060     {
00061     public:
00062 
00068         MvDataByteIO(PictureParams& pparams,
00069                         PicturePredParams& picpredparams);
00070 
00077         MvDataByteIO(ByteIO &byte_io, PictureParams& pparams,
00078                         PicturePredParams& picpredparams);
00079 
00083         virtual ~MvDataByteIO();
00084 
00089         void CollateByteStats(DiracByteStats& dirac_byte_stats);
00090 
00094         void Output();
00095 
00099         void Input();
00100 
00101 
00105         virtual const std::string GetBytes();
00106 
00110         MvDataElementByteIO*  SplitModeData() { return &m_splitmode_data; };
00111 
00115         MvDataElementByteIO*  PredModeData() { return &m_predmode_data; };
00116 
00120         MvDataElementByteIO*  MV1HorizData() { return &m_mv1hblock_data; };
00121 
00125         MvDataElementByteIO*  MV1VertData() { return &m_mv1vblock_data; };
00126 
00130         MvDataElementByteIO*  MV2HorizData() { return &m_mv2hblock_data; };
00131 
00135         MvDataElementByteIO*  MV2VertData() { return &m_mv2vblock_data; };
00136 
00140         MvDataElementByteIO*  YDCData() { return &m_ydcblock_data; };
00141 
00145         MvDataElementByteIO*  UDCData() { return &m_udcblock_data; };
00146 
00150         MvDataElementByteIO*  VDCData() { return &m_vdcblock_data; };
00151 
00155         int GetSize() const;
00156 
00157     protected:
00158 
00159 
00160     private:
00164         void InputBlockParams();
00165 
00169         void InputMVPrecision();
00170 
00174         void InputGlobalMotionParams();
00175 
00179         void InputFramePredictionMode();
00180 
00184         void InputPictureWeights();
00185 
00189         void OutputBlockParams();
00190 
00194         void OutputMVPrecision();
00195 
00199         void OutputGlobalMotionParams();
00200 
00204         void OutputFramePredictionMode();
00205 
00209         void OutputPictureWeights();
00210 
00214         PictureParams&   m_pparams;
00215 
00219         PicturePredParams& m_picpredparams;
00220 
00224         MvDataElementByteIO m_splitmode_data;
00225 
00229         MvDataElementByteIO m_predmode_data;
00230 
00234         MvDataElementByteIO m_mv1hblock_data;
00235 
00239         MvDataElementByteIO m_mv1vblock_data;
00240 
00244         MvDataElementByteIO m_mv2hblock_data;
00245 
00249         MvDataElementByteIO m_mv2vblock_data;
00250 
00254         MvDataElementByteIO m_ydcblock_data;
00255 
00259         MvDataElementByteIO m_udcblock_data;
00260 
00264         MvDataElementByteIO m_vdcblock_data;
00265     };
00266 
00267 } // namespace dirac
00268 
00269 #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.