| 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 | public: |
|---|
| 57 | TAppEncLayerCfg(); |
|---|
| 58 | virtual ~TAppEncLayerCfg(); |
|---|
| 59 | |
|---|
| 60 | public: |
|---|
| 61 | Void create (); ///< create option handling class |
|---|
| 62 | Void destroy (); ///< destroy option handling class |
|---|
| 63 | bool parseCfg ( const string& cfgFileName ); ///< parse layer configuration file to fill member variables |
|---|
| 64 | |
|---|
| 65 | Void xPrintParameter(); |
|---|
| 66 | Bool xCheckParameter(); |
|---|
| 67 | |
|---|
| 68 | Void setAppEncCfg(TAppEncCfg* p) {m_cAppEncCfg = p; } |
|---|
| 69 | |
|---|
| 70 | string getInputFile() {return m_cInputFile; } |
|---|
| 71 | string getReconFile() {return m_cReconFile; } |
|---|
| 72 | Int getFrameRate() {return m_iFrameRate; } |
|---|
| 73 | Int getSourceWidth() {return m_iSourceWidth; } |
|---|
| 74 | Int getSourceHeight() {return m_iSourceHeight; } |
|---|
| 75 | Int getConformanceMode() { return m_conformanceMode; } |
|---|
| 76 | Int* getPad() {return m_aiPad; } |
|---|
| 77 | Double getFloatQP() {return m_fQP; } |
|---|
| 78 | Int getConfLeft() {return m_confLeft; } |
|---|
| 79 | Int getConfRight() {return m_confRight; } |
|---|
| 80 | Int getConfTop() {return m_confTop; } |
|---|
| 81 | Int getConfBottom() {return m_confBottom; } |
|---|
| 82 | |
|---|
| 83 | Int getIntQP() {return m_iQP; } |
|---|
| 84 | Int* getdQPs() {return m_aidQP; } |
|---|
| 85 | #if VPS_EXTN_DIRECT_REF_LAYERS |
|---|
| 86 | Int getNumDirectRefLayers() {return m_numDirectRefLayers;} |
|---|
| 87 | Int* getRefLayerIds() {return m_refLayerIds; } |
|---|
| 88 | Int getRefLayerId(Int i) {return m_refLayerIds[i]; } |
|---|
| 89 | #endif |
|---|
| 90 | }; // END CLASS DEFINITION TAppEncLayerCfg |
|---|
| 91 | |
|---|
| 92 | //! \} |
|---|
| 93 | |
|---|
| 94 | #endif // __TAPPENCLAYERCFG__ |
|---|