本文整理汇总了C++中TComSlice::getCabacInitFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ TComSlice::getCabacInitFlag方法的具体用法?C++ TComSlice::getCabacInitFlag怎么用?C++ TComSlice::getCabacInitFlag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TComSlice
的用法示例。
在下文中一共展示了TComSlice::getCabacInitFlag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: decompressSlice
//.........这里部分代码省略.........
{
// TR not available.
}
else
{
// TR is available, we use it.
pcSbacDecoders[uiSubStrm].loadContexts( &m_pcBufferSbacDecoders[uiTileCol] );
}
}
pcSbacDecoder->load(&pcSbacDecoders[uiSubStrm]); //this load is used to simplify the code (avoid to change all the call to pcSbacDecoders)
}
else if ( pcSlice->getPPS()->getNumSubstreams() <= 1 )
{
// Set variables to appropriate values to avoid later code change.
iNumSubstreamsPerTile = 1;
}
if ( (iCUAddr == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr()) && // 1st in tile.
(iCUAddr!=0) && (iCUAddr!=rpcPic->getPicSym()->getPicSCUAddr(rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getSliceCurStartCUAddr())/rpcPic->getNumPartInCU())
&& (iCUAddr!=rpcPic->getPicSym()->getPicSCUAddr(rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getSliceSegmentCurStartCUAddr())/rpcPic->getNumPartInCU())
) // !1st in frame && !1st in slice
{
if (pcSlice->getPPS()->getNumSubstreams() > 1)
{
// We're crossing into another tile, tiles are independent.
// When tiles are independent, we have "substreams per tile". Each substream has already been terminated, and we no longer
// have to perform it here.
// For TILES_DECODER, there can be a header at the start of the 1st substream in a tile. These are read when the substreams
// are extracted, not here.
}
else
{
SliceType sliceType = pcSlice->getSliceType();
if (pcSlice->getCabacInitFlag())
{
switch (sliceType)
{
case P_SLICE: // change initialization table to B_SLICE intialization
sliceType = B_SLICE;
break;
case B_SLICE: // change initialization table to P_SLICE intialization
sliceType = P_SLICE;
break;
default : // should not occur
assert(0);
}
}
m_pcEntropyDecoder->updateContextTables( sliceType, pcSlice->getSliceQp() );
}
}
#if ENC_DEC_TRACE
g_bJustDoIt = g_bEncDecTraceEnable;
#endif
if ( pcSlice->getSPS()->getUseSAO() && (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) )
{
SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam();
saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag();
if (iCUAddr == iStartCUAddr)
{
saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma();
}
Int numCuInWidth = saoParam->numCuInWidth;
Int cuAddrInSlice = iCUAddr - rpcPic->getPicSym()->getCUOrderMap(pcSlice->getSliceCurStartCUAddr()/rpcPic->getNumPartInCU());
Int cuAddrUpInSlice = cuAddrInSlice - numCuInWidth;
示例2: decompressSlice
//.........这里部分代码省略.........
)
{
// TR not available.
}
else
{
// TR is available, we use it.
pcSbacDecoders[uiSubStrm].loadContexts( &m_pcBufferSbacDecoders[uiTileCol] );
}
}
pcSbacDecoder->load(&pcSbacDecoders[uiSubStrm]); //this load is used to simplify the code (avoid to change all the call to pcSbacDecoders)
}
else if ( iSymbolMode && pcSlice->getPPS()->getNumSubstreams() <= 1 )
{
// Set variables to appropriate values to avoid later code change.
iNumSubstreamsPerTile = 1;
}
if ( (iCUAddr == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr()) && // 1st in tile.
(iCUAddr!=0) && (iCUAddr!=rpcPic->getPicSym()->getPicSCUAddr(rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getSliceCurStartCUAddr())/rpcPic->getNumPartInCU())) // !1st in frame && !1st in slice
{
if (pcSlice->getPPS()->getNumSubstreams() > 1)
{
// We're crossing into another tile, tiles are independent.
// When tiles are independent, we have "substreams per tile". Each substream has already been terminated, and we no longer
// have to perform it here.
// For TILES_DECODER, there can be a header at the start of the 1st substream in a tile. These are read when the substreams
// are extracted, not here.
}
else
{
#if CABAC_INIT_FLAG
SliceType sliceType = pcSlice->getSliceType();
if (pcSlice->getCabacInitFlag())
{
switch (sliceType)
{
case P_SLICE: // change initialization table to B_SLICE intialization
sliceType = B_SLICE;
break;
case B_SLICE: // change initialization table to P_SLICE intialization
sliceType = P_SLICE;
break;
default : // should not occur
assert(0);
}
}
m_pcEntropyDecoder->updateContextTables( sliceType, pcSlice->getSliceQp() );
#else
m_pcEntropyDecoder->updateContextTables( pcSlice->getSliceType(), pcSlice->getSliceQp() );
#endif
}
Bool bTileMarkerFoundFlag = false;
TComInputBitstream *pcTmpPtr;
pcTmpPtr = ppcSubstreams[uiSubStrm]; // for CABAC
for (UInt uiIdx=0; uiIdx<pcTmpPtr->getTileMarkerLocationCount(); uiIdx++)
{
if ( pcTmpPtr->getByteLocation() == (pcTmpPtr->getTileMarkerLocation( uiIdx )+2) )
{
bTileMarkerFoundFlag = true;
break;
}
}