Dirac - A Video Codec

Created by the British Broadcasting Corporation.


draw_overlay.h

Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK ***** 00002 * 00003 * $Id: draw_overlay.h,v 1.3 2004/09/09 14:48:43 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): 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 #define NO_REF -1 00042 00043 #include <libdirac_common/motion.h> 00044 #include <libdirac_common/frame.h> 00045 #include <util/instrumentation/libdirac_instrument/overlay_symbols.h> 00046 00048 class DrawFrameMotionParams 00049 { 00050 public : 00051 00053 DrawFrameMotionParams() {} 00054 00056 ~DrawFrameMotionParams() {} 00059 const int MvYBlockY() const {return m_mv_Y_block_y;} 00060 00062 const int MvYBlockX() const {return m_mv_Y_block_x;} 00063 00065 const int MvUVBlockY() const {return m_mv_UV_block_y;} 00066 00068 const int MvUVBlockX() const {return m_mv_UV_block_x;} 00069 00071 const int ChromaFactorY() const {return m_chroma_factor_y;} 00072 00074 const int ChromaFactorX() const {return m_chroma_factor_x;} 00075 00077 const int PicY() const {return m_pic_y;} 00078 00080 const int PicX() const {return m_pic_x;} 00081 00084 void SetMvYBlockY(int y) {m_mv_Y_block_y=y;} 00085 00087 void SetMvYBlockX(int x) {m_mv_Y_block_x=x;} 00088 00090 void SetMvUVBlockY(int y) {m_mv_UV_block_y=y;} 00091 00093 void SetMvUVBlockX(int x) {m_mv_UV_block_x=x;} 00094 00096 void SetChromaFactorY(int y) {m_chroma_factor_y=y;} 00097 00099 void SetChromaFactorX(int x) {m_chroma_factor_x=x;} 00100 00102 void SetPicY(int y) {m_pic_y=y;} 00103 00105 void SetPicX(int x) {m_pic_x=x;} 00106 00107 private : 00108 00110 int m_mv_Y_block_y, m_mv_Y_block_x; 00111 00113 int m_mv_UV_block_y, m_mv_UV_block_x; 00114 00116 int m_chroma_factor_y, m_chroma_factor_x; 00117 00119 int m_pic_y, m_pic_x; 00120 }; 00121 00123 /* 00124 Base class for block overlay objects with pure 00125 virtual functions to define sub-class interface 00126 */ 00127 class DrawOverlay 00128 { 00129 public : 00131 DrawOverlay(Frame &, DrawFrameMotionParams &); 00132 00134 virtual ~DrawOverlay(); 00135 00137 virtual void DrawBlock(int, int)=0; 00138 00140 virtual void DrawLegend()=0; 00141 00143 // // 00144 // Assumes default copy constructor and assignment = // 00145 // // 00147 00149 void DrawReferenceNumbers(int, int); 00150 00152 void DrawReferenceNumber(int, int); 00153 00155 void DrawFrameNumber(int); 00156 00158 void DrawCharacter(const PicArray &, int, int); 00159 00161 const OverlaySymbols & Symbols() const {return m_symbols;} 00162 00163 protected : 00164 00165 00167 void GetPowerUV(int, int &, int &); 00168 00170 void DrawPowerBar(int, int); 00171 00173 void DrawValue(int, int, int); 00174 00176 void DrawMvBlockUV(int, int, int, int); 00177 00179 void DrawBlockUV(int, int, int, int); 00180 00182 Frame & m_frame; 00183 00185 DrawFrameMotionParams & m_draw_params; 00186 00188 OverlaySymbols m_symbols; 00189 00190 private : 00191 00192 }; 00193 00194 #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.