source: 3DVCSoftware/branches/0.2-HHI/source/Lib/TLibRenderer/TRenImagePlane.h @ 78

Last change on this file since 78 was 5, checked in by hhi, 13 years ago

Clean version with cfg-files

  • Property svn:eol-style set to native
File size: 4.2 KB
Line 
1/* The copyright in this software is being made available under the BSD
2 * License, included below. This software may be subject to other third party
3 * and contributor rights, including patent rights, and no such rights are
4 * granted under this license.
5 *
6 * Copyright (c) 2010-2011, ISO/IEC
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright notice,
13 *    this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above copyright notice,
15 *    this list of conditions and the following disclaimer in the documentation
16 *    and/or other materials provided with the distribution.
17 *  * Neither the name of the ISO/IEC nor the names of its contributors may
18 *    be used to endorse or promote products derived from this software without
19 *    specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34
35
36
37
38#ifndef __TRENIMAGEPLANE__
39#define __TRENIMAGEPLANE__
40
41#include "../TLibCommon/CommonDef.h"
42#include "../TLibCommon/TComPicYuv.h"
43
44#define PelImagePlane     TRenImagePlane<Pel>
45#define DoubleImagePlane  TRenImagePlane<Double>
46#define IntImagePlane     TRenImagePlane<Int>
47
48template<typename T>
49class TRenImagePlane
50{
51public:
52  // Construction
53  TRenImagePlane();
54  TRenImagePlane( UInt uiWidth, UInt uiHeight, UInt uiPad);
55  TRenImagePlane( TRenImagePlane* pcInputPlane );
56  TRenImagePlane( T* pcDataOrg, UInt uiWidthOrg, UInt uiHeightOrg, UInt uiStride, UInt uiPad );
57
58  ~TRenImagePlane();
59
60  // Get Data
61  T*   getPlaneData();
62  UInt getWidth    () { return m_uiWidth; };
63  UInt getHeight   () { return m_uiHeight; };
64
65  T*   getPlaneDataOrg();
66  UInt getWidthOrg () { return m_uiWidthOrg;  };
67  UInt getHeightOrg() { return m_uiHeightOrg; };
68  UInt getPad      () { return m_uiPad;       };
69  UInt getStride   () { return m_uiStride; };
70
71  Void setData ( T* pDataOrg, UInt uiWidthOrg, UInt uiHeightOrg, UInt uiStride, UInt uiPad, Bool bClean /*= false*/ );
72  Void setData ( TRenImagePlane<T>* pcInPlane, Bool bClean );
73  Void setClean( Bool bClean );
74  Void extendMargin();
75
76  // Assignment
77  Void assign( Pel*    data, UInt uiSourceStride );
78  Void assign( Pel     data );
79
80  Void assign( Double* data, UInt uiSourceStride );
81  Void assign( Double  data );
82
83  Void assign( Bool*  data, UInt uiSourceStride );
84  Void assign( Bool   data );
85
86  Void assign( Int*   data, UInt uiSourceStride );
87  Void assign( Int    data );
88
89  Void assign( TRenImagePlane<T>* pcPlane);
90
91  Void assign( T data , UInt uRow, UInt uStartOffset, UInt uEndOffset);
92  Void assign( TRenImagePlane<T>* pcPlane, UInt uRow, UInt uStartOffset, UInt uEndOffset);
93  Void assign( TRenImagePlane<T>* pcSourcePlane, UInt uSourceRowStart, UInt uSourceColStart, UInt uWidth, UInt uHeight);
94
95  // Operators
96  Void devide(   Double dDevisor );
97  Void multiply( Double dMultiplier );
98
99protected:
100  T     *m_pcData;
101  UInt   m_uiWidth;
102  UInt   m_uiHeight;
103  UInt   m_uiStride;
104
105  T     *m_pcDataOrg;
106  UInt   m_uiWidthOrg;
107  UInt   m_uiHeightOrg;
108  UInt   m_uiPad;
109
110  Double m_dRatio;
111  Bool   m_bClean;
112
113private:
114  Void deleteData();
115};
116
117template<typename T>
118class TRenImagePlanePart : public TRenImagePlane< T >
119{
120public:
121  TRenImagePlanePart( TRenImagePlane<T>* pcPlane, UInt uHorOff, UInt uVerOff, UInt uWidth, UInt uHeight);;
122  ~TRenImagePlanePart();;
123};
124
125#endif // __TRENIMAGEPLANE__
Note: See TracBrowser for help on using the repository browser.