⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sliceheaderbase.h

📁 SVC最新更新代码
💻 H
📖 第 1 页 / 共 4 页
字号:
  const PredWeightTable&          getPredWeightTableL1                  ()                    const { return m_cPredWeightTableL1; }
  PredWeightTable&                getPredWeightTableL1                  ()                          { return m_cPredWeightTableL1; }
  const PredWeightTable&          getPredWeightTable                    ( ListIdx eListIdx )  const { return ( eListIdx == LIST_0 ? m_cPredWeightTableL0 : m_cPredWeightTableL1 ); }
  PredWeightTable&                getPredWeightTable                    ( ListIdx eListIdx )        { return ( eListIdx == LIST_0 ? m_cPredWeightTableL0 : m_cPredWeightTableL1 ); }
  Bool                            getNoOutputOfPriorPicsFlag            ()                    const { return m_bNoOutputOfPriorPicsFlag; }
  Bool                            getLongTermReferenceFlag              ()                    const { return m_bLongTermReferenceFlag; }
  const DecRefPicMarking&         getDecRefPicMarking                   ()                    const { return m_cDecRefPicMarking; }
  DecRefPicMarking&               getDecRefPicMarking                   ()                          { return m_cDecRefPicMarking; }
  UInt                            getCabacInitIdc                       ()                    const { return m_uiCabacInitIdc; }
  Int                             getSliceQpDelta                       ()                    const { return m_iSliceQpDelta; }
  Int                             getSliceQp                            ()                    const { return m_iSliceQpDelta + getPPSQp(); }
  Bool                            getSPForSwitchFlag                    ()                    const { return m_bSPForSwitchFlag; }
  Int                             getSliceQsDelta                       ()                    const { return m_iSliceQsDelta; }
  const DBFilterParameter&        getDeblockingFilterParameter          ()                    const { return m_cDeblockingFilterParameter; }
  DBFilterParameter&              getDeblockingFilterParameter          ()                          { return m_cDeblockingFilterParameter; }
  UInt                            getSliceGroupChangeCycle              ()                    const { return m_uiSliceGroupChangeCycle; }
  UInt                            getRefLayerDQId                       ()                    const { return m_uiRefLayerDQId; }
  UInt                            getRefLayerDependencyId               ()                    const { return m_uiRefLayerDQId >> 4; }
  UInt                            getRefLayerQualityId                  ()                    const { return m_uiRefLayerDQId & 15; }
  const DBFilterParameter&        getInterLayerDeblockingFilterParameter()                    const { return m_cInterLayerDeblockingFilterParameter; }
  DBFilterParameter&              getInterLayerDeblockingFilterParameter()                          { return m_cInterLayerDeblockingFilterParameter; }
  Bool                            getConstrainedIntraResamplingFlag     ()                    const { return m_bConstrainedIntraResamplingFlag; }
  Bool                            getRefLayerChromaPhaseXPlus1Flag      ()                    const { return m_bRefLayerChromaPhaseXPlus1Flag; }
  UInt                            getRefLayerChromaPhaseXPlus1          ()                    const { return m_bRefLayerChromaPhaseXPlus1Flag ? 1 : 0; }
  UInt                            getRefLayerChromaPhaseYPlus1          ()                    const { return m_uiRefLayerChromaPhaseYPlus1; }
  Int                             getRefLayerChromaPhaseX               ()                    const { return m_bRefLayerChromaPhaseXPlus1Flag ? 0 : -1; }
  Int                             getRefLayerChromaPhaseY               ()                    const { return m_uiRefLayerChromaPhaseYPlus1 - 1; }
  Int                             getScaledRefLayerLeftOffset           ()                    const { return m_iScaledRefLayerLeftOffset; }
  Int                             getScaledRefLayerTopOffset            ()                    const { return ( isFrameMbsOnly() ? m_iScaledRefLayerTopOffset : m_iScaledRefLayerTopOffset << 1 ); }
  Int                             getScaledRefLayerRightOffset          ()                    const { return m_iScaledRefLayerRightOffset; }
  Int                             getScaledRefLayerBottomOffset         ()                    const { return ( isFrameMbsOnly() ? m_iScaledRefLayerBottomOffset : m_iScaledRefLayerBottomOffset << 1 ); }
  Bool                            getSliceSkipFlag                      ()                    const { return m_bSliceSkipFlag; }
  UInt                            getNumMbsInSliceMinus1                ()                    const { return m_uiNumMbsInSliceMinus1; }
  Bool                            getAdaptiveBaseModeFlag               ()                    const { return m_bAdaptiveBaseModeFlag; }
  Bool                            getDefaultBaseModeFlag                ()                    const { return m_bDefaultBaseModeFlag; }
  Bool                            getAdaptiveMotionPredictionFlag       ()                    const { return m_bAdaptiveMotionPredictionFlag; }
  Bool                            getDefaultMotionPredictionFlag        ()                    const { return m_bDefaultMotionPredictionFlag; }
  Bool                            getAdaptiveResidualPredictionFlag     ()                    const { return m_bAdaptiveResidualPredictionFlag; }
  Bool                            getDefaultResidualPredictionFlag      ()                    const { return m_bDefaultResidualPredictionFlag; }
  Bool                            getTCoeffLevelPredictionFlag          ()                    const { return m_bTCoeffLevelPredictionFlag; }
  UInt                            getScanIdxStart                       ()                    const { return m_uiScanIdxStart; }
  UInt                            getScanIdxStop                        ()                    const { return m_uiScanIdxStop; }
  Bool                            hasDefaultScanIdx                     ()                    const { return m_uiScanIdxStart == 0 && m_uiScanIdxStop == 16; }
  Bool                            parameterSetsInitialized              ()                    const { return m_pcPPS != 0 && m_pcSPS != 0; }
  const SequenceParameterSet&     getSPS                                ()                    const { AOF( parameterSetsInitialized() ); return *m_pcSPS; }
  const PictureParameterSet&      getPPS                                ()                    const { AOF( parameterSetsInitialized() ); return *m_pcPPS; }
  const StatBuf<const UChar*,8>&  getScalingMatrix                      ()                    const { return m_acScalingMatrix; }
  StatBuf<const UChar*,8>&        getScalingMatrix                      ()                          { return m_acScalingMatrix; }


  Void  setFirstMbInSlice                     ( UInt                        uiFirstMbInSlice                      )  { m_uiFirstMbInSlice                     = ( isMbaffFrame() ? uiFirstMbInSlice >> 1 : uiFirstMbInSlice ); }
  Void  setSliceType                          ( SliceType                   eSliceType                            )  { m_eSliceType                           = eSliceType; }
  Void  setPicParameterSetId                  ( UInt                        uiPicParameterSetId                   )  { m_uiPicParameterSetId                  = uiPicParameterSetId; }
  Void  setColourPlaneId                      ( UInt                        uiColourPlaneId                       )  { m_uiColourPlaneId                      = uiColourPlaneId; }
  Void  setFrameNum                           ( UInt                        uiFrameNum                            )  { m_uiFrameNum                           = uiFrameNum; }
  Void  setFieldPicFlag                       ( Bool                        bFieldPicFlag                         )  { m_bFieldPicFlag                        = bFieldPicFlag; }
  Void  setBottomFieldFlag                    ( Bool                        bBottomFieldFlag                      )  { m_bBottomFieldFlag                     = bBottomFieldFlag; }
  Void  setIdrPicId                           ( UInt                        uiIdrPicId                            )  { m_uiIdrPicId                           = uiIdrPicId; }
  Void  setPicOrderCntLsb                     ( UInt                        uiPicOrderCntLsb                      )  { m_uiPicOrderCntLsb                     = uiPicOrderCntLsb; }
  Void  setDeltaPicOrderCntBottom             ( Int                         iDeltaPicOrderCntBottom               )  { m_iDeltaPicOrderCntBottom              = iDeltaPicOrderCntBottom; }
  Void  setDeltaPicOrderCnt0                  ( Int                         iDeltaPicOrderCnt0                    )  { m_iDeltaPicOrderCnt0                   = iDeltaPicOrderCnt0; }
  Void  setDeltaPicOrderCnt1                  ( Int                         iDeltaPicOrderCnt1                    )  { m_iDeltaPicOrderCnt1                   = iDeltaPicOrderCnt1; }
  Void  setRedundantPicCnt                    ( UInt                        uiRedundantPicCnt                     )  { m_uiRedundantPicCnt                    = uiRedundantPicCnt; }
  Void  setDirectSpatialMvPredFlag            ( Bool                        bDirectSpatialMvPredFlag              )  { m_bDirectSpatialMvPredFlag             = bDirectSpatialMvPredFlag; }
  Void  setNumRefIdxActiveOverrideFlag        ( Bool                        bNumRefIdxActiveOverrideFlag          )  { m_bNumRefIdxActiveOverrideFlag         = bNumRefIdxActiveOverrideFlag; }
  Void  setNumRefIdxL0ActiveMinus1            ( UInt                        uiNumRefIdxL0ActiveMinus1             )  { m_uiNumRefIdxL0ActiveMinus1            = uiNumRefIdxL0ActiveMinus1; }
  Void  setNumRefIdxL0Active                  ( UInt                        uiNumRefIdxL0Active                   )  { m_uiNumRefIdxL0ActiveMinus1            = uiNumRefIdxL0Active - 1; }
  Void  setNumRefIdxL1ActiveMinus1            ( UInt                        uiNumRefIdxL1ActiveMinus1             )  { m_uiNumRefIdxL1ActiveMinus1            = uiNumRefIdxL1ActiveMinus1; }
  Void  setNumRefIdxL1Active                  ( UInt                        uiNumRefIdxL1Active                   )  { m_uiNumRefIdxL1ActiveMinus1            = uiNumRefIdxL1Active - 1; }
  Void  setNumRefIdxActive                    ( ListIdx                     eListIdx,
                                                UInt                        uiNumRefIdxActive                     )  { if( eListIdx == LIST_0 ) m_uiNumRefIdxL0ActiveMinus1 = uiNumRefIdxActive - 1; else m_uiNumRefIdxL1ActiveMinus1 = uiNumRefIdxActive - 1; }
  Void  setRefPicListReorderingL0             ( const RefPicListReOrdering& rcRefPicListReorderingL0              )  { m_cRefPicListReorderingL0              = rcRefPicListReorderingL0; }
  Void  setRefPicListReorderingL1             ( const RefPicListReOrdering& rcRefPicListReorderingL1              )  { m_cRefPicListReorderingL1              = rcRefPicListReorderingL1; }
  Void  setBasePredWeightTableFlag            ( Bool                        bBasePredWeightTableFlag              )  { m_bBasePredWeightTableFlag             = bBasePredWeightTableFlag; }
  Void  setLumaLog2WeightDenom                ( UInt                        uiLumaLog2WeightDenom                 )  { m_uiLumaLog2WeightDenom                = uiLumaLog2WeightDenom; }
  Void  setChromaLog2WeightDenom              ( UInt                        uiChromaLog2WeightDenom               )  { m_uiChromaLog2WeightDenom              = uiChromaLog2WeightDenom; }
  Void  setPredWeightTableL0                  ( const PredWeightTable&      rcPredWeightTableL0                   )  { m_cPredWeightTableL0                   = rcPredWeightTableL0; }
  Void  setPredWeightTableL1                  ( const PredWeightTable&      rcPredWeightTableL1                   )  { m_cPredWeightTableL1                   = rcPredWeightTableL1; }
  Void  setNoOutputOfPriorPicsFlag            ( Bool                        bNoOutputOfPriorPicsFlag              )  { m_bNoOutputOfPriorPicsFlag             = bNoOutputOfPriorPicsFlag; }
  Void  setLongTermReferenceFlag              ( Bool                        bLongTermReferenceFlag                )  { m_bLongTermReferenceFlag               = bLongTermReferenceFlag; }
  Void  setDecRefPicMarking                   ( const DecRefPicMarking&     rcDecRefPicMarking                    )  { m_cDecRefPicMarking                    = rcDecRefPicMarking; }
  Void  setCabacInitIdc                       ( UInt                        uiCabacInitIdc                        )  { m_uiCabacInitIdc                       = uiCabacInitIdc; }
  Void  setSliceQpDelta                       ( Int                         iSliceQpDelta                         )  { m_iSliceQpDelta                        = iSliceQpDelta; }
  Void  setSliceHeaderQp                      ( Int                         iSliceHeaderQp                        )  { m_iSliceQpDelta                        = iSliceHeaderQp - getPPSQp(); }
  Void  setSPForSwitchFlag                    ( Bool                        bSPForSwitchFlag                      )  { m_bSPForSwitchFlag                     = bSPForSwitchFlag; }
  Void  setSliceQsDelta                       ( Int                         iSliceQsDelta                         )  { m_iSliceQsDelta                        = iSliceQsDelta; }
  Void  setDeblockingFilterParameter          ( const DBFilterParameter&    rcDeblockingFilterParameter           )  { m_cDeblockingFilterParameter           = rcDeblockingFilterParameter; }
  Void  setSliceGroupChangeCycle              ( UInt                        uiSliceGroupChangeCycle               )  { m_uiSliceGroupChangeCycle              = uiSliceGroupChangeCycle; }
  Void  setRefLayerDQId                       ( UInt                        uiRefLayerDQId                        )  { m_uiRefLayerDQId                       = uiRefLayerDQId; }
  Void  setRefLayer                           ( UInt                        uiRefLayerDependencyId,
                                                UInt                        uiRefLayerQualityId                   )  { m_uiRefLayerDQId                       = ( uiRefLayerDependencyId << 4 ) + uiRefLayerQualityId; }
  Void  setInterLayerDeblockingFilterParameter( const DBFilterParameter&    rcInterLayerDeblockingFilterParameter )  { m_cInterLayerDeblockingFilterParameter = rcInterLayerDeblockingFilterParameter; }
  Void  setConstrainedIntraResamplingFlag     ( Bool                        bConstrainedIntraResamplingFlag       )  { m_bConstrainedIntraResamplingFlag      = bConstrainedIntraResamplingFlag; }
  Void  setRefLayerChromaPhaseXPlus1Flag      ( Bool                        bRefLayerChromaPhaseXPlus1Flag        )  { m_bRefLayerChromaPhaseXPlus1Flag       = bRefLayerChromaPhaseXPlus1Flag; }
  Void  setRefLayerChromaPhaseXPlus1          ( UInt                        uiRefLayerChromaPhaseXPlus1           )  { m_bRefLayerChromaPhaseXPlus1Flag       = uiRefLayerChromaPhaseXPlus1 > 0; }
  Void  setRefLayerChromaPhaseYPlus1          ( UInt                        uiRefLayerChromaPhaseYPlus1           )  { m_uiRefLayerChromaPhaseYPlus1          = uiRefLayerChromaPhaseYPlus1; }
  Void  setRefLayerChromaPhaseX               ( Int                         iRefLayerChromaPhaseX                 )  { m_bRefLayerChromaPhaseXPlus1Flag       = iRefLayerChromaPhaseX == 0; }
  Void  setRefLayerChromaPhaseY               ( Int                         iRefLayerChromaPhaseY                 )  { m_uiRefLayerChromaPhaseYPlus1          = iRefLayerChromaPhaseY + 1; }
  Void  setScaledRefLayerLeftOffset           ( Int                         iScaledRefLayerLeftOffset             )  { m_iScaledRefLayerLeftOffset            = iScaledRefLayerLeftOffset; }
  Void  setScaledRefLayerTopOffset            ( Int                         iScaledRefLayerTopOffset              )  { m_iScaledRefLayerTopOffset             = ( isFrameMbsOnly() ? iScaledRefLayerTopOffset    : iScaledRefLayerTopOffset    >> 1 ); }
  Void  setScaledRefLayerRightOffset          ( Int                         iScaledRefLayerRightOffset            )  { m_iScaledRefLayerRightOffset           = iScaledRefLayerRightOffset; }
  Void  setScaledRefLayerBottomOffset         ( Int                         iScaledRefLayerBottomOffset           )  { m_iScaledRefLayerBottomOffset          = ( isFrameMbsOnly() ? iScaledRefLayerBottomOffset : iScaledRefLayerBottomOffset >> 1 ); }
  Void  setSliceSkipFlag                      ( Bool                        bSliceSkipFlag                        )  { m_bSliceSkipFlag                       = bSliceSkipFlag; }
  Void  setNumMbsInSliceMinus1                ( UInt                        uiNumMbsInSliceMinus1                 )  { m_uiNumMbsInSliceMinus1                = uiNumMbsInSliceMinus1; }
  Void  setAdaptiveBaseModeFlag               ( Bool                        bAdaptiveBaseModeFlag                 )  { m_bAdaptiveBaseModeFlag                = bAdaptiveBaseModeFlag; }
  Void  setDefaultBaseModeFlag                ( Bool                        bDefaultBaseModeFlag                  )  { m_bDefaultBaseModeFlag                 = bDefaultBaseModeFlag; }
  Void  setAdaptiveMotionPredictionFlag       ( Bool                        bAdaptiveMotionPredictionFlag         )  { m_bAdaptiveMotionPredictionFlag        = bAdaptiveMotionPredictionFlag; }
  Void  setDefaultMotionPredictionFlag        ( Bool                        bDefaultMotionPredictionFlag          )  { m_bDefaultMotionPredictionFlag         = bDefaultMotionPredictionFlag; }
  Void  setAdaptiveResidualPredictionFlag     ( Bool                        bAdaptiveResidualPredictionFlag       )  { m_bAdaptiveResidualPredictionFlag      = bAdaptiveResidualPredictionFlag; }
  Void  setDefaultResidualPredictionFlag      ( Bool                        bDefaultResidualPredictionFlag        )  { m_bDefaultResidualPredictionFlag       = bDefaultResidualPredictionFlag; }
  Void  setTCoeffLevelPredictionFlag          ( Bool                        bTCoeffLevelPredictionFlag            )  { m_bTCoeffLevelPredictionFlag           = bTCoeffLevelPredictionFlag; }
  Void  setScanIdxStart                       ( UInt                        uiScanIdxStart                        )  { m_uiScanIdxStart                       = uiScanIdxStart; }
  Void  setScanIdxStop                        ( UInt                        uiScanIdxStop                         )  { m_uiScanIdxStop                        = uiScanIdxStop; }

private:
  Void    xInit               ();
  Void    xCopy               ( const SliceHeaderSyntax&    rcSliceHeaderSyntax );
  ErrVal  xInitScalingMatrix  ();
  ErrVal  xInitParameterSets  ( ParameterSetMng&            rcParameterSetMng,
                                UInt                        uiPPSId,
                                Bool                        bSubSetSPS );
  ErrVal  xInitParameterSets  ( const SequenceParameterSet& rcSPS,
                                const PictureParameterSet&  rcPPS );

private:
  //===== syntax =====
  UInt                        m_uiFirstMbInSlice;
  SliceType                   m_eSliceType;
  UInt                        m_uiPicParameterSetId;
  UInt                        m_uiColourPlaneId;
  UInt                        m_uiFrameNum;
  Bool                        m_bFieldPicFlag;
  Bool                        m_bBottomFieldFlag;
  UInt                        m_uiIdrPicId;
  UInt                        m_uiPicOrderCntLsb;
  Int                         m_iDeltaPicOrderCntBottom;
  Int                         m_iDeltaPicOrderCnt0;
  Int                         m_iDeltaPicOrderCnt1;
  UInt                        m_uiRedundantPicCnt;
  Bool                        m_bDirectSpatialMvPredFlag;
  Bool                        m_bNumRefIdxActiveOverrideFlag;
  UInt                        m_uiNumRefIdxL0ActiveMinus1;
  UInt                        m_uiNumRefIdxL1ActiveMinus1;
  RefPicListReOrdering        m_cRefPicListReorderingL0;
  RefPicListReOrdering        m_cRefPicListReorderingL1;
  Bool                        m_bBasePredWeightTableFlag;
  UInt                        m_uiLumaLog2WeightDenom;
  UInt                        m_uiChromaLog2WeightDenom;
  PredWeightTable             m_cPredWeightTableL0;
  PredWeightTable             m_cPredWeightTableL1;
  Bool                        m_bNoOutputOfPriorPicsFlag;
  Bool                        m_bLongTermReferenceFlag;
  DecRefPicMarking            m_cDecRefPicMarking;
  UInt                        m_uiCabacInitIdc;
  Int                         m_iSliceQpDelta;
  Bool                        m_bSPForSwitchFlag;
  Int                         m_iSliceQsDelta;
  DBFilterParameter           m_cDeblockingFilterParameter;
  UInt                        m_uiSliceGroupChangeCycle;
  UInt                        m_uiRefLayerDQId;
  DBFilterParameter           m_cInterLayerDeblockingFilterParameter;
  Bool                        m_bConstrainedIntraResamplingFlag;
  Bool                        m_bRefLayerChromaPhaseXPlus1Flag;
  UInt                        m_uiRefLayerChromaPhaseYPlus1;
  Int                         m_iScaledRefLayerLeftOffset;
  Int                         m_iScaledRefLayerTopOffset;
  Int                         m_iScaledRefLayerRightOffset;
  Int                         m_iScaledRefLayerBottomOffset;
  Bool                        m_bSliceSkipFlag;
  UInt                        m_uiNumMbsInSliceMinus1;
  Bool                        m_bAdaptiveBaseModeFlag;
  Bool                        m_bDefaultBaseModeFlag;
  Bool                        m_bAdaptiveMotionPredictionFlag;
  Bool                        m_bDefaultMotionPredictionFlag;
  Bool                        m_bAdaptiveResidualPredictionFlag;
  Bool                        m_bDefaultResidualPredictionFlag;
  Bool                        m_bTCoeffLevelPredictionFlag;
  UInt                        m_uiScanIdxStart;
  UInt                        m_uiScanIdxStop;

  //===== derived parameters =====
  const SequenceParameterSet* m_pcSPS;
  const PictureParameterSet*  m_pcPPS;
  StatBuf< const UChar*, 8 >  m_acScalingMatrix;
};




#if defined( WIN32 )
# pragma warning( default: 4251 )
# pragma warning( default: 4275 )
#endif

H264AVC_NAMESPACE_END



#endif // !defined(AFX_SLICEHEADERBASE_H__2CC1FD0F_CACB_4799_84BE_FC5FC9B9C245__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -