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 | Void xPrintParameter(); |
---|
72 | Bool xCheckParameter(); |
---|
73 | |
---|
74 | Void setAppEncCfg(TAppEncCfg* p) {m_cAppEncCfg = p; } |
---|
75 | |
---|
76 | string getInputFile() {return m_cInputFile; } |
---|
77 | string getReconFile() {return m_cReconFile; } |
---|
78 | Int getFrameRate() {return m_iFrameRate; } |
---|
79 | Int getSourceWidth() {return m_iSourceWidth; } |
---|
80 | Int getSourceHeight() {return m_iSourceHeight; } |
---|
81 | Int getConformanceMode() { return m_conformanceMode; } |
---|
82 | Int* getPad() {return m_aiPad; } |
---|
83 | Double getFloatQP() {return m_fQP; } |
---|
84 | Int getConfLeft() {return m_confLeft; } |
---|
85 | Int getConfRight() {return m_confRight; } |
---|
86 | Int getConfTop() {return m_confTop; } |
---|
87 | Int getConfBottom() {return m_confBottom; } |
---|
88 | |
---|
89 | Int getIntQP() {return m_iQP; } |
---|
90 | Int* getdQPs() {return m_aidQP; } |
---|
91 | #if VPS_EXTN_DIRECT_REF_LAYERS |
---|
92 | Int getNumDirectRefLayers() {return m_numDirectRefLayers;} |
---|
93 | Int* getRefLayerIds() {return m_refLayerIds; } |
---|
94 | Int getRefLayerId(Int i) {return m_refLayerIds[i]; } |
---|
95 | #endif |
---|
96 | }; // END CLASS DEFINITION TAppEncLayerCfg |
---|
97 | |
---|
98 | //! \} |
---|
99 | |
---|
100 | #endif // __TAPPENCLAYERCFG__ |
---|