source: SHVCSoftware/branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.h @ 288

Last change on this file since 288 was 288, checked in by qualcomm, 12 years ago

Changes made to signaling of scaled reference layer offsets.

Patch incorporating changes made to signaling of scaled reference layer offsets during SHVC editing. The number of sets of scaled reference layer offsets is signaled. Changes to configuration files also included.

From: Adarsh K. Ramasubramonian <aramasub@…>

File size: 6.0 KB
Line 
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
12using namespace std;
13#if SVC_EXTENSION
14class TAppEncCfg;
15#endif
16//! \ingroup TAppEncoder
17//! \{
18
19// ====================================================================================================================
20// Class definition
21// ====================================================================================================================
22
23/// encoder layer configuration class
24class TAppEncLayerCfg
25{
26  friend class TAppEncCfg;
27  friend class TAppEncTop;
28protected:
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  Int       *m_predLayerIds;
48  Int       m_numActiveRefLayers;
49#endif
50
51#if RC_SHVC_HARMONIZATION
52  Bool      m_RCEnableRateControl;                ///< enable rate control or not
53  Int       m_RCTargetBitrate;                    ///< target bitrate when rate control is enabled
54  Bool      m_RCKeepHierarchicalBit;              ///< whether keeping hierarchical bit allocation structure or not
55  Bool      m_RCLCULevelRC;                       ///< true: LCU level rate control; false: picture level rate control
56  Bool      m_RCUseLCUSeparateModel;              ///< use separate R-lambda model at LCU level
57  Int       m_RCInitialQP;                        ///< inital QP for rate control
58  Bool      m_RCForceIntraQP;                     ///< force all intra picture to use initial QP or not
59#endif
60
61#if SVC_EXTENSION
62  Int       m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles).
63#endif
64
65  Int       m_iQP;                                            ///< QP value of key-picture (integer)
66  char*     m_pchdQPFile;                                     ///< QP offset for each slice (initialized from external file)
67  Int*      m_aidQP;                                          ///< array of slice QP values
68  TAppEncCfg* m_cAppEncCfg;                                   ///< pointer to app encoder config
69#if SCALED_REF_LAYER_OFFSETS
70  Int       m_numScaledRefLayerOffsets  ;
71  Int       m_scaledRefLayerLeftOffset  [MAX_LAYERS];
72  Int       m_scaledRefLayerTopOffset   [MAX_LAYERS];
73  Int       m_scaledRefLayerRightOffset [MAX_LAYERS];
74  Int       m_scaledRefLayerBottomOffset[MAX_LAYERS];
75#endif 
76public:
77  TAppEncLayerCfg();
78  virtual ~TAppEncLayerCfg();
79
80public:
81  Void  create    ();                                         ///< create option handling class
82  Void  destroy   ();                                         ///< destroy option handling class
83  bool  parseCfg  ( const string& cfgFileName );              ///< parse layer configuration file to fill member variables
84
85#if AVC_SYNTAX
86  Void  xPrintParameter( UInt layerId );
87#else
88  Void  xPrintParameter();
89#endif
90  Bool  xCheckParameter();
91
92  Void    setAppEncCfg(TAppEncCfg* p) {m_cAppEncCfg = p;          }
93
94  string  getInputFile()              {return m_cInputFile;       }
95  string  getReconFile()              {return m_cReconFile;       }
96  Int     getFrameRate()              {return m_iFrameRate;       }
97  Int     getSourceWidth()            {return m_iSourceWidth;     }
98  Int     getSourceHeight()           {return m_iSourceHeight;    }
99  Int     getConformanceMode()        { return m_conformanceMode; }
100  Int*    getPad()                    {return m_aiPad;            }
101  Double  getFloatQP()                {return m_fQP;              }
102  Int     getConfLeft()               {return m_confLeft;         }
103  Int     getConfRight()              {return m_confRight;        }
104  Int     getConfTop()                {return m_confTop;          }
105  Int     getConfBottom()             {return m_confBottom;       }
106
107  Int     getIntQP()                  {return m_iQP;              } 
108  Int*    getdQPs()                   {return m_aidQP;            }
109#if VPS_EXTN_DIRECT_REF_LAYERS
110  Int     getNumDirectRefLayers()     {return m_numDirectRefLayers;}
111  Int*    getRefLayerIds()            {return m_refLayerIds;      }
112  Int     getRefLayerId(Int i)        {return m_refLayerIds[i];   }
113
114  Int     getNumActiveRefLayers()     {return m_numActiveRefLayers;}
115  Int*    getPredLayerIds()           {return m_predLayerIds;     }
116  Int     getPredLayerId(Int i)       {return m_predLayerIds[i];  }
117#endif
118#if RC_SHVC_HARMONIZATION
119  Bool    getRCEnableRateControl()    {return m_RCEnableRateControl;   }
120  Int     getRCTargetBitrate()        {return m_RCTargetBitrate;       }
121  Bool    getRCKeepHierarchicalBit()  {return m_RCKeepHierarchicalBit; }
122  Bool    getRCLCULevelRC()           {return m_RCLCULevelRC;          }
123  Bool    getRCUseLCUSeparateModel()  {return m_RCUseLCUSeparateModel; }
124  Int     getRCInitialQP()            {return m_RCInitialQP;           }
125  Bool    getRCForceIntraQP()         {return m_RCForceIntraQP;        }
126#endif
127}; // END CLASS DEFINITION TAppEncLayerCfg
128
129//! \}
130
131#endif // __TAPPENCLAYERCFG__
Note: See TracBrowser for help on using the repository browser.