1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | #ifndef __TRENIMAGEPLANE__ |
---|
6 | #define __TRENIMAGEPLANE__ |
---|
7 | |
---|
8 | #include "../TLibCommon/CommonDef.h" |
---|
9 | #include "../TLibCommon/TComPicYuv.h" |
---|
10 | |
---|
11 | #define PelImagePlane TRenImagePlane<Pel> |
---|
12 | #define DoubleImagePlane TRenImagePlane<Double> |
---|
13 | #define IntImagePlane TRenImagePlane<Int> |
---|
14 | |
---|
15 | template<typename T> |
---|
16 | class TRenImagePlane |
---|
17 | { |
---|
18 | public: |
---|
19 | // Construction |
---|
20 | TRenImagePlane(); |
---|
21 | TRenImagePlane( UInt uiWidth, UInt uiHeight, UInt uiPad); |
---|
22 | TRenImagePlane( TRenImagePlane* pcInputPlane ); |
---|
23 | TRenImagePlane( T* pcDataOrg, UInt uiWidthOrg, UInt uiHeightOrg, UInt uiStride, UInt uiPad ); |
---|
24 | |
---|
25 | ~TRenImagePlane(); |
---|
26 | |
---|
27 | // Get Data |
---|
28 | T* getPlaneData(); |
---|
29 | UInt getWidth () { return m_uiWidth; }; |
---|
30 | UInt getHeight () { return m_uiHeight; }; |
---|
31 | |
---|
32 | T* getPlaneDataOrg(); |
---|
33 | UInt getWidthOrg () { return m_uiWidthOrg; }; |
---|
34 | UInt getHeightOrg() { return m_uiHeightOrg; }; |
---|
35 | UInt getPad () { return m_uiPad; }; |
---|
36 | UInt getStride () { return m_uiStride; }; |
---|
37 | |
---|
38 | Void setData ( T* pDataOrg, UInt uiWidthOrg, UInt uiHeightOrg, UInt uiStride, UInt uiPad, Bool bClean /*= false*/ ); |
---|
39 | Void setData ( TRenImagePlane<T>* pcInPlane, Bool bClean ); |
---|
40 | Void setClean( Bool bClean ); |
---|
41 | Void extendMargin(); |
---|
42 | |
---|
43 | // Assignment |
---|
44 | Void assign( Pel* data, UInt uiSourceStride ); |
---|
45 | Void assign( Pel data ); |
---|
46 | |
---|
47 | Void assign( Double* data, UInt uiSourceStride ); |
---|
48 | Void assign( Double data ); |
---|
49 | |
---|
50 | Void assign( Bool* data, UInt uiSourceStride ); |
---|
51 | Void assign( Bool data ); |
---|
52 | |
---|
53 | Void assign( Int* data, UInt uiSourceStride ); |
---|
54 | Void assign( Int data ); |
---|
55 | |
---|
56 | Void assign( TRenImagePlane<T>* pcPlane); |
---|
57 | |
---|
58 | Void assign( T data , UInt uRow, UInt uStartOffset, UInt uEndOffset); |
---|
59 | Void assign( TRenImagePlane<T>* pcPlane, UInt uRow, UInt uStartOffset, UInt uEndOffset); |
---|
60 | Void assign( TRenImagePlane<T>* pcSourcePlane, UInt uSourceRowStart, UInt uSourceColStart, UInt uWidth, UInt uHeight); |
---|
61 | |
---|
62 | // Operators |
---|
63 | Void devide( Double dDevisor ); |
---|
64 | Void multiply( Double dMultiplier ); |
---|
65 | |
---|
66 | protected: |
---|
67 | T *m_pcData; |
---|
68 | UInt m_uiWidth; |
---|
69 | UInt m_uiHeight; |
---|
70 | UInt m_uiStride; |
---|
71 | |
---|
72 | T *m_pcDataOrg; |
---|
73 | UInt m_uiWidthOrg; |
---|
74 | UInt m_uiHeightOrg; |
---|
75 | UInt m_uiPad; |
---|
76 | |
---|
77 | Double m_dRatio; |
---|
78 | Bool m_bClean; |
---|
79 | |
---|
80 | private: |
---|
81 | Void deleteData(); |
---|
82 | }; |
---|
83 | |
---|
84 | template<typename T> |
---|
85 | class TRenImagePlanePart : public TRenImagePlane< T > |
---|
86 | { |
---|
87 | public: |
---|
88 | TRenImagePlanePart( TRenImagePlane<T>* pcPlane, UInt uHorOff, UInt uVerOff, UInt uWidth, UInt uHeight);; |
---|
89 | ~TRenImagePlanePart();; |
---|
90 | }; |
---|
91 | |
---|
92 | #endif // __TRENIMAGEPLANE__ |
---|