source: 3DVCSoftware/branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.h

Last change on this file was 12, checked in by poznan-univ, 13 years ago

Poznan Tools

  • Depth base motion vector prediction
  • Property svn:eol-style set to native
File size: 5.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/** \file     TAppDecTop.h
37    \brief    Decoder application class (header)
38*/
39
40#ifndef __TAPPDECTOP__
41#define __TAPPDECTOP__
42
43#if _MSC_VER > 1000
44#pragma once
45#endif // _MSC_VER > 1000
46
47#include "../../Lib/TLibVideoIO/TVideoIOYuv.h"
48#include "../../Lib/TLibVideoIO/TVideoIOBits.h"
49#include "../../Lib/TLibCommon/TComList.h"
50#include "../../Lib/TLibCommon/TComPicYuv.h"
51#include "../../Lib/TLibCommon/TComBitStream.h"
52#include "../../Lib/TLibCommon/TComDepthMapGenerator.h"
53#include "../../Lib/TLibDecoder/TDecTop.h"
54#if POZNAN_CU_SKIP || POZNAN_CU_SYNTH
55#include "../../Lib/TLibRenderer/TRenTop.h"
56#endif
57#include "TAppDecCfg.h"
58
59#if POZNAN_MP
60#include "../../Lib/TLibCommon/TComMP.h"
61#endif
62
63// ====================================================================================================================
64// Class definition
65// ====================================================================================================================
66
67/// decoder application class
68class TAppDecTop : public TAppDecCfg
69{
70private:
71  // class interface
72  std::vector<TDecTop*>           m_acTDecTopList;
73  std::vector<TDecTop*>           m_acTDecDepthTopList;
74  TComBitstream*                  m_apcBitstream;                 ///< bitstream class
75  TVideoIOBitsStartCode           m_cTVideoIOBitstreamFile;       ///< file I/O class
76  std::vector<TVideoIOYuv*>       m_acTVideoIOYuvReconFileList;
77  std::vector<TVideoIOYuv*>       m_acTVideoIOYuvDepthReconFileList;
78
79  Bool m_bUsingDepth;
80
81  // for output control
82  Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
83//  Int                             m_iPOCLastDisplay;              ///< last POC in display order
84
85  std::vector<Bool>               m_abDecFlagList;         ///< decoded flag in one GOP
86  std::vector<Int>                m_aiPOCLastDisplayList;
87  std::vector<Int>                m_aiDepthPOCLastDisplayList;
88
89  FILE*                           m_pScaleOffsetFile;
90  CamParsCollector                m_cCamParsCollector;
91#if DEPTH_MAP_GENERATION
92  TComSPSAccess                   m_cSPSAccess;
93  TComAUPicAccess                 m_cAUPicAccess;
94#endif
95
96#if POZNAN_CU_SKIP || POZNAN_CU_SYNTH
97  TRenTop                         m_cAvailabilityRenderer;
98#endif
99
100#if POZNAN_MP
101  TComMP*                                                 m_pcMP;
102#endif
103
104public:
105  TAppDecTop();
106  virtual ~TAppDecTop() {}
107
108  Void  create            (); ///< create internal members
109  Void  destroy           (); ///< destroy internal members
110  Void  decode            (); ///< main decoding function
111  Void  increaseNumberOfViews   (Int iNewNumberOfViews);
112  Void  startUsingDepth() ;
113
114#if POZNAN_CU_SKIP || POZNAN_CU_SYNTH
115  Void  initRenderer(TComSPS &cComSPS);
116  Void  storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx,Int iCurPoc,Bool bDepth);
117#endif
118
119// GT FIX
120  std::vector<TComPic*> getSpatialRefPics( Int iViewIdx, Int iPoc, Bool bIsDepth );
121  TComPic* getPicFromView( Int iViewIdx, Int iPoc, bool bDepth );
122// GT FIX END
123
124#if DEPTH_MAP_GENERATION
125  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
126  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
127#endif
128
129#if POZNAN_MP
130  TComMP* getMP() { return m_pcMP; }
131#endif
132
133protected:
134  Void  xCreateDecLib     (); ///< create internal classes
135  Void  xDestroyDecLib    (); ///< destroy internal classes
136  Void  xInitDecLib       (); ///< initialize decoder class
137
138  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic ); ///< write YUV to file
139};
140
141#endif
142
Note: See TracBrowser for help on using the repository browser.