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_croppingMode; |
---|
37 | Int m_cropLeft; |
---|
38 | Int m_cropRight; |
---|
39 | Int m_cropTop; |
---|
40 | Int m_cropBottom; |
---|
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 | |
---|
45 | #if SVC_EXTENSION |
---|
46 | Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). |
---|
47 | #endif |
---|
48 | |
---|
49 | Int m_iQP; ///< QP value of key-picture (integer) |
---|
50 | char* m_pchdQPFile; ///< QP offset for each slice (initialized from external file) |
---|
51 | Int* m_aidQP; ///< array of slice QP values |
---|
52 | TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config |
---|
53 | public: |
---|
54 | TAppEncLayerCfg(); |
---|
55 | virtual ~TAppEncLayerCfg(); |
---|
56 | |
---|
57 | public: |
---|
58 | Void create (); ///< create option handling class |
---|
59 | Void destroy (); ///< destroy option handling class |
---|
60 | bool parseCfg ( const string& cfgFileName ); ///< parse layer configuration file to fill member variables |
---|
61 | |
---|
62 | Void xPrintParameter(); |
---|
63 | Bool xCheckParameter(); |
---|
64 | |
---|
65 | Void setAppEncCfg(TAppEncCfg* p) {m_cAppEncCfg = p; } |
---|
66 | string getInputFile() {return m_cInputFile; } |
---|
67 | string getReconFile() {return m_cReconFile; } |
---|
68 | Int getFrameRate() {return m_iFrameRate; } |
---|
69 | Int getSourceWidth() {return m_iSourceWidth; } |
---|
70 | Int getSourceHeight() {return m_iSourceHeight; } |
---|
71 | Int getCroppingMode() {return m_croppingMode; } |
---|
72 | Int getCropLeft() {return m_cropLeft; } |
---|
73 | Int getCropRight() {return m_cropRight; } |
---|
74 | Int getCropTop() {return m_cropTop; } |
---|
75 | Int getCropBottom() {return m_cropBottom; } |
---|
76 | Int* getPad() {return m_aiPad; } |
---|
77 | Double getFloatQP() {return m_fQP; } |
---|
78 | |
---|
79 | Int getIntQP() {return m_iQP; } |
---|
80 | Int* getdQPs() {return m_aidQP; } |
---|
81 | |
---|
82 | }; // END CLASS DEFINITION TAppEncLayerCfg |
---|
83 | |
---|
84 | //! \} |
---|
85 | |
---|
86 | #endif // __TAPPENCLAYERCFG__ |
---|