Ignore:
Timestamp:
18 Jul 2015, 01:59:29 (9 years ago)
Author:
seregin
Message:

port rev 4324 (g_uiMaxDepth, g_uiAddDepth)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp

    r1287 r1290  
    441441{
    442442  PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
     443  const UInt log2DiffMaxMinCodingBlockSize = pcCU->getSlice()->getSPS()->getLog2DiffMaxMinCodingBlockSize();
    443444
    444445  if ( pcCU->isIntra( uiAbsPartIdx ) )
    445446  {
    446     if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
     447    if( uiDepth == log2DiffMaxMinCodingBlockSize )
    447448    {
    448449      m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) );
     
    464465      m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) );
    465466      m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) );
    466       if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth )
     467      if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize )
    467468      {
    468469        if (eSize == SIZE_2NxN)
     
    485486      m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) );
    486487
    487       if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) )
     488      if( uiDepth == log2DiffMaxMinCodingBlockSize && !( pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) )
    488489      {
    489490        m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 2) );
    490491      }
    491492
    492       if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth )
     493      if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize )
    493494      {
    494495        if (eSize == SIZE_Nx2N)
     
    506507    case SIZE_NxN:
    507508    {
    508       if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) )
     509      if( uiDepth == log2DiffMaxMinCodingBlockSize && !( pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) )
    509510      {
    510511        m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) );
     
    617618Void TEncSbac::codeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    618619{
    619   if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
     620  if( uiDepth == pcCU->getSlice()->getSPS()->getLog2DiffMaxMinCodingBlockSize() )
    620621  {
    621622    return;
     
    11941195  const UInt uiWidth=tuRect.width;
    11951196  const UInt uiHeight=tuRect.height;
     1197  const TComSPS &sps=*(pcCU->getSlice()->getSPS());
    11961198
    11971199  DTRACE_CABAC_VL( g_nSymbolCounter++ )
     
    12251227  //--------------------------------------------------------------------------------------------------
    12261228
    1227   if( uiWidth > m_pcSlice->getSPS()->getMaxTrSize() )
     1229  if( uiWidth > sps.getMaxTrSize() )
    12281230  {
    12291231    std::cerr << "ERROR: codeCoeffNxN was passed a TU with dimensions larger than the maximum allowed size" << std::endl;
     
    12511253
    12521254  const ChannelType  channelType       = toChannelType(compID);
    1253   const Bool         extendedPrecision = pcCU->getSlice()->getSPS()->getUseExtendedPrecision();
    1254 
    1255   const Bool         alignCABACBeforeBypass = pcCU->getSlice()->getSPS()->getAlignCABACBeforeBypass();
    1256   const Int          maxLog2TrDynamicRange  = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(channelType);
     1255  const Bool         extendedPrecision = sps.getUseExtendedPrecision();
     1256
     1257  const Bool         alignCABACBeforeBypass = sps.getAlignCABACBeforeBypass();
     1258  const Int          maxLog2TrDynamicRange  = sps.getMaxLog2TrDynamicRange(channelType);
    12571259
    12581260  Bool beValid;
     
    12661268      uiIntraMode = pcCU->getIntraDir( toChannelType(compID), uiAbsPartIdx );
    12671269
    1268       uiIntraMode = (uiIntraMode==DM_CHROMA_IDX && !bIsLuma) ? pcCU->getIntraDir(CHANNEL_TYPE_LUMA, getChromasCorrespondingPULumaIdx(uiAbsPartIdx, rTu.GetChromaFormat())) : uiIntraMode;
     1270      const UInt partsPerMinCU = 1<<(2*(sps.getMaxTotalCUDepth() - sps.getLog2DiffMaxMinCodingBlockSize()));
     1271      uiIntraMode = (uiIntraMode==DM_CHROMA_IDX && !bIsLuma) ? pcCU->getIntraDir(CHANNEL_TYPE_LUMA, getChromasCorrespondingPULumaIdx(uiAbsPartIdx, rTu.GetChromaFormat(), partsPerMinCU)) : uiIntraMode;
    12691272      uiIntraMode = ((rTu.GetChromaFormat() == CHROMA_422) && !bIsLuma) ? g_chroma422IntraAngleMappingTable[uiIntraMode] : uiIntraMode;
    12701273    }
     
    13071310  //--------------------------------------------------------------------------------------------------
    13081311
    1309   const Bool  bUseGolombRiceParameterAdaptation = pcCU->getSlice()->getSPS()->getUseGolombRiceParameterAdaptation();
     1312  const Bool  bUseGolombRiceParameterAdaptation = sps.getUseGolombRiceParameterAdaptation();
    13101313        UInt &currentGolombRiceStatistic        = m_golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)];
    13111314
Note: See TracChangeset for help on using the changeset viewer.