Created by the British Broadcasting Corporation.
00001 /* ***** BEGIN LICENSE BLOCK ***** 00002 * 00003 * $Id: draw_overlay.h,v 1.6 2008/03/14 08:17:37 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): Chris Bowley (Original Author) 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 _BLOCK_OVERLAY_H_ 00039 #define _BLOCK_OVERLAY_H_ 00040 00041 00042 #include <libdirac_common/motion.h> 00043 #include <libdirac_common/picture.h> 00044 using dirac::Picture; 00045 using dirac::PicArray; 00046 using dirac::MvArray; 00047 00048 #include <util/instrumentation/libdirac_instrument/overlay_symbols.h> 00049 00050 namespace dirac_instr 00051 { 00052 #define NO_REF -1 00053 00055 class DrawPictureMotionParams 00056 { 00057 public : 00058 00060 DrawPictureMotionParams() {} 00061 00063 ~DrawPictureMotionParams() {} 00066 int MvYBlockY() const {return m_mv_Y_block_y;} 00067 00069 int MvYBlockX() const {return m_mv_Y_block_x;} 00070 00072 int MvUVBlockY() const {return m_mv_UV_block_y;} 00073 00075 int MvUVBlockX() const {return m_mv_UV_block_x;} 00076 00078 int ChromaFactorY() const {return m_chroma_factor_y;} 00079 00081 int ChromaFactorX() const {return m_chroma_factor_x;} 00082 00084 int PicY() const {return m_pic_y;} 00085 00087 int PicX() const {return m_pic_x;} 00088 00091 void SetMvYBlockY(int y) {m_mv_Y_block_y=y;} 00092 00094 void SetMvYBlockX(int x) {m_mv_Y_block_x=x;} 00095 00097 void SetMvUVBlockY(int y) {m_mv_UV_block_y=y;} 00098 00100 void SetMvUVBlockX(int x) {m_mv_UV_block_x=x;} 00101 00103 void SetChromaFactorY(int y) {m_chroma_factor_y=y;} 00104 00106 void SetChromaFactorX(int x) {m_chroma_factor_x=x;} 00107 00109 void SetPicY(int y) {m_pic_y=y;} 00110 00112 void SetPicX(int x) {m_pic_x=x;} 00113 00114 private : 00115 00117 int m_mv_Y_block_y, m_mv_Y_block_x; 00118 00120 int m_mv_UV_block_y, m_mv_UV_block_x; 00121 00123 int m_chroma_factor_y, m_chroma_factor_x; 00124 00126 int m_pic_y, m_pic_x; 00127 }; 00128 00130 /* 00131 Base class for block overlay objects with pure 00132 virtual functions to define sub-class interface 00133 */ 00134 class DrawOverlay 00135 { 00136 public : 00138 DrawOverlay(Picture &, DrawPictureMotionParams &); 00139 00141 virtual ~DrawOverlay(); 00142 00144 virtual void DrawBlock(int, int)=0; 00145 00147 virtual void DrawLegend()=0; 00148 00150 // // 00151 // Assumes default copy constructor and assignment = // 00152 // // 00154 00156 void DrawReferenceNumbers(int, int); 00157 00159 void DrawReferenceNumber(int, int); 00160 00162 void DrawPictureNumber(int); 00163 00165 void DrawCharacter(const PicArray &, int, int); 00166 00168 const OverlaySymbols & Symbols() const {return m_symbols;} 00169 00170 protected : 00171 00172 00174 void GetPowerUV(int, int &, int &); 00175 00177 void DrawPowerBar(int, int); 00178 00180 void DrawValue(int, int, int); 00181 00183 void DrawMvBlockUV(int, int, int, int); 00184 00186 void DrawBlockUV(int, int, int, int); 00187 00189 Picture & m_picture; 00190 00192 DrawPictureMotionParams & m_draw_params; 00193 00195 OverlaySymbols m_symbols; 00196 00197 private : 00198 00199 }; 00200 00201 } // namespace dirac_instr 00202 00203 #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.