source: 3DVCSoftware/branches/0.1-poznan-univ/source/Lib/TLibRenderer/TRenModel.h @ 47

Last change on this file since 47 was 2, checked in by hhi, 13 years ago

inital import

  • Property svn:eol-style set to native
File size: 4.1 KB
Line 
1
2
3
4#ifndef __TRENMODEL__
5#define __TRENMODEL__
6
7#include "TRenImage.h"
8#include "TRenSingleModel.h"
9#include "../TLibCommon/CommonDef.h"
10#include "../TLibCommon/TComPicYuv.h"
11#include "../TLibCommon/TypeDef.h"
12
13class TRenModel
14{
15public:
16
17  TRenModel();
18  ~TRenModel();
19
20  // Creation
21  Void  create           ( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin );
22  Void  createSingleModel( Int iBaseViewNum, Int iContent, Int iModelNum, Int iLeftViewNum, Int iRightViewNum, Bool bUseOrgRef, Int iBlendMode );
23
24  // Set new Frame
25  Void  setBaseView      ( Int iViewNum, TComPicYuv* pcPicYuvVideoData, TComPicYuv* pcPicYuvDepthData, TComPicYuv* pcPicYuvOrgVideoData, TComPicYuv* pcPicYuvOrgDepthData  );
26  Void  setSingleModel   ( Int iModelNum, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, TComPicYuv* pcPicYuvRefView );
27
28  // Set Mode
29  Void  setErrorMode     ( Int iView, Int iContent, int iPlane );
30
31  // Get Distortion, set Data
32  Int64 getDist          ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData  );
33  Void  setData          ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData  );
34
35  // Get Rendered View
36  Void  getSynthVideo    ( Int iModelNum, Int iViewNum, TComPicYuv*& rpcPicYuvSynthVideo );
37  Void  getSynthDepth    ( Int iModelNum, Int iViewNum, TComPicYuv*& rpcPicYuvSynthDepth );
38
39  // Get Total Distortion
40  Void  getTotalSSE      (Int64& riSSEY, Int64& riSSEU, Int64& riSSEV );
41
42#if GERHARD_RM_DEBUG_MM
43  Bool  compareAll       ( TRenModel* pcModel);
44  Bool  compare          ( TRenModel* pcModel);
45public:
46#else
47private:
48#endif
49
50  // helpers
51  Void xSetLRViewAndAddModel( Int iModelNum, Int iBaseViewNum, Int iContent, Int iViewPos, Bool bAdd );
52  Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget );
53
54  // Settings
55  Int    m_iShiftPrec;
56  Int**  m_aaaiSubPelShiftLut[2];
57  Int    m_iHoleMargin;
58
59  /// Size of Video and Depth
60  Int m_iWidth;
61  Int m_iHeight;
62  Int m_iSampledWidth;
63  Int m_iPad;
64
65  Int m_iNumOfBaseViews;
66
67  /// Current Error Type ///
68  Int m_iCurrentView;
69  Int m_iCurrentContent;
70  Int m_iCurrentPlane;
71
72  /// Array of Models used to determine the Current Error ///
73  Int                m_iNumOfCurRenModels;
74  TRenSingleModel**  m_apcCurRenModels;   // Array of pointers used for determination of current error
75  Int*               m_aiCurPosInModels;  // Position of Current View in Model
76
77  /// Array of Models ///
78  Int                m_iNumOfRenModels;
79  TRenSingleModel**  m_apcRenModels;   // Array of pointers to all created models
80
81  /// Mapping from View number and Content type to models ///
82  Int*               m_aiNumOfModelsForDepthView;
83  TRenSingleModel*** m_aapcRenModelForDepthView;   // Dim1: ViewNumber
84  Int**              m_aaePosInModelForDepthView; // Position in Model ( Left or Right)
85
86  Int*               m_aiNumOfModelsForVideoView;
87  TRenSingleModel*** m_aapcRenModelForVideoView;   // Dim1: ViewNumber
88  Int**              m_aaePosInModelForVideoView; // Position in Model ( Left or Right) (local model numbering)
89
90  /// Position of Base Views in Models ( global model numbering )
91  Int**              m_aaeBaseViewPosInModel;
92
93  /// Current Setup data ///
94  Bool*              m_abSetupVideoFromOrgForView;  //: Dim1: ViewNumber, 0 ... use org; 1 ... use coded; 2; use org ref and coded in RDO
95  Bool*              m_abSetupDepthFromOrgForView;
96
97  /// DATA //
98  // Cur
99
100  /// Number of Base Views
101  Pel*** m_aapiCurVideoPel   ; // Dim1: ViewNumber: Plane  0-> Y, 1->U, 2->V
102  Int**  m_aaiCurVideoStrides; // Dim1: ViewPosition 0->Left, 1->Right; Dim2: Plane  0-> Y, 1->U, 2->V
103
104  Pel**  m_apiCurDepthPel    ; // Dim1: ViewPosition
105  Int*   m_aiCurDepthStrides ; // Dim1: ViewPosition
106
107  Pel*** m_aapiOrgVideoPel   ; // Dim1: ViewPosition  Dim2: Plane  0-> Y, 1->U, 2->V
108  Int**  m_aaiOrgVideoStrides; // Dim1: ViewPosition  Dim2: Plane  0-> Y, 1->U, 2->V
109
110  Pel**  m_apiOrgDepthPel    ;    // Dim1: ViewPosition
111  Int*   m_aiOrgDepthStrides ;    // Dim1: ViewPosition
112};
113
114#endif //__TRENMODEL__
Note: See TracBrowser for help on using the repository browser.