Changeset 1248 in SHVCSoftware for branches/SHM-dev
- Timestamp:
- 14 Jul 2015, 00:33:29 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp
r1246 r1248 454 454 else 455 455 { 456 if (edgeDir == EDGE_HOR)457 {458 pcCUP = pcCUQ->getPUAbove(uiPartP, uiPartQ, !pCtu->getSlice()->getLFCrossSliceBoundaryFlag(), false, !m_bLFCrossTileBoundary);459 }460 456 if (pcSlice->isInterB() || pcCUP->getSlice()->isInterB()) 461 457 { -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1246 r1248 1380 1380 } 1381 1381 1382 rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );1383 1382 Int orgQP = rpcTempCU->getQP( 0 ); 1384 1383 xCheckDQP( rpcTempCU ); … … 1443 1442 DEBUG_STRING_NEW(sTest) 1444 1443 1444 // prior to this, rpcTempCU will have just been reset using rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1445 1445 UChar uhDepth = rpcTempCU->getDepth( 0 ); 1446 1447 rpcTempCU->setDepthSubParts( uhDepth, 0 );1448 1449 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );1450 1446 1451 1447 rpcTempCU->setPartSizeSubParts ( ePartSize, 0, uhDepth ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1247 r1248 2275 2275 #endif 2276 2276 2277 for( Int i=0; i < numModesForFullRD; i++ ) 2277 for( Int i=0; i < numModesForFullRD; i++ ) 2278 2278 { 2279 2279 CandCostList[ i ] = MAX_DOUBLE; … … 2334 2334 pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode ); 2335 2335 #endif 2336 const Int numCand = ( iMode >= 0 ) ? iMode : Int(NUM_MOST_PROBABLE_MODES); 2336 const Int numCand = ( iMode >= 0 ) ? iMode : Int(NUM_MOST_PROBABLE_MODES); 2337 2337 2338 2338 for( Int j=0; j < numCand; j++) … … 4515 4515 UInt uiHeight = pcCU->getHeight( 0 ); 4516 4516 4517 // The pcCU is not marked as skip-mode at this point, and its coeffs and arlCoeffs will all be 0. 4518 // due to prior calls to TComDataCU::initEstData( ); 4519 4517 4520 // No residual coding : SKIP mode 4518 4521 if ( bSkipRes ) … … 4582 4585 } 4583 4586 4587 // TODO: there should be a check on the CU depth (but see to-do below regarding this feature) eg: 4588 // bHighPass = (bHighPass && pcCU->getDepth(0) <= pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()); 4584 4589 #if SVC_EXTENSION 4585 4590 qpMin = bHighPass ? Clip3( -pcCU->getSlice()->getQpBDOffsetY(), MAX_QP, pcCU->getQP(0) - m_iMaxDeltaQP ) : pcCU->getQP( 0 ); … … 4594 4599 TComTURecurse tuLevel0(pcCU, 0); 4595 4600 4596 for ( qp = qpMin; qp <= qpMax; qp++ ) 4601 for ( qp = qpMin; qp <= qpMax; qp++ ) // TODO: see the to-do below about this loop. 4597 4602 { 4598 4603 dCost = 0.; 4599 4604 uiBits = 0; 4600 4605 uiDistortion = 0; 4606 4607 // TODO: see the to-do below. eg: 4608 //if (qpMin != qpMax) 4609 //{ 4610 // pcCU->setQPSubParts(qp, 0, pcCU->getDepth(0)); 4611 // pcCU->setSkipFlagSubParts(false, 0, pcCU->getDepth(0)); 4612 //} 4601 4613 4602 4614 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ pcCU->getDepth( 0 ) ][ CI_CURR_BEST ] ); … … 4621 4633 } 4622 4634 4623 if ( dZeroCost < dCost ) 4635 const Bool bRootCbf=pcCU->getQtRootCbf(0)!=0; 4636 if ( dZeroCost < dCost || !bRootCbf ) 4624 4637 { 4625 4638 if ( dZeroCost < dCost ) … … 4634 4647 { 4635 4648 const ComponentID component = ComponentID(ch); 4636 const UInt componentShift = pcCU->getPic()->getComponentScaleX(component) + pcCU->getPic()->getComponentScaleY(component);4637 4649 ::memset( pcCU->getCbf( component ) , 0, uiQPartNum * sizeof(UChar) ); 4638 ::memset( pcCU->getCoeff(component), 0, (uiWidth*uiHeight*sizeof(TCoeff))>>componentShift ); 4650 if (qpMin != qpMax) // If there is only one iteration, then these will already be 0. 4651 { 4652 const UInt componentShift = pcCU->getPic()->getComponentScaleX(component) + pcCU->getPic()->getComponentScaleY(component); 4653 ::memset( pcCU->getCoeff(component), 0, (uiWidth*uiHeight*sizeof(TCoeff))>>componentShift ); 4654 #if ADAPTIVE_QP_SELECTION 4655 ::memset( pcCU->getArlCoeff(component), 0, (uiWidth*uiHeight*sizeof(TCoeff))>>componentShift ); 4656 #endif 4657 } 4639 4658 ::memset( pcCU->getCrossComponentPredictionAlpha(component), 0, ( uiQPartNum * sizeof(Char) ) ); 4640 4659 } … … 4706 4725 if( qpMin != qpMax && qpBest != qpMax ) 4707 4726 { 4727 // TODO: this code has never been used, the qp doesn't change the QP coded, and the following assert prevented this code running. 4728 // also, skip flag got stuck-on, as nothing cleared it. Recommend removing this. 4708 4729 assert( 0 ); // check 4709 4730 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ pcCU->getDepth( 0 ) ][ CI_TEMP_BEST ] ); … … 4724 4745 ::memcpy( pcCU->getCrossComponentPredictionAlpha(compID), m_phQTTempCrossComponentPredictionAlpha[compID], uiQPartNum * sizeof( Char ) ); 4725 4746 } 4747 // TODO: see to-do above. eg: 4748 // pcCU->setSkipFlagSubParts( (pcCU->getMergeFlag( 0 ) && pcCU->getPartitionSize( 0 ) == SIZE_2Nx2N && !pcCU->getQtRootCbf( 0 )), 0, pcCU->getDepth(0) ); 4726 4749 } 4727 4750 pcYuvRec->addClip ( pcYuvPred, pcYuvResiBest, 0, uiWidth ); … … 4741 4764 pcCU->getTotalCost() = dCostBest; 4742 4765 4743 if ( pcCU->isSkipped(0) ) 4744 { 4745 static const UInt cbfZero[MAX_NUM_COMPONENT]={0,0,0}; 4746 pcCU->setCbfSubParts( cbfZero, 0, pcCU->getDepth( 0 ) ); 4747 } 4748 4749 pcCU->setQPSubParts( qpBest, 0, pcCU->getDepth(0) ); 4766 if( qpMin != qpMax) // TODO: see to-do above 4767 { 4768 pcCU->setQPSubParts( qpBest, 0, pcCU->getDepth(0) ); 4769 } 4750 4770 } 4751 4771 … … 5475 5495 5476 5496 5477 Void TEncSearch::xSetResidualQTData( TComYuv* pcResi, Bool bSpatial, TComTU &rTu ) 5497 Void TEncSearch::xSetResidualQTData( TComYuv* pcResi, Bool bSpatial, TComTU &rTu ) // TODO: turn this into two functions for bSpatial=true and false. 5478 5498 { 5479 5499 TComDataCU* pcCU=rTu.getCU();
Note: See TracChangeset for help on using the changeset viewer.