本文整理汇总了C++中SliceHeader::getDependencyId方法的典型用法代码示例。如果您正苦于以下问题:C++ SliceHeader::getDependencyId方法的具体用法?C++ SliceHeader::getDependencyId怎么用?C++ SliceHeader::getDependencyId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SliceHeader
的用法示例。
在下文中一共展示了SliceHeader::getDependencyId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}