Changeset 1290 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
- Timestamp:
- 18 Jul 2015, 01:59:29 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
r1287 r1290 441 441 { 442 442 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 443 const UInt log2DiffMaxMinCodingBlockSize = pcCU->getSlice()->getSPS()->getLog2DiffMaxMinCodingBlockSize(); 443 444 444 445 if ( pcCU->isIntra( uiAbsPartIdx ) ) 445 446 { 446 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth)447 if( uiDepth == log2DiffMaxMinCodingBlockSize ) 447 448 { 448 449 m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) ); … … 464 465 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 465 466 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 ) 467 468 { 468 469 if (eSize == SIZE_2NxN) … … 485 486 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 486 487 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 ) ) 488 489 { 489 490 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 490 491 } 491 492 492 if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth)493 if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) 493 494 { 494 495 if (eSize == SIZE_Nx2N) … … 506 507 case SIZE_NxN: 507 508 { 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 ) ) 509 510 { 510 511 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); … … 617 618 Void TEncSbac::codeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 618 619 { 619 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth)620 if( uiDepth == pcCU->getSlice()->getSPS()->getLog2DiffMaxMinCodingBlockSize() ) 620 621 { 621 622 return; … … 1194 1195 const UInt uiWidth=tuRect.width; 1195 1196 const UInt uiHeight=tuRect.height; 1197 const TComSPS &sps=*(pcCU->getSlice()->getSPS()); 1196 1198 1197 1199 DTRACE_CABAC_VL( g_nSymbolCounter++ ) … … 1225 1227 //-------------------------------------------------------------------------------------------------- 1226 1228 1227 if( uiWidth > m_pcSlice->getSPS()->getMaxTrSize() )1229 if( uiWidth > sps.getMaxTrSize() ) 1228 1230 { 1229 1231 std::cerr << "ERROR: codeCoeffNxN was passed a TU with dimensions larger than the maximum allowed size" << std::endl; … … 1251 1253 1252 1254 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); 1257 1259 1258 1260 Bool beValid; … … 1266 1268 uiIntraMode = pcCU->getIntraDir( toChannelType(compID), uiAbsPartIdx ); 1267 1269 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; 1269 1272 uiIntraMode = ((rTu.GetChromaFormat() == CHROMA_422) && !bIsLuma) ? g_chroma422IntraAngleMappingTable[uiIntraMode] : uiIntraMode; 1270 1273 } … … 1307 1310 //-------------------------------------------------------------------------------------------------- 1308 1311 1309 const Bool bUseGolombRiceParameterAdaptation = pcCU->getSlice()->getSPS()->getUseGolombRiceParameterAdaptation();1312 const Bool bUseGolombRiceParameterAdaptation = sps.getUseGolombRiceParameterAdaptation(); 1310 1313 UInt ¤tGolombRiceStatistic = m_golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)]; 1311 1314
Note: See TracChangeset for help on using the changeset viewer.