source: 3DVCSoftware/trunk/source/App/TAppEncoder/TAppEncTop.h @ 2

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

inital import

  • Property svn:eol-style set to native
File size: 5.2 KB
Line 
1
2
3/** \file     TAppEncTop.h
4    \brief    Encoder application class (header)
5*/
6
7#ifndef __TAPPENCTOP__
8#define __TAPPENCTOP__
9
10#include "../../Lib/TLibEncoder/TEncTop.h"
11#include "../../Lib/TLibVideoIO/TVideoIOYuv.h"
12#include "../../Lib/TLibVideoIO/TVideoIOBits.h"
13#include "../../Lib/TLibCommon/TComBitStream.h"
14#include "../../Lib/TLibCommon/TComDepthMapGenerator.h"
15#include "TAppEncCfg.h"
16//GT VSO
17#include "../../Lib/TLibRenderer/TRenTop.h"
18//GT VSO end
19
20// ====================================================================================================================
21// Class definition
22// ====================================================================================================================
23
24/// encoder application class
25class TAppEncTop : public TAppEncCfg
26{
27private:
28  // class interface
29
30  std::vector<TEncTop*>                          m_acTEncTopList ;
31  std::vector<TEncTop*>        m_acTEncDepthTopList ;
32  std::vector<TVideoIOYuv*>              m_acTVideoIOYuvInputFileList;
33  std::vector<TVideoIOYuv*>    m_acTVideoIOYuvDepthInputFileList;
34  std::vector<TVideoIOYuv*>              m_acTVideoIOYuvReconFileList;
35  std::vector<TVideoIOYuv*>    m_acTVideoIOYuvDepthReconFileList;
36
37  TVideoIOBitsStartCode      m_cTVideoIOBitsFile;           ///< output bitstream file
38 
39  std::vector< TComList<TComPicYuv*>* >  m_cListPicYuvRecList;              ///< list of reconstruction YUV files
40  std::vector< TComList<TComPicYuv*>* >  m_cListPicYuvDepthRecList;         ///< list of reconstruction YUV files
41  std::vector<PicOrderCnt> m_aiNextPocToDump;
42  std::vector<PicOrderCnt> m_aiNextDepthPocToDump;
43  std::vector< std::map<PicOrderCnt, TComPicYuv*> > m_cListPicYuvRecMap;
44  std::vector< std::map<PicOrderCnt, TComPicYuv*> > m_cListPicYuvDepthRecMap;
45
46  TComList<TComBitstream*>   m_cListBitstream;              ///< list of bitstreams
47 
48  std::vector<Int>              m_iFrameRcvdVector;                  ///< number of received frames
49  std::vector<Int>            m_iDepthFrameRcvdVector;             ///< number of received frames
50
51  TComSPSAccess               m_cSPSAccess;
52  TComAUPicAccess             m_cAUPicAccess;
53 
54  TRenTop                     m_cRendererTop; 
55#if GERHARD_RM_DEBUG_MM
56  TRenModel                   m_cMMCheckModel; 
57#endif
58  TRenModel                   m_cRendererModel;   
59
60protected:
61  // initialization
62  Void  xCreateLib        ();                               ///< create files & encoder class
63  Void  xInitLibCfg       ();                               ///< initialize internal variables
64  Void  xInitLib          ();                               ///< initialize encoder class
65  Void  xDestroyLib       ();                               ///< destroy encoder class
66 
67  /// obtain required buffers
68  Void  xGetBuffer        ( TComPicYuv*& rpcPicYuvRec,                  //GT: unused?
69                           TComBitstream*& rpcBitStream );
70 
71  Void  xGetBuffer        ( TComPicYuv*& rpcPicYuvRec, Int iViewIdx, std::vector< TComList<TComPicYuv*>*>& racBuffer  );
72
73  /// delete allocated buffers
74  Void  xDeleteBuffer     ();
75 
76  // file I/O
77  Void  xWriteOutput      ( Int iViewIdx, Bool isDepth = false );              ///< write bitstream to file
78
79
80  // util 
81  TComPic*    xGetPicFromView   ( Int iViewIdx, Int iPoc, Bool bDepth );
82  TComPicYuv* xGetPicYuvFromView( Int iViewIdx, Int iPoc, Bool bDepth, Bool bRecon );
83
84
85  // Ref Data
86  Void  xSetBaseLUT   ( Int iViewIdxSource, Int iViewIdxTarget, TComMVDRefData* pcRefInfo, InterViewReference eView );
87  Void  xSetBasePicYuv( Int iViewIdx, Int iPoc, TComMVDRefData* pcRefInfo, InterViewReference eView, bool bDepth ); ///< store pics from buffers in pcRefInfo
88
89 
90public:
91  TAppEncTop();
92  virtual ~TAppEncTop();
93 
94  Void        encode      ();                               ///< main encoding function
95  Void                  setupRenModel    ( Int iPoc, Int iEncViewIdx, Int iEncContent );
96  Void                  setMVDPic        ( Int iViewIdx, Int iPoc, TComMVDRefData* pcReferenceInfo ); // set MultiView References
97  Void                  getUsedPelsMap   ( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedPelsMap );
98  std::vector<TComPic*> getSpatialRefPics( Int iViewIdx, Int iPoc, Bool bIsDepthCoder );              // only for mvc functionality yet
99  TComPic*              getPicFromView   ( Int iViewIdx, Int iPoc, Bool bDepth ) { return xGetPicFromView( iViewIdx, iPoc, bDepth ); }
100
101#if GERHARD_RM_DEBUG_MM
102  TRenModel* getMMCheckModel() { return  &m_cMMCheckModel  ; };   
103#endif
104  TRenModel* getRenModel    () { return  &m_cRendererModel ; }; 
105
106  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
107  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
108
109//GT VSO
110private:
111  std::vector<TVideoIOYuv*>                            m_acTVideoIOYuvERFileList;
112  std::map< Int, std::vector< TComPicYuv*> > m_cMapPicExtRefView;             /// Buffer for external Reference files
113
114  Int                                        m_iLastFramePutInERViewBuffer;   ///< Poc of last frame put to ERView Buffer
115  Void  xSetERPicYuvs(  Int iViewIdx, Int iPoc, TComMVDRefData* pcReferenceInfo );    ///< store pic from buffer in pcReferenceInfo   
116  Void  xStoreVSORefPicsInBuffer();                                                   ///< read in External Ref pic from file and store in buffer
117//GT VSO end
118
119 
120};// END CLASS DEFINITION TAppEncTop
121
122#endif // __TAPPENCTOP__
123
Note: See TracBrowser for help on using the repository browser.