source: 3DVCSoftware/trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.h

Last change on this file was 1405, checked in by tech, 9 years ago

Merged HTM-16.1-dev@1404.

  • Property svn:eol-style set to native
File size: 5.0 KB
RevLine 
[5]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 *
[1405]6 * Copyright (c) 2010-2016, ITU/ISO/IEC
[5]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 */
[608]33
[2]34#ifndef __TRENMODSETUPSTRPARSER__
35#define __TRENMODSETUPSTRPARSER__
36
37#include "../TLibCommon/CommonDef.h"
38#include "../TLibCommon/TComPicYuv.h"
39#include "../TLibCommon/TypeDef.h"
[56]40#include "../TAppCommon/TAppComCamPara.h"
[1386]41#if NH_3D_VSO
[2]42
43
[608]44
[2]45#include <list>
46#include <vector>
47#include <math.h>
48#include <errno.h>
49#include <vector>
50#include <iostream>
51#include <algorithm>
52#include <functional>
53#include <string>
54#include <cstdio>
55#include <cstring>
56
57
58using namespace std;
59
60class TRenModSetupStrParser
61{
62public:
63
64  Int  getNumOfModels          ();
65  Int  getNumOfBaseViews       ();
66
67  Int  getNumOfModelsForView   ( Int iViewIdx, Int iContent );
68  Int  getNumOfBaseViewsForView( Int iViewIdx, Int iContent );
69
70  Void getSingleModelData      ( Int  iSrcViewIdx,
71                                 Int  iSrcCnt,
72                                 Int  iCurModel,
73                                 Int& riModelNum,
74                                 Int& riInterpolationType,
75                                 Int& riLeftBaseViewIdx,
76                                 Int& riRightBaseViewIdx,
77                                 Int& riOrgRefBaseViewIdx,
78                                 Int& riSynthViewRelNum
79                               );
80
81  Void getBaseViewData         ( Int   iSourceViewIdx,
82                                 Int   iSourceContent,
83                                 Int   iCurView,
84                                 Int&  riBaseViewSIdx,
85                                 Int&  riVideoDistMode,
86                                 Int&  riDepthDistMode
87                                );
88
[1356]89  IntAry1d*  getSynthViews() { return &m_aiAllSynthViewNums;  }
90  IntAry1d*  getBaseViews()  { return &m_aiAllBaseViewIdx;    }
[2]91
92  TRenModSetupStrParser();
93
[1386]94  Void setString( Int iNumOfBaseViews, TChar* pchSetStr );
[2]95
96private:
[1356]97  IntAry2d                         m_aaaiBaseViewsIdx  [2];
98  IntAry2d                         m_aaaiVideoDistMode [2];
99  IntAry2d                         m_aaaiDepthDistMode [2];
100  IntAry2d                         m_aaaiModelNums     [2];
101  IntAry2d                         m_aaaiSynthViewNums [2];
102  BoolAry2d                        m_aaabOrgRef        [2];
103  BoolAry2d                        m_aaabExtrapolate   [2];
104  IntAry2d                         m_aaaiBlendMode     [2];
[2]105
[1356]106  IntAry1d                         m_aiAllBaseViewIdx;
107  IntAry1d                         m_aiAllSynthViewNums;
[2]108
109  Bool                             m_bCurrentViewSet;
110  Int                              m_iCurrentView;
111  Int                              m_iCurrentContent;
112  Int                              m_iNumberOfModels;
113
[1386]114  TChar*                            m_pchSetStr;
[2]115  size_t                           m_iPosInStr;
116
117private:
118  Void xParseString();
119  Void xParseSourceView();
[1386]120  Void xReadViews         ( TChar cType );
121  Void xReadViewInfo      ( TChar cType );
122  Void xAddBaseView       ( Int iViewIdx, TChar cVideoType, TChar cDepthType );
123  Void xAddSynthView      ( Int iViewNum, TChar cType, TChar cRefType );
[2]124  Void xError             ( Bool bIsError );
125  Void xGetViewNumberRange( std::vector<Int>& raiViewNumbers );
[1386]126  Void xGetNextCharGoOn   ( TChar& rcNextChar );
127  Void xGetNextChar       ( TChar& rcNextChar );
[2]128};
[5]129
[1313]130#endif // NH_3D
[2]131#endif //__TRENMODEL__
[210]132
[608]133
Note: See TracBrowser for help on using the repository browser.