| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | #ifndef __TRENMODSETUPSTRPARSER__ |
|---|
| 5 | #define __TRENMODSETUPSTRPARSER__ |
|---|
| 6 | |
|---|
| 7 | #include "../TLibCommon/CommonDef.h" |
|---|
| 8 | #include "../TLibCommon/TComPicYuv.h" |
|---|
| 9 | #include "../TLibCommon/TypeDef.h" |
|---|
| 10 | #include "../../App/TAppCommon/TAppComCamPara.h" |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | #include <list> |
|---|
| 14 | #include <vector> |
|---|
| 15 | #include <math.h> |
|---|
| 16 | #include <errno.h> |
|---|
| 17 | #include <vector> |
|---|
| 18 | #include <iostream> |
|---|
| 19 | #include <algorithm> |
|---|
| 20 | #include <functional> |
|---|
| 21 | #include <string> |
|---|
| 22 | #include <cstdio> |
|---|
| 23 | #include <cstring> |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | using namespace std; |
|---|
| 27 | |
|---|
| 28 | class TRenModSetupStrParser |
|---|
| 29 | { |
|---|
| 30 | public: |
|---|
| 31 | |
|---|
| 32 | Int getNumOfModels (); |
|---|
| 33 | Int getNumOfBaseViews (); |
|---|
| 34 | |
|---|
| 35 | Int getNumOfModelsForView ( Int iViewIdx, Int iContent ); |
|---|
| 36 | Int getNumOfBaseViewsForView( Int iViewIdx, Int iContent ); |
|---|
| 37 | |
|---|
| 38 | Void getSingleModelData ( Int iSrcViewIdx, |
|---|
| 39 | Int iSrcCnt, |
|---|
| 40 | Int iCurModel, |
|---|
| 41 | Int& riModelNum, |
|---|
| 42 | Int& riInterpolationType, |
|---|
| 43 | Int& riLeftBaseViewIdx, |
|---|
| 44 | Int& riRightBaseViewIdx, |
|---|
| 45 | Int& riOrgRefBaseViewIdx, |
|---|
| 46 | Int& riSynthViewRelNum |
|---|
| 47 | ); |
|---|
| 48 | |
|---|
| 49 | Void getBaseViewData ( Int iSourceViewIdx, |
|---|
| 50 | Int iSourceContent, |
|---|
| 51 | Int iCurView, |
|---|
| 52 | Int& riBaseViewSIdx, |
|---|
| 53 | Int& riVideoDistMode, |
|---|
| 54 | Int& riDepthDistMode |
|---|
| 55 | ); |
|---|
| 56 | |
|---|
| 57 | std::vector<Int>* getSynthViews() { return &m_aiAllSynthViewNums; } |
|---|
| 58 | std::vector<Int>* getBaseViews() { return &m_aiAllBaseViewIdx; } |
|---|
| 59 | |
|---|
| 60 | TRenModSetupStrParser(); |
|---|
| 61 | |
|---|
| 62 | Void setString( Int iNumOfBaseViews, Char* pchSetStr ); |
|---|
| 63 | |
|---|
| 64 | private: |
|---|
| 65 | std::vector< std::vector<Int > > m_aaaiBaseViewsIdx [2]; |
|---|
| 66 | std::vector< std::vector<Int > > m_aaaiVideoDistMode [2]; |
|---|
| 67 | std::vector< std::vector<Int > > m_aaaiDepthDistMode [2]; |
|---|
| 68 | std::vector< std::vector<Int > > m_aaaiModelNums [2]; |
|---|
| 69 | std::vector< std::vector<Int > > m_aaaiSynthViewNums [2]; |
|---|
| 70 | std::vector< std::vector<Bool> > m_aaabOrgRef [2]; |
|---|
| 71 | std::vector< std::vector<Bool> > m_aaabExtrapolate [2]; |
|---|
| 72 | std::vector< std::vector<Int > > m_aaaiBlendMode [2]; |
|---|
| 73 | |
|---|
| 74 | std::vector<Int> m_aiAllBaseViewIdx; |
|---|
| 75 | std::vector<Int> m_aiAllSynthViewNums; |
|---|
| 76 | |
|---|
| 77 | Bool m_bCurrentViewSet; |
|---|
| 78 | Int m_iCurrentView; |
|---|
| 79 | Int m_iCurrentContent; |
|---|
| 80 | Int m_iNumberOfModels; |
|---|
| 81 | |
|---|
| 82 | Char* m_pchSetStr; |
|---|
| 83 | size_t m_iPosInStr; |
|---|
| 84 | |
|---|
| 85 | private: |
|---|
| 86 | Void xParseString(); |
|---|
| 87 | Void xParseSourceView(); |
|---|
| 88 | Void xReadViews ( Char cType ); |
|---|
| 89 | Void xReadViewInfo ( Char cType ); |
|---|
| 90 | Void xAddBaseView ( Int iViewIdx, Char cVideoType, Char cDepthType ); |
|---|
| 91 | Void xAddSynthView ( Int iViewNum, Char cType, Char cRefType ); |
|---|
| 92 | Void xError ( Bool bIsError ); |
|---|
| 93 | Void xGetViewNumberRange( std::vector<Int>& raiViewNumbers ); |
|---|
| 94 | Void xGetNextCharGoOn ( Char& rcNextChar ); |
|---|
| 95 | Void xGetNextChar ( Char& rcNextChar ); |
|---|
| 96 | }; |
|---|
| 97 | #endif //__TRENMODEL__ |
|---|