Dirac - A Video Codec

Created by the British Broadcasting Corporation.


draw_overlay.h
Go to the documentation of this file.
1 /* ***** BEGIN LICENSE BLOCK *****
2 *
3 * $Id: draw_overlay.h,v 1.6 2008/03/14 08:17:37 asuraparaju Exp $ $Name: Dirac_1_0_2 $
4 *
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 *
7 * The contents of this file are subject to the Mozilla Public License
8 * Version 1.1 (the "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
11 *
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
14 * the specific language governing rights and limitations under the License.
15 *
16 * The Original Code is BBC Research and Development code.
17 *
18 * The Initial Developer of the Original Code is the British Broadcasting
19 * Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 2004.
21 * All Rights Reserved.
22 *
23 * Contributor(s): Chris Bowley (Original Author)
24 *
25 * Alternatively, the contents of this file may be used under the terms of
26 * the GNU General Public License Version 2 (the "GPL"), or the GNU Lesser
27 * Public License Version 2.1 (the "LGPL"), in which case the provisions of
28 * the GPL or the LGPL are applicable instead of those above. If you wish to
29 * allow use of your version of this file only under the terms of the either
30 * the GPL or LGPL and not to allow others to use your version of this file
31 * under the MPL, indicate your decision by deleting the provisions above
32 * and replace them with the notice and other provisions required by the GPL
33 * or LGPL. If you do not delete the provisions above, a recipient may use
34 * your version of this file under the terms of any one of the MPL, the GPL
35 * or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
37 
38 #ifndef _BLOCK_OVERLAY_H_
39 #define _BLOCK_OVERLAY_H_
40 
41 
42 #include <libdirac_common/motion.h>
44 using dirac::Picture;
45 using dirac::PicArray;
46 using dirac::MvArray;
47 
49 
50 namespace dirac_instr
51 {
52 #define NO_REF -1
53 
56  {
57  public :
58 
61 
66  int MvYBlockY() const {return m_mv_Y_block_y;}
67 
69  int MvYBlockX() const {return m_mv_Y_block_x;}
70 
72  int MvUVBlockY() const {return m_mv_UV_block_y;}
73 
75  int MvUVBlockX() const {return m_mv_UV_block_x;}
76 
78  int ChromaFactorY() const {return m_chroma_factor_y;}
79 
81  int ChromaFactorX() const {return m_chroma_factor_x;}
82 
84  int PicY() const {return m_pic_y;}
85 
87  int PicX() const {return m_pic_x;}
88 
91  void SetMvYBlockY(int y) {m_mv_Y_block_y=y;}
92 
94  void SetMvYBlockX(int x) {m_mv_Y_block_x=x;}
95 
97  void SetMvUVBlockY(int y) {m_mv_UV_block_y=y;}
98 
101 
104 
107 
109  void SetPicY(int y) {m_pic_y=y;}
110 
112  void SetPicX(int x) {m_pic_x=x;}
113 
114  private :
115 
118 
121 
124 
127  };
128 
130  /*
131  Base class for block overlay objects with pure
132  virtual functions to define sub-class interface
133  */
135  {
136  public :
139 
141  virtual ~DrawOverlay();
142 
144  virtual void DrawBlock(int, int)=0;
145 
147  virtual void DrawLegend()=0;
148 
150  // //
151  // Assumes default copy constructor and assignment = //
152  // //
154 
156  void DrawReferenceNumbers(int, int);
157 
159  void DrawReferenceNumber(int, int);
160 
162  void DrawPictureNumber(int);
163 
165  void DrawCharacter(const PicArray &, int, int);
166 
168  const OverlaySymbols & Symbols() const {return m_symbols;}
169 
170  protected :
171 
172 
174  void GetPowerUV(int, int &, int &);
175 
177  void DrawPowerBar(int, int);
178 
180  void DrawValue(int, int, int);
181 
183  void DrawMvBlockUV(int, int, int, int);
184 
186  void DrawBlockUV(int, int, int, int);
187 
190 
193 
196 
197  private :
198 
199  };
200 
201 } // namespace dirac_instr
202 
203 #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.