Created by the British Broadcasting Corporation.
00001 /* ***** BEGIN LICENSE BLOCK ***** 00002 * 00003 * $Id: frame_buffer.h,v 1.6 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): 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 _FRAME_BUFFER_H_ 00039 #define _FRAME_BUFFER_H_ 00040 00041 #include <vector> 00042 #include <map> 00043 #include <libdirac_common/frame.h> 00044 #include <libdirac_common/common.h> 00045 #include <libdirac_common/pic_io.h> 00046 00048 00055 class FrameBuffer{ 00056 public: 00058 00067 FrameBuffer(ChromaFormat cf,int xlen,int ylen); 00068 00070 00081 FrameBuffer(ChromaFormat cf,int L1sep,int xlen, int ylen); 00082 00084 00095 FrameBuffer(ChromaFormat cf,int numL1,int L1sep,int xlen,int ylen); 00096 00098 00102 FrameBuffer(const FrameBuffer& cpy); 00103 00105 00108 FrameBuffer& operator=(const FrameBuffer& rhs); 00109 00111 ~FrameBuffer(); 00112 00114 Frame& GetFrame(unsigned int fnum); 00115 00117 const Frame& GetFrame(unsigned int fnum) const; 00118 00120 PicArray& GetComponent(unsigned int frame_num, CompSort c); 00121 00123 const PicArray& GetComponent(unsigned int frame_num, CompSort c) const; 00124 00126 PicArray& GetUpComponent(unsigned int frame_num, CompSort c); 00127 00129 const PicArray& GetUpComponent(unsigned int frame_num, CompSort c) const; 00130 00132 size_t Size() const {return m_frame_data.size();} 00133 00135 00141 void PushFrame(unsigned int frame_num); 00142 00144 00148 void PushFrame(const FrameParams& fp); 00149 00151 00154 void PushFrame( const Frame& frame ); 00155 00157 00164 void PushFrame(PicInput* picin,const FrameParams& fp); 00165 00167 00173 void PushFrame(PicInput* picin,unsigned int fnum); 00174 00176 00180 void Clean(int fnum); 00181 00183 const FrameParams& GetFParams() const{return m_fparams;} 00184 00185 private: 00187 std::vector<Frame*> m_frame_data; 00188 00190 std::map<unsigned int,unsigned int> m_fnum_map; 00191 00193 FrameParams m_fparams; 00194 00196 unsigned int m_num_L1; 00197 00199 unsigned int m_L1_sep; 00200 00202 unsigned int m_gop_len; 00203 00204 00205 00207 void SetFrameParams(unsigned int fnum); 00208 00210 00214 void Remove(unsigned int fnum); 00215 00216 00217 }; 00218 00219 #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.