Dirac - A Video Codec

Created by the British Broadcasting Corporation.


picture.h
Go to the documentation of this file.
1/* ***** BEGIN LICENSE BLOCK *****
2*
3* $Id: picture.h,v 1.4 2008/08/14 00:51:08 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): Thomas Davies (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 _PICTURE_H_
39#define _PICTURE_H_
40
43
44namespace dirac
45{
47
51 class Picture
52 {
53
54 public:
55
57
60 Picture( const PictureParams& pp );
61
63 Picture(const Picture& cpy);
64
66 virtual ~Picture();
67
69 Picture& operator=( const Picture& rhs );
70
72
75 void Fill(ValueType val );
76
77 //gets and sets
80
82 void SetPictureSort( const PictureSort ps ){m_pparams.SetPicSort( ps ); }
83
85 void SetPictureType( const PictureType ftype ){m_pparams.SetPictureType( ftype ); }
86
88 void SetReferenceType( const ReferenceType rtype ){m_pparams.SetReferenceType( rtype ); }
89
91 void ReconfigPicture( const PictureParams &pp );
92
94 PicArray& Data(CompSort cs){return *m_pic_data[(int) cs];}
95
97 const PicArray& Data(CompSort cs) const{return *m_pic_data[(int) cs];}
98
101
103 const PicArray& UpData(CompSort cs) const;
104
106 const CoeffArray& WltData( CompSort c ) const { return m_wlt_data[(int) c]; }
107
109 CoeffArray& WltData( CompSort c ) { return m_wlt_data[(int) c]; }
110
112 void InitWltData( const int transform_depth );
113
115
118 void Clip();
119
121
125
126 protected:
128 PicArray* m_pic_data[3];//the picture data
129 mutable PicArray* m_up_pic_data[3];//upconverted data. Mutable because we
130 //create them on the fly even in const
131 //functions.
132
133 CoeffArray m_wlt_data[3];// the wavelet coefficient data
134
136 virtual void Init();
137
139 virtual void ClearData();
140
142 void ClipComponent(PicArray& pic_data, CompSort cs) const;
143
144 };
145
146} // namespace dirac
147
148
149#endif
PictureType
Definition common_types.h:86
ReferenceType
Definition common_types.h:92
Definition of class SequenceHeaderByteIO.
Definition accessunit_byteio.h:52
CompSort
Types of picture component.
Definition common.h:87
short ValueType
Type of picture data (including motion compensated residuals)
Definition common.h:70
Picture type Class.
Definition common.h:229
Parameters for initialising picture class objects.
Definition common.h:533
A class for picture component data.
Definition common.h:719
const PicArray & UpData(CompSort cs) const
Returns a given upconverted component.
PicArray & UpData(CompSort cs)
Returns a given upconverted component.
void Fill(ValueType val)
Picture Fill.
PicArray & Data(CompSort cs)
Returns a given component.
Definition picture.h:94
void SetPictureSort(const PictureSort ps)
Sets the picture sort.
Definition picture.h:82
const PicArray & Data(CompSort cs) const
Returns a given component.
Definition picture.h:97
void InitWltData(const int transform_depth)
Initialises the wavelet coefficient data arrays;.
void SetPictureType(const PictureType ftype)
Sets the picture type.
Definition picture.h:85
const CoeffArray & WltData(CompSort c) const
Returns the wavelet coefficient data.
Definition picture.h:106
void ClipComponent(PicArray &pic_data, CompSort cs) const
Clip an individual component.
PicArray * m_up_pic_data[3]
Definition picture.h:129
virtual void ClearData()
Delete all the data.
void ClipUpData()
Clip the upconverted data to prevent overshoot.
void SetReferenceType(const ReferenceType rtype)
Sets the picture type.
Definition picture.h:88
Picture(const PictureParams &pp)
Constructor.
PictureParams & GetPparams() const
Gets the picture parameters.
Definition picture.h:79
PictureParams m_pparams
Definition picture.h:127
Picture(const Picture &cpy)
Copy constructor. Private as not currently used [may want to implement reference counting later....
virtual void Init()
Initialises the picture once the picture parameters have been set.
CoeffArray & WltData(CompSort c)
Returns the wavelet coefficient data.
Definition picture.h:109
Picture & operator=(const Picture &rhs)
Assignment =. Private as not currently used [may want to implement reference counting later....
CoeffArray m_wlt_data[3]
Definition picture.h:133
void ReconfigPicture(const PictureParams &pp)
Reconfigures to the new parameters.
virtual ~Picture()
Destructor.
void Clip()
Clip the data to prevent overshoot.
PicArray * m_pic_data[3]
Definition picture.h:128
A class for wavelet coefficient data.
Definition wavelet_utils.h:623

© 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.