1 | |
---|
2 | /** \file TAppEncLayerCfg.h |
---|
3 | \brief Handle encoder layer configuration parameters (header) |
---|
4 | */ |
---|
5 | #ifndef __TAPPENCLAYERCFG__ |
---|
6 | #define __TAPPENCLAYERCFG__ |
---|
7 | |
---|
8 | #include "TLibCommon/CommonDef.h" |
---|
9 | #include "TLibEncoder/TEncCfg.h" |
---|
10 | #include <sstream> |
---|
11 | |
---|
12 | using namespace std; |
---|
13 | #if SVC_EXTENSION |
---|
14 | class TAppEncCfg; |
---|
15 | #endif |
---|
16 | //! \ingroup TAppEncoder |
---|
17 | //! \{ |
---|
18 | |
---|
19 | // ==================================================================================================================== |
---|
20 | // Class definition |
---|
21 | // ==================================================================================================================== |
---|
22 | |
---|
23 | /// encoder layer configuration class |
---|
24 | class TAppEncLayerCfg |
---|
25 | { |
---|
26 | friend class TAppEncCfg; |
---|
27 | friend class TAppEncTop; |
---|
28 | protected: |
---|
29 | // file I/O0 |
---|
30 | string m_cInputFile; ///< source file name |
---|
31 | string m_cReconFile; ///< output reconstruction file |
---|
32 | |
---|
33 | Int m_iFrameRate; ///< source frame-rates (Hz) |
---|
34 | Int m_iSourceWidth; ///< source width in pixel |
---|
35 | Int m_iSourceHeight; ///< source height in pixel |
---|
36 | Int m_conformanceMode; |
---|
37 | Int m_confLeft; |
---|
38 | Int m_confRight; |
---|
39 | Int m_confTop; |
---|
40 | Int m_confBottom; |
---|
41 | Int m_aiPad[2]; ///< number of padded pixels for width and height |
---|
42 | Int m_iIntraPeriod; ///< period of I-slice (random access period) |
---|
43 | Double m_fQP; ///< QP value of key-picture (floating point) |
---|
44 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
45 | Int *m_refLayerIds; |
---|
46 | Int m_numDirectRefLayers; |
---|
47 | #endif |
---|
48 | #if SVC_EXTENSION |
---|
49 | Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). |
---|
50 | #endif |
---|
51 | |
---|
52 | Int m_iQP; ///< QP value of key-picture (integer) |
---|
53 | char* m_pchdQPFile; ///< QP offset for each slice (initialized from external file) |
---|
54 | Int* m_aidQP; ///< array of slice QP values |
---|
55 | TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config |
---|
56 | #if SCALED_REF_LAYER_OFFSETS |
---|
57 | Int m_scaledRefLayerLeftOffset; |
---|
58 | Int m_scaledRefLayerTopOffset; |
---|
59 | Int m_scaledRefLayerRightOffset; |
---|
60 | Int m_scaledRefLayerBottomOffset; |
---|
61 | #endif |
---|
62 | public: |
---|
63 | TAppEncLayerCfg(); |
---|
64 | virtual ~TAppEncLayerCfg(); |
---|
65 | |
---|
66 | public: |
---|
67 | Void create (); ///< create option handling class |
---|
68 | Void destroy (); ///< destroy option handling class |
---|
69 | bool parseCfg ( const string& cfgFileName ); ///< parse layer configuration file to fill member variables |
---|
70 | |
---|
71 | #if AVC_SYNTAX |
---|
72 | Void xPrintParameter( UInt layerId ); |
---|
73 | #else |
---|
74 | Void xPrintParameter(); |
---|
75 | #endif |
---|
76 | Bool xCheckParameter(); |
---|
77 | |
---|
78 | Void setAppEncCfg(TAppEncCfg* p) {m_cAppEncCfg = p; } |
---|
79 | |
---|
80 | string getInputFile() {return m_cInputFile; } |
---|
81 | string getReconFile() {return m_cReconFile; } |
---|
82 | Int getFrameRate() {return m_iFrameRate; } |
---|
83 | Int getSourceWidth() {return m_iSourceWidth; } |
---|
84 | Int getSourceHeight() {return m_iSourceHeight; } |
---|
85 | Int getConformanceMode() { return m_conformanceMode; } |
---|
86 | Int* getPad() {return m_aiPad; } |
---|
87 | Double getFloatQP() {return m_fQP; } |
---|
88 | Int getConfLeft() {return m_confLeft; } |
---|
89 | Int getConfRight() {return m_confRight; } |
---|
90 | Int getConfTop() {return m_confTop; } |
---|
91 | Int getConfBottom() {return m_confBottom; } |
---|
92 | |
---|
93 | Int getIntQP() {return m_iQP; } |
---|
94 | Int* getdQPs() {return m_aidQP; } |
---|
95 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
96 | Int getNumDirectRefLayers() {return m_numDirectRefLayers;} |
---|
97 | Int* getRefLayerIds() {return m_refLayerIds; } |
---|
98 | Int getRefLayerId(Int i) {return m_refLayerIds[i]; } |
---|
99 | #endif |
---|
100 | }; // END CLASS DEFINITION TAppEncLayerCfg |
---|
101 | |
---|
102 | //! \} |
---|
103 | |
---|
104 | #endif // __TAPPENCLAYERCFG__ |
---|