📄 codingparameter.h
字号:
//~DS_FIX_FT_09_2007
//JVT-T054}
, m_uiExplicitQPCascading ( 0 )
, m_uiIPCMRate ( 0 )
, m_uiBiPred8x8Disable ( 0 )
, m_uiMCBlks8x8Disable ( 0 )
, m_uiBotFieldFirst ( 0 )
, m_uiUseLongTerm ( 0 )
, m_uiPicCodingType ( 0 )
, m_uiNumDependentDId ( 0 )
, m_uiProfileIdc ( 0 )
, m_uiLevelIdc ( 0 )
, m_bIntraOnly ( false )
, m_bConstrainedSetFlag0 ( false )
, m_bConstrainedSetFlag1 ( false )
, m_bConstrainedSetFlag2 ( false )
, m_bConstrainedSetFlag3 ( false )
{
for( UInt ui = 0; ui < MAX_DSTAGES; ui++ ) m_adQpModeDecision[ui] = 0.00;
::memset( m_uiMGSVect, 0x00, 16*sizeof(UInt) );
for( UInt uiTTL = 0; uiTTL < MAX_TEMP_LEVELS; uiTTL++ )
{
m_adDeltaQPTLevel[uiTTL] = 0.0;
}
for( UInt uiSM = 0; uiSM < 8; uiSM++ )
{
::memset( &(m_aaucScalingMatrices[uiSM][0]), 0x00, 64*sizeof(UChar) );
}
}
virtual ~LayerParameters()
{
// JVT-S054 (ADD) ->
if (m_puiGridSliceWidthInMbsMinus1 != NULL)
{
free(m_puiGridSliceWidthInMbsMinus1);
m_puiGridSliceWidthInMbsMinus1 = NULL;
}
if (m_puiGridSliceHeightInMbsMinus1 != NULL)
{
free(m_puiGridSliceHeightInMbsMinus1);
m_puiGridSliceHeightInMbsMinus1 = NULL;
}
if (m_puiFirstMbInSlice != NULL)
{
free(m_puiFirstMbInSlice);
m_puiFirstMbInSlice = NULL;
}
if (m_puiLastMbInSlice != NULL)
{
free(m_puiLastMbInSlice);
m_puiLastMbInSlice = NULL;
}
if (m_puiSliceId != NULL)
{
free(m_puiSliceId);
m_puiSliceId = NULL;
}
// JVT-S054 (ADD) <-
}
ErrVal setAndCheckProfile( CodingParameter* pcCodingParameter );
ErrVal updateWithLevel ( CodingParameter* pcCodingParameter, UInt& ruiLevelIdc );
//===== get =====
UInt getLayerId () const {return m_uiLayerId; }
UInt getDependencyId () const {return m_uiDependencyId; }
Bool isInterlaced () const {return ( m_uiMbAff != 0 || m_uiPAff != 0 ); }
UInt getFrameWidthInSamples () const {return m_uiFrameWidthInSamples; }
UInt getFrameHeightInSamples () const {return m_uiFrameHeightInSamples; }
UInt getFrameWidthInMbs () const {return ( m_uiFrameWidthInSamples + 15 ) >> 4; }
UInt getFrameHeightInMbs () const {return ( isInterlaced() ? ( ( m_uiFrameHeightInSamples + 31 ) >> 5 ) << 1 : ( m_uiFrameHeightInSamples + 15 ) >> 4 ); }
UInt getFrameHeightInMapUnits () const {return ( isInterlaced() ? ( m_uiFrameHeightInSamples + 31 ) >> 5 : ( m_uiFrameHeightInSamples + 15 ) >> 4 ); }
UInt getHorPadding () const {return 16*getFrameWidthInMbs () - getFrameWidthInSamples (); }
UInt getVerPadding () const {return 16*getFrameHeightInMbs() - getFrameHeightInSamples(); }
Double getInputFrameRate () const {return m_dInputFrameRate; }
Double getOutputFrameRate () const {return m_dOutputFrameRate; }
const std::string& getInputFilename () const {return m_cInputFilename; }
const std::string& getOutputFilename () const {return m_cOutputFilename; }
Bool getEntropyCodingModeFlag () const {return m_uiEntropyCodingModeFlag == 1; }
UInt getEnable8x8Trafo () const {return m_uiEnable8x8Trafo; }
UInt getScalingMatricesPresent () const {return m_uiScalingMatricesPresent; }
UInt getMaxAbsDeltaQP () const {return m_uiMaxAbsDeltaQP; }
Double getBaseQpResidual () const {return m_dBaseQpResidual; }
Double getQpModeDecision (UInt ui) const {return m_adQpModeDecision[ui]; }
Double getQpModeDecisionLP () const {return m_dQpModeDecisionLP; }
UInt getInterLayerPredictionMode () const {return m_uiInterLayerPredictionMode; }
UInt getBaseQualityLevel () const {return m_uiBaseQualityLevel; }
UInt getMotionInfoMode () const {return m_uiMotionInfoMode; }
const std::string& getMotionInfoFilename () const {return m_cMotionInfoFilename; }
//JVT-V079 Low-complexity MB mode decision {
UInt getLowComplexMbEnable () const { return m_uiLowComplexMbEnable; }
//JVT-V079 Low-complexity MB mode decision }
UInt getDecompositionStages () const {return m_uiDecompositionStages; }
UInt getNotCodedStages () const {return m_uiNotCodedStages ; }
UInt getTemporalResolution () const {return m_uiTemporalResolution; }
UInt getFrameDelay () const {return m_uiFrameDelay; }
UInt getBaseLayerSpatRes () const {return m_uiBaseLayerSpatRes; }
UInt getBaseLayerTempRes () const {return m_uiBaseLayerTempRes; }
Bool getContrainedIntraForLP () const {return m_bConstrainedIntraPredForLP; }
UInt getForceReorderingCommands () const {return m_uiForceReorderingCommands; }
UInt getBaseLayerId () const {return m_uiBaseLayerId; }
UInt getMbAff () const {return m_uiMbAff;}
UInt getPAff () const {return m_uiPAff;}
Bool getUseRedundantSliceFlag () const {return m_uiUseRedundantSlice == 1; } //JVT-Q054 Red. Picture
Bool getUseRedundantKeySliceFlag () const {return m_uiUseRedundantKeySlice == 1; } //JVT-W049
//--ICU/ETRI FMO Implementation : FMO start
UInt getNumSliceGroupsMinus1() const {return m_uiNumSliceGroupsMinus1;} //for test
UInt getSliceGroupMapType() const {return m_uiSliceGroupMapType; }
Bool getSliceGroupChangeDirection_flag () const {return m_bSliceGroupChangeDirection_flag;}
UInt getSliceGroupChangeRateMinus1 () const {return m_uiSliceGroupChangeRateMinus1;}
UInt getNumSliceGroupMapUnitsMinus1() const {return m_uiNumSliceGroupMapUnitsMinus1;}
UInt getSliceGroupId(Int i) const {return m_uiSliceGroupId[i];}
UInt getSliceMode() const {return m_uiSliceMode;}
UInt getSliceArgument() const { return m_uiSliceArgument ;}
const std::string& getSliceGroupConfigFileName() const{ return m_cSliceGroupConfigFileName;}
UInt getUseRedundantSlice() const { return m_uiUseRedundantSlice;}
UInt* getArrayRunLengthMinus1 () const {return (UInt*)m_uiRunLengthMinus1;}
UInt* getArrayTopLeft () const {return (UInt*)m_uiTopLeft;}
UInt* getArrayBottomRight () const {return (UInt*)m_uiBottomRight;}
UInt* getArraySliceGroupId() const {return (UInt*)m_uiSliceGroupId;}
//--ICU/ETRI FMO Implementation : FMO end
//<-- consider ROI Extraction ICU/ETRI DS
const std::string& getROIConfigFileName() const{ return m_cROIConfigFileName;}
UInt getNumROI() const {return m_uiNumROI;} //for test
UInt* getROIID () const {return (UInt*)m_uiROIID;}
UInt* getSGID () const {return (UInt*)m_uiSGID;}
UInt* getSLID () const {return (UInt*)m_uiSLID;}
//--> consider ROI Extraction ICU/ETRI DS
UInt getMGSVect (UInt uiNum) const { return m_uiMGSVectorMode ? m_uiMGSVect[uiNum] : (uiNum == 0 ? 16 : 0); }
Bool getTCoeffLevelPredictionFlag () const { return m_bAVCRewriteFlag==1; }
Bool getAVCAdaptiveRewriteFlag () const { return m_bAVCAdaptiveRewriteFlag==1; }
Void setAVCRewrite( UInt ui ) { m_bAVCRewriteFlag = ui; }
UInt getSliceSkip() const { return m_uiSliceSkip; }
UInt getSliceSkipTLevelStart() const { return m_uiSliceSkipTLevelStart; }
Void setSliceSkip( UInt uiSliceSkip ) { m_uiSliceSkip = uiSliceSkip; }
Void setSliceSkipTLevelStart( UInt ui ) { m_uiSliceSkipTLevelStart = ui; }
//===== set =====
Void setLayerId (UInt p) { m_uiLayerId = p; }
Void setDependencyId (UInt p) { m_uiDependencyId = p; }
Void setFrameWidthInSamples (UInt p) { m_uiFrameWidthInSamples = p; }
Void setFrameHeightInSamples (UInt p) { m_uiFrameHeightInSamples = p; }
Void setInputFrameRate (Double p) { m_dInputFrameRate = p; }
Void setOutputFrameRate (Double p) { m_dOutputFrameRate = p; }
Void setInputFilename (Char* p) { m_cInputFilename = p; }
Void setOutputFilename (Char* p) { m_cOutputFilename = p; }
Void setEntropyCodingModeFlag (Bool p) { m_uiEntropyCodingModeFlag = p; }
Void setEnable8x8Trafo (UInt p) { m_uiEnable8x8Trafo = p; }
Void setScalingMatricesPresent (UInt p) { m_uiScalingMatricesPresent = p; }
Void setMaxAbsDeltaQP (UInt p) { m_uiMaxAbsDeltaQP = p; }
Void setBaseQpResidual (Double p) { m_dBaseQpResidual = p; }
Void setQpModeDecision (UInt n,
Double p) { m_adQpModeDecision [n] = p; }
Void setQpModeDecisionLP (Double p) { m_dQpModeDecisionLP = p; }
Void setInterLayerPredictionMode (UInt p) { m_uiInterLayerPredictionMode = p; }
Void setMotionInfoMode (UInt p) { m_uiMotionInfoMode = p; }
Void setMotionInfoFilename (Char* p) { m_cMotionInfoFilename = p; }
Void setDecompositionStages (UInt p) { m_uiDecompositionStages = p; }
Void setNotCodedStages (UInt p) { m_uiNotCodedStages = p; }
Void setTemporalResolution (UInt p) { m_uiTemporalResolution = p; }
Void setFrameDelay (UInt p) { m_uiFrameDelay = p; }
Void setBaseLayerSpatRes (UInt p) { m_uiBaseLayerSpatRes = p; }
Void setBaseLayerTempRes (UInt p) { m_uiBaseLayerTempRes = p; }
Void setBaseQualityLevel (UInt p) { m_uiBaseQualityLevel = p; }
Void setContrainedIntraForLP () { m_bConstrainedIntraPredForLP = true; }
Void setForceReorderingCommands (UInt p) { m_uiForceReorderingCommands = p; }
Void setBaseLayerId (UInt p) { m_uiBaseLayerId = p; }
Void setMbAff (UInt p) { m_uiMbAff = p; }
Void setPAff (UInt p) { m_uiPAff = p; }
ResizeParameters& getResizeParameters () { return m_cResizeParameters; }
const std::string& getESSFilename () { return m_cESSFilename; }
// JVT-Q065 EIDR{
Int getIDRPeriod () { return m_iIDRPeriod; }
// JVT-Q065 EIDR}
UInt getPLR () { return m_uiPLR; } //JVT-R057 LA-RDO
Void setPLR (UInt ui){m_uiPLR=ui;} //JVT-W049
//===== check =====
ErrVal check();
//--ICU/ETRI FMO Implementation
Void setSliceGroupId(int i, UInt value) { m_uiSliceGroupId[i] = value;}
Void setUseRedundantSliceFlag(Bool b) { m_uiUseRedundantSlice = b; } // JVT-Q054 Red. Picture
Void setUseRedundantKeySliceFlag(UInt b) { m_uiUseRedundantKeySlice = b; } //JVT-W049
//S051{
const std::string& getInSIPFileName () const { return m_cInSIPFileName; }
const std::string& getOutSIPFileName () const { return m_cOutSIPFileName; }
Void setInSIPFileName (Char* p) { m_cInSIPFileName=p; }
Void setOutSIPFileName (Char* p) { m_cOutSIPFileName=p; }
Void setAnaSIP (UInt uiAnaSIP){ m_uiAnaSIP = uiAnaSIP;}
Void setEncSIP (Bool bEncSIP){ m_bEncSIP = bEncSIP;}
UInt getAnaSIP (){ return m_uiAnaSIP; }
Bool getEncSIP (){ return m_bEncSIP; }
//S051}
//JVT-T054{
UInt getLayerCGSSNR () { return m_uiLayerCGSSNR;}
UInt getQualityLevelCGSSNR () { return m_uiQualityLevelCGSSNR;}
UInt getNumberOfQualityLevelsCGSSNR () const;
UInt getBaseLayerCGSSNR () { return m_uiBaseLayerCGSSNR;}
UInt getBaseQualityLevelCGSSNR () { return m_uiBaseQualityLevelCGSSNR;}
Void setLayerCGSSNR (UInt ui) { m_uiLayerCGSSNR = ui;}
Void setQualityLevelCGSSNR (UInt ui) { m_uiQualityLevelCGSSNR = ui;}
Void setBaseLayerCGSSNR (UInt ui) { m_uiBaseLayerCGSSNR = ui;}
Void setBaseQualityLevelCGSSNR (UInt ui) { m_uiBaseQualityLevelCGSSNR = ui;}
//DS_FIX_FT_09_2007
Void setNonDiscardable () { m_bDiscardable = false;}
Void setQLDiscardable (UInt ui) { m_uiQLDiscardable = ui;}
UInt getQLDiscardable () { return m_uiQLDiscardable;}
//~DS_FIX_FT_09_2007
Bool isDiscardable () { return m_bDiscardable;}
//JVT-T054}
UInt getExplicitQPCascading () const { return m_uiExplicitQPCascading; }
Double getDeltaQPTLevel ( UInt ui ) const { return m_adDeltaQPTLevel[ui]; }
Void setExplicitQPCascading ( UInt ui ) { m_uiExplicitQPCascading = ui; }
Void setDeltaQPTLevel ( UInt tl,
Double d ) { m_adDeltaQPTLevel[tl] = d; }
Void setIPCMRate( UInt ui ) { m_uiIPCMRate = ui; }
UInt getIPCMRate() const { return m_uiIPCMRate; }
const UChar* getScalMatrixBuffer() const { return m_aaucScalingMatrices[0]; }
UInt getBiPred8x8Disable() const { return m_uiBiPred8x8Disable; }
Void setBiPred8x8Disable( UInt ui ) { m_uiBiPred8x8Disable = ui; }
UInt getMCBlks8x8Disable() const { return m_uiMCBlks8x8Disable; }
Void setMCBlks8x8Disable( UInt ui ) { m_uiMCBlks8x8Disable = ui; }
UInt getBotFieldFirst() const { return m_uiBotFieldFirst; }
Void setBotFieldFirst( UInt ui ) { m_uiBotFieldFirst = ui; }
UInt getPicCodingType() const { return m_uiPicCodingType; }
Void setPicCodingType( UInt ui ) { m_uiPicCodingType = ui; }
Void setProfileIdc( UInt ui ) { m_uiProfileIdc = ui; }
UInt getProfileIdc () const { return m_uiProfileIdc; }
UInt getLevelIdc () const { return m_uiLevelIdc; }
Bool isIntraOnly () const { return m_bIntraOnly; }
Bool getConstrainedSet0Flag() const { return m_bConstrainedSetFlag0; }
Bool getConstrainedSet1Flag() const { return m_bConstrainedSetFlag1; }
Bool getConstrainedSet2Flag() const { return m_bConstrainedSetFlag2; }
Bool getConstrainedSet3Flag() const { return m_bConstrainedSetFlag3; }
Void setUseLongTerm ( UInt ui ) { m_uiUseLongTerm = ui; }
UInt getUseLongTerm () const { return m_uiUseLongTerm; }
protected:
Bool xIsBaselineProfile ( CodingParameter* pcCodingParameter );
ErrVal xForceBaselineProfile ( CodingParameter* pcCodingParameter );
Bool xIsMainProfile ( CodingParameter* pcCodingParameter );
ErrVal xForceMainProfile ( CodingParameter* pcCodingParameter );
Bool xIsExtendedProfile ( CodingParameter* pcCodingParameter );
ErrVal xForceExtendedProfile ( CodingParameter* pcCodingParameter );
Bool xIsHighProfile ( CodingParameter* pcCodingParameter );
ErrVal xForceHighProfile ( CodingParameter* pcCodingParameter );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -