Skip to content
Snippets Groups Projects
EncAppCfg.h 60.8 KiB
Newer Older
  • Learn to ignore specific revisions
  •   int         m_verbosity;
    
      std::string m_decodeBitstreams[2];                          ///< filename for decode bitstreams.
    
    Tobias Hinz's avatar
    Tobias Hinz committed
      int         m_debugCTU;
    
      int         m_switchPOC;                                    ///< dbg poc.
      int         m_switchDQP;                                    ///< switch DQP.
      int         m_fastForwardToPOC;                             ///< get to encoding the specified POC as soon as possible by skipping temporal layers irrelevant for the specified POC
      bool        m_stopAfterFFtoPOC;
      bool        m_bs2ModPOCAndType;
      bool        m_forceDecodeBitstream1;
    
    
      int         m_maxNumAlfAps{ ALF_CTB_MAX_NUM_APS };
    
      int         m_constantJointCbCrSignFlag;
      bool        m_alf;                                       ///< Adaptive Loop Filter
    
      bool        m_alfAllowPredefinedFilters;
      double      m_ccalfStrength;
    
      double      m_alfStrengthChroma;
      double      m_alfStrengthTargetLuma;
      double      m_alfStrengthTargetChroma;
      double      m_ccalfStrengthTarget;
    
      bool        m_ccalf;
      int         m_ccalfQpThreshold;
    
      double      m_scalingRatioHor;
      double      m_scalingRatioVer;
    
      bool        m_gopBasedRPREnabledFlag;
      int         m_gopBasedRPRQPThreshold;
      double      m_scalingRatioHor2;
      double      m_scalingRatioVer2;
      double      m_scalingRatioHor3;
      double      m_scalingRatioVer3;
      double      m_psnrThresholdRPR;
      double      m_psnrThresholdRPR2;
      double      m_psnrThresholdRPR3;
      int         m_qpOffsetRPR;
      int         m_qpOffsetRPR2;
      int         m_qpOffsetRPR3;
      int         m_qpOffsetChromaRPR;
      int         m_qpOffsetChromaRPR2;
      int         m_qpOffsetChromaRPR3;
    
      int         m_rprSwitchingResolutionOrderList[MAX_RPR_SWITCHING_ORDER_LIST_SIZE];
      int         m_rprSwitchingQPOffsetOrderList[MAX_RPR_SWITCHING_ORDER_LIST_SIZE];
      int         m_rprSwitchingListSize;
    
      bool        m_rprFunctionalityTestingEnabledFlag;
      bool        m_rprPopulatePPSatIntraFlag;
      int         m_rprSwitchingSegmentSize;
      double      m_rprSwitchingTime;
    
      bool        m_resChangeInClvsEnabled;
    
      double      m_fractionOfFrames;                             ///< encode a fraction of the frames as specified in FramesToBeEncoded
    
    Vadim Seregin's avatar
    Vadim Seregin committed
      int         m_upscaledOutput;                               ////< Output upscaled (2), decoded cropped but in full resolution buffer (1) or decoded cropped (0, default) picture for RPR.
    
      int         m_upscaledOutputWidth;
      int         m_upscaledOutputHeight;
    
    Kenneth Andersson's avatar
    Kenneth Andersson committed
      int         m_upscaleFilterForDisplay;
    
      bool        m_craAPSreset;
      bool        m_rprRASLtoolSwitch;
    
      bool        m_avoidIntraInDepLayer;
    
      bool                  m_gopBasedTemporalFilterEnabled;
    
      int                   m_gopBasedTemporalFilterPastRefs;
      int                   m_gopBasedTemporalFilterFutureRefs;
    
      std::map<int, double> m_gopBasedTemporalFilterStrengths;             ///< Filter strength per frame for the GOP-based Temporal Filter
    
      bool                  m_bimEnabled;
    
    Junjie Chen's avatar
    Junjie Chen committed
    #if JVET_AH0078_DPF
      bool                  m_dpfEnabled;
      int                   m_dpfKeyLen;
      int                   m_dpfNonkeyLen;
    #endif
    
    Vadim Seregin's avatar
    Vadim Seregin committed
      int         m_maxLayers;
    
      bool        m_OPIEnabled;                                     ///< enable Operating Point Information (OPI)
    
      int         m_maxTemporalLayer;
    
      int         m_layerId[MAX_VPS_LAYERS];
      int         m_maxSublayers;
    
      bool        m_defaultPtlDpbHrdMaxTidFlag;
    
      bool        m_allIndependentLayersFlag;
    
      std::string m_predDirectionArray;
    
      int         m_numRefLayers[MAX_VPS_LAYERS];
      std::string m_refLayerIdxStr[MAX_VPS_LAYERS];
      bool        m_eachLayerIsAnOlsFlag;
      int         m_olsModeIdc;
      int         m_numOutputLayerSets;
      std::string m_olsOutputLayerStr[MAX_VPS_LAYERS];
    
      std::string m_maxTidILRefPicsPlus1Str[MAX_VPS_LAYERS];
    
    Vadim Seregin's avatar
    Vadim Seregin committed
    
    
      int         m_numPtlsInVps;
    
      int         m_ptPresentInPtl[MAX_NUM_OLSS];
    
      EncCfgParam::CfgVPSParameters m_cfgVPSParameters;
    
      Level::Name m_levelPtl[MAX_NUM_OLSS];
    
      int         m_olsPtlIdx[MAX_NUM_OLSS];
    
    #if EXTENSION_360_VIDEO
      TExt360AppEncCfg m_ext360;
      friend class TExt360AppEncCfg;
      friend class TExt360AppEncTop;
    #endif
    
    
    #if JVET_O0756_CONFIG_HDRMETRICS || JVET_O0756_CALCULATE_HDRMETRICS
    
    #if JVET_O0756_CALCULATE_HDRMETRICS
      double      m_whitePointDeltaE[hdrtoolslib::NB_REF_WHITE];
    
    #else
      double      m_whitePointDeltaE[3];
    #endif
    
      double      m_maxSampleValue;
      int         m_sampleRange;
      int         m_colorPrimaries;
      bool        m_enableTFunctionLUT;
      int         m_chromaLocation;
      int         m_chromaUPFilter;
      int         m_cropOffsetLeft;
      int         m_cropOffsetTop;
      int         m_cropOffsetRight;
      int         m_cropOffsetBottom;
      bool        m_calculateHdrMetrics;
    #endif
    
    
      // internal member functions
      bool  xCheckParameter ();                                   ///< check validity of configuration values
      void  xPrintParameter ();                                   ///< print configuration values
      void  xPrintUsage     ();                                   ///< print usage
    
      bool  xHasNonZeroTemporalID();                             ///< check presence of constant temporal ID in GOP structure
      bool  xHasLeadingPicture();                                 ///< check presence of leading pictures in GOP structure
    
      int   xAutoDetermineProfile();                              ///< auto determine the profile to use given the other configuration settings. Returns 1 if erred. Can select profile 'NONE'
    
    public:
      EncAppCfg();
      virtual ~EncAppCfg();
    
    public:
      void  create    ();                                         ///< create option handling class
      void  destroy   ();                                         ///< destroy option handling class
      bool  parseCfg  ( int argc, char* argv[] );                ///< parse configuration file to fill member variables