本文整理汇总了C++中SliceHeader::getPPS方法的典型用法代码示例。如果您正苦于以下问题:C++ SliceHeader::getPPS方法的具体用法?C++ SliceHeader::getPPS怎么用?C++ SliceHeader::getPPS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SliceHeader
的用法示例。
在下文中一共展示了SliceHeader::getPPS方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RNOK
ErrVal ControlMngH264AVCDecoder::initSlice( SliceHeader& rcSH, ProcessingState eProcessingState )
{
m_uiCurrLayer = rcSH.getLayerId();
m_pcMbDataCtrl = rcSH.getFrameUnit()->getMbDataCtrl();
RNOK( m_pcMbDataCtrl->initSlice( rcSH, eProcessingState, true, NULL ) );
RNOK( m_pcSampleWeighting->initSlice( rcSH ) );
if( PARSE_PROCESS == eProcessingState && rcSH.getTrueSlice())//TMM_EC
{
MbSymbolReadIf* pcMbSymbolReadIf;
if( rcSH.getPPS().getEntropyCodingModeFlag() )
{
pcMbSymbolReadIf = m_pcCabacReader;
}
else
{
pcMbSymbolReadIf = m_pcUvlcReader;
}
RNOK( pcMbSymbolReadIf->startSlice( rcSH ) );
RNOK( m_pcMbParser->initSlice( pcMbSymbolReadIf ) );
}
if( DECODE_PROCESS == eProcessingState)
{
RNOK( m_pcMotionCompensation->initSlice( rcSH ) );
}
return Err::m_nOK;
}
示例2: RNOK
ErrVal ControlMngH264AVCDecoder::initSliceForReading( const SliceHeader& rcSH )
{
m_uiCurrLayer = rcSH.getLayerId();
MbSymbolReadIf* pcMbSymbolReadIf;
if( rcSH.getPPS().getEntropyCodingModeFlag() )
{
pcMbSymbolReadIf = m_pcCabacReader;
}
else
{
pcMbSymbolReadIf = m_pcUvlcReader;
}
if ( rcSH.getTrueSlice())
{
RNOK( pcMbSymbolReadIf->startSlice( rcSH ) );
}
RNOK( m_pcMbParser->initSlice( pcMbSymbolReadIf ) );
#ifdef LF_INTERLACE
m_pcSliceHeader = &rcSH;
#endif
return Err::m_nOK;
}
示例3: RNOK
ErrVal ControlMngH264AVCEncoder::initSlice( SliceHeader& rcSH, ProcessingState eProcessingState )
{
m_uiCurrLayer = rcSH.getSPS().getLayerId();
m_pcMbDataCtrl = rcSH.getFrameUnit()->getMbDataCtrl();
RNOK( m_pcMbDataCtrl ->initSlice( rcSH, eProcessingState, false, NULL ) );
RNOK( m_pcMotionEstimation ->initSlice( rcSH ) );
RNOK( m_pcSampleWeighting ->initSlice( rcSH ) );
RNOK( m_pcMbEncoder ->initSlice( rcSH ) );
if( ENCODE_PROCESS == eProcessingState )
{
Bool bCabac = rcSH.getPPS().getEntropyCodingModeFlag();
if( bCabac )
{
m_pcMbSymbolWriteIf = m_pcCabacWriter;
}
else
{
m_pcMbSymbolWriteIf = m_pcUvlcWriter;
}
RNOK( m_pcMbSymbolWriteIf->startSlice( rcSH ) );
RNOK( m_pcMbCoder->initSlice( rcSH, m_pcMbSymbolWriteIf, m_pcRateDistortion ) );
}
return Err::m_nOK;
}
示例4: initSlice
ErrVal MbCoder::initSlice( const SliceHeader& rcSH,
MbSymbolWriteIf* pcMbSymbolWriteIf,
RateDistortionIf* pcRateDistortionIf )
{
ROT( NULL == pcMbSymbolWriteIf );
ROT( NULL == pcRateDistortionIf );
m_pcMbSymbolWriteIf = pcMbSymbolWriteIf;
m_pcRateDistortionIf = pcRateDistortionIf;
m_bCabac = rcSH.getPPS().getEntropyCodingModeFlag();
m_bPrevIsSkipped = false;
m_bInitDone = true;
return Err::m_nOK;
}
示例5: min
ErrVal
RecPicBuffer::xAdaptListSize( RefFrameList& rcList,
ListIdx eListIdx,
SliceHeader& rcSliceHeader )
{
UInt uiDefaultListSize = rcSliceHeader.getNumRefIdxActive( eListIdx );
UInt uiMaximumListSize = rcList.getActive();
UInt uiCurrentListSize = min( uiDefaultListSize, uiMaximumListSize );
//===== update slice header =====
rcList. setActive ( uiCurrentListSize );
rcSliceHeader.setNumRefIdxActive( eListIdx, uiCurrentListSize );
if( uiCurrentListSize != rcSliceHeader.getPPS().getNumRefIdxActive( eListIdx ) )
{
rcSliceHeader.setNumRefIdxActiveOverrideFlag( true );
}
return Err::m_nOK;
}
示例6: xSetPredWeights
ErrVal SliceEncoder::xSetPredWeights( SliceHeader& rcSH,
Frame* pOrgFrame,
RefListStruct& rcRefListStruct )
{
ROTRS( rcSH.isIntraSlice(), Err::m_nOK );
RefFrameList& rcRefFrameList0 = rcRefListStruct.acRefFrameListRC[0];
RefFrameList& rcRefFrameList1 = rcRefListStruct.acRefFrameListRC[1];
const SampleWeightingParams& rcSWP = m_pcCodingParameter->getSampleWeightingParams(rcSH.getDependencyId());
{ // determine denoms
const UInt uiLumaDenom = rcSWP.getLumaDenom();
rcSH.setLumaLog2WeightDenom ( ( uiLumaDenom == MSYS_UINT_MAX ) ? gIntRandom(0,7) : uiLumaDenom );
const UInt uiChromaDenom = rcSWP.getChromaDenom();
rcSH.setChromaLog2WeightDenom( ( uiChromaDenom == MSYS_UINT_MAX ) ? gIntRandom(0,7) : uiChromaDenom );
}
const Int iChromaScale = 1<<rcSH.getChromaLog2WeightDenom();
const Int iLumaScale = 1<<rcSH.getLumaLog2WeightDenom();
m_pcControlMng->initSliceForWeighting(rcSH);
if( rcSH.isBSlice() )
{
ROTRS( 1 != rcSH.getPPS().getWeightedBiPredIdc(), Err::m_nOK );
}
else
{
ROTRS( ! rcSH.getPPS().getWeightedPredFlag(), Err::m_nOK );
}
if( rcSH.isBSlice() )
{
RNOK( rcSH.getPredWeightTable(LIST_1).initDefaults( rcSH.getLumaLog2WeightDenom(), rcSH.getChromaLog2WeightDenom() ) );
}
RNOK( rcSH.getPredWeightTable(LIST_0).initDefaults( rcSH.getLumaLog2WeightDenom(), rcSH.getChromaLog2WeightDenom() ) );
Double afFwWeight[MAX_REF_FRAMES][3];
Double afBwWeight[MAX_REF_FRAMES][3];
Double afFwOffsets[MAX_REF_FRAMES][3];
Double afBwOffsets[MAX_REF_FRAMES][3];
/* init arrays with default weights */
for (UInt x = 0; x < MAX_REF_FRAMES; x++)
{
xInitDefaultWeights(afFwWeight[x], rcSH.getLumaLog2WeightDenom(), rcSH.getChromaLog2WeightDenom());
xInitDefaultWeights(afBwWeight[x], rcSH.getLumaLog2WeightDenom(), rcSH.getChromaLog2WeightDenom());
afFwOffsets[x][0] = afFwOffsets[x][1] = afFwOffsets[x][2] = 0;
afBwOffsets[x][0] = afBwOffsets[x][1] = afBwOffsets[x][2] = 0;
}
if( rcSH.isBSlice() )
{
RNOK( m_pcMbEncoder->getPredWeights( rcSH, LIST_1, afBwWeight,
pOrgFrame, rcRefFrameList1 ) );
RNOK( rcSH.getPredWeightTable( LIST_1).setWeights( afBwWeight, iLumaScale, iChromaScale ) );
}
RNOK( m_pcMbEncoder->getPredWeights( rcSH, LIST_0, afFwWeight, pOrgFrame, rcRefFrameList0 ) );
RNOK( rcSH.getPredWeightTable( LIST_0).setWeights( afFwWeight, iLumaScale, iChromaScale ) );
return Err::m_nOK;
}
示例7: switch
ErrVal
SampleWeighting::initSlice( const SliceHeader& rcSliceHeader )
{
if( rcSliceHeader.isIntraSlice() )
{
m_bWeightedPredDisableP = true;
m_bWeightedPredDisableB = true;
m_bExplicit = false;
return Err::m_nOK;
}
if( rcSliceHeader.isPSlice() )
{
m_bExplicit = rcSliceHeader.getPPS().getWeightedPredFlag();
m_bWeightedPredDisableP = ! m_bExplicit;
m_bWeightedPredDisableB = true;
if( m_bExplicit )
{
m_uiLumaLogWeightDenom = rcSliceHeader.getLumaLog2WeightDenom();
m_uiChromaLogWeightDenom = rcSliceHeader.getChromaLog2WeightDenom();
}
return Err::m_nOK;
}
if( rcSliceHeader.isBSlice() )
{
switch( rcSliceHeader.getPPS().getWeightedBiPredIdc() )
{
case 0:
{
m_bExplicit = false;
m_bWeightedPredDisableP = true;
m_bWeightedPredDisableB = true;
m_uiLumaLogWeightDenom = 0;
m_uiChromaLogWeightDenom = 0;
}
break;
case 1:
{
m_bExplicit = true;
m_bWeightedPredDisableP = false;
m_bWeightedPredDisableB = false;
m_uiLumaLogWeightDenom = rcSliceHeader.getLumaLog2WeightDenom();
m_uiChromaLogWeightDenom = rcSliceHeader.getChromaLog2WeightDenom();
}
break;
case 2:
{
m_bExplicit = false;
m_bWeightedPredDisableP = true;
m_bWeightedPredDisableB = false;
m_uiLumaLogWeightDenom = 5;
m_uiChromaLogWeightDenom = 5;
}
break;
default:
{
AF();
}
break;
}
}
return Err::m_nOK;
}