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

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

Poznan disocclusion coding - CU Skip

  • Property svn:eol-style set to native
File size: 5.0 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_SYNTH
55#include "../../Lib/TLibRenderer/TRenTop.h"
56#endif
57#include "TAppDecCfg.h"
58
59// ====================================================================================================================
60// Class definition
61// ====================================================================================================================
62
63/// decoder application class
64class TAppDecTop : public TAppDecCfg
65{
66private:
67  // class interface
68  std::vector<TDecTop*>           m_acTDecTopList;
69  std::vector<TDecTop*>           m_acTDecDepthTopList;
70  TComBitstream*                  m_apcBitstream;                 ///< bitstream class
71  TVideoIOBitsStartCode           m_cTVideoIOBitstreamFile;       ///< file I/O class
72  std::vector<TVideoIOYuv*>       m_acTVideoIOYuvReconFileList;
73  std::vector<TVideoIOYuv*>       m_acTVideoIOYuvDepthReconFileList;
74
75  Bool m_bUsingDepth;
76
77  // for output control
78  Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
79//  Int                             m_iPOCLastDisplay;              ///< last POC in display order
80
81  std::vector<Bool>               m_abDecFlagList;         ///< decoded flag in one GOP
82  std::vector<Int>                m_aiPOCLastDisplayList;
83  std::vector<Int>                m_aiDepthPOCLastDisplayList;
84
85  FILE*                           m_pScaleOffsetFile;
86  CamParsCollector                m_cCamParsCollector;
87#if DEPTH_MAP_GENERATION
88  TComSPSAccess                   m_cSPSAccess;
89  TComAUPicAccess                 m_cAUPicAccess;
90#endif
91
92#if POZNAN_SYNTH
93  TRenTop                         m_cAvailabilityRenderer;
94#endif
95
96
97public:
98  TAppDecTop();
99  virtual ~TAppDecTop() {}
100
101  Void  create            (); ///< create internal members
102  Void  destroy           (); ///< destroy internal members
103  Void  decode            (); ///< main decoding function
104  Void  increaseNumberOfViews   (Int iNewNumberOfViews);
105  Void  startUsingDepth() ;
106
107#if POZNAN_SYNTH
108  Void  initRenderer(TComSPS &cComSPS);
109  Void  storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx,Int iCurPoc,Bool bDepth);
110#endif
111
112// GT FIX
113  std::vector<TComPic*> getSpatialRefPics( Int iViewIdx, Int iPoc, Bool bIsDepth );
114  TComPic* getPicFromView( Int iViewIdx, Int iPoc, bool bDepth );
115// GT FIX END
116
117#if DEPTH_MAP_GENERATION
118  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
119  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
120#endif
121
122protected:
123  Void  xCreateDecLib     (); ///< create internal classes
124  Void  xDestroyDecLib    (); ///< destroy internal classes
125  Void  xInitDecLib       (); ///< initialize decoder class
126
127  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic ); ///< write YUV to file
128};
129
130#endif
131
Note: See TracBrowser for help on using the repository browser.